@ledgerhq/device-signer-kit-bitcoin 0.0.0-20250119001136 → 0.0.0-signer-eth-20250122093657

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/README.md +363 -0
  2. package/lib/cjs/api/SignerBtc.js +1 -1
  3. package/lib/cjs/api/SignerBtc.js.map +1 -1
  4. package/lib/cjs/api/app-binder/GetWalletAddressDeviceActionTypes.js +2 -0
  5. package/lib/cjs/api/app-binder/GetWalletAddressDeviceActionTypes.js.map +7 -0
  6. package/lib/cjs/api/index.js +1 -1
  7. package/lib/cjs/api/index.js.map +2 -2
  8. package/lib/cjs/api/model/Wallet.js +1 -1
  9. package/lib/cjs/api/model/Wallet.js.map +1 -1
  10. package/lib/cjs/api/model/WalletAddressOptions.js +2 -0
  11. package/lib/cjs/api/model/WalletAddressOptions.js.map +7 -0
  12. package/lib/cjs/internal/DefaultSignerBtc.js +1 -1
  13. package/lib/cjs/internal/DefaultSignerBtc.js.map +3 -3
  14. package/lib/cjs/internal/app-binder/BtcAppBinder.js +1 -1
  15. package/lib/cjs/internal/app-binder/BtcAppBinder.js.map +3 -3
  16. package/lib/cjs/internal/app-binder/command/GetExtendedPublicKeyCommand.test.js +1 -1
  17. package/lib/cjs/internal/app-binder/command/GetExtendedPublicKeyCommand.test.js.map +2 -2
  18. package/lib/cjs/internal/app-binder/command/GetWalletAddressCommand.js +1 -1
  19. package/lib/cjs/internal/app-binder/command/GetWalletAddressCommand.js.map +3 -3
  20. package/lib/cjs/internal/app-binder/command/GetWalletAddressCommand.test.js +1 -1
  21. package/lib/cjs/internal/app-binder/command/GetWalletAddressCommand.test.js.map +3 -3
  22. package/lib/cjs/internal/app-binder/device-action/GetWalletAddress/GetWalletAddressDeviceAction.js +2 -0
  23. package/lib/cjs/internal/app-binder/device-action/GetWalletAddress/GetWalletAddressDeviceAction.js.map +7 -0
  24. package/lib/cjs/internal/app-binder/device-action/GetWalletAddress/GetWalletAddressDeviceAction.test.js +2 -0
  25. package/lib/cjs/internal/app-binder/device-action/GetWalletAddress/GetWalletAddressDeviceAction.test.js.map +7 -0
  26. package/lib/cjs/internal/app-binder/task/GetWalletAddressTask.js +2 -0
  27. package/lib/cjs/internal/app-binder/task/GetWalletAddressTask.js.map +7 -0
  28. package/lib/cjs/internal/app-binder/task/GetWalletAddressTask.test.js +2 -0
  29. package/lib/cjs/internal/app-binder/task/GetWalletAddressTask.test.js.map +7 -0
  30. package/lib/cjs/internal/use-cases/di/useCasesModule.js +1 -1
  31. package/lib/cjs/internal/use-cases/di/useCasesModule.js.map +3 -3
  32. package/lib/cjs/internal/use-cases/di/useCasesModule.test.js +1 -1
  33. package/lib/cjs/internal/use-cases/di/useCasesModule.test.js.map +2 -2
  34. package/lib/cjs/internal/use-cases/di/useCasesTypes.js +1 -1
  35. package/lib/cjs/internal/use-cases/di/useCasesTypes.js.map +2 -2
  36. package/lib/cjs/internal/use-cases/get-wallet-address/GetWalletAddressUseCase.js +2 -0
  37. package/lib/cjs/internal/use-cases/get-wallet-address/GetWalletAddressUseCase.js.map +7 -0
  38. package/lib/cjs/internal/use-cases/get-wallet-address/GetWalletAddressUseCase.test.js +2 -0
  39. package/lib/cjs/internal/use-cases/get-wallet-address/GetWalletAddressUseCase.test.js.map +7 -0
  40. package/lib/cjs/internal/utils/BtcCommandUtils.js +1 -1
  41. package/lib/cjs/internal/utils/BtcCommandUtils.js.map +3 -3
  42. package/lib/cjs/package.json +1 -1
  43. package/lib/esm/api/app-binder/GetWalletAddressDeviceActionTypes.js +1 -0
  44. package/lib/esm/api/app-binder/GetWalletAddressDeviceActionTypes.js.map +7 -0
  45. package/lib/esm/api/index.js +1 -1
  46. package/lib/esm/api/index.js.map +2 -2
  47. package/lib/esm/api/model/Wallet.js +1 -1
  48. package/lib/esm/api/model/Wallet.js.map +1 -1
  49. package/lib/esm/api/model/WalletAddressOptions.js +1 -0
  50. package/lib/esm/api/model/WalletAddressOptions.js.map +7 -0
  51. package/lib/esm/internal/DefaultSignerBtc.js +1 -1
  52. package/lib/esm/internal/DefaultSignerBtc.js.map +3 -3
  53. package/lib/esm/internal/app-binder/BtcAppBinder.js +1 -1
  54. package/lib/esm/internal/app-binder/BtcAppBinder.js.map +3 -3
  55. package/lib/esm/internal/app-binder/command/GetExtendedPublicKeyCommand.test.js +1 -1
  56. package/lib/esm/internal/app-binder/command/GetExtendedPublicKeyCommand.test.js.map +2 -2
  57. package/lib/esm/internal/app-binder/command/GetWalletAddressCommand.js +1 -1
  58. package/lib/esm/internal/app-binder/command/GetWalletAddressCommand.js.map +3 -3
  59. package/lib/esm/internal/app-binder/command/GetWalletAddressCommand.test.js +1 -1
  60. package/lib/esm/internal/app-binder/command/GetWalletAddressCommand.test.js.map +3 -3
  61. package/lib/esm/internal/app-binder/device-action/GetWalletAddress/GetWalletAddressDeviceAction.js +2 -0
  62. package/lib/esm/internal/app-binder/device-action/GetWalletAddress/GetWalletAddressDeviceAction.js.map +7 -0
  63. package/lib/esm/internal/app-binder/device-action/GetWalletAddress/GetWalletAddressDeviceAction.test.js +2 -0
  64. package/lib/esm/internal/app-binder/device-action/GetWalletAddress/GetWalletAddressDeviceAction.test.js.map +7 -0
  65. package/lib/esm/internal/app-binder/task/GetWalletAddressTask.js +2 -0
  66. package/lib/esm/internal/app-binder/task/GetWalletAddressTask.js.map +7 -0
  67. package/lib/esm/internal/app-binder/task/GetWalletAddressTask.test.js +2 -0
  68. package/lib/esm/internal/app-binder/task/GetWalletAddressTask.test.js.map +7 -0
  69. package/lib/esm/internal/use-cases/di/useCasesModule.js +1 -1
  70. package/lib/esm/internal/use-cases/di/useCasesModule.js.map +3 -3
  71. package/lib/esm/internal/use-cases/di/useCasesModule.test.js +1 -1
  72. package/lib/esm/internal/use-cases/di/useCasesModule.test.js.map +2 -2
  73. package/lib/esm/internal/use-cases/di/useCasesTypes.js +1 -1
  74. package/lib/esm/internal/use-cases/di/useCasesTypes.js.map +2 -2
  75. package/lib/esm/internal/use-cases/get-wallet-address/GetWalletAddressUseCase.js +2 -0
  76. package/lib/esm/internal/use-cases/get-wallet-address/GetWalletAddressUseCase.js.map +7 -0
  77. package/lib/esm/internal/use-cases/get-wallet-address/GetWalletAddressUseCase.test.js +2 -0
  78. package/lib/esm/internal/use-cases/get-wallet-address/GetWalletAddressUseCase.test.js.map +7 -0
  79. package/lib/esm/internal/utils/BtcCommandUtils.js +1 -1
  80. package/lib/esm/internal/utils/BtcCommandUtils.js.map +3 -3
  81. package/lib/esm/package.json +1 -1
  82. package/lib/types/api/SignerBtc.d.ts +3 -0
  83. package/lib/types/api/SignerBtc.d.ts.map +1 -1
  84. package/lib/types/api/app-binder/GetWalletAddressDeviceActionTypes.d.ts +32 -0
  85. package/lib/types/api/app-binder/GetWalletAddressDeviceActionTypes.d.ts.map +1 -0
  86. package/lib/types/api/index.d.ts +2 -1
  87. package/lib/types/api/index.d.ts.map +1 -1
  88. package/lib/types/api/model/Wallet.d.ts +3 -0
  89. package/lib/types/api/model/Wallet.d.ts.map +1 -1
  90. package/lib/types/api/model/WalletAddressOptions.d.ts +5 -0
  91. package/lib/types/api/model/WalletAddressOptions.d.ts.map +1 -0
  92. package/lib/types/internal/DefaultSignerBtc.d.ts +3 -1
  93. package/lib/types/internal/DefaultSignerBtc.d.ts.map +1 -1
  94. package/lib/types/internal/app-binder/BtcAppBinder.d.ts +7 -0
  95. package/lib/types/internal/app-binder/BtcAppBinder.d.ts.map +1 -1
  96. package/lib/types/internal/app-binder/command/GetWalletAddressCommand.d.ts +5 -7
  97. package/lib/types/internal/app-binder/command/GetWalletAddressCommand.d.ts.map +1 -1
  98. package/lib/types/internal/app-binder/device-action/GetWalletAddress/GetWalletAddressDeviceAction.d.ts +38 -0
  99. package/lib/types/internal/app-binder/device-action/GetWalletAddress/GetWalletAddressDeviceAction.d.ts.map +1 -0
  100. package/lib/types/internal/app-binder/device-action/GetWalletAddress/GetWalletAddressDeviceAction.test.d.ts +2 -0
  101. package/lib/types/internal/app-binder/device-action/GetWalletAddress/GetWalletAddressDeviceAction.test.d.ts.map +1 -0
  102. package/lib/types/internal/app-binder/task/GetWalletAddressTask.d.ts +27 -0
  103. package/lib/types/internal/app-binder/task/GetWalletAddressTask.d.ts.map +1 -0
  104. package/lib/types/internal/app-binder/task/GetWalletAddressTask.test.d.ts +2 -0
  105. package/lib/types/internal/app-binder/task/GetWalletAddressTask.test.d.ts.map +1 -0
  106. package/lib/types/internal/use-cases/di/useCasesModule.d.ts.map +1 -1
  107. package/lib/types/internal/use-cases/di/useCasesTypes.d.ts +1 -0
  108. package/lib/types/internal/use-cases/di/useCasesTypes.d.ts.map +1 -1
  109. package/lib/types/internal/use-cases/get-wallet-address/GetWalletAddressUseCase.d.ts +9 -0
  110. package/lib/types/internal/use-cases/get-wallet-address/GetWalletAddressUseCase.d.ts.map +1 -0
  111. package/lib/types/internal/use-cases/get-wallet-address/GetWalletAddressUseCase.test.d.ts +2 -0
  112. package/lib/types/internal/use-cases/get-wallet-address/GetWalletAddressUseCase.test.d.ts.map +1 -0
  113. package/lib/types/internal/utils/BtcCommandUtils.d.ts +2 -0
  114. package/lib/types/internal/utils/BtcCommandUtils.d.ts.map +1 -1
  115. package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
  116. package/package.json +6 -6
