diff --git a/.changeset/good-geese-laugh.md b/.changeset/good-geese-laugh.md new file mode 100644 index 0000000..bf2c712 --- /dev/null +++ b/.changeset/good-geese-laugh.md @@ -0,0 +1,5 @@ +--- +"@babylonlabs-io/bbn-wallet-connect": patch +--- + +Keystone wallet diff --git a/package-lock.json b/package-lock.json index aa7ad73..cdc7fd0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,8 +8,12 @@ "name": "@babylonlabs-io/bbn-wallet-connect", "version": "0.1.14", "dependencies": { + "@bitcoin-js/tiny-secp256k1-asmjs": "^2.2.3", "@cosmjs/stargate": "^0.32.4", "@keplr-wallet/types": "^0.12.156", + "@keystonehq/animated-qr": "^0.8.6", + "@keystonehq/keystone-sdk": "^0.4.1", + "@keystonehq/sdk": "^0.21.3", "buffer": "^6.0.3", "nanoevents": "^9.1.0" }, @@ -425,6 +429,24 @@ "yup": "^1.5.0" } }, + "node_modules/@bitcoin-js/tiny-secp256k1-asmjs": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@bitcoin-js/tiny-secp256k1-asmjs/-/tiny-secp256k1-asmjs-2.2.3.tgz", + "integrity": "sha512-arFPdEZi9RIiaG76OZswTnAU0KfuiLwGw2VNfD66LKhzlbfOnX1o1WI/GI3qm9UbjG/0QOzZu/KmTNvL79x/DQ==", + "license": "MIT", + "dependencies": { + "uint8array-tools": "0.0.7" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@bufbuild/protobuf": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.10.0.tgz", + "integrity": "sha512-QDdVFLoN93Zjg36NoQPZfsVH9tZew7wKDKyV5qRdj8ntT4wQCOradQjRaTdwMhWUYsgKsvCINKKm87FdEk96Ag==", + "license": "(Apache-2.0 AND BSD-3-Clause)" + }, "node_modules/@changesets/apply-release-plan": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-7.0.6.tgz", @@ -1616,9 +1638,9 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", "dev": true, "license": "MIT", "dependencies": { @@ -1680,6 +1702,677 @@ "starknet": "^6" } }, + "node_modules/@keystonehq/alias-sampling": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@keystonehq/alias-sampling/-/alias-sampling-0.1.2.tgz", + "integrity": "sha512-5ukLB3bcgltgaFfQfYKYwHDUbwHicekYo53fSEa7xhVkAEqsA74kxdIwoBIURmGUtXe3EVIRm4SYlgcrt2Ri0w==", + "license": "MIT" + }, + "node_modules/@keystonehq/animated-qr": { + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/@keystonehq/animated-qr/-/animated-qr-0.8.6.tgz", + "integrity": "sha512-qDJ79ckxi8J27hRncS5KaCe9OQJ8ZUMSOjQrPt8V5ZOEEeeAzsmKFa8eytW9Cq2j7VQhWrdEYlDmWqcfYc/2lg==", + "license": "MIT", + "dependencies": { + "@keystonehq/ur-decoder": "^0.12.2", + "@ngraveio/bc-ur": "^1.1.6", + "@zxing/browser": "^0.1.1", + "@zxing/library": "^0.19.1", + "qrcode.react": "^3.1.0" + }, + "peerDependencies": { + "react": ">= 16.8", + "react-dom": ">= 16.8" + } + }, + "node_modules/@keystonehq/animated-qr/node_modules/@zxing/library": { + "version": "0.19.3", + "resolved": "https://registry.npmjs.org/@zxing/library/-/library-0.19.3.tgz", + "integrity": "sha512-RUv5svewpDoD0ymXleOP8yVTO5BLkR0zn5coGC/Vs1671u0OBJ4xdtR8WVWf08OcvrieEMHdSfQY3ZKtqII/hg==", + "license": "MIT", + "dependencies": { + "ts-custom-error": "^3.2.1" + }, + "engines": { + "node": ">= 10.4.0" + }, + "optionalDependencies": { + "@zxing/text-encoding": "~0.9.0" + } + }, + "node_modules/@keystonehq/bc-ur-registry": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry/-/bc-ur-registry-0.6.4.tgz", + "integrity": "sha512-j8Uy44DuAkvYkbf0jMxRY3UizJfn8wsEQr7GS3miRF44vcq7k0/yemVkftbn3jQ+0JYaUXf5wY7lVpLhAeW5nQ==", + "license": "Apache-2.0", + "dependencies": { + "@ngraveio/bc-ur": "^1.1.5", + "bs58check": "^2.1.2", + "tslib": "^2.3.0" + } + }, + "node_modules/@keystonehq/bc-ur-registry-aptos": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry-aptos/-/bc-ur-registry-aptos-0.3.2.tgz", + "integrity": "sha512-ZQ+gsif+R5rF9fXpG9+atoj/o00iceo91uFw/zpXMZLmJgMIs9EcfM7SXrPmLm/KvMfigsYXPj1epTCg3GOSSg==", + "license": "ISC", + "dependencies": { + "@keystonehq/bc-ur-registry": "0.5.4", + "bs58check": "^2.1.2", + "uuid": "^8.3.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-aptos/node_modules/@keystonehq/bc-ur-registry": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry/-/bc-ur-registry-0.5.4.tgz", + "integrity": "sha512-z7bZe10I5k0zz9znmDTXh+o3Rzb5XsRVpwAzexubOaLxVdZ0F7aMbe2LoEsw766Hpox/7zARi7UGmLz5C8BAzA==", + "license": "Apache-2.0", + "dependencies": { + "@ngraveio/bc-ur": "^1.1.5", + "bs58check": "^2.1.2", + "tslib": "^2.3.0" + } + }, + "node_modules/@keystonehq/bc-ur-registry-aptos/node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/@keystonehq/bc-ur-registry-aptos/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-aptos/node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "license": "MIT", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-aptos/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@keystonehq/bc-ur-registry-arweave": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry-arweave/-/bc-ur-registry-arweave-0.4.0.tgz", + "integrity": "sha512-PDCYpOOHp1elRQeWutol4n5NE7Briv2K1ho70FrTbU7N7W8CEbUlRlEeb78cq/P0LtIuw6NR6byRrQQ36ZmPhw==", + "license": "ISC", + "dependencies": { + "@keystonehq/bc-ur-registry": "0.5.4", + "uuid": "^8.3.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-arweave/node_modules/@keystonehq/bc-ur-registry": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry/-/bc-ur-registry-0.5.4.tgz", + "integrity": "sha512-z7bZe10I5k0zz9znmDTXh+o3Rzb5XsRVpwAzexubOaLxVdZ0F7aMbe2LoEsw766Hpox/7zARi7UGmLz5C8BAzA==", + "license": "Apache-2.0", + "dependencies": { + "@ngraveio/bc-ur": "^1.1.5", + "bs58check": "^2.1.2", + "tslib": "^2.3.0" + } + }, + "node_modules/@keystonehq/bc-ur-registry-arweave/node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/@keystonehq/bc-ur-registry-arweave/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-arweave/node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "license": "MIT", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-arweave/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@keystonehq/bc-ur-registry-btc": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry-btc/-/bc-ur-registry-btc-0.1.1.tgz", + "integrity": "sha512-LdYqItY1Y/M6fWJNE6L0HYZbKL8CGVP6OigG7T/gJ+SWnOGgYXj3at02aV7b9qZ7iNwJPkNrqsIDN5eajQcZjQ==", + "license": "ISC", + "dependencies": { + "@keystonehq/bc-ur-registry": "^0.6.4", + "uuid": "^8.3.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-btc/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@keystonehq/bc-ur-registry-cardano": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry-cardano/-/bc-ur-registry-cardano-0.3.9.tgz", + "integrity": "sha512-moQtGVjRpzJmHBGxITjljKVE8b2wIC72/9UtuqIfeWWUz/gHWZ4zB0jrz+YgnNwhIizEKmydjtOHLSFrbUQ9VQ==", + "license": "ISC", + "dependencies": { + "@keystonehq/bc-ur-registry": "^0.6.4", + "uuid": "^8.3.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-cardano/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@keystonehq/bc-ur-registry-cosmos": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry-cosmos/-/bc-ur-registry-cosmos-0.2.2.tgz", + "integrity": "sha512-bZfjyDiAHv6d9Xt++3fbTDvvdSBJPAGphotStMy2wFbQFxdWww7IPZyPIFJwCeIcFTfapYpF/UsZ1xly40068Q==", + "license": "ISC", + "dependencies": { + "@keystonehq/bc-ur-registry": "0.5.4", + "bs58check": "^2.1.2", + "uuid": "^8.3.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-cosmos/node_modules/@keystonehq/bc-ur-registry": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry/-/bc-ur-registry-0.5.4.tgz", + "integrity": "sha512-z7bZe10I5k0zz9znmDTXh+o3Rzb5XsRVpwAzexubOaLxVdZ0F7aMbe2LoEsw766Hpox/7zARi7UGmLz5C8BAzA==", + "license": "Apache-2.0", + "dependencies": { + "@ngraveio/bc-ur": "^1.1.5", + "bs58check": "^2.1.2", + "tslib": "^2.3.0" + } + }, + "node_modules/@keystonehq/bc-ur-registry-cosmos/node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/@keystonehq/bc-ur-registry-cosmos/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-cosmos/node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "license": "MIT", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-cosmos/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@keystonehq/bc-ur-registry-eth": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry-eth/-/bc-ur-registry-eth-0.15.2.tgz", + "integrity": "sha512-M096p7RD4SfcU+EQOISa0eTGyr5+Ls4hKOx3pDVWu8Y3TlWZFgFE39ma+zLqKTzGjkt6Ita96dT2u2p4pZfyTA==", + "license": "ISC", + "dependencies": { + "@ethereumjs/util": "^8.0.0", + "@keystonehq/bc-ur-registry": "0.5.4", + "hdkey": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-eth/node_modules/@keystonehq/bc-ur-registry": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry/-/bc-ur-registry-0.5.4.tgz", + "integrity": "sha512-z7bZe10I5k0zz9znmDTXh+o3Rzb5XsRVpwAzexubOaLxVdZ0F7aMbe2LoEsw766Hpox/7zARi7UGmLz5C8BAzA==", + "license": "Apache-2.0", + "dependencies": { + "@ngraveio/bc-ur": "^1.1.5", + "bs58check": "^2.1.2", + "tslib": "^2.3.0" + } + }, + "node_modules/@keystonehq/bc-ur-registry-eth/node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/@keystonehq/bc-ur-registry-eth/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-eth/node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "license": "MIT", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-eth/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@keystonehq/bc-ur-registry-evm": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry-evm/-/bc-ur-registry-evm-0.5.3.tgz", + "integrity": "sha512-K3tmY1Y2SDImtSnCPFoASMBNernbN/ZRIIkp8iKegDeyHtaPbzfNIdaEL/wUHVoieTgTOUTwyWZspBvvbgrivw==", + "license": "ISC", + "dependencies": { + "@keystonehq/bc-ur-registry": "^0.6.4", + "bs58check": "^2.1.2", + "uuid": "^9.0.0" + } + }, + "node_modules/@keystonehq/bc-ur-registry-evm/node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/@keystonehq/bc-ur-registry-evm/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-evm/node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "license": "MIT", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-keystone": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry-keystone/-/bc-ur-registry-keystone-0.1.0.tgz", + "integrity": "sha512-ev9Vi5h+ewFmKCBVFoOgWmF17RuG31UQKmTXjByD0p2QxCrIOpa5XWGKEpxrfl7Y2ulLpAloVt3Oy9FY5g38bQ==", + "license": "ISC", + "dependencies": { + "@keystonehq/bc-ur-registry": "0.5.4" + } + }, + "node_modules/@keystonehq/bc-ur-registry-keystone/node_modules/@keystonehq/bc-ur-registry": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry/-/bc-ur-registry-0.5.4.tgz", + "integrity": "sha512-z7bZe10I5k0zz9znmDTXh+o3Rzb5XsRVpwAzexubOaLxVdZ0F7aMbe2LoEsw766Hpox/7zARi7UGmLz5C8BAzA==", + "license": "Apache-2.0", + "dependencies": { + "@ngraveio/bc-ur": "^1.1.5", + "bs58check": "^2.1.2", + "tslib": "^2.3.0" + } + }, + "node_modules/@keystonehq/bc-ur-registry-keystone/node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/@keystonehq/bc-ur-registry-keystone/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-keystone/node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "license": "MIT", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-near": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry-near/-/bc-ur-registry-near-0.8.0.tgz", + "integrity": "sha512-xyNTiTeSBqEpjvLlNR3DZKbP6P7+JALa8rgsO7+b9C2kUEdDmTQ6jEquD4V+zMS86AeT+GhGxnAvZWF+jaZMZA==", + "license": "ISC", + "dependencies": { + "@keystonehq/bc-ur-registry": "0.5.4", + "bs58check": "^2.1.2", + "uuid": "^8.3.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-near/node_modules/@keystonehq/bc-ur-registry": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry/-/bc-ur-registry-0.5.4.tgz", + "integrity": "sha512-z7bZe10I5k0zz9znmDTXh+o3Rzb5XsRVpwAzexubOaLxVdZ0F7aMbe2LoEsw766Hpox/7zARi7UGmLz5C8BAzA==", + "license": "Apache-2.0", + "dependencies": { + "@ngraveio/bc-ur": "^1.1.5", + "bs58check": "^2.1.2", + "tslib": "^2.3.0" + } + }, + "node_modules/@keystonehq/bc-ur-registry-near/node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/@keystonehq/bc-ur-registry-near/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-near/node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "license": "MIT", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-near/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@keystonehq/bc-ur-registry-sol": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry-sol/-/bc-ur-registry-sol-0.6.2.tgz", + "integrity": "sha512-iI+OvugXchZ1D1FXuagqd5MvPhgV/9QdojA+aTKzE9GYwdAkhRqaqC+ORH58mw32dZAtRttXwH0tJsBAZfQRKw==", + "license": "ISC", + "dependencies": { + "@keystonehq/bc-ur-registry": "0.5.4", + "bs58check": "^2.1.2", + "uuid": "^8.3.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-sol/node_modules/@keystonehq/bc-ur-registry": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry/-/bc-ur-registry-0.5.4.tgz", + "integrity": "sha512-z7bZe10I5k0zz9znmDTXh+o3Rzb5XsRVpwAzexubOaLxVdZ0F7aMbe2LoEsw766Hpox/7zARi7UGmLz5C8BAzA==", + "license": "Apache-2.0", + "dependencies": { + "@ngraveio/bc-ur": "^1.1.5", + "bs58check": "^2.1.2", + "tslib": "^2.3.0" + } + }, + "node_modules/@keystonehq/bc-ur-registry-sol/node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/@keystonehq/bc-ur-registry-sol/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-sol/node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "license": "MIT", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry-sol/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@keystonehq/bc-ur-registry-sui": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry-sui/-/bc-ur-registry-sui-0.3.1.tgz", + "integrity": "sha512-cbxu5AF5xFg9J3p0AXIkp1IMGSSNsaXWRgn22bcnkIlzwMEwmgJR5J/Lg45MIyIpW2p17fKyYqc9yuP0iMALEQ==", + "license": "ISC", + "dependencies": { + "@keystonehq/bc-ur-registry": "^0.6.4", + "uuid": "^9.0.0" + } + }, + "node_modules/@keystonehq/bc-ur-registry-ton": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry-ton/-/bc-ur-registry-ton-0.1.2.tgz", + "integrity": "sha512-m36/QODXTbkQQacM8vIopt5RvE/uc/f9f4Jc9VFxsxKWmld3aGwrMsLB1SBSva31kawikOVSMEWXhXlQ07UJhA==", + "license": "ISC", + "dependencies": { + "@keystonehq/bc-ur-registry": "^0.6.4", + "uuid": "^9.0.0" + } + }, + "node_modules/@keystonehq/bc-ur-registry/node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/@keystonehq/bc-ur-registry/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/@keystonehq/bc-ur-registry/node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "license": "MIT", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/@keystonehq/keystone-sdk": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@keystonehq/keystone-sdk/-/keystone-sdk-0.4.1.tgz", + "integrity": "sha512-f0vat1DYs3CpbN2KjtMF2ZGW5kSWTYQtLghCM8eErANTDk3Nk9R//NdKXUZC1LVRB3GUv6jJOy1Rbq+6sPsJ5Q==", + "license": "ISC", + "dependencies": { + "@bufbuild/protobuf": "^1.2.0", + "@keystonehq/bc-ur-registry": "^0.6.4", + "@keystonehq/bc-ur-registry-aptos": "^0.3.2", + "@keystonehq/bc-ur-registry-arweave": "^0.4.0", + "@keystonehq/bc-ur-registry-btc": "^0.1.0", + "@keystonehq/bc-ur-registry-cardano": "^0.3.0", + "@keystonehq/bc-ur-registry-cosmos": "^0.2.2", + "@keystonehq/bc-ur-registry-eth": "^0.15.2", + "@keystonehq/bc-ur-registry-evm": "^0.5.2", + "@keystonehq/bc-ur-registry-keystone": "^0.1.0", + "@keystonehq/bc-ur-registry-near": "^0.8.0", + "@keystonehq/bc-ur-registry-sol": "^0.6.2", + "@keystonehq/bc-ur-registry-sui": "^0.3.0", + "@keystonehq/bc-ur-registry-ton": "^0.1.0", + "@ngraveio/bc-ur": "^1.1.6", + "bs58check": "^3.0.1", + "pako": "^2.1.0", + "ripple-binary-codec": "^1.4.3", + "uuid": "^9.0.0" + } + }, + "node_modules/@keystonehq/sdk": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/@keystonehq/sdk/-/sdk-0.21.3.tgz", + "integrity": "sha512-Zdm44vKU8+rzKWnz/ITg3pERqjAOxlT5gHD4V8MMbq1NsDZQIc/z3UI+0Ru0H+0WSyqZAxPU6MoLvL9LBMlsSA==", + "license": "ISC", + "dependencies": { + "@ngraveio/bc-ur": "^1.0.0", + "@yudiel/react-qr-scanner": "2.0.0-beta.3", + "qrcode.react": "^3.1.0", + "react-modal": "^3.16.1", + "rxjs": "^6.6.3" + }, + "peerDependencies": { + "react": "^16 || ^17 || ^18", + "react-dom": "^16 || ^17 || ^18" + } + }, + "node_modules/@keystonehq/ur-decoder": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@keystonehq/ur-decoder/-/ur-decoder-0.12.2.tgz", + "integrity": "sha512-qFmNFR2fsk3YAs3bF6nFO2Ny79Cl0gaZC5S7fjzQPyClUxFL2OwuEYLBcFT+Q7n6mbInuH4rCBHU4UWXf3FKGg==", + "license": "ISC", + "dependencies": { + "@keystonehq/bc-ur-registry-eth": "^0.6.12", + "@ngraveio/bc-ur": "^1.1.6" + } + }, + "node_modules/@keystonehq/ur-decoder/node_modules/@keystonehq/bc-ur-registry": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry/-/bc-ur-registry-0.4.4.tgz", + "integrity": "sha512-SBdKdAZfp3y14GTGrKjfJJHf4iXObjcm4/qKUZ92lj8HVR8mxHHGmHksjE328bJPTAsJPloLix4rTnWg+qgS2w==", + "license": "Apache-2.0", + "dependencies": { + "@ngraveio/bc-ur": "^1.1.5", + "base58check": "^2.0.0", + "tslib": "^2.3.0" + } + }, + "node_modules/@keystonehq/ur-decoder/node_modules/@keystonehq/bc-ur-registry-eth": { + "version": "0.6.14", + "resolved": "https://registry.npmjs.org/@keystonehq/bc-ur-registry-eth/-/bc-ur-registry-eth-0.6.14.tgz", + "integrity": "sha512-Zr0VAUJuzz5zfH2263AucdWPUYuclpd93Pmi/VzbML72sQLv8l83kQWmQpI+7639uV5dHcOj6JnD8FhCPYPRFQ==", + "license": "ISC", + "dependencies": { + "@keystonehq/bc-ur-registry": "^0.4.4", + "ethereumjs-util": "^7.0.8", + "hdkey": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "node_modules/@keystonehq/ur-decoder/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@manypkg/find-root": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@manypkg/find-root/-/find-root-1.1.0.tgz", @@ -1934,12 +2627,26 @@ "dev": true, "license": "MIT" }, + "node_modules/@ngraveio/bc-ur": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/@ngraveio/bc-ur/-/bc-ur-1.1.13.tgz", + "integrity": "sha512-j73akJMV4+vLR2yQ4AphPIT5HZmxVjn/LxpL7YHoINnXoH6ccc90Zzck6/n6a3bCXOVZwBxq+YHwbAKRV+P8Zg==", + "license": "MIT", + "dependencies": { + "@keystonehq/alias-sampling": "^0.1.1", + "assert": "^2.0.0", + "bignumber.js": "^9.0.1", + "cbor-sync": "^1.0.4", + "crc": "^3.8.0", + "jsbi": "^3.1.5", + "sha.js": "^2.4.11" + } + }, "node_modules/@noble/curves": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", "license": "MIT", - "peer": true, "dependencies": { "@noble/hashes": "1.4.0" }, @@ -1952,7 +2659,6 @@ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", "license": "MIT", - "peer": true, "engines": { "node": ">= 16" }, @@ -2579,7 +3285,57 @@ "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", "license": "MIT", - "peer": true, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, "funding": { "url": "https://paulmillr.com/funding/" } @@ -3402,6 +4158,15 @@ "bitcoinjs-lib": "*" } }, + "node_modules/@types/bn.js": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", + "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/doctrine": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/@types/doctrine/-/doctrine-0.0.9.tgz", @@ -3452,6 +4217,15 @@ "undici-types": "~6.20.0" } }, + "node_modules/@types/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/prop-types": { "version": "15.7.14", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.14.tgz", @@ -3487,6 +4261,15 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/secp256k1": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.6.tgz", + "integrity": "sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==", + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/uuid": { "version": "9.0.8", "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", @@ -3939,6 +4722,69 @@ "dev": true, "license": "MIT" }, + "node_modules/@yudiel/react-qr-scanner": { + "version": "2.0.0-beta.3", + "resolved": "https://registry.npmjs.org/@yudiel/react-qr-scanner/-/react-qr-scanner-2.0.0-beta.3.tgz", + "integrity": "sha512-3zGssNoBXpSUdVmNPGhlyQS1V9snzKPlGk5JGOjNXPNUqVYjf/m8TTrU6cskPbL3dRUOGFctAs5rLeVB1UEhXw==", + "license": "MIT", + "dependencies": { + "@zxing/library": "^0.20.0" + }, + "peerDependencies": { + "react": "^18.2.0", + "react-dom": "^18.2.0" + } + }, + "node_modules/@yudiel/react-qr-scanner/node_modules/@zxing/library": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@zxing/library/-/library-0.20.0.tgz", + "integrity": "sha512-6Ev6rcqVjMakZFIDvbUf0dtpPGeZMTfyxYg4HkVWioWeN7cRcnUWT3bU6sdohc82O1nPXcjq6WiGfXX2Pnit6A==", + "license": "MIT", + "dependencies": { + "ts-custom-error": "^3.2.1" + }, + "engines": { + "node": ">= 10.4.0" + }, + "optionalDependencies": { + "@zxing/text-encoding": "~0.9.0" + } + }, + "node_modules/@zxing/browser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@zxing/browser/-/browser-0.1.5.tgz", + "integrity": "sha512-4Lmrn/il4+UNb87Gk8h1iWnhj39TASEHpd91CwwSJtY5u+wa0iH9qS0wNLAWbNVYXR66WmT5uiMhZ7oVTrKfxw==", + "license": "MIT", + "optionalDependencies": { + "@zxing/text-encoding": "^0.9.0" + }, + "peerDependencies": { + "@zxing/library": "^0.21.0" + } + }, + "node_modules/@zxing/library": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/@zxing/library/-/library-0.21.3.tgz", + "integrity": "sha512-hZHqFe2JyH/ZxviJZosZjV+2s6EDSY0O24R+FQmlWZBZXP9IqMo7S3nb3+2LBWxodJQkSurdQGnqE7KXqrYgow==", + "license": "MIT", + "peer": true, + "dependencies": { + "ts-custom-error": "^3.2.1" + }, + "engines": { + "node": ">= 10.4.0" + }, + "optionalDependencies": { + "@zxing/text-encoding": "~0.9.0" + } + }, + "node_modules/@zxing/text-encoding": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@zxing/text-encoding/-/text-encoding-0.9.0.tgz", + "integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==", + "license": "(Unlicense OR Apache-2.0)", + "optional": true + }, "node_modules/abi-wan-kanabi": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/abi-wan-kanabi/-/abi-wan-kanabi-2.2.3.tgz", @@ -4333,7 +5179,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz", "integrity": "sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.2", @@ -4414,7 +5259,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, "license": "MIT", "dependencies": { "possible-typed-array-names": "^1.0.0" @@ -4448,9 +5292,32 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==", - "dev": true, "license": "MIT" }, + "node_modules/base58check": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base58check/-/base58check-2.0.0.tgz", + "integrity": "sha512-sTzsDAOC9+i2Ukr3p1Ie2DWpD117ua+vBJRDnpsSlScGwImeeiTg/IatwcFLsz9K9wEGoBLVd5ahNZzrZ/jZyg==", + "license": "MIT", + "dependencies": { + "bs58": "^3.0.0" + } + }, + "node_modules/base58check/node_modules/base-x": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-1.1.0.tgz", + "integrity": "sha512-c0WLeG3K5OlL4Skz2/LVdS+MjggByKhowxQpG+JpCLA48s/bGwIDyzA1naFjywtNvp/37fLK0p0FpjTNNLLUXQ==", + "license": "MIT" + }, + "node_modules/base58check/node_modules/bs58": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-3.1.0.tgz", + "integrity": "sha512-9C2bRFTGy3meqO65O9jLvVTyawvhLVp4h2ECm5KlRPuV5KPDNJZcJIj3gl+aA0ENXcYrUSLCkPAeqbTcI2uWyQ==", + "license": "MIT", + "dependencies": { + "base-x": "^1.1.0" + } + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -4503,6 +5370,24 @@ "node": ">=4" } }, + "node_modules/big-integer": { + "version": "1.6.52", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", + "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", + "license": "Unlicense", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -4551,6 +5436,12 @@ "dev": true, "license": "MIT" }, + "node_modules/blakejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==", + "license": "MIT" + }, "node_modules/bn.js": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", @@ -4607,7 +5498,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, "license": "MIT", "dependencies": { "buffer-xor": "^1.0.3", @@ -4680,6 +5570,20 @@ "node": ">= 0.12" } }, + "node_modules/browserify-sign/node_modules/hash-base": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.5.tgz", + "integrity": "sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/browserify-sign/node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -4781,7 +5685,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", - "dev": true, "license": "MIT", "dependencies": { "base-x": "^4.0.0" @@ -4791,7 +5694,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-3.0.1.tgz", "integrity": "sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==", - "dev": true, "license": "MIT", "dependencies": { "@noble/hashes": "^1.2.0", @@ -4826,7 +5728,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", - "dev": true, "license": "MIT" }, "node_modules/builtin-status-codes": { @@ -4840,7 +5741,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", - "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.0", @@ -4859,7 +5759,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", - "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -4869,6 +5768,23 @@ "node": ">= 0.4" } }, + "node_modules/call-bound": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.2.tgz", + "integrity": "sha512-0lk0PHFe/uz0vl527fG9CgdE9WdafjDbCXvBbs+LUv000TVt2Jjhqbs4Jwm8gz070w8xXyEAxrPOMullsxXeGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "get-intrinsic": "^1.2.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -4924,6 +5840,12 @@ "cdl": "bin/cdl.js" } }, + "node_modules/cbor-sync": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cbor-sync/-/cbor-sync-1.0.4.tgz", + "integrity": "sha512-GWlXN4wiz0vdWWXBU71Dvc1q3aBo0HytqwAZnXF1wOwjqNnDWA1vZ1gDMFLlqohak31VQzmhiYfiCX5QSSfagA==", + "license": "MIT" + }, "node_modules/chai": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/chai/-/chai-5.1.2.tgz", @@ -5057,7 +5979,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.6.tgz", "integrity": "sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==", - "dev": true, "license": "MIT", "dependencies": { "inherits": "^2.0.4", @@ -5286,6 +6207,39 @@ "integrity": "sha512-MN/yUe6mkJwHnCFfsNPeCfXVhyxHYW6c/xDUzrSbBycYzw++XvWDMJArXp2pLdgD6FQ8DW79vkPjeNKVrXaHeQ==", "license": "Apache-2.0" }, + "node_modules/crc": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz", + "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==", + "license": "MIT", + "dependencies": { + "buffer": "^5.1.0" + } + }, + "node_modules/crc/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/create-ecdh": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", @@ -5308,7 +6262,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, "license": "MIT", "dependencies": { "cipher-base": "^1.0.1", @@ -5322,7 +6275,6 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, "license": "MIT", "dependencies": { "cipher-base": "^1.0.3", @@ -5382,6 +6334,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/crypto-browserify/node_modules/hash-base": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.5.tgz", + "integrity": "sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/css.escape": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", @@ -5488,6 +6454,12 @@ } } }, + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "license": "MIT" + }, "node_modules/deep-eql": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", @@ -5672,7 +6644,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.0.tgz", "integrity": "sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A==", - "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.0", @@ -6418,14 +7389,106 @@ "dev": true, "license": "MIT" }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "license": "MIT", + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/ethereum-cryptography/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ethereumjs-util": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", + "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", + "license": "MPL-2.0", + "dependencies": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/ethereumjs-util/node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ethereumjs-util/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/ethereumjs-util/node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "license": "MIT", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/ethereumjs-util/node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "license": "MIT", + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" } }, "node_modules/eventemitter3": { @@ -6449,7 +7512,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, "license": "MIT", "dependencies": { "md5.js": "^1.3.4", @@ -6480,6 +7542,12 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw==", + "license": "BSD-3-Clause" + }, "node_modules/extendable-error": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz", @@ -6676,7 +7744,6 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, "license": "MIT", "dependencies": { "is-callable": "^1.1.3" @@ -6771,7 +7838,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6843,7 +7909,6 @@ "version": "1.2.5", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.5.tgz", "integrity": "sha512-Y4+pKa7XeRUPWFNvOOYHkRYrfzW07oraURSvjDmRVOJ748OrVmeXtpE4+GCEHncjCjkTxPNRt8kEbxDhsn6VTg==", - "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.0", @@ -7090,7 +8155,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -7103,7 +8167,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, "license": "MIT", "dependencies": { "has-symbols": "^1.0.3" @@ -7116,17 +8179,17 @@ } }, "node_modules/hash-base": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.5.tgz", - "integrity": "sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg==", - "dev": true, + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "license": "MIT", "dependencies": { "inherits": "^2.0.4", - "safe-buffer": "^5.2.1" + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" }, "engines": { - "node": ">= 0.10" + "node": ">=4" } }, "node_modules/hash.js": { @@ -7143,7 +8206,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -7152,6 +8214,47 @@ "node": ">= 0.4" } }, + "node_modules/hdkey": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hdkey/-/hdkey-2.1.0.tgz", + "integrity": "sha512-i9Wzi0Dy49bNS4tXXeGeu0vIcn86xXdPQUpEYg+SO1YiO8HtomjmmRMaRyqL0r59QfcD4PfVbSF3qmsWFwAemA==", + "license": "MIT", + "dependencies": { + "bs58check": "^2.1.2", + "ripemd160": "^2.0.2", + "safe-buffer": "^5.1.1", + "secp256k1": "^4.0.0" + } + }, + "node_modules/hdkey/node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/hdkey/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/hdkey/node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "license": "MIT", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -7338,7 +8441,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.2", @@ -7434,7 +8536,6 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -7550,7 +8651,6 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" @@ -7592,7 +8692,6 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.0", @@ -7758,7 +8857,6 @@ "version": "1.1.13", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", - "dev": true, "license": "MIT", "dependencies": { "which-typed-array": "^1.1.14" @@ -7933,6 +9031,12 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsbi": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/jsbi/-/jsbi-3.2.5.tgz", + "integrity": "sha512-aBE4n43IPvjaddScbvWRA2YlTzKEynHzu7MqOyTipdHucf/VxS63ViCjxYRg86M8Rxwbt/GfzHl1kKERkt45fQ==", + "license": "Apache-2.0" + }, "node_modules/jsdoc-type-pratt-parser": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.1.0.tgz", @@ -8011,6 +9115,27 @@ "node": ">= 10.0.0" } }, + "node_modules/keccak": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", + "integrity": "sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/keccak/node_modules/node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", + "license": "MIT" + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -8326,7 +9451,6 @@ "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, "license": "MIT", "dependencies": { "hash-base": "^3.0.0", @@ -8361,6 +9485,12 @@ "node": ">= 8" } }, + "node_modules/micro-ftch": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", + "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", + "license": "MIT" + }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -8595,6 +9725,12 @@ "dev": true, "license": "MIT" }, + "node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==", + "license": "MIT" + }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -8616,6 +9752,17 @@ } } }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, "node_modules/node-releases": { "version": "2.0.19", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", @@ -8747,7 +9894,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -8780,7 +9926,6 @@ "version": "1.1.6", "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.7", @@ -8806,7 +9951,6 @@ "version": "4.1.5", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.5", @@ -9029,8 +10173,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", - "license": "(MIT AND Zlib)", - "peer": true + "license": "(MIT AND Zlib)" }, "node_modules/parent-module": { "version": "1.0.1", @@ -9063,6 +10206,20 @@ "node": ">= 0.10" } }, + "node_modules/parse-asn1/node_modules/hash-base": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.5.tgz", + "integrity": "sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", @@ -9152,7 +10309,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dev": true, "license": "MIT", "dependencies": { "create-hash": "^1.1.2", @@ -9325,7 +10481,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -9730,6 +10885,15 @@ "node": ">=6" } }, + "node_modules/qrcode.react": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/qrcode.react/-/qrcode.react-3.2.0.tgz", + "integrity": "sha512-YietHHltOHA4+l5na1srdaMx4sVSOjV9tamHs+mwiLWAMr6QVACRUw1Neax5CptFILcNoITctJY0Ipyn5enQ8g==", + "license": "ISC", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/qs": { "version": "6.13.1", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.1.tgz", @@ -9787,7 +10951,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" @@ -9920,6 +11083,31 @@ "dev": true, "license": "MIT" }, + "node_modules/react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==", + "license": "MIT" + }, + "node_modules/react-modal": { + "version": "3.16.1", + "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.16.1.tgz", + "integrity": "sha512-VStHgI3BVcGo7OXczvnJN7yT2TWHJPDXZWyI/a0ssFNhGZWsPmB8cF0z33ewDXq4VfYMO1vXgiv/g8Nj9NDyWg==", + "license": "MIT", + "dependencies": { + "exenv": "^1.2.0", + "prop-types": "^15.7.2", + "react-lifecycles-compat": "^3.0.0", + "warning": "^4.0.3" + }, + "engines": { + "node": ">=8" + }, + "peerDependencies": { + "react": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18", + "react-dom": "^0.14.0 || ^15.0.0 || ^16 || ^17 || ^18" + } + }, "node_modules/react-popper": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-2.3.0.tgz", @@ -9986,7 +11174,6 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, "license": "MIT", "dependencies": { "inherits": "^2.0.3", @@ -10242,13 +11429,63 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, "license": "MIT", "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1" } }, + "node_modules/ripple-address-codec": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-4.3.1.tgz", + "integrity": "sha512-Qa3+9wKVvpL/xYtT6+wANsn0A1QcC5CT6IMZbRJZ/1lGt7gmwIfsrCuz1X0+LCEO7zgb+3UT1I1dc0k/5dwKQQ==", + "license": "ISC", + "dependencies": { + "base-x": "^3.0.9", + "create-hash": "^1.1.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/ripple-address-codec/node_modules/base-x": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ripple-binary-codec": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/ripple-binary-codec/-/ripple-binary-codec-1.11.0.tgz", + "integrity": "sha512-g7+gs3T+NfoeW6vIq5dcN0CkIT4t/zwRzFxz8X2RzfbrWRnewPUKqQbmBgs05tXLX5NuWPaneiaAVpFpYBcdfw==", + "license": "ISC", + "dependencies": { + "assert": "^2.0.0", + "big-integer": "^1.6.48", + "buffer": "6.0.3", + "create-hash": "^1.2.0", + "decimal.js": "^10.2.0", + "ripple-address-codec": "^4.3.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/rlp": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", + "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", + "license": "MPL-2.0", + "dependencies": { + "bn.js": "^5.2.0" + }, + "bin": { + "rlp": "bin/rlp" + } + }, "node_modules/rollup": { "version": "4.28.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.28.1.tgz", @@ -10312,6 +11549,24 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/rxjs/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "license": "0BSD" + }, "node_modules/safe-array-concat": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", @@ -10335,7 +11590,6 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, "funding": [ { "type": "github", @@ -10386,6 +11640,27 @@ "loose-envify": "^1.1.0" } }, + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "license": "MIT" + }, + "node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", @@ -10410,7 +11685,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", @@ -10444,14 +11718,12 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "dev": true, "license": "MIT" }, "node_modules/sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, "license": "(MIT AND BSD-3-Clause)", "dependencies": { "inherits": "^2.0.1", @@ -10485,16 +11757,73 @@ } }, "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -10696,7 +12025,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" @@ -10777,16 +12105,19 @@ } }, "node_modules/string.prototype.trim": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", - "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-object-atoms": "^1.0.0" + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -10796,16 +12127,20 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", - "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -11200,6 +12535,15 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-custom-error": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/ts-custom-error/-/ts-custom-error-3.3.1.tgz", + "integrity": "sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/ts-dedent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", @@ -11243,7 +12587,6 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, "license": "0BSD" }, "node_modules/tty-browserify": { @@ -11414,6 +12757,15 @@ "dev": true, "license": "MIT" }, + "node_modules/uint8array-tools": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/uint8array-tools/-/uint8array-tools-0.0.7.tgz", + "integrity": "sha512-vrrNZJiusLWoFWBqz5Y5KMCgP9W9hnjZHzZiZRT8oNAkq3d5Z5Oe76jAvVVSRh4U8GGR90N2X1dWtrhvx6L8UQ==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -11544,7 +12896,6 @@ "version": "0.12.5", "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "dev": true, "license": "MIT", "dependencies": { "inherits": "^2.0.3", @@ -11558,14 +12909,12 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true, "license": "MIT" }, "node_modules/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "dev": true, "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" @@ -12141,7 +13490,6 @@ "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", "license": "MIT", - "peer": true, "dependencies": { "loose-envify": "^1.0.0" } @@ -12265,7 +13613,6 @@ "version": "1.1.16", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.16.tgz", "integrity": "sha512-g+N+GAWiRj66DngFwHvISJd+ITsyphZvD1vChfVg6cEdnzy53GzB3oy0fUNlvhz7H7+MiqhYr26qxQShCpKTTQ==", - "dev": true, "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", diff --git a/package.json b/package.json index 8f69840..efd049c 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,12 @@ "release": "npm run build && changeset publish" }, "dependencies": { + "@bitcoin-js/tiny-secp256k1-asmjs": "^2.2.3", "@cosmjs/stargate": "^0.32.4", "@keplr-wallet/types": "^0.12.156", + "@keystonehq/animated-qr": "^0.8.6", + "@keystonehq/keystone-sdk": "^0.4.1", + "@keystonehq/sdk": "^0.21.3", "buffer": "^6.0.3", "nanoevents": "^9.1.0" }, diff --git a/src/components/Chains/index.stories.ts b/src/components/Chains/index.stories.ts index 637ba32..dfa96cf 100644 --- a/src/components/Chains/index.stories.ts +++ b/src/components/Chains/index.stories.ts @@ -27,6 +27,7 @@ export const Default: Story = { docs: "", provider: null, account: null, + label: "Installed", }, ], }, @@ -41,6 +42,7 @@ export const Default: Story = { docs: "", provider: null, account: null, + label: "Installed", }, }, className: "b-h-[600px]", diff --git a/src/components/Wallets/index.stories.tsx b/src/components/Wallets/index.stories.tsx index cdc3ceb..22ac99e 100644 --- a/src/components/Wallets/index.stories.tsx +++ b/src/components/Wallets/index.stories.tsx @@ -2,6 +2,7 @@ import { Text } from "@babylonlabs-io/bbn-core-ui"; import type { Meta, StoryObj } from "@storybook/react"; import { WalletButton } from "@/components/WalletButton"; +import { IWallet } from "@/core/types"; import { Wallets } from "./index"; @@ -14,7 +15,7 @@ export default meta; type Story = StoryObj; -const wallets = [ +const wallets: IWallet[] = [ { id: "injectable", name: "Binance (Browser)", @@ -23,6 +24,7 @@ const wallets = [ docs: "", provider: null, account: null, + label: "Injected", }, { id: "okx", @@ -32,6 +34,7 @@ const wallets = [ docs: "", provider: null, account: null, + label: "Installed", }, { id: "keystone", @@ -41,6 +44,7 @@ const wallets = [ docs: "", provider: null, account: null, + label: "Hardware wallet", }, ]; diff --git a/src/components/Wallets/index.tsx b/src/components/Wallets/index.tsx index 55d0947..1d9546a 100644 --- a/src/components/Wallets/index.tsx +++ b/src/components/Wallets/index.tsx @@ -37,7 +37,7 @@ export const Wallets = memo(({ chain, className, append, onClose, onBack, onSele onSelectWallet?.(chain, injectableWallet)} /> )} @@ -47,7 +47,7 @@ export const Wallets = memo(({ chain, className, append, onClose, onBack, onSele key={wallet.id} name={wallet.name} logo={wallet.icon} - label={wallet.installed ? "Installed" : ""} + label={wallet.label} onClick={() => onSelectWallet?.(chain, wallet)} /> ))} diff --git a/src/core/Wallet.ts b/src/core/Wallet.ts index 11e3a48..4f9bea6 100644 --- a/src/core/Wallet.ts +++ b/src/core/Wallet.ts @@ -8,6 +8,7 @@ export interface WalletOptions

{ networks: Network[]; origin: any; provider: P | null; + label?: string; } export class Wallet

implements IWallet { @@ -18,9 +19,10 @@ export class Wallet

implements IWallet { readonly docs: string; readonly networks: Network[]; readonly provider: P | null = null; + private readonly _label?: string; account: Account | null = null; - constructor({ id, origin, name, icon, docs, networks, provider }: WalletOptions

) { + constructor({ id, origin, name, icon, docs, networks, provider, label }: WalletOptions

) { this.id = id; this.origin = origin; this.name = name; @@ -28,12 +30,17 @@ export class Wallet

implements IWallet { this.docs = docs; this.networks = networks; this.provider = provider; + this._label = label; } get installed() { return Boolean(this.provider); } + get label() { + return this._label ?? (this.installed ? "Installed" : ""); + } + async connect() { if (!this.provider) { throw Error("Provider not found"); diff --git a/src/core/index.ts b/src/core/index.ts index 38c220b..0334abf 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -13,6 +13,7 @@ export const createWallet = async

(metadata: WalletMetad docs = "", networks = [], createProvider, + label, } = metadata; const options: WalletOptions

= { @@ -23,6 +24,7 @@ export const createWallet = async

(metadata: WalletMetad provider: null, docs, networks, + label, }; if (walletGetter) { diff --git a/src/core/types.ts b/src/core/types.ts index 8c54046..495a393 100644 --- a/src/core/types.ts +++ b/src/core/types.ts @@ -73,6 +73,7 @@ export interface IWallet

{ installed: boolean; provider: P | null; account: Account | null; + label: string; } export interface IChain { @@ -96,6 +97,7 @@ export interface Account { export interface WalletMetadata

{ id: string; wallet?: string | ((context: any, config: C) => any); + label?: string; name: string | ((wallet: any, config: C) => Promise); icon: string | ((wallet: any, config: C) => Promise); docs: string; diff --git a/src/core/utils/bip322.ts b/src/core/utils/bip322.ts new file mode 100644 index 0000000..5ca981c --- /dev/null +++ b/src/core/utils/bip322.ts @@ -0,0 +1,133 @@ +import * as bitcoin from "bitcoinjs-lib"; + +/** + * https://github.com/ACken2/bip322-js/blob/main/src/BIP322.ts + * use the existing the bip322-js file with some modification, use the file directly instead of install the whole package, + * because the package will introduce too many dependencies. + * Class that handles BIP-322 related operations. + */ +class BIP322 { + // BIP322 message tag + static TAG = Buffer.from("BIP0322-signed-message"); + + /** + * Compute the message hash as specified in the BIP-322. + * The standard is specified in BIP-340 as: + * The function hashtag(x) where tag is a UTF-8 encoded tag name and x is a byte array returns the 32-byte hash SHA256(SHA256(tag) || SHA256(tag) || x). + * @param message Message to be hashed + * @returns Hashed message + */ + public static hashMessage(message: string): Buffer { + // Compute the message hash - SHA256(SHA256(tag) || SHA256(tag) || message) + const { sha256 } = bitcoin.crypto; + const tagHash = sha256(this.TAG); + const result = sha256(Buffer.concat([tagHash, tagHash, Buffer.from(message)])); + return result; + } + + /** + * Build a to_spend transaction using simple signature in accordance to the BIP-322. + * @param message Message to be signed using BIP-322 + * @param scriptPublicKey The script public key for the signing wallet + * @returns Bitcoin transaction that correspond to the to_spend transaction + */ + public static buildToSpendTx(message: string, scriptPublicKey: Buffer): bitcoin.Transaction { + // Create PSBT object for constructing the transaction + const psbt = new bitcoin.Psbt(); + // Set default value for nVersion and nLockTime + psbt.setVersion(0); // nVersion = 0 + psbt.setLocktime(0); // nLockTime = 0 + // Compute the message hash - SHA256(SHA256(tag) || SHA256(tag) || message) + const messageHash = this.hashMessage(message); + // Construct the scriptSig - OP_0 PUSH32[ message_hash ] + const OP_0_CODE = 0x00; // OP_0 + const PUSH32_CODE = 0x20; // PUSH32 + const scriptSigPartOne = new Uint8Array([OP_0_CODE, PUSH32_CODE]); // OP_0 PUSH32 + const scriptSig = new Uint8Array(scriptSigPartOne.length + messageHash.length); + scriptSig.set(scriptSigPartOne); + scriptSig.set(messageHash, scriptSigPartOne.length); + // Set the input + psbt.addInput({ + hash: "0".repeat(64), // vin[0].prevout.hash = 0000...000 + index: 0xffffffff, // vin[0].prevout.n = 0xFFFFFFFF + sequence: 0, // vin[0].nSequence = 0 + finalScriptSig: Buffer.from(scriptSig), // vin[0].scriptSig = OP_0 PUSH32[ message_hash ] + witnessScript: Buffer.from([]), // vin[0].scriptWitness = [] + }); + // Set the output + psbt.addOutput({ + value: 0, // vout[0].nValue = 0 + script: scriptPublicKey, // vout[0].scriptPubKey = message_challenge + }); + // Return transaction + return psbt.extractTransaction(); + } + + /** + * Build a to_sign transaction using simple signature in accordance to the BIP-322. + * @param toSpendTxId Transaction ID of the to_spend transaction as constructed by buildToSpendTx + * @param witnessScript The script public key for the signing wallet, or the redeemScript for P2SH-P2WPKH address + * @param isRedeemScript Set to true if the provided witnessScript is a redeemScript for P2SH-P2WPKH address, default to false + * @param tapInternalKey Used to set the taproot internal public key of a taproot signing address when provided, default to undefined + * @returns Ready-to-be-signed bitcoinjs.Psbt transaction + */ + public static buildToSignTx( + toSpendTxId: string, + witnessScript: Buffer, + isRedeemScript: boolean = false, + tapInternalKey?: Buffer, + ): bitcoin.Psbt { + // Create PSBT object for constructing the transaction + const psbt = new bitcoin.Psbt(); + // Set default value for nVersion and nLockTime + psbt.setVersion(0); // nVersion = 0 + psbt.setLocktime(0); // nLockTime = 0 + // Set the input + psbt.addInput({ + hash: toSpendTxId, // vin[0].prevout.hash = to_spend.txid + index: 0, // vin[0].prevout.n = 0 + sequence: 0, // vin[0].nSequence = 0 + witnessUtxo: { + script: witnessScript, + value: 0, + }, + }); + // Set redeemScript as witnessScript if isRedeemScript + if (isRedeemScript) { + psbt.updateInput(0, { + redeemScript: witnessScript, + }); + } + // Set tapInternalKey if provided + if (tapInternalKey) { + psbt.updateInput(0, { + tapInternalKey: tapInternalKey, + }); + } + // Set the output + const OP_RETURN_CODE = 0x6a; // OP_RETURN + psbt.addOutput({ + value: 0, // vout[0].nValue = 0 + script: Buffer.from([OP_RETURN_CODE]), // vout[0].scriptPubKey = OP_RETURN + }); + return psbt; + } + + /** + * Encode witness stack in a signed BIP-322 PSBT into its base-64 encoded format. + * @param signedPsbt Signed PSBT + * @returns Base-64 encoded witness data + */ + public static encodeWitness(signedPsbt: bitcoin.Psbt): string { + // Obtain the signed witness data + const witness = signedPsbt.data.inputs[0].finalScriptWitness; + // Check if the witness data is present + if (!witness) { + throw new Error("Cannot encode empty witness stack."); + } + // Return the base-64 encoded witness stack + return witness.toString("base64"); + } +} + +export default BIP322; diff --git a/src/core/utils/wallet.ts b/src/core/utils/wallet.ts index 9289faf..de34ab9 100644 --- a/src/core/utils/wallet.ts +++ b/src/core/utils/wallet.ts @@ -1,3 +1,5 @@ +import { networks } from "bitcoinjs-lib"; + import { Network } from "@/core/types"; export function validateAddress(network: Network, address: string): void { @@ -9,3 +11,15 @@ export function validateAddress(network: Network, address: string): void { throw new Error(`Unsupported network: ${network}. Please provide a valid network.`); } } + +export const toNetwork = (network: Network): networks.Network => { + switch (network) { + case Network.MAINNET: + return networks.bitcoin; + case Network.TESTNET: + case Network.SIGNET: + return networks.testnet; + default: + throw new Error("Unsupported network"); + } +}; diff --git a/src/core/wallets/btc/index.ts b/src/core/wallets/btc/index.ts index e79016a..0b69673 100644 --- a/src/core/wallets/btc/index.ts +++ b/src/core/wallets/btc/index.ts @@ -5,6 +5,7 @@ import icon from "./bitcoin.png"; import bitget from "./bitget"; import cactus from "./cactus"; import injectable from "./injectable"; +import keystone from "./keystone"; import okx from "./okx"; import onekey from "./onekey"; @@ -12,7 +13,7 @@ const metadata: ChainMetadata<"BTC", BTCProvider, BTCConfig> = { chain: "BTC", name: "Bitcoin", icon, - wallets: [injectable, okx, onekey, bitget, cactus], + wallets: [injectable, okx, onekey, bitget, cactus, keystone], }; export default metadata; diff --git a/src/core/wallets/btc/injectable/index.ts b/src/core/wallets/btc/injectable/index.ts index 774f790..3eecbb4 100644 --- a/src/core/wallets/btc/injectable/index.ts +++ b/src/core/wallets/btc/injectable/index.ts @@ -10,6 +10,7 @@ const metadata: WalletMetadata = { wallet: "btcwallet", createProvider: (wallet) => wallet, networks: [Network.MAINNET, Network.SIGNET], + label: "Injectable", }; export default metadata; diff --git a/src/core/wallets/btc/keystone/index.ts b/src/core/wallets/btc/keystone/index.ts new file mode 100644 index 0000000..5fe59f8 --- /dev/null +++ b/src/core/wallets/btc/keystone/index.ts @@ -0,0 +1,18 @@ +import { Network, type BTCConfig, type WalletMetadata } from "@/core/types"; + +import type { BTCProvider } from "../BTCProvider"; + +import logo from "./logo.svg"; +import { KeystoneProvider } from "./provider"; + +const metadata: WalletMetadata = { + id: "keystone", + name: "Keystone", + icon: logo, + docs: "https://www.keyst.one/btc-only", + createProvider: (wallet, config) => new KeystoneProvider(wallet, config), + networks: [Network.MAINNET, Network.SIGNET], + label: "Hardware wallet", +}; + +export default metadata; diff --git a/src/core/wallets/btc/keystone/logo.svg b/src/core/wallets/btc/keystone/logo.svg new file mode 100644 index 0000000..dd62e6f --- /dev/null +++ b/src/core/wallets/btc/keystone/logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/core/wallets/btc/keystone/provider.ts b/src/core/wallets/btc/keystone/provider.ts new file mode 100644 index 0000000..14078c1 --- /dev/null +++ b/src/core/wallets/btc/keystone/provider.ts @@ -0,0 +1,366 @@ +import * as ecc from "@bitcoin-js/tiny-secp256k1-asmjs"; +import { KeystoneSDK, UR } from "@keystonehq/keystone-sdk"; +import sdk, { PlayStatus, ReadStatus, SDK, SupportedResult } from "@keystonehq/sdk"; +import { HDKey } from "@scure/bip32"; +import { PsbtInput } from "bip174/src/lib/interfaces"; +import { Network as BitcoinNetwork, Psbt, Transaction, initEccLib, payments } from "bitcoinjs-lib"; +import { tapleafHash } from "bitcoinjs-lib/src/payments/bip341"; +import { toXOnly } from "bitcoinjs-lib/src/psbt/bip371"; +import { pubkeyInScript } from "bitcoinjs-lib/src/psbt/psbtutils"; + +import type { BTCConfig, Fees, InscriptionIdentifier, UTXO } from "@/core/types"; +import { Network } from "@/core/types"; +import BIP322 from "@/core/utils/bip322"; +import { toNetwork } from "@/core/utils/wallet"; +import { BTCProvider } from "@/core/wallets/btc/BTCProvider"; + +initEccLib(ecc); + +type KeystoneWalletInfo = { + mfp: string | undefined; + extendedPublicKey: string | undefined; + path: string | undefined; + address: string | undefined; + publicKeyHex: string | undefined; + scriptPubKeyHex: string | undefined; +}; + +export class KeystoneProvider extends BTCProvider { + private keystoneWaleltInfo: KeystoneWalletInfo | undefined; + private viewSdk: typeof sdk; + private dataSdk: KeystoneSDK; + + constructor(_wallet: any, config: BTCConfig) { + super(config); + if (sdk?.bootstrap) { + sdk.bootstrap(); + this.viewSdk = sdk; + } else { + // commonjs -> esm npm link issue + (sdk as any).default.bootstrap(); + this.viewSdk = (sdk as any).default; + } + this.dataSdk = new KeystoneSDK({ + origin: "babylon staking app", + }); + } + + /** + * Connects the staking app to the Keystone device and retrieves the necessary information. + * @returns A Promise that resolves to the current instance of the class. + * @throws An error if there is an issue reading the QR code or retrieving the extended public key. + */ + connectWallet = async (): Promise => { + const keystoneContainer = await this.viewSdk.getSdk(); + + // Initialize the Keystone container and read the QR code for sync keystone device with the staking app. + const decodedResult = await keystoneContainer.read([SupportedResult.UR_CRYPTO_ACCOUNT], { + title: "Sync Keystone with Babylon Staking App", + description: + "Please scan the QR code displayed on your Keystone, Currently only the first Taproot Address will be used", + renderInitial: { + walletMode: "btc", + link: "", + description: [ + "1. Turn on your Keystone 3 with BTC only firmware.", + '2. Click connect software wallet and use "Sparrow" for connection.', + '3. Press the "Sync Keystone" button and scan the QR Code displayed on your Keystone hardware wallet', + "4. The first Taproot address will be used for staking.", + ], + }, + URTypeErrorMessage: + "The scanned QR code is not the sync code from the Keystone hardware wallet. Please verify the code and try again.", + }); + + if (decodedResult.status === ReadStatus.canceled) { + throw new Error("Connection to Keystone was canceled"); + } else if (decodedResult.status !== ReadStatus.success) { + throw new Error("Error reading QR code, Please try again."); + } + + // parse the QR Code and get extended public key and other required information + const accountData = this.dataSdk.parseAccount(decodedResult.result); + + // currently only the p2tr address will be used. + const P2TRINDEX = 3; + const xpub = accountData.keys[P2TRINDEX].extendedPublicKey; + + this.keystoneWaleltInfo = { + mfp: accountData.masterFingerprint, + extendedPublicKey: xpub, + path: accountData.keys[P2TRINDEX].path, + address: undefined, + publicKeyHex: undefined, + scriptPubKeyHex: undefined, + }; + + if (!this.keystoneWaleltInfo.extendedPublicKey) throw new Error("Could not retrieve the extended public key"); + + // generate the address and public key based on the xpub + const { address, pubkeyHex, scriptPubKeyHex } = generateP2trAddressFromXpub( + this.keystoneWaleltInfo.extendedPublicKey, + "M/0/0", + toNetwork(this.config.network), + ); + this.keystoneWaleltInfo.address = address; + this.keystoneWaleltInfo.publicKeyHex = pubkeyHex; + this.keystoneWaleltInfo.scriptPubKeyHex = scriptPubKeyHex; + }; + + getWalletProviderName = async (): Promise => { + return "Keystone"; + }; + + getAddress = async (): Promise => { + if (!this.keystoneWaleltInfo?.address) throw new Error("Could not retrieve the address"); + + return this.keystoneWaleltInfo.address; + }; + + getPublicKeyHex = async (): Promise => { + if (!this.keystoneWaleltInfo?.publicKeyHex) throw new Error("Could not retrieve the BTC public key"); + + return this.keystoneWaleltInfo.publicKeyHex; + }; + + signPsbt = async (psbtHex: string): Promise => { + if (!this.keystoneWaleltInfo?.address || !this.keystoneWaleltInfo?.publicKeyHex) { + throw new Error("Keystone Wallet not connected"); + } + if (!psbtHex) throw new Error("psbt hex is required"); + + // enhance the PSBT with the BIP32 derivation information + // to tell keystone which key to use to sign the PSBT + let psbt = Psbt.fromHex(psbtHex); + psbt = this.enhancePsbt(psbt); + const enhancedPsbt = psbt.toHex(); + // sign the psbt with keystone + const signedPsbt = await this.sign(enhancedPsbt); + return signedPsbt.toHex(); + }; + + signPsbts = async (psbtsHexes: string[]): Promise => { + if (!this.keystoneWaleltInfo?.address || !this.keystoneWaleltInfo?.publicKeyHex) { + throw new Error("Keystone Wallet not connected"); + } + if (!psbtsHexes && !Array.isArray(psbtsHexes)) throw new Error("psbts hexes are required"); + + const result = []; + for (const psbt of psbtsHexes) { + const signedHex = await this.signPsbt(psbt); + result.push(signedHex); + } + return result; + }; + + getNetwork = async (): Promise => { + return this.config.network; + }; + + /** + * https://github.com/bitcoin/bips/blob/master/bip-0322.mediawiki + * signMessageBIP322 signs a message using the BIP322 standard. + * @param message + * @returns signature + */ + signMessageBIP322 = async (message: string): Promise => { + if (!this.keystoneWaleltInfo?.scriptPubKeyHex || !this.keystoneWaleltInfo?.publicKeyHex) { + throw new Error("Keystone Wallet not connected"); + } + + // Construct the psbt of Bip322 message signing + const scriptPubKey = Buffer.from(this.keystoneWaleltInfo.scriptPubKeyHex, "hex"); + const toSpendTx = BIP322.buildToSpendTx(message, scriptPubKey); + const internalPublicKey = toXOnly(Buffer.from(this.keystoneWaleltInfo.publicKeyHex, "hex")); + let psbt = BIP322.buildToSignTx(toSpendTx.getId(), scriptPubKey, false, internalPublicKey); + + // Set the sighashType to bitcoin.Transaction.SIGHASH_ALL since it defaults to SIGHASH_DEFAULT + psbt.updateInput(0, { + sighashType: Transaction.SIGHASH_ALL, + }); + + // Ehance the PSBT with the BIP32 derivation information + psbt = this.enhancePsbt(psbt); + const signedPsbt = await this.sign(psbt.toHex()); + return BIP322.encodeWitness(signedPsbt); + }; + + signMessage = async (message: string, type: "ecdsa" | "bip322-simple" = "ecdsa"): Promise => { + if (!this.keystoneWaleltInfo) throw new Error("Keystone Wallet not connected"); + if (type === "bip322-simple") { + return this.signMessageBIP322(message); + } + + // TODO implement + console.log("signMessage", message, type); + return ""; + }; + + /** + * Sign the PSBT with the Keystone device. + * + * @param psbtHex - The PSBT in hex format. + * @returns The signed PSBT in hex format. + * */ + private sign = async (psbtHex: string): Promise => { + if (!psbtHex) throw new Error("psbt hex is required"); + + const ur = this.dataSdk.btc.generatePSBT(Buffer.from(psbtHex, "hex")); + + // compose the signing process for the Keystone device + const signPsbt = composeQRProcess(SupportedResult.UR_PSBT); + + const keystoneContainer = await this.viewSdk.getSdk(); + const signePsbtUR = await signPsbt(keystoneContainer, ur); + + // extract the signed PSBT from the UR + const signedPsbtHex = this.dataSdk.btc.parsePSBT(signePsbtUR); + const signedPsbt = Psbt.fromHex(signedPsbtHex); + signedPsbt.finalizeAllInputs(); + return signedPsbt; + }; + + /** + * Add the BIP32 derivation information for each input. + * The Keystone device is stateless, so it needs to know which key to use to sign the PSBT. + * Therefore, add the Taproot BIP32 derivation information to the PSBT. + * https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#Specification + * @param psbt - The PSBT object. + * @returns The PSBT object with the BIP32 derivation information added. + */ + private enhancePsbt = (psbt: Psbt): Psbt => { + if ( + !this.keystoneWaleltInfo?.scriptPubKeyHex || + !this.keystoneWaleltInfo?.publicKeyHex || + !this.keystoneWaleltInfo?.mfp || + !this.keystoneWaleltInfo?.path + ) { + throw new Error("Keystone Wallet not connected"); + } + + const bip32Derivation = { + masterFingerprint: Buffer.from(this.keystoneWaleltInfo.mfp, "hex"), + path: `${this.keystoneWaleltInfo.path}/0/0`, + pubkey: Buffer.from(this.keystoneWaleltInfo.publicKeyHex, "hex"), + }; + + psbt.data.inputs.forEach((input) => { + input.tapBip32Derivation = [ + { + ...bip32Derivation, + pubkey: toXOnly(bip32Derivation.pubkey), + leafHashes: caculateTapLeafHash(input, bip32Derivation.pubkey), + }, + ]; + }); + return psbt; + }; + + // Not implemented because of the Airgapped HW nature + on = (): void => {}; + off = (): void => {}; + + // Mempool calls + getBalance = async (): Promise => { + return await this.mempool.getAddressBalance(await this.getAddress()); + }; + + getNetworkFees = async (): Promise => { + return await this.mempool.getNetworkFees(); + }; + + pushTx = async (txHex: string): Promise => { + return await this.mempool.pushTx(txHex); + }; + + getUtxos = async (address: string, amount: number): Promise => { + return await this.mempool.getFundingUTXOs(address, amount); + }; + + getBTCTipHeight = async (): Promise => { + return await this.mempool.getTipHeight(); + }; + + getInscriptions(): Promise { + throw new Error("Method not implemented."); + } +} + +/** + * High order function to compose the QR generation and scanning process for specific data types. + * Composes the QR code process for the Keystone device. + * @param destinationDataType - The type of data to be read from the QR code. + * @returns A function that plays the UR in the QR code and reads the result. + */ +const composeQRProcess = + (destinationDataType: SupportedResult) => + async (container: SDK, ur: UR): Promise => { + // make the container play the UR in the QR code + const status: PlayStatus = await container.play(ur, { + title: "Scan the QR Code", + description: "Please scan the QR code with your Keystone device.", + }); + + // if the QR code is scanned successfully, read the result + if (status !== PlayStatus.success) throw new Error("Could not generate the QR code, please try again."); + + const urResult = await container.read([destinationDataType], { + title: "Get the Signature from Keystone", + description: "Please scan the QR code displayed on your Keystone", + URTypeErrorMessage: "The scanned QR code can't be read. please verify and try again.", + }); + + // return the result if the QR code data(UR) of scanned successfully + if (urResult.status !== ReadStatus.success) throw new Error("Could not extract the signature, please try again."); + return urResult.result; + }; + +/** + * Generates the p2tr Bitcoin address from an extended public key and a path. + * @param xpub - The extended public key. + * @param path - The derivation path. + * @param network - The Bitcoin network. + * @returns The Bitcoin address and the public key as a hex string. + */ +const generateP2trAddressFromXpub = ( + xpub: string, + path: string, + network: BitcoinNetwork, +): { address: string; pubkeyHex: string; scriptPubKeyHex: string } => { + const hdNode = HDKey.fromExtendedKey(xpub); + const derivedNode = hdNode.derive(path); + const pubkeyBuffer = Buffer.from(derivedNode.publicKey!); + const childNodeXOnlyPubkey = toXOnly(pubkeyBuffer); + const { address, output } = payments.p2tr({ + internalPubkey: childNodeXOnlyPubkey, + network, + }); + return { + address: address!, + pubkeyHex: pubkeyBuffer.toString("hex"), + scriptPubKeyHex: output!.toString("hex"), + }; +}; + +/** + * Calculates the tap leaf hashes for a given PsbtInput and public key. + * @param input - The PsbtInput object. + * @param pubkey - The public key as a Buffer. + * @returns An array of tap leaf hashes. + */ +const caculateTapLeafHash = (input: PsbtInput, pubkey: Buffer) => { + if (input.tapInternalKey && !input.tapLeafScript) { + return []; + } + const tapLeafHashes = (input.tapLeafScript || []) + .filter((tapLeaf) => pubkeyInScript(pubkey, tapLeaf.script)) + .map((tapLeaf) => { + const hash = tapleafHash({ + output: tapLeaf.script, + version: tapLeaf.leafVersion, + }); + return Object.assign({ hash }, tapLeaf); + }); + + return tapLeafHashes.map((each) => each.hash); +}; diff --git a/tsconfig.json b/tsconfig.json index f5e41d1..9f586ee 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,6 +2,8 @@ "files": [], "references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }], "compilerOptions": { - "declaration": true + "declaration": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true } } diff --git a/vite.config.ts b/vite.config.ts index c6d0513..e1ef216 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -29,8 +29,12 @@ export default defineConfig({ "react-dom", "react/jsx-runtime", "tailwind-merge", - "@babylonlabs-io/bbn-core-ui", "@cosmjs/stargate", + "@babylonlabs-io/bbn-core-ui", + "@keystonehq/animated-qr", + "@keystonehq/keystone-sdk", + "@keystonehq/sdk", + "@bitcoin-js/tiny-secp256k1-asmjs", ], output: { sourcemapExcludeSources: true,