Skip to content

fix: migrate subdomains to wallet key address #1226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85,837 changes: 44,672 additions & 41,165 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-node": "^11.1.0",
"inspectpack": "^4.7.1",
"lerna": "^4.0.0",
"lerna": "^5.1.8",
"madge": "^5.0.1",
"path-browserify": "^1.0.1",
"prettier": "^2.5.1",
Expand Down
8 changes: 7 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@scure/bip32": "^1.1.0",
"@scure/bip39": "^1.1.0",
"@stacks/auth": "^4.3.3",
"@stacks/blockchain-api-client": "^4.0.1",
"@stacks/blockchain-api-client": "4.0.1",
"@stacks/bns": "^4.3.3",
"@stacks/common": "^4.3.2",
"@stacks/encryption": "^4.3.3",
Expand Down Expand Up @@ -54,6 +54,7 @@
"@types/express-winston": "^3.0.1",
"@types/inquirer": "^6.5.0",
"@types/jest": "^26.0.22",
"@types/node": "^18.0.4",
"@types/node-fetch": "^2.5.0",
"@types/ripemd160": "^2.0.0",
"@types/wif": "^2.0.2",
Expand All @@ -65,6 +66,11 @@
"typescript": "^4.2.4",
"webpack-bundle-analyzer": "^4.5.0"
},
"overrides": {
"ajv": "6.12.3",
"nth-check": "2.0.1",
"schema-inspector": "2.0.1"
},
"publishConfig": {
"access": "public"
},
Expand Down
44 changes: 44 additions & 0 deletions packages/cli/src/argparse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1380,6 +1380,50 @@ export const CLI_ARGS = {
'\n',
group: 'Key Management',
},
migrate_subdomains: {
type: 'array',
items: [
{
name: 'backup_phrase',
type: 'string',
realtype: '24_words_or_ciphertext',
},
{
name: 'registrar_url',
type: 'string',
realtype: 'url',
},
],
minItems: 1,
maxItems: 2,
help:
'Enable users to transfer subdomains currently owned by any data-key \n' +
'addresses, to the wallet-key address of the account. Data-key addresses \n' +
'owning addresses is a remnant of the Blockstack Connect interface. \n' +
'Currently, the web wallet extension shows usernames owned by the \n' +
'wallet-key address of an account.\n' +
'\n' +
'This command performs these steps in sequence: \n' +
'1. Detects whether there are any subdomains owned by data-key addresses\n' +
'2. Prompts the user to confirm whether they want to migrate the each \n' +
' owned subdomain to the corresponding wallet-key addresses for the \n' +
' resepective wallet account\n' +
"3. Alerts the user to any subdomains that can't be migrated to these \n" +
' wallet-key addresses given collision with existing usernames owned \n' +
' by them\n' +
'4. Initiates a request to the subdomain registrar using the /transfer\n' +
' endpoint\n' +
'5. Displays a message indicating how long the user will have to wait \n' +
' until request is likely fulfilled\n' +
'6. Informs user that no subdomains are pending migration if the command \n' +
' is executed again\n' +
'\n' +
'Example\n' +
'\n' +
' $ stx migrate_subdomains "toast canal educate tissue express melody produce later gospel victory meadow outdoor hollow catch liberty annual gasp hat hello april equip thank neck cruise" https://registrar.stacks.co\n' +
'\n',
group: 'Blockstack ID Management',
},
get_zonefile: {
type: 'array',
items: [
Expand Down
Loading