@@ -1,2 +1,2 @@
1
- import{ApduParser as c,CommandResultFactory as s,CommandUtils as d,InvalidStatusWordError as r}from"@ledgerhq/device-management-kit";import{SW_INTERRUPTED_EXECUTION as a}from"../app-binder/command/utils/constants";const m=32,p=32;class u{static isContinueResponse(e){return e.statusCode[0]===a[0]&&e.statusCode[1]===a[1]}static isSuccessResponse(e){return d.isSuccessResponse(e)||u.isContinueResponse(e)}static getSignature(e){const t=new c(e.data),n=t.extract8BitUInt();if(n===void 0)return s({error:new r("V is missing")});const o=t.encodeToHexaString(t.extractFieldByLength(m),!0);if(!o)return s({error:new r("R is missing")});const i=t.encodeToHexaString(t.extractFieldByLength(p),!0);return i?s({data:{v:n,r:o,s:i}}):s({error:new r("S is missing")})}}export{u as BtcCommandUtils};
1
+ import{ApduParser as d,CommandResultFactory as s,CommandUtils as c,InvalidStatusWordError as n}from"@ledgerhq/device-management-kit";import{SW_INTERRUPTED_EXECUTION as i}from"../app-binder/command/utils/constants";const m=32,p=32;class u{static isContinueResponse(e){return e.statusCode[0]===i[0]&&e.statusCode[1]===i[1]}static isSuccessResponse(e){return c.isSuccessResponse(e)||u.isContinueResponse(e)}static getSignature(e){const t=new d(e.data),r=t.extract8BitUInt();if(r===void 0)return s({error:new n("V is missing")});const o=t.encodeToHexaString(t.extractFieldByLength(m),!0);if(!o)return s({error:new n("R is missing")});const a=t.encodeToHexaString(t.extractFieldByLength(p),!0);return a?s({data:{v:r,r:o,s:a}}):s({error:new n("S is missing")})}static getAddress(e){const t=new d(e.data);if(!e.data)return s({error:new n("Failed to extract address from response")});const r=t.encodeToString(e.data.data);return s({data:{address:r}})}}export{u as BtcCommandUtils};
2
2
  //# sourceMappingURL=BtcCommandUtils.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/internal/utils/BtcCommandUtils.ts"],
