{"_id":"@theyabtc/bitcoin-sdk","_rev":"26-f62ccf5f30472f1207fc8d0050a4d58b","name":"@theyabtc/bitcoin-sdk","dist-tags":{"latest":"0.0.22"},"versions":{"0.0.16":{"name":"@theyabtc/bitcoin-sdk","version":"0.0.16","keywords":["bitcoin","bitcoin wallet","bitcoin sdk","bitcoin hwi","ledger","trezor","hardware wallet","coldcard","coldcard wallet","foundation device"],"author":{"name":"Theya Inc"},"license":"MIT","_id":"@theyabtc/bitcoin-sdk@0.0.16","maintainers":[{"name":"ilyavf","email":"fadeev.ilya@gmail.com"},{"name":"theyabitcoin","email":"development@theya.us"}],"homepage":"https://github.com/theyabtc/bitcoin-sdk#readme","bugs":{"url":"https://github.com/theyabtc/bitcoin-sdk/issues"},"dist":{"shasum":"9cdba1b188b49a126ccd97bab417a5179fcefbba","tarball":"https://registry.npmjs.org/@theyabtc/bitcoin-sdk/-/bitcoin-sdk-0.0.16.tgz","fileCount":45,"integrity":"sha512-fUPoAi2PpNbzW6eFoWaiY3NQyEuP9Ow0mVO8LW4DZbujw/ZFeqaW3qQxQKlW4g6GsCpabyYEpyUDZM0laGg4HQ==","signatures":[{"sig":"MEUCIQCU9XRyKUzfTC35Ahg0FPu1HznzN9Thykxi+Sv2dFIsqgIgPov3FH5D/P4BIzAc3pKNrcUllJN+mkvO9W5JkGrPSqI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":121768},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"093e203da7966e6532b1b9d79ade2b8c00d6b59b","scripts":{"test":"jest","build":"npm run clean && tsc","clean":"rm -rf dist"},"_npmUser":{"name":"theyabitcoin","email":"development@theya.us"},"repository":{"url":"git+https://github.com/theyabtc/bitcoin-sdk.git","type":"git"},"_npmVersion":"9.8.1","description":"Bitcoin utilities","directories":{},"_nodeVersion":"18.18.2","dependencies":{"@scure/base":"~1.1.7","micro-packed":"~0.5.3","ledger-bitcoin":"^0.2.3","@scure/btc-signer":"~1.2.2","@trezor/connect-web":"^9.2.2","@ledgerhq/hw-transport-webusb":"^6.28.6"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.2","typedoc":"^0.25.13","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.7"},"_npmOperationalInternal":{"tmp":"tmp/bitcoin-sdk_0.0.16_1720956017643_0.03598706912303462","host":"s3://npm-registry-packages"}},"0.0.17":{"name":"@theyabtc/bitcoin-sdk","version":"0.0.17","keywords":["bitcoin","bitcoin wallet","bitcoin sdk","bitcoin hwi","ledger","trezor","hardware wallet","coldcard","coldcard wallet","foundation device"],"author":{"name":"Theya Inc"},"license":"MIT","_id":"@theyabtc/bitcoin-sdk@0.0.17","maintainers":[{"name":"ilyavf","email":"fadeev.ilya@gmail.com"},{"name":"theyabitcoin","email":"development@theya.us"}],"homepage":"https://github.com/theyabtc/bitcoin-sdk#readme","bugs":{"url":"https://github.com/theyabtc/bitcoin-sdk/issues"},"dist":{"shasum":"5c542820f8b68773da5f974d499417232cd0234e","tarball":"https://registry.npmjs.org/@theyabtc/bitcoin-sdk/-/bitcoin-sdk-0.0.17.tgz","fileCount":45,"integrity":"sha512-VfeLDmOWB7JeTOvfQ6AdCI2xmf+OOoWYBbWqkjJIXWgKz/o7NMMbKXyC3aaeswx0OuPGjV+4rgYAZ8aZ1Nekjw==","signatures":[{"sig":"MEUCICQbosZNnXb39snBOcNtakWgH24x5lNjZHaWg8rZYujWAiEAlH9NXDJj/HNNN0wgwwdWDzsm0qSMRiIhBGbBKji5Z7Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122081},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"a7ca7d1164a9948c89a6bd3cc002f12925b82c7a","scripts":{"test":"jest","build":"npm run clean && tsc","clean":"rm -rf dist"},"_npmUser":{"name":"ilyavf","email":"fadeev.ilya@gmail.com"},"repository":{"url":"git+https://github.com/theyabtc/bitcoin-sdk.git","type":"git"},"_npmVersion":"10.2.3","description":"Bitcoin utilities","directories":{},"_nodeVersion":"18.19.0","dependencies":{"@scure/base":"~1.1.7","micro-packed":"~0.5.3","ledger-bitcoin":"^0.2.3","@scure/btc-signer":"~1.2.2","@trezor/connect-web":"^9.2.2","@ledgerhq/hw-transport-webusb":"^6.28.6"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.2","typedoc":"^0.25.13","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.7"},"_npmOperationalInternal":{"tmp":"tmp/bitcoin-sdk_0.0.17_1724181982357_0.6617147901004365","host":"s3://npm-registry-packages"}},"0.0.18":{"name":"@theyabtc/bitcoin-sdk","version":"0.0.18","keywords":["bitcoin","bitcoin wallet","bitcoin sdk","bitcoin hwi","ledger","trezor","hardware wallet","coldcard","coldcard wallet","foundation device"],"author":{"name":"Theya Inc"},"license":"MIT","_id":"@theyabtc/bitcoin-sdk@0.0.18","maintainers":[{"name":"ilyavf","email":"fadeev.ilya@gmail.com"},{"name":"theyabitcoin","email":"development@theya.us"}],"homepage":"https://github.com/theyabtc/bitcoin-sdk#readme","bugs":{"url":"https://github.com/theyabtc/bitcoin-sdk/issues"},"dist":{"shasum":"256e7717f49810bc6eb57ab5487ab97be84f92d3","tarball":"https://registry.npmjs.org/@theyabtc/bitcoin-sdk/-/bitcoin-sdk-0.0.18.tgz","fileCount":45,"integrity":"sha512-FC3WYZkasTOelH8lkM3plm5fa3SGMFRNlikqUWSeabq8xepnzmcayWC+lv+R3Of7iA7OFvWuZw6eZepdB9USHQ==","signatures":[{"sig":"MEUCIEP8QaUSMs4rWA2oHpiiq0oXsdcc0CaaEMm7goVs4vmOAiEA1EjKfELrbcKBafvcg38nWit0M8Mxi91FfjiaN+IaBSA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":123305},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"689177297f81a2e8371c4eb9ab36b49ce9066e16","scripts":{"test":"jest","build":"npm run clean && tsc","clean":"rm -rf dist"},"_npmUser":{"name":"theyabitcoin","email":"development@theya.us"},"repository":{"url":"git+https://github.com/theyabtc/bitcoin-sdk.git","type":"git"},"_npmVersion":"9.8.1","description":"Bitcoin utilities","directories":{},"_nodeVersion":"18.18.2","dependencies":{"@scure/base":"~1.1.7","micro-packed":"~0.5.3","ledger-bitcoin":"^0.2.3","@scure/btc-signer":"~1.2.2","@trezor/connect-web":"^9.2.2","@ledgerhq/hw-transport-webusb":"^6.28.6"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.2","typedoc":"^0.25.13","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.7"},"_npmOperationalInternal":{"tmp":"tmp/bitcoin-sdk_0.0.18_1731208483061_0.00026494840226143346","host":"s3://npm-registry-packages"}},"0.0.19":{"name":"@theyabtc/bitcoin-sdk","version":"0.0.19","keywords":["bitcoin","bitcoin wallet","bitcoin sdk","bitcoin hwi","ledger","trezor","hardware wallet","coldcard","coldcard wallet","foundation device"],"author":{"name":"Theya Inc"},"license":"MIT","_id":"@theyabtc/bitcoin-sdk@0.0.19","maintainers":[{"name":"theyabitcoin","email":"development@theya.us"},{"name":"ilyavf","email":"fadeev.ilya@gmail.com"}],"homepage":"https://github.com/theyabtc/bitcoin-sdk#readme","bugs":{"url":"https://github.com/theyabtc/bitcoin-sdk/issues"},"dist":{"shasum":"c981912e7ce854639921ad646d2b1c92c1d7df14","tarball":"https://registry.npmjs.org/@theyabtc/bitcoin-sdk/-/bitcoin-sdk-0.0.19.tgz","fileCount":45,"integrity":"sha512-5gpJzmqOooSvBOWwGeF08Yw8MdGsTzwOge35q6bVa7zQNJgeApzYXRNF+ubvH0OLk+vMxWtnBRm6ODVqWSBCRQ==","signatures":[{"sig":"MEYCIQDjOnYgv3lIwIYlNpqxBddftKsHX02CACRPONUmTYlxUgIhAL7X0F/Cs1JbHC7SeMndgvEV5zxaQ3PKmkLZUtQ3kFAa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":106671},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"1edcd0833eed91f53ccf2fae7e0323e9364e6a8b","scripts":{"test":"jest","build":"npm run clean && tsc","clean":"rm -rf dist"},"_npmUser":{"name":"theyabitcoin","email":"development@theya.us"},"repository":{"url":"git+https://github.com/theyabtc/bitcoin-sdk.git","type":"git"},"_npmVersion":"9.8.1","description":"Bitcoin utilities","directories":{},"_nodeVersion":"18.18.2","dependencies":{"@scure/base":"~1.1.7","micro-packed":"~0.5.3","ledger-bitcoin":"^0.2.3","@scure/btc-signer":"~1.2.2","@trezor/connect-web":"^9.2.2","@ledgerhq/hw-transport-webusb":"^6.28.6"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.2","typedoc":"^0.25.13","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.7"},"_npmOperationalInternal":{"tmp":"tmp/bitcoin-sdk_0.0.19_1733266283596_0.20119470803298367","host":"s3://npm-registry-packages"}},"0.0.20":{"name":"@theyabtc/bitcoin-sdk","version":"0.0.20","keywords":["bitcoin","bitcoin wallet","bitcoin sdk","bitcoin hwi","ledger","trezor","hardware wallet","coldcard","coldcard wallet","foundation device"],"author":{"name":"Theya Inc"},"license":"MIT","_id":"@theyabtc/bitcoin-sdk@0.0.20","maintainers":[{"name":"theyabitcoin","email":"development@theya.us"},{"name":"ilyavf","email":"fadeev.ilya@gmail.com"}],"homepage":"https://github.com/theyabtc/bitcoin-sdk#readme","bugs":{"url":"https://github.com/theyabtc/bitcoin-sdk/issues"},"dist":{"shasum":"0b4190d662bfc33b8a2aa14ca436ef9dd2029cfe","tarball":"https://registry.npmjs.org/@theyabtc/bitcoin-sdk/-/bitcoin-sdk-0.0.20.tgz","fileCount":45,"integrity":"sha512-qizf/RMQkFL6G6MKODmhcYMid+FR4dSc1hEg5EnAQmMY4kcDW6AGQlyuwMDvvUtHkA1/y/iFdw0NzsqpXnbPcA==","signatures":[{"sig":"MEYCIQDunel12hJpzoVrYP5AQCs5oNTVCG+UuwpQfGNIJM8FFQIhAN1mQo0vMjiQXYUM+XC2wS4YPZT9+WbHwEWl1ecStsaM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":108167},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"d8bda62ce481418f8a14e908b3f4e049a0d702ac","scripts":{"test":"jest","build":"npm run clean && tsc","clean":"rm -rf dist"},"_npmUser":{"name":"ilyavf","email":"fadeev.ilya@gmail.com"},"repository":{"url":"git+https://github.com/theyabtc/bitcoin-sdk.git","type":"git"},"_npmVersion":"10.2.3","description":"Bitcoin utilities","directories":{},"_nodeVersion":"18.19.0","dependencies":{"@scure/base":"~1.1.7","micro-packed":"~0.5.3","ledger-bitcoin":"^0.2.3","@scure/btc-signer":"~1.2.2","@trezor/connect-web":"^9.2.2","@ledgerhq/hw-transport-webusb":"^6.28.6"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.2","typedoc":"^0.25.13","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.7"},"_npmOperationalInternal":{"tmp":"tmp/bitcoin-sdk_0.0.20_1737990304219_0.39530013445591416","host":"s3://npm-registry-packages-npm-production"}},"0.0.21":{"name":"@theyabtc/bitcoin-sdk","version":"0.0.21","keywords":["bitcoin","bitcoin wallet","bitcoin sdk","bitcoin hwi","ledger","trezor","hardware wallet","coldcard","coldcard wallet","foundation device"],"author":{"name":"Theya Inc"},"license":"MIT","_id":"@theyabtc/bitcoin-sdk@0.0.21","maintainers":[{"name":"theyabitcoin","email":"development@theya.us"},{"name":"ilyavf","email":"fadeev.ilya@gmail.com"}],"homepage":"https://github.com/theyabtc/bitcoin-sdk#readme","bugs":{"url":"https://github.com/theyabtc/bitcoin-sdk/issues"},"dist":{"shasum":"95bf7ccc6521a9e0913cc87b27c8f793ff79c67f","tarball":"https://registry.npmjs.org/@theyabtc/bitcoin-sdk/-/bitcoin-sdk-0.0.21.tgz","fileCount":45,"integrity":"sha512-F6j7VRnXO1zEuaxQ4wt5yg43fnwow8pBxys8ooVZvTaYY6UJ7KhBuHSa4bDJ9xe9JHr5RFM2ZOpD6aQU7RKkdw==","signatures":[{"sig":"MEUCIC204yZSOjrBa6acAYWomXCv5LfAXJ+Jj4m5gSypZ9UmAiEAzR7Zv77AAOp/3O5ePYJSifEglqzWCTHJKn3JLDtUcmY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":108132},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"2530743b88b1f9fafdbc19dbc20166745b75687c","scripts":{"test":"jest","build":"npm run clean && tsc","clean":"rm -rf dist"},"_npmUser":{"name":"theyabitcoin","email":"development@theya.us"},"repository":{"url":"git+https://github.com/theyabtc/bitcoin-sdk.git","type":"git"},"_npmVersion":"9.8.1","description":"Bitcoin utilities","directories":{},"_nodeVersion":"18.18.2","dependencies":{"@scure/base":"~1.1.7","micro-packed":"~0.5.3","ledger-bitcoin":"^0.2.3","@scure/btc-signer":"~1.2.2","@trezor/connect-web":"^9.2.2","@ledgerhq/hw-transport-webusb":"^6.28.6"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.2","typedoc":"^0.25.13","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.7"},"_npmOperationalInternal":{"tmp":"tmp/bitcoin-sdk_0.0.21_1741844019894_0.4464236483987294","host":"s3://npm-registry-packages-npm-production"}},"0.0.22":{"name":"@theyabtc/bitcoin-sdk","version":"0.0.22","description":"Bitcoin utilities","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"clean":"rm -rf dist","build":"npm run clean && tsc","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/theyabtc/bitcoin-sdk.git"},"keywords":["bitcoin","bitcoin wallet","bitcoin sdk","bitcoin hwi","ledger","trezor","hardware wallet","coldcard","coldcard wallet","foundation device"],"author":{"name":"Theya Inc"},"license":"MIT","bugs":{"url":"https://github.com/theyabtc/bitcoin-sdk/issues"},"homepage":"https://github.com/theyabtc/bitcoin-sdk#readme","devDependencies":{"@types/jest":"^29.5.12","@types/node":"^20.12.7","jest":"^29.7.0","ts-jest":"^29.1.2","typedoc":"^0.25.13","typescript":"^5.4.5"},"dependencies":{"@ledgerhq/hw-transport-webusb":"^6.28.6","@scure/base":"~1.1.7","@scure/btc-signer":"~1.2.2","@trezor/connect-web":"^9.2.2","ledger-bitcoin":"^0.2.3","micro-packed":"~0.5.3"},"_id":"@theyabtc/bitcoin-sdk@0.0.22","gitHead":"94381d4b85c83e58f4783bf5fb7b9b37ef7c5f9c","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-sml9vKo6TbERt+L4DRHR/Qoh19JwTEuZNid0HS3DWBWt3SN9BbWxLt/is6GEDq7Y+bB/28zZvoSdVbuY8L0Pww==","shasum":"91af30c6274f2b2f62aca451802b9e14cf60d79a","tarball":"https://registry.npmjs.org/@theyabtc/bitcoin-sdk/-/bitcoin-sdk-0.0.22.tgz","fileCount":45,"unpackedSize":108315,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCDuTnRCvZC5D+C4wyhW8+fFH1rNLnRpK6OmhMAuq4UaAIgf2SDy4WlwhJY1OD4UHbTTtgya0NYqCorytXD1g2QUz4="}]},"_npmUser":{"name":"theyabitcoin","email":"development@theya.us"},"directories":{},"maintainers":[{"name":"theyabitcoin","email":"development@theya.us"},{"name":"ilyavf","email":"fadeev.ilya@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bitcoin-sdk_0.0.22_1747596561781_0.22713226237273987"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-14T11:20:17.552Z","modified":"2025-05-18T19:29:22.175Z","0.0.1":"2024-06-19T20:26:44.706Z","0.0.2":"2024-06-19T20:36:19.202Z","0.0.3":"2024-06-20T01:40:02.672Z","0.0.4":"2024-06-20T18:55:22.829Z","0.0.5":"2024-06-20T19:06:03.481Z","0.0.6":"2024-06-21T05:50:54.386Z","0.0.7":"2024-06-21T14:55:47.103Z","0.0.8":"2024-06-21T15:11:11.488Z","0.0.9":"2024-06-21T16:18:23.473Z","0.0.10":"2024-06-21T20:54:30.313Z","0.0.11":"2024-06-21T22:40:51.803Z","0.0.12":"2024-06-24T17:53:43.032Z","0.0.13":"2024-07-14T11:07:28.990Z","0.0.14":"2024-07-14T11:14:09.973Z","0.0.15":"2024-07-14T11:15:44.066Z","0.0.16":"2024-07-14T11:20:17.790Z","0.0.17":"2024-08-20T19:26:22.511Z","0.0.18":"2024-11-10T03:14:43.266Z","0.0.19":"2024-12-03T22:51:23.782Z","0.0.20":"2025-01-27T15:05:04.430Z","0.0.21":"2025-03-13T05:33:40.091Z","0.0.22":"2025-05-18T19:29:21.980Z"},"bugs":{"url":"https://github.com/theyabtc/bitcoin-sdk/issues"},"author":{"name":"Theya Inc"},"license":"MIT","homepage":"https://github.com/theyabtc/bitcoin-sdk#readme","keywords":["bitcoin","bitcoin wallet","bitcoin sdk","bitcoin hwi","ledger","trezor","hardware wallet","coldcard","coldcard wallet","foundation device"],"repository":{"type":"git","url":"git+https://github.com/theyabtc/bitcoin-sdk.git"},"description":"Bitcoin utilities","maintainers":[{"name":"theyabitcoin","email":"development@theya.us"},{"name":"ilyavf","email":"fadeev.ilya@gmail.com"}],"readme":"# bitcoin-sdk\n\nBitcoin wallet utilities\n\nThe package contains bitcoin utilities to work with wallet software as well as a set of device\nspecific modules that allow to communicate with hardware keys. Supports the following devices:\n\n- Ledger\n- Trezor\n- Foundation Passport\n- Coldcard\n\n## Install\n\n```\nnpm i bitcoin-sdk\n```\n\n## API\n\nGeneric bitcoin utils are exported as the root props of the main export, and device specific are\nnamespaced by brand name. Device modules implement either `Connected` or `Airgapped` interface.\n\nAPI docs available [here](https://theyabtc.github.io/bitcoin-sdk/).\n\n### Top level utilities:\n\n- `getXpubDescriptorPattern: ({ derivationPath, xpub, masterFingerprint }) => string` - computes\n  descriptor from key params.\n- `getNetworkFromDp: (derivationPath) => NetworkEnum` - extracts network from derivation path.\n- `parseMultisigWalletDescriptor: (descriptor) => { policy, keys }` - computes wallet policy and\n  extracts keys.\n- `getPsbtSignatureCount(psbt) => number` - gets signature count from psbt hex.\n- `checkForNewSignature: (psbtOrig, psbtNew) => void` - validates if new PSBT contains a new\n  signature compared to the original.\n- `getAccountNumberFromDp: (derivationPath) => string` - computes account number from derivation\n  path.\n\n### Top level device interface modules:\n\n- `Ledger: Connected` a class with a set of Ledger utilities that implements \"Connected\" interface.\n- `Trezor: Connected` a class implements \"Connected\" interface for Trezor.\n- `Coldcard: Airgapped` implements \"Airgapped\" interface for Coldcard.\n- `Foundation: Airgapped` implements \"Airgapped\" interface for Foundation.\n\n### Device Interface - \"Connected\"\n\nDevice interface for hardware keys that requires physical connection to a computer (via USB or\nBluetooth).\n\n- `init: (options) => void` initializes device specific module.\n- `getMasterFingerprint: (network) => Promise<string>` - extracts master fingerprint from device.\n- `getXpubInfo: (dp, network) => Promise<{ xpub; master_fingerprint }>` - extracts key params for\n  given derivation path.\n- `getXpubByDp: (dp, network) => Promise<string>` - extracts XPUB for given derivation path and\n  network.\n- `signTransaction: (psbtHex, walletType, walletKey, options) => Promise<string>` signs psbt\n  (handles single key and multisig wallets).\n- `policyRegistrationRequired: boolean` - indicates if wallet policy needs to be registered on the\n  device.\n- `registerDevicePolicy: (walletKeys, options) => Promise<{ policy, policy_hmac }>` - registers\n  wallet policy on device.\n\n### Device Interface - \"Airgapped\"\n\nDevice Interface to work with hardware keys in \"airgap\" mode (via microSD card or QR codes).\n\n- `getXpubFromFile: (fileContent: any, isMultisigWallet: boolean) => DeviceKeyParams`\n- `getSignatureFromFile: (fileContent: any) => { addr: string; signature: string }`\n- `policyRegistrationRequired: boolean` - indicates if wallet policy needs to be registered on the\n  device.\n- `buildWalletConfig: (walletName, descriptor) => string` - creates a multi-line string for\n  downlowding a text file with wallet config for registering multisig wallet on the device.\n\n### Example\n\nSee `*/__tests__` folders for more examples.\n\nUsage:\n\n```js\nimport { getNetworkFromDp, Coldcard, LedgerDI, TrezorDI } from 'bitcoin-sdk';\n\nconst network = getNetworkFromDp(`m/48'/0'/0'/2'`);\n// => 'mainnet'\n\n// Ledger:\nconst ledger = new LedgerDI();\nconst masterFingerprint = await ledger.getMasterFingerprint();\n\n// Trezor:\nconst trezor = new TrezorDI({ manifest: { email: 'user@email.com' } });\nconst masterFingerprint = await trezor.getMasterFingerprint('testnet');\n\n// Coldcard:\nconst descriptor = 'wsh(sortedmulti(2, ...)';\nconst coldcard = new ColdcardDI();\nconst walletConfig = coldcard.buildWalletConfig('My wallet', descriptor);\n//  Returns multiline string:\n/*\n# Multisig wallet configuration\n#\nName: My wallet\nPolicy: 2 of 3\nFormat: P2WSH\n...\n*/\n```\n","readmeFilename":"README.md"}