4
- "sourcesContent": ["import {\n ApduParser,\n type ApduResponse,\n type CommandResult,\n CommandResultFactory,\n type CommandSuccessResult,\n CommandUtils as DmkCommandUtils,\n InvalidStatusWordError,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type Signature } from \"@api/model/Signature\";\nimport { type BtcErrorCodes } from \"@internal/app-binder/command/utils/bitcoinAppErrors\";\nimport { SW_INTERRUPTED_EXECUTION } from \"@internal/app-binder/command/utils/constants\";\n\nconst R_LENGTH = 32;\nconst S_LENGTH = 32;\n\nexport class BtcCommandUtils {\n static isContinueResponse(response: ApduResponse) {\n return (\n response.statusCode[0] === SW_INTERRUPTED_EXECUTION[0] &&\n response.statusCode[1] === SW_INTERRUPTED_EXECUTION[1]\n );\n }\n static isSuccessResponse(response: ApduResponse) {\n return (\n DmkCommandUtils.isSuccessResponse(response) ||\n BtcCommandUtils.isContinueResponse(response)\n );\n }\n\n static getSignature(\n result: CommandSuccessResult<ApduResponse>,\n ): CommandResult<Signature, BtcErrorCodes> {\n const parser = new ApduParser(result.data);\n\n const v = parser.extract8BitUInt();\n if (v === undefined) {\n return CommandResultFactory({\n error: new InvalidStatusWordError(\"V is missing\"),\n });\n }\n\n const r = parser.encodeToHexaString(\n parser.extractFieldByLength(R_LENGTH),\n true,\n );\n if (!r) {\n return CommandResultFactory({\n error: new InvalidStatusWordError(\"R is missing\"),\n });\n }\n\n const s = parser.encodeToHexaString(\n parser.extractFieldByLength(S_LENGTH),\n true,\n );\n if (!s) {\n return CommandResultFactory({\n error: new InvalidStatusWordError(\"S is missing\"),\n });\n }\n\n return CommandResultFactory({\n data: {\n v,\n r,\n s,\n },\n });\n }\n}\n"],
5
- "mappings": "AAAA,OACE,cAAAA,EAGA,wBAAAC,EAEA,gBAAgBC,EAChB,0BAAAC,MACK,kCAIP,OAAS,4BAAAC,MAAgC,+CAEzC,MAAMC,EAAW,GACXC,EAAW,GAEV,MAAMC,CAAgB,CAC3B,OAAO,mBAAmBC,EAAwB,CAChD,OACEA,EAAS,WAAW,CAAC,IAAMJ,EAAyB,CAAC,GACrDI,EAAS,WAAW,CAAC,IAAMJ,EAAyB,CAAC,CAEzD,CACA,OAAO,kBAAkBI,EAAwB,CAC/C,OACEN,EAAgB,kBAAkBM,CAAQ,GAC1CD,EAAgB,mBAAmBC,CAAQ,CAE/C,CAEA,OAAO,aACLC,EACyC,CACzC,MAAMC,EAAS,IAAIV,EAAWS,EAAO,IAAI,EAEnCE,EAAID,EAAO,gBAAgB,EACjC,GAAIC,IAAM,OACR,OAAOV,EAAqB,CAC1B,MAAO,IAAIE,EAAuB,cAAc,CAClD,CAAC,EAGH,MAAMS,EAAIF,EAAO,mBACfA,EAAO,qBAAqBL,CAAQ,EACpC,EACF,EACA,GAAI,CAACO,EACH,OAAOX,EAAqB,CAC1B,MAAO,IAAIE,EAAuB,cAAc,CAClD,CAAC,EAGH,MAAMU,EAAIH,EAAO,mBACfA,EAAO,qBAAqBJ,CAAQ,EACpC,EACF,EACA,OAAKO,EAMEZ,EAAqB,CAC1B,KAAM,CACJ,EAAAU,EACA,EAAAC,EACA,EAAAC,CACF,CACF,CAAC,EAXQZ,EAAqB,CAC1B,MAAO,IAAIE,EAAuB,cAAc,CAClD,CAAC,CAUL,CACF",
6
- "names": ["ApduParser", "CommandResultFactory", "DmkCommandUtils", "InvalidStatusWordError", "SW_INTERRUPTED_EXECUTION", "R_LENGTH", "S_LENGTH", "BtcCommandUtils", "response", "result", "parser", "v", "r", "s"]
4
+ "sourcesContent": ["import {\n ApduParser,\n type ApduResponse,\n type CommandResult,\n CommandResultFactory,\n type CommandSuccessResult,\n CommandUtils as DmkCommandUtils,\n InvalidStatusWordError,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type Signature } from \"@api/model/Signature\";\nimport { type WalletAddress } from \"@api/model/Wallet\";\nimport { type BtcErrorCodes } from \"@internal/app-binder/command/utils/bitcoinAppErrors\";\nimport { SW_INTERRUPTED_EXECUTION } from \"@internal/app-binder/command/utils/constants\";\n\nconst R_LENGTH = 32;\nconst S_LENGTH = 32;\n\nexport class BtcCommandUtils {\n static isContinueResponse(response: ApduResponse) {\n return (\n response.statusCode[0] === SW_INTERRUPTED_EXECUTION[0] &&\n response.statusCode[1] === SW_INTERRUPTED_EXECUTION[1]\n );\n }\n static isSuccessResponse(response: ApduResponse) {\n return (\n DmkCommandUtils.isSuccessResponse(response) ||\n BtcCommandUtils.isContinueResponse(response)\n );\n }\n\n static getSignature(\n result: CommandSuccessResult<ApduResponse>,\n ): CommandResult<Signature, BtcErrorCodes> {\n const parser = new ApduParser(result.data);\n\n const v = parser.extract8BitUInt();\n if (v === undefined) {\n return CommandResultFactory({\n error: new InvalidStatusWordError(\"V is missing\"),\n });\n }\n\n const r = parser.encodeToHexaString(\n parser.extractFieldByLength(R_LENGTH),\n true,\n );\n if (!r) {\n return CommandResultFactory({\n error: new InvalidStatusWordError(\"R is missing\"),\n });\n }\n\n const s = parser.encodeToHexaString(\n parser.extractFieldByLength(S_LENGTH),\n true,\n );\n if (!s) {\n return CommandResultFactory({\n error: new InvalidStatusWordError(\"S is missing\"),\n });\n }\n\n return CommandResultFactory({\n data: {\n v,\n r,\n s,\n },\n });\n }\n\n static getAddress(\n response: CommandSuccessResult<ApduResponse>,\n ): CommandResult<WalletAddress, BtcErrorCodes> {\n const parser = new ApduParser(response.data);\n if (!response.data) {\n return CommandResultFactory({\n error: new InvalidStatusWordError(\n \"Failed to extract address from response\",\n ),\n });\n }\n\n const address = parser.encodeToString(response.data.data);\n return CommandResultFactory({\n data: {\n address,\n },\n });\n }\n}\n"],
5
+ "mappings": "AAAA,OACE,cAAAA,EAGA,wBAAAC,EAEA,gBAAgBC,EAChB,0BAAAC,MACK,kCAKP,OAAS,4BAAAC,MAAgC,+CAEzC,MAAMC,EAAW,GACXC,EAAW,GAEV,MAAMC,CAAgB,CAC3B,OAAO,mBAAmBC,EAAwB,CAChD,OACEA,EAAS,WAAW,CAAC,IAAMJ,EAAyB,CAAC,GACrDI,EAAS,WAAW,CAAC,IAAMJ,EAAyB,CAAC,CAEzD,CACA,OAAO,kBAAkBI,EAAwB,CAC/C,OACEN,EAAgB,kBAAkBM,CAAQ,GAC1CD,EAAgB,mBAAmBC,CAAQ,CAE/C,CAEA,OAAO,aACLC,EACyC,CACzC,MAAMC,EAAS,IAAIV,EAAWS,EAAO,IAAI,EAEnCE,EAAID,EAAO,gBAAgB,EACjC,GAAIC,IAAM,OACR,OAAOV,EAAqB,CAC1B,MAAO,IAAIE,EAAuB,cAAc,CAClD,CAAC,EAGH,MAAMS,EAAIF,EAAO,mBACfA,EAAO,qBAAqBL,CAAQ,EACpC,EACF,EACA,GAAI,CAACO,EACH,OAAOX,EAAqB,CAC1B,MAAO,IAAIE,EAAuB,cAAc,CAClD,CAAC,EAGH,MAAMU,EAAIH,EAAO,mBACfA,EAAO,qBAAqBJ,CAAQ,EACpC,EACF,EACA,OAAKO,EAMEZ,EAAqB,CAC1B,KAAM,CACJ,EAAAU,EACA,EAAAC,EACA,EAAAC,CACF,CACF,CAAC,EAXQZ,EAAqB,CAC1B,MAAO,IAAIE,EAAuB,cAAc,CAClD,CAAC,CAUL,CAEA,OAAO,WACLK,EAC6C,CAC7C,MAAME,EAAS,IAAIV,EAAWQ,EAAS,IAAI,EAC3C,GAAI,CAACA,EAAS,KACZ,OAAOP,EAAqB,CAC1B,MAAO,IAAIE,EACT,yCACF,CACF,CAAC,EAGH,MAAMW,EAAUJ,EAAO,eAAeF,EAAS,KAAK,IAAI,EACxD,OAAOP,EAAqB,CAC1B,KAAM,CACJ,QAAAa,CACF,CACF,CAAC,CACH,CACF",
6
+ "names": ["ApduParser", "CommandResultFactory", "DmkCommandUtils", "InvalidStatusWordError", "SW_INTERRUPTED_EXECUTION", "R_LENGTH", "S_LENGTH", "BtcCommandUtils", "response", "result", "parser", "v", "r", "s", "address"]
7
7
  }
@@ -42,7 +42,7 @@
42
42
  "inversify-logger-middleware": "^3.1.0",
43
43
  "purify-ts": "^2.1.0",
44
44
  "reflect-metadata": "^0.2.2",
45
- "xstate": "^5.19.1"
45
+ "xstate": "^5.19.2"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@ledgerhq/device-management-kit": "workspace:*",
@@ -5,10 +5,13 @@ import { type SignTransactionDAReturnType } from "./app-binder/SignTransactionDe
5
5
  import { type AddressOptions } from "./model/AddressOptions";
6
6
  import { type Psbt } from "./model/Psbt";
7
7
  import { type Wallet } from "./model/Wallet";
8
+ import { type GetWalletAddressDAReturnType } from "./app-binder/GetWalletAddressDeviceActionTypes";
9
+ import { type WalletAddressOptions } from "./model/WalletAddressOptions";
8
10
  export interface SignerBtc {
9
11
  getExtendedPublicKey: (derivationPath: string, options: AddressOptions) => GetExtendedPublicKeyDAReturnType;
10
12
  signMessage: (derivationPath: string, message: string) => SignMessageDAReturnType;
11
13
  signPsbt: (wallet: Wallet, psbt: Psbt) => SignPsbtDAReturnType;
12
14
  signTransaction: (wallet: Wallet, psbt: Psbt) => SignTransactionDAReturnType;
15
+ getWalletAddress: (wallet: Wallet, addressIndex: number, options: WalletAddressOptions) => GetWalletAddressDAReturnType;
13
16
  }
14
17
  //# sourceMappingURL=SignerBtc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignerBtc.d.ts","sourceRoot":"","sources":["../../../src/api/SignerBtc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gCAAgC,EAAE,MAAM,uDAAuD,CAAC;AAC9G,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,WAAW,SAAS;IACxB,oBAAoB,EAAE,CACpB,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,cAAc,KACpB,gCAAgC,CAAC;IACtC,WAAW,EAAE,CACX,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,KACZ,uBAAuB,CAAC;IAC7B,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,oBAAoB,CAAC;IAC/D,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,2BAA2B,CAAC;CAE9E"}
1
+ {"version":3,"file":"SignerBtc.d.ts","sourceRoot":"","sources":["../../../src/api/SignerBtc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gCAAgC,EAAE,MAAM,uDAAuD,CAAC;AAC9G,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,gDAAgD,CAAC;AACnG,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,MAAM,WAAW,SAAS;IACxB,oBAAoB,EAAE,CACpB,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,cAAc,KACpB,gCAAgC,CAAC;IACtC,WAAW,EAAE,CACX,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,KACZ,uBAAuB,CAAC;IAC7B,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,oBAAoB,CAAC;IAC/D,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,2BAA2B,CAAC;IAC7E,gBAAgB,EAAE,CAChB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,oBAAoB,KAC1B,4BAA4B,CAAC;CACnC"}
@@ -0,0 +1,32 @@
1
+ import { type CommandErrorResult, type DeviceActionState, type ExecuteDeviceActionReturnType, type OpenAppDAError, type OpenAppDARequiredInteraction, type UserInteractionRequired } from "@ledgerhq/device-management-kit";
2
+ import { type WalletAddress } from "../model/Wallet";
3
+ import { type Wallet as ApiWallet } from "../model/Wallet";
4
+ import { type BtcErrorCodes } from "../../internal/app-binder/command/utils/bitcoinAppErrors";
5
+ import { type DataStoreService } from "../../internal/data-store/service/DataStoreService";
6
+ import { type Wallet as InternalWallet } from "../../internal/wallet/model/Wallet";
7
+ import { type WalletBuilder } from "../../internal/wallet/service/WalletBuilder";
8
+ import { type WalletSerializer } from "../../internal/wallet/service/WalletSerializer";
9
+ export type GetWalletAddressDAOutput = WalletAddress;
10
+ export type GetWalletAddressDAInput = {
11
+ readonly checkOnDevice: boolean;
12
+ readonly change: boolean;
13
+ readonly addressIndex: number;
14
+ readonly wallet: ApiWallet;
15
+ readonly walletBuilder: WalletBuilder;
16
+ readonly walletSerializer: WalletSerializer;
17
+ readonly dataStoreService: DataStoreService;
18
+ };
19
+ export type GetWalletAddressDAError = OpenAppDAError | CommandErrorResult<BtcErrorCodes>["error"];
20
+ type GetWalletAddressDARequiredInteraction = OpenAppDARequiredInteraction | UserInteractionRequired.VerifyAddress;
21
+ export type GetWalletAddressDAIntermediateValue = {
22
+ requiredUserInteraction: GetWalletAddressDARequiredInteraction;
23
+ };
24
+ export type GetWalletAddressDAState = DeviceActionState<GetWalletAddressDAOutput, GetWalletAddressDAError, GetWalletAddressDAIntermediateValue>;
25
+ export type GetWalletAddressDAInternalState = {
26
+ readonly error: GetWalletAddressDAError | null;
27
+ readonly wallet: InternalWallet | null;
28
+ readonly walletAddress: WalletAddress | null;
29
+ };
30
+ export type GetWalletAddressDAReturnType = ExecuteDeviceActionReturnType<GetWalletAddressDAOutput, GetWalletAddressDAError, GetWalletAddressDAIntermediateValue>;
31
+ export {};
32
+ //# sourceMappingURL=GetWalletAddressDeviceActionTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetWalletAddressDeviceActionTypes.d.ts","sourceRoot":"","sources":["../../../../src/api/app-binder/GetWalletAddressDeviceActionTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,cAAc,EACnB,KAAK,4BAA4B,EACjC,KAAK,uBA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A+B,GAAG;IAC5C,QAAQ,CAAC,KAAK,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC/C,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,6BAA6B,CACtE,wBAAwB,EACxB,uBAAuB,EACvB,mCAAmC,CACpC,CAAC"}
@@ -1,7 +1,8 @@
1
1
  export { type SignerBtc } from "./SignerBtc";
2
2
  export { SignerBtcBuilder } from "./SignerBtcBuilder";
3
3
  export * from "./app-binder/GetExtendedPublicKeyDeviceActionTypes";
4
- export type { SignMessageDAError, SignMessageDAInput, SignMessageDAIntermediateValue, SignMessageDAOutput, SignMessageDAState, } from "./app-binder/SignMessageDeviceActionTypes";
4
+ export * from "./app-binder/GetWalletAddressDeviceActionTypes";
5
+ export * from "./app-binder/SignMessageDeviceActionTypes";
5
6
  export * from "./app-binder/SignPsbtDeviceActionTypes";
6
7
  export * from "./app-binder/SignTransactionDeviceActionTypes";
7
8
  export { DefaultDescriptorTemplate, DefaultWallet } from "./model/Wallet";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,cAAc,uDAAuD,CAAC;AACtE,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,8BAA8B,EAC9B,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,8CAA8C,CAAC;AACtD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kDAAkD,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC7E,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,cAAc,uDAAuD,CAAC;AACtE,cAAc,mDAAmD,CAAC;AAClE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kDAAkD,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC7E,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC"}
@@ -38,4 +38,7 @@ export declare class WalletPolicy {
38
38
  constructor(name: string, descriptorTemplate: string, keys: string[]);
39
39
  }
40
40
  export type Wallet = DefaultWallet | RegisteredWallet;
41
+ export type WalletAddress = {
42
+ address: string;
43
+ };
41
44
  //# sourceMappingURL=Wallet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Wallet.d.ts","sourceRoot":"","sources":["../../../../src/api/model/Wallet.ts"],"names":[],"mappings":"AAAA,oBAAY,yBAAyB;IACnC,MAAM,eAAe;IACrB,aAAa,oBAAoB;IACjC,aAAa,gBAAgB;IAC7B,OAAO,cAAc;CACtB;AAED;;GAEG;AACH,qBAAa,aAAa;IAIf,cAAc,EAAE,MAAM;IACtB,QAAQ,EAAE,yBAAyB;gBADnC,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,yBAAyB;CAE7C;AAED;;;GAGG;AACH,qBAAa,gBAAgB;IAElB,IAAI,EAAE,MAAM;IACZ,kBAAkB,EAAE,MAAM;IAC1B,IAAI,EAAE,MAAM,EAAE;IACd,IAAI,EAAE,UAAU;gBAHhB,IAAI,EAAE,MAAM,EACZ,kBAAkB,EAAE,MAAM,EAC1B,IAAI,EAAE,MAAM,EAAE,EACd,IAAI,EAAE,UAAU;CAE1B;AAED;;;;;;;GAOG;AACH,qBAAa,YAAY;IAEd,IAAI,EAAE,MAAM;IACZ,kBAAkB,EAAE,MAAM;IAC1B,IAAI,EAAE,MAAM,EAAE;gBAFd,IAAI,EAAE,MAAM,EACZ,kBAAkB,EAAE,MAAM,EAC1B,IAAI,EAAE,MAAM,EAAE;CAExB;AAED,MAAM,MAAM,MAAM,GAAG,aAAa,GAAG,gBAAgB,CAAC"}
1
+ {"version":3,"file":"Wallet.d.ts","sourceRoot":"","sources":["../../../../src/api/model/Wallet.ts"],"names":[],"mappings":"AAAA,oBAAY,yBAAyB;IACnC,MAAM,eAAe;IACrB,aAAa,oBAAoB;IACjC,aAAa,gBAAgB;IAC7B,OAAO,cAAc;CACtB;AAED;;GAEG;AACH,qBAAa,aAAa;IAIf,cAAc,EAAE,MAAM;IACtB,QAAQ,EAAE,yBAAyB;gBADnC,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,yBAAyB;CAE7C;AAED;;;GAGG;AACH,qBAAa,gBAAgB;IAElB,IAAI,EAAE,MAAM;IACZ,kBAAkB,EAAE,MAAM;IAC1B,IAAI,EAAE,MAAM,EAAE;IACd,IAAI,EAAE,UAAU;gBAHhB,IAAI,EAAE,MAAM,EACZ,kBAAkB,EAAE,MAAM,EAC1B,IAAI,EAAE,MAAM,EAAE,EACd,IAAI,EAAE,UAAU;CAE1B;AAED;;;;;;;GAOG;AACH,qBAAa,YAAY;IAEd,IAAI,EAAE,MAAM;IACZ,kBAAkB,EAAE,MAAM;IAC1B,IAAI,EAAE,MAAM,EAAE;gBAFd,IAAI,EAAE,MAAM,EACZ,kBAAkB,EAAE,MAAM,EAC1B,IAAI,EAAE,MAAM,EAAE;CAExB;AAED,MAAM,MAAM,MAAM,GAAG,aAAa,GAAG,gBAAgB,CAAC;AAEtD,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export type WalletAddressOptions = {
2
+ checkOnDevice?: boolean;
3
+ change?: boolean;
4
+ };
5
+ //# sourceMappingURL=WalletAddressOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WalletAddressOptions.d.ts","sourceRoot":"","sources":["../../../../src/api/model/WalletAddressOptions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC"}
@@ -3,6 +3,7 @@ import { type SignMessageDAReturnType } from "../api/app-binder/SignMessageDevic
3
3
  import { type AddressOptions } from "../api/model/AddressOptions";
4
4
  import { type Psbt } from "../api/model/Psbt";
5
5
  import { type Wallet } from "../api/model/Wallet";
6
+ import { type WalletAddressOptions } from "../api/model/WalletAddressOptions";
6
7
  import { type SignerBtc } from "../api/SignerBtc";
7
8
  type DefaultSignerBtcConstructorArgs = {
8
9
  dmk: DeviceManagementKit;
@@ -11,9 +12,10 @@ type DefaultSignerBtcConstructorArgs = {
11
12
  export declare class DefaultSignerBtc implements SignerBtc {
12
13
  private readonly _container;
13
14
  constructor({ dmk, sessionId }: DefaultSignerBtcConstructorArgs);
15
+ getWalletAddress(wallet: Wallet, addressIndex: number, { checkOnDevice, change }: WalletAddressOptions): import("..").GetWalletAddressDAReturnType;
14
16
  signPsbt(wallet: Wallet, psbt: Psbt): import("..").SignPsbtDAReturnType;
15
17
  getExtendedPublicKey(derivationPath: string, { checkOnDevice }: AddressOptions): import("..").GetExtendedPublicKeyDAReturnType;
16
- signMessage(_derivationPath: string, _message: string): SignMessageDAReturnType;
18
+ signMessage(derivationPath: string, message: string): SignMessageDAReturnType;
17
19
  signTransaction(wallet: Wallet, psbt: Psbt): import("..").SignTransactionDAReturnType;
18
20
  }
19
21
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultSignerBtc.d.ts","sourceRoot":"","sources":["../../../src/internal/DefaultSignerBtc.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KA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AAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAUhD,KAAK,+BAA+B,GAAG;IACrC,GAAG,EAAE,mBAAmB,CAAC;IACzB,SAAS,EAAE,eAAe,CAAC;CAC5B,CAAC;AAEF,qBAAa,gBAAiB,YAAW,SAAS;IAChD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAY;gBAE3B,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,+BAA+B;IAI/D,gBAAgB,CACd,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,EAAE,aAAqB,EAAE,MAAc,EAAE,EAAE,oBAAoB;IAOjE,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI;IAMnC,oBAAoB,CAClB,cAAc,EAAE,MAAM,EACtB,EAAE,aAAqB,EAAE,EAAE,cAAc;IAS3C,WAAW,CACT,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,GACd,uBAAuB;IAM1B,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI;CAK3C"}
@@ -3,6 +3,7 @@ import { GetExtendedPublicKeyDAInput, GetExtendedPublicKeyDAReturnType } from ".
3
3
  import { SignMessageDAReturnType } from "../../api/app-binder/SignMessageDeviceActionTypes";
4
4
  import { SignPsbtDAReturnType } from "../../api/app-binder/SignPsbtDeviceActionTypes";
5
5
  import { SignTransactionDAReturnType } from "../../api/app-binder/SignTransactionDeviceActionTypes";
6
+ import { GetWalletAddressDAReturnType } from "../../api/index";
6
7
  import { Psbt } from "../../api/model/Psbt";
7
8
  import { Wallet } from "../../api/model/Wallet";
8
9
  import type { DataStoreService } from "../data-store/service/DataStoreService";
@@ -28,6 +29,12 @@ export declare class BtcAppBinder {
28
29
  psbt: Psbt;
29
30
  wallet: Wallet;
30
31
  }): SignPsbtDAReturnType;
32
+ getWalletAddress(args: {
33
+ checkOnDevice: boolean;
34
+ wallet: Wallet;
35
+ change: boolean;
36
+ addressIndex: number;
37
+ }): GetWalletAddressDAReturnType;
31
38
  signTransaction(args: {
32
39
  psbt: Psbt;
33
40
  wallet: Wallet;
@@ -1 +1 @@
1
- {"version":3,"file":"BtcAppBinder.d.ts","sourceRoot":"","sources":["../../../../src/internal/app-binder/BtcAppBinder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,KAAK,eAAe,EAGrB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EACL,2BAA2B,EAC3B,gCAAgC,EACjC,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAC/F,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAK3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAGtF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAE5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAIlF,qBACa,YAAY;IAGrB,OAAO,CAAC,QAAQ,CAAC,IAAI;IAErB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAE3B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAE/B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CA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AE,IAAI,CAAC;QACX,MAAM,EAAE,MAAM,CAAC;KAChB,GAAG,2BAA2B;CAgBhC"}
@@ -1,21 +1,19 @@
1
1
  import { type Apdu, type ApduResponse, type Command, type CommandResult } from "@ledgerhq/device-management-kit";
2
2
  import { CommandErrorHelper } from "@ledgerhq/signer-utils";
3
3
  import { type BtcErrorCodes } from "./utils/bitcoinAppErrors";
4
- export type GetWalletAddressCommandResponse = {
5
- readonly address: string;
6
- };
4
+ export type GetWalletAddressCommandResponse = ApduResponse;
7
5
  export type GetWalletAddressCommandArgs = {
8
- readonly display: boolean;
6
+ readonly checkOnDevice: boolean;
9
7
  readonly walletId: Uint8Array;
10
8
  readonly walletHmac: Uint8Array;
11
9
  readonly change: boolean;
12
10
  readonly addressIndex: number;
13
11
  };
14
12
  export declare class GetWalletAddressCommand implements Command<GetWalletAddressCommandResponse, GetWalletAddressCommandArgs, BtcErrorCodes> {
15
- private readonly _args;
13
+ private readonly args;
16
14
  private readonly _errorHelper;
17
- constructor(_args: GetWalletAddressCommandArgs, _errorHelper?: CommandErrorHelper<GetWalletAddressCommandResponse, BtcErrorCodes>);
15
+ constructor(args: GetWalletAddressCommandArgs, _errorHelper?: CommandErrorHelper<ApduResponse, BtcErrorCodes>);
18
16
  getApdu(): Apdu;
19
- parseResponse(response: ApduResponse): CommandResult<GetWalletAddressCommandResponse, BtcErrorCodes>;
17
+ parseResponse(response: ApduResponse): CommandResult<ApduResponse, BtcErrorCodes>;
20
18
  }
21
19
  //# sourceMappingURL=GetWalletAddressCommand.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GetWalletAddressCommand.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/command/GetWalletAddressCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAGT,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAGnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAM5D,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,+BAA+B,GAAG;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,qBAAa,uBACX,YACE,OAAO,CACL,+BAA+B,EAC/B,2BAA2B,EAC3B,aAAa,CACd;IAGD,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,KAAK,EAAE,2BAA2B,EAClC,YAAY,qEAO5B;IAGH,OAAO,IAAI,IAAI;IAef,aAAa,CACX,QAAQ,EAAE,YAAY,GACrB,aAAa,CAAC,+BAA+B,EAAE,aAAa,CAAC;CAqBjE"}
1
+ {"version":3,"file":"GetWalletAddressCommand.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/command/GetWalletAddressCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAET,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,aAAa,EAEnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAM5D,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,+BAA+B,GAAG,YAAY,CAAC;AAE3D,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,qBAAa,uBACX,YACE,OAAO,CACL,+BAA+B,EAC/B,2BAA2B,EAC3B,aAAa,CACd;IAGD,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,IAAI,EAAE,2BAA2B,EACjC,YAAY,kDAO5B;IAGH,OAAO,IAAI,IAAI;IAef,aAAa,CACX,QAAQ,EAAE,YAAY,GACrB,aAAa,CAAC,YAAY,EAAE,aAAa,CAAC;CAK9C"}
@@ -0,0 +1,38 @@
1
+ import { type CommandResult, type DeviceActionStateMachine, type InternalApi, XStateDeviceAction } from "@ledgerhq/device-management-kit";
2
+ import { type GetWalletAddressDAError, type GetWalletAddressDAInput, type GetWalletAddressDAIntermediateValue, type GetWalletAddressDAInternalState, type GetWalletAddressDAOutput } from "../../../../api/app-binder/GetWalletAddressDeviceActionTypes";
3
+ import { type WalletAddress } from "../../../../api/model/Wallet";
4
+ import { type Wallet as ApiWallet } from "../../../../api/model/Wallet";
5
+ import { type BtcErrorCodes } from "../../../app-binder/command/utils/bitcoinAppErrors";
6
+ import { type DataStoreService } from "../../../data-store/service/DataStoreService";
7
+ import { type Wallet as InternalWallet } from "../../../wallet/model/Wallet";
8
+ import { type WalletBuilder } from "../../../wallet/service/WalletBuilder";
9
+ import { type WalletSerializer } from "../../../wallet/service/WalletSerializer";
10
+ export type GetWalletAddressMachineDependencies = {
11
+ readonly prepareWalletPolicy: (arg0: {
12
+ input: {
13
+ wallet: ApiWallet;
14
+ walletBuilder: WalletBuilder;
15
+ };
16
+ }) => Promise<CommandResult<InternalWallet, BtcErrorCodes>>;
17
+ readonly getWalletAddress: (arg0: {
18
+ input: {
19
+ checkOnDevice: boolean;
20
+ change: boolean;
21
+ addressIndex: number;
22
+ wallet: InternalWallet;
23
+ walletBuilder: WalletBuilder;
24
+ walletSerializer: WalletSerializer;
25
+ dataStoreService: DataStoreService;
26
+ };
27
+ }) => Promise<CommandResult<WalletAddress, BtcErrorCodes>>;
28
+ };
29
+ export type ExtractGetWalletAddressMachineDependencies = (internalApi: InternalApi) => GetWalletAddressMachineDependencies;
30
+ export declare class GetWalletAddressDeviceAction extends XStateDeviceAction<GetWalletAddressDAOutput, GetWalletAddressDAInput, GetWalletAddressDAError, GetWalletAddressDAIntermediateValue, GetWalletAddressDAInternalState> {
31
+ constructor(args: {
32
+ input: GetWalletAddressDAInput;
33
+ inspect?: boolean;
34
+ });
35
+ makeStateMachine(internalApi: InternalApi): DeviceActionStateMachine<GetWalletAddressDAOutput, GetWalletAddressDAInput, GetWalletAddressDAError, GetWalletAddressDAIntermediateValue, GetWalletAddressDAInternalState>;
36
+ extractDependencies(internalApi: InternalApi): GetWalletAddressMachineDependencies;
37
+ }
38
+ //# sourceMappingURL=GetWalletAddressDeviceAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetWalletAddressDeviceAction.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/app-binder/device-action/GetWalletAddress/GetWalletAddressDeviceAction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,WAAW,EAMhB,kBAAkB,EACnB,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,mCAAmC,EACxC,KAAK,+BAA+B,EACpC,KAAK,wBAAwB,EAC9B,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,KAAK,MAAM,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qDAAqD,CAAC;AAGzF,OAAO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uB,EACvB,uBAAuB,EACvB,mCAAmC,EACnC,+BAA+B,CAChC;IAkND,mBAAmB,CACjB,WAAW,EAAE,WAAW,GACvB,mCAAmC;CAkDvC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=GetWalletAddressDeviceAction.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetWalletAddressDeviceAction.test.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/app-binder/device-action/GetWalletAddress/GetWalletAddressDeviceAction.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
1
+ import { type CommandResult } from "@ledgerhq/device-management-kit";
2
+ import { type InternalApi } from "@ledgerhq/device-management-kit";
3
+ import { type WalletAddress } from "../../../api/model/Wallet";
4
+ import { type BtcErrorCodes } from "../../app-binder/command/utils/bitcoinAppErrors";
5
+ import { DataStore } from "../../data-store/model/DataStore";
6
+ import { type DataStoreService } from "../../data-store/service/DataStoreService";
7
+ import { BtcCommandUtils } from "../../utils/BtcCommandUtils";
8
+ import { type Wallet as InternalWallet } from "../../wallet/model/Wallet";
9
+ import { type WalletSerializer } from "../../wallet/service/WalletSerializer";
10
+ import { ContinueTask } from "./ContinueTask";
11
+ export type SendGetWalletAddressTaskArgs = {
12
+ checkOnDevice: boolean;
13
+ wallet: InternalWallet;
14
+ change: boolean;
15
+ addressIndex: number;
16
+ };
17
+ export declare class GetWalletAddressTask {
18
+ private readonly _api;
19
+ private readonly _args;
20
+ private readonly _walletSerializer;
21
+ private readonly _dataStoreService;
22
+ private readonly _continueTaskFactory;
23
+ private readonly _getAddress;
24
+ constructor(_api: InternalApi, _args: SendGetWalletAddressTaskArgs, _walletSerializer: WalletSerializer, _dataStoreService: DataStoreService, _continueTaskFactory?: (api: InternalApi, dataStore: DataStore) => ContinueTask, _getAddress?: typeof BtcCommandUtils.getAddress);
25
+ run(): Promise<CommandResult<WalletAddress, BtcErrorCodes>>;
26
+ }
27
+ //# sourceMappingURL=GetWalletAddressTask.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetWalletAddressTask.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/task/GetWalletAddressTask.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qDAAqD,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,KAAK,MAAM,IAAI,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAElF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,MAAM,4BAA4B,GAAG;IACzC,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,qBAAa,oBAAoB;IAE7B,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IAIrC,OAAO,CAAC,QAAQ,CAAC,WAAW;gBARX,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,4BAA4B,EACnC,iBAAiB,EAAE,gBAAgB,EACnC,iBAAiB,EAAE,gBAAgB,EACnC,oBAAoB,SAC9B,WAAW,aACL,SAAS,iBACe,EACpB,WAAW,oCAA6B;IAGrD,GAAG,IAAI,OAAO,CAAC,aAAa,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;CA6BlE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=GetWalletAddressTask.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetWalletAddressTask.test.d.ts","sourceRoot":"","sources":["../../../../../src/internal/app-binder/task/GetWalletAddressTask.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"useCasesModule.d.ts","sourceRoot":"","sources":["../../../../../src/internal/use-cases/di/useCasesModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAQ5C,eAAO,MAAM,qBAAqB,uBAkB/B,CAAC"}
1
+ {"version":3,"file":"useCasesModule.d.ts","sourceRoot":"","sources":["../../../../../src/internal/use-cases/di/useCasesModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAS5C,eAAO,MAAM,qBAAqB,uBAmB/B,CAAC"}
@@ -3,5 +3,6 @@ export declare const useCasesTypes: {
3
3
  SignMessageUseCase: symbol;
4
4
  SignPsbtUseCase: symbol;
5
5
  SignTransactionUseCase: symbol;
6
+ GetWalletAddressUseCase: symbol;
6
7
  };
7
8
  //# sourceMappingURL=useCasesTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCasesTypes.d.ts","sourceRoot":"","sources":["../../../../../src/internal/use-cases/di/useCasesTypes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;CAKzB,CAAC"}
1
+ {"version":3,"file":"useCasesTypes.d.ts","sourceRoot":"","sources":["../../../../../src/internal/use-cases/di/useCasesTypes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;CAMzB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { GetWalletAddressDAReturnType } from "../../../api/app-binder/GetWalletAddressDeviceActionTypes";
2
+ import { Wallet } from "../../../api/model/Wallet";
3
+ import { BtcAppBinder } from "../../app-binder/BtcAppBinder";
4
+ export declare class GetWalletAddressUseCase {
5
+ private _appBinder;
6
+ constructor(appBinding: BtcAppBinder);
7
+ execute(checkOnDevice: boolean, wallet: Wallet, change: boolean, addressIndex: number): GetWalletAddressDAReturnType;
8
+ }
9
+ //# sourceMappingURL=GetWalletAddressUseCase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetWalletAddressUseCase.d.ts","sourceRoot":"","sources":["../../../../../src/internal/use-cases/get-wallet-address/GetWalletAddressUseCase.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,mDAAmD,CAAC;AACjG,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAGjE,qBACa,uBAAuB;IAClC,OAAO,CAAC,UAAU,CAAe;gBAI/B,UAAU,EAAE,YAAY;IAK1B,OAAO,CACL,aAAa,EAAE,OAAO,EACtB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,EACf,YAAY,EAAE,MAAM,GACnB,4BAA4B;CAQhC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=GetWalletAddressUseCase.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetWalletAddressUseCase.test.d.ts","sourceRoot":"","sources":["../../../../../src/internal/use-cases/get-wallet-address/GetWalletAddressUseCase.test.ts"],"names":[],"mappings":""}
@@ -1,9 +1,11 @@
1
1
  import { type ApduResponse, type CommandResult, type CommandSuccessResult } from "@ledgerhq/device-management-kit";
2
2
  import { type Signature } from "../../api/model/Signature";
3
+ import { type WalletAddress } from "../../api/model/Wallet";
3
4
  import { type BtcErrorCodes } from "../app-binder/command/utils/bitcoinAppErrors";
4
5
  export declare class BtcCommandUtils {
5
6
  static isContinueResponse(response: ApduResponse): boolean;
6
7
  static isSuccessResponse(response: ApduResponse): boolean;
7
8
  static getSignature(result: CommandSuccessResult<ApduResponse>): CommandResult<Signature, BtcErrorCodes>;
9
+ static getAddress(response: CommandSuccessResult<ApduResponse>): CommandResult<WalletAddress, BtcErrorCodes>;
8
10
  }
9
11
  //# sourceMappingURL=BtcCommandUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BtcCommandUtils.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/BtcCommandUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,aAAa,EAElB,KAAK,oBAAoB,EAG1B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qDAAqD,CAAC;AAMzF,qBAAa,eAAe;IAC1B,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE,YAAY;IAMhD,MAAM,CAAC,iBAAiB,CAAC,QAAQ,EAAE,YAAY;IAO/C,MAAM,CAAC,YAAY,CACjB,MAAM,EAAE,oBAAoB,CAAC,YAAY,CAAC,GACzC,aAAa,CAAC,SAAS,EAAE,aAAa,CAAC;CAsC3C"}
1
+ {"version":3,"file":"BtcCommandUtils.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/BtcCommandUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,aAAa,EAElB,KAAK,oBAAoB,EAG1B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qDAAqD,CAAC;AAMzF,qBAAa,eAAe;IAC1B,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE,YAAY;IAMhD,MAAM,CAAC,iBAAiB,CAAC,QAAQ,EAAE,YAAY;IAO/C,MAAM,CAAC,YAAY,CACjB,MAAM,EAAE,oBAAoB,CAAC,YAAY,CAAC,GACzC,aAAa,CAAC,SAAS,EAAE,aAAa,CAAC;IAuC1C,MAAM,CAAC,UAAU,CACf,QAAQ,EAAE,oBAAoB,CAAC,YAAY,CAAC,GAC3C,aAAa,CAAC,aAAa,EAAE,aAAa,CAAC;CAiB/C"}