@ledgerhq/device-trusted-app-kit-ledger-keyring-protocol 0.0.0-ledger-button-20250806141658

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 (510) hide show
  1. package/LICENSE.MD +202 -0
  2. package/README.md +32 -0
  3. package/lib/cjs/api/LedgerKeyringProtocol.js +2 -0
  4. package/lib/cjs/api/LedgerKeyringProtocol.js.map +7 -0
  5. package/lib/cjs/api/LedgerKeyringProtocolBuilder.js +2 -0
  6. package/lib/cjs/api/LedgerKeyringProtocolBuilder.js.map +7 -0
  7. package/lib/cjs/api/app-binder/AddToTrustchainDeviceActionTypes.js +2 -0
  8. package/lib/cjs/api/app-binder/AddToTrustchainDeviceActionTypes.js.map +7 -0
  9. package/lib/cjs/api/app-binder/AuthenticateDeviceActionTypes.js +2 -0
  10. package/lib/cjs/api/app-binder/AuthenticateDeviceActionTypes.js.map +7 -0
  11. package/lib/cjs/api/app-binder/Errors.js +2 -0
  12. package/lib/cjs/api/app-binder/Errors.js.map +7 -0
  13. package/lib/cjs/api/app-binder/GetAppNameCommandTypes.js +2 -0
  14. package/lib/cjs/api/app-binder/GetAppNameCommandTypes.js.map +7 -0
  15. package/lib/cjs/api/app-binder/GetSeedIdCommandTypes.js +2 -0
  16. package/lib/cjs/api/app-binder/GetSeedIdCommandTypes.js.map +7 -0
  17. package/lib/cjs/api/app-binder/GetVersionCommandTypes.js +2 -0
  18. package/lib/cjs/api/app-binder/GetVersionCommandTypes.js.map +7 -0
  19. package/lib/cjs/api/app-binder/GetVersionDeviceActionTypes.js +2 -0
  20. package/lib/cjs/api/app-binder/GetVersionDeviceActionTypes.js.map +7 -0
  21. package/lib/cjs/api/app-binder/InitCommandTypes.js +2 -0
  22. package/lib/cjs/api/app-binder/InitCommandTypes.js.map +7 -0
  23. package/lib/cjs/api/app-binder/KeypairFromBytes.js +2 -0
  24. package/lib/cjs/api/app-binder/KeypairFromBytes.js.map +7 -0
  25. package/lib/cjs/api/app-binder/LKRPTypes.js +2 -0
  26. package/lib/cjs/api/app-binder/LKRPTypes.js.map +7 -0
  27. package/lib/cjs/api/app-binder/ParseStreamBlockCommandCommandTypes.js +2 -0
  28. package/lib/cjs/api/app-binder/ParseStreamBlockCommandCommandTypes.js.map +7 -0
  29. package/lib/cjs/api/app-binder/ParseStreamBlockHeaderCommandTypes.js +2 -0
  30. package/lib/cjs/api/app-binder/ParseStreamBlockHeaderCommandTypes.js.map +7 -0
  31. package/lib/cjs/api/app-binder/ParseStreamBlockSignatureTypes.js +2 -0
  32. package/lib/cjs/api/app-binder/ParseStreamBlockSignatureTypes.js.map +7 -0
  33. package/lib/cjs/api/app-binder/SetTrustedMemberTypes.js +2 -0
  34. package/lib/cjs/api/app-binder/SetTrustedMemberTypes.js.map +7 -0
  35. package/lib/cjs/api/app-binder/SignBlockCommandTypes.js +2 -0
  36. package/lib/cjs/api/app-binder/SignBlockCommandTypes.js.map +7 -0
  37. package/lib/cjs/api/app-binder/SignBlockHeaderCommandTypes.js +2 -0
  38. package/lib/cjs/api/app-binder/SignBlockHeaderCommandTypes.js.map +7 -0
  39. package/lib/cjs/api/app-binder/SignBlockSignatureCommandTypes.js +2 -0
  40. package/lib/cjs/api/app-binder/SignBlockSignatureCommandTypes.js.map +7 -0
  41. package/lib/cjs/api/app-binder/SignBlockSingleCommandTypes.js +2 -0
  42. package/lib/cjs/api/app-binder/SignBlockSingleCommandTypes.js.map +7 -0
  43. package/lib/cjs/api/index.js +2 -0
  44. package/lib/cjs/api/index.js.map +7 -0
  45. package/lib/cjs/index.js +2 -0
  46. package/lib/cjs/index.js.map +7 -0
  47. package/lib/cjs/internal/DefaultLedgerKeyringProtocol.js +2 -0
  48. package/lib/cjs/internal/DefaultLedgerKeyringProtocol.js.map +7 -0
  49. package/lib/cjs/internal/app-binder/LedgerKeyringProtocolBinder.js +2 -0
  50. package/lib/cjs/internal/app-binder/LedgerKeyringProtocolBinder.js.map +7 -0
  51. package/lib/cjs/internal/app-binder/command/GetAppNameCommand.js +2 -0
  52. package/lib/cjs/internal/app-binder/command/GetAppNameCommand.js.map +7 -0
  53. package/lib/cjs/internal/app-binder/command/GetSeedIdCommand.js +2 -0
  54. package/lib/cjs/internal/app-binder/command/GetSeedIdCommand.js.map +7 -0
  55. package/lib/cjs/internal/app-binder/command/GetSeedIdCommand.test.js +27 -0
  56. package/lib/cjs/internal/app-binder/command/GetSeedIdCommand.test.js.map +7 -0
  57. package/lib/cjs/internal/app-binder/command/GetVersionCommand.js +2 -0
  58. package/lib/cjs/internal/app-binder/command/GetVersionCommand.js.map +7 -0
  59. package/lib/cjs/internal/app-binder/command/InitCommand.js +2 -0
  60. package/lib/cjs/internal/app-binder/command/InitCommand.js.map +7 -0
  61. package/lib/cjs/internal/app-binder/command/InitCommand.test.js +2 -0
  62. package/lib/cjs/internal/app-binder/command/InitCommand.test.js.map +7 -0
  63. package/lib/cjs/internal/app-binder/command/ParseBlockSignatureCommand.js +2 -0
  64. package/lib/cjs/internal/app-binder/command/ParseBlockSignatureCommand.js.map +7 -0
  65. package/lib/cjs/internal/app-binder/command/ParseBlockSignatureCommand.test.js +2 -0
  66. package/lib/cjs/internal/app-binder/command/ParseBlockSignatureCommand.test.js.map +7 -0
  67. package/lib/cjs/internal/app-binder/command/ParseStreamBlockCommand.js +2 -0
  68. package/lib/cjs/internal/app-binder/command/ParseStreamBlockCommand.js.map +7 -0
  69. package/lib/cjs/internal/app-binder/command/ParseStreamBlockCommand.test.js +2 -0
  70. package/lib/cjs/internal/app-binder/command/ParseStreamBlockCommand.test.js.map +7 -0
  71. package/lib/cjs/internal/app-binder/command/ParseStreamBlockHeader.js +2 -0
  72. package/lib/cjs/internal/app-binder/command/ParseStreamBlockHeader.js.map +7 -0
  73. package/lib/cjs/internal/app-binder/command/ParseStreamBlockHeader.test.js +2 -0
  74. package/lib/cjs/internal/app-binder/command/ParseStreamBlockHeader.test.js.map +7 -0
  75. package/lib/cjs/internal/app-binder/command/SetTrustedMemberCommand.js +2 -0
  76. package/lib/cjs/internal/app-binder/command/SetTrustedMemberCommand.js.map +7 -0
  77. package/lib/cjs/internal/app-binder/command/SetTrustedMemberCommand.test.js +2 -0
  78. package/lib/cjs/internal/app-binder/command/SetTrustedMemberCommand.test.js.map +7 -0
  79. package/lib/cjs/internal/app-binder/command/SignBlockHeader.js +2 -0
  80. package/lib/cjs/internal/app-binder/command/SignBlockHeader.js.map +7 -0
  81. package/lib/cjs/internal/app-binder/command/SignBlockHeader.test.js +2 -0
  82. package/lib/cjs/internal/app-binder/command/SignBlockHeader.test.js.map +7 -0
  83. package/lib/cjs/internal/app-binder/command/SignBlockSignatureCommand.js +2 -0
  84. package/lib/cjs/internal/app-binder/command/SignBlockSignatureCommand.js.map +7 -0
  85. package/lib/cjs/internal/app-binder/command/SignBlockSignatureCommand.test.js +2 -0
  86. package/lib/cjs/internal/app-binder/command/SignBlockSignatureCommand.test.js.map +7 -0
  87. package/lib/cjs/internal/app-binder/command/SignBlockSingleCommand.js +2 -0
  88. package/lib/cjs/internal/app-binder/command/SignBlockSingleCommand.js.map +7 -0
  89. package/lib/cjs/internal/app-binder/command/SignBlockSingleCommand.test.js +2 -0
  90. package/lib/cjs/internal/app-binder/command/SignBlockSingleCommand.test.js.map +7 -0
  91. package/lib/cjs/internal/app-binder/command/utils/extractTrustedProperty.js +2 -0
  92. package/lib/cjs/internal/app-binder/command/utils/extractTrustedProperty.js.map +7 -0
  93. package/lib/cjs/internal/app-binder/command/utils/ledgerKeyringProtocolErrors.js +2 -0
  94. package/lib/cjs/internal/app-binder/command/utils/ledgerKeyringProtocolErrors.js.map +7 -0
  95. package/lib/cjs/internal/app-binder/device-action/AddToTrustchainDeviceAction.js +2 -0
  96. package/lib/cjs/internal/app-binder/device-action/AddToTrustchainDeviceAction.js.map +7 -0
  97. package/lib/cjs/internal/app-binder/device-action/AuthenticateDeviceAction.js +2 -0
  98. package/lib/cjs/internal/app-binder/device-action/AuthenticateDeviceAction.js.map +7 -0
  99. package/lib/cjs/internal/app-binder/device-action/utils/raiseAndAssign.js +2 -0
  100. package/lib/cjs/internal/app-binder/device-action/utils/raiseAndAssign.js.map +7 -0
  101. package/lib/cjs/internal/app-binder/di/appBinderModule.js +2 -0
  102. package/lib/cjs/internal/app-binder/di/appBinderModule.js.map +7 -0
  103. package/lib/cjs/internal/app-binder/di/appBinderTypes.js +2 -0
  104. package/lib/cjs/internal/app-binder/di/appBinderTypes.js.map +7 -0
  105. package/lib/cjs/internal/app-binder/task/InitTask.js +2 -0
  106. package/lib/cjs/internal/app-binder/task/InitTask.js.map +7 -0
  107. package/lib/cjs/internal/app-binder/task/ParseStreamToDeviceTask.js +2 -0
  108. package/lib/cjs/internal/app-binder/task/ParseStreamToDeviceTask.js.map +7 -0
  109. package/lib/cjs/internal/app-binder/task/SignBlockTask.js +2 -0
  110. package/lib/cjs/internal/app-binder/task/SignBlockTask.js.map +7 -0
  111. package/lib/cjs/internal/app-binder/task/SignChallengeWithDeviceTask.js +2 -0
  112. package/lib/cjs/internal/app-binder/task/SignChallengeWithDeviceTask.js.map +7 -0
  113. package/lib/cjs/internal/app-binder/task/SignChallengeWithKeypairTask.js +2 -0
  114. package/lib/cjs/internal/app-binder/task/SignChallengeWithKeypairTask.js.map +7 -0
  115. package/lib/cjs/internal/app-binder/task/SignChallengeWithKeypairTask.test.js +2 -0
  116. package/lib/cjs/internal/app-binder/task/SignChallengeWithKeypairTask.test.js.map +7 -0
  117. package/lib/cjs/internal/app-binder/task/utils/TrustedProperties.js +2 -0
  118. package/lib/cjs/internal/app-binder/task/utils/TrustedProperties.js.map +7 -0
  119. package/lib/cjs/internal/di.js +2 -0
  120. package/lib/cjs/internal/di.js.map +7 -0
  121. package/lib/cjs/internal/externalTypes.js +2 -0
  122. package/lib/cjs/internal/externalTypes.js.map +7 -0
  123. package/lib/cjs/internal/lkrp-datasource/data/HttpLKRPDataSource.js +2 -0
  124. package/lib/cjs/internal/lkrp-datasource/data/HttpLKRPDataSource.js.map +7 -0
  125. package/lib/cjs/internal/lkrp-datasource/data/HttpLKRPDataSource.test.js +2 -0
  126. package/lib/cjs/internal/lkrp-datasource/data/HttpLKRPDataSource.test.js.map +7 -0
  127. package/lib/cjs/internal/lkrp-datasource/data/LKRPDataSource.js +2 -0
  128. package/lib/cjs/internal/lkrp-datasource/data/LKRPDataSource.js.map +7 -0
  129. package/lib/cjs/internal/lkrp-datasource/di/lkrpDatasourceModuleFactory.js +2 -0
  130. package/lib/cjs/internal/lkrp-datasource/di/lkrpDatasourceModuleFactory.js.map +7 -0
  131. package/lib/cjs/internal/lkrp-datasource/di/lkrpDatasourceTypes.js +2 -0
  132. package/lib/cjs/internal/lkrp-datasource/di/lkrpDatasourceTypes.js.map +7 -0
  133. package/lib/cjs/internal/use-cases/authentication/AuthenticateUseCase.js +2 -0
  134. package/lib/cjs/internal/use-cases/authentication/AuthenticateUseCase.js.map +7 -0
  135. package/lib/cjs/internal/use-cases/di/useCasesModule.js +2 -0
  136. package/lib/cjs/internal/use-cases/di/useCasesModule.js.map +7 -0
  137. package/lib/cjs/internal/use-cases/di/useCasesTypes.js +2 -0
  138. package/lib/cjs/internal/use-cases/di/useCasesTypes.js.map +7 -0
  139. package/lib/cjs/internal/utils/LKRPBlock.js +5 -0
  140. package/lib/cjs/internal/utils/LKRPBlock.js.map +7 -0
  141. package/lib/cjs/internal/utils/LKRPBlock.test.js +24 -0
  142. package/lib/cjs/internal/utils/LKRPBlock.test.js.map +7 -0
  143. package/lib/cjs/internal/utils/LKRPBlockStream.js +4 -0
  144. package/lib/cjs/internal/utils/LKRPBlockStream.js.map +7 -0
  145. package/lib/cjs/internal/utils/LKRPBlockStream.test.js +39 -0
  146. package/lib/cjs/internal/utils/LKRPBlockStream.test.js.map +7 -0
  147. package/lib/cjs/internal/utils/LKRPCommand.js +3 -0
  148. package/lib/cjs/internal/utils/LKRPCommand.js.map +7 -0
  149. package/lib/cjs/internal/utils/LKRPCommand.test.js +3 -0
  150. package/lib/cjs/internal/utils/LKRPCommand.test.js.map +7 -0
  151. package/lib/cjs/internal/utils/TLVBuilder.js +2 -0
  152. package/lib/cjs/internal/utils/TLVBuilder.js.map +7 -0
  153. package/lib/cjs/internal/utils/TLVParser.js +2 -0
  154. package/lib/cjs/internal/utils/TLVParser.js.map +7 -0
  155. package/lib/cjs/internal/utils/TLVParser.test.js +2 -0
  156. package/lib/cjs/internal/utils/TLVParser.test.js.map +7 -0
  157. package/lib/cjs/internal/utils/TLVTags.js +2 -0
  158. package/lib/cjs/internal/utils/TLVTags.js.map +7 -0
  159. package/lib/cjs/internal/utils/crypto.js +2 -0
  160. package/lib/cjs/internal/utils/crypto.js.map +7 -0
  161. package/lib/cjs/internal/utils/derivationPath.js +2 -0
  162. package/lib/cjs/internal/utils/derivationPath.js.map +7 -0
  163. package/lib/cjs/internal/utils/eitherSeqRecord.js +2 -0
  164. package/lib/cjs/internal/utils/eitherSeqRecord.js.map +7 -0
  165. package/lib/cjs/internal/utils/hex.js +2 -0
  166. package/lib/cjs/internal/utils/hex.js.map +7 -0
  167. package/lib/cjs/internal/utils/required.js +2 -0
  168. package/lib/cjs/internal/utils/required.js.map +7 -0
  169. package/lib/cjs/internal/utils/types.js +2 -0
  170. package/lib/cjs/internal/utils/types.js.map +7 -0
  171. package/lib/cjs/package.json +55 -0
  172. package/lib/esm/api/LedgerKeyringProtocol.js +1 -0
  173. package/lib/esm/api/LedgerKeyringProtocol.js.map +7 -0
  174. package/lib/esm/api/LedgerKeyringProtocolBuilder.js +2 -0
  175. package/lib/esm/api/LedgerKeyringProtocolBuilder.js.map +7 -0
  176. package/lib/esm/api/app-binder/AddToTrustchainDeviceActionTypes.js +1 -0
  177. package/lib/esm/api/app-binder/AddToTrustchainDeviceActionTypes.js.map +7 -0
  178. package/lib/esm/api/app-binder/AuthenticateDeviceActionTypes.js +1 -0
  179. package/lib/esm/api/app-binder/AuthenticateDeviceActionTypes.js.map +7 -0
  180. package/lib/esm/api/app-binder/Errors.js +2 -0
  181. package/lib/esm/api/app-binder/Errors.js.map +7 -0
  182. package/lib/esm/api/app-binder/GetAppNameCommandTypes.js +1 -0
  183. package/lib/esm/api/app-binder/GetAppNameCommandTypes.js.map +7 -0
  184. package/lib/esm/api/app-binder/GetSeedIdCommandTypes.js +1 -0
  185. package/lib/esm/api/app-binder/GetSeedIdCommandTypes.js.map +7 -0
  186. package/lib/esm/api/app-binder/GetVersionCommandTypes.js +1 -0
  187. package/lib/esm/api/app-binder/GetVersionCommandTypes.js.map +7 -0
  188. package/lib/esm/api/app-binder/GetVersionDeviceActionTypes.js +1 -0
  189. package/lib/esm/api/app-binder/GetVersionDeviceActionTypes.js.map +7 -0
  190. package/lib/esm/api/app-binder/InitCommandTypes.js +1 -0
  191. package/lib/esm/api/app-binder/InitCommandTypes.js.map +7 -0
  192. package/lib/esm/api/app-binder/KeypairFromBytes.js +2 -0
  193. package/lib/esm/api/app-binder/KeypairFromBytes.js.map +7 -0
  194. package/lib/esm/api/app-binder/LKRPTypes.js +2 -0
  195. package/lib/esm/api/app-binder/LKRPTypes.js.map +7 -0
  196. package/lib/esm/api/app-binder/ParseStreamBlockCommandCommandTypes.js +1 -0
  197. package/lib/esm/api/app-binder/ParseStreamBlockCommandCommandTypes.js.map +7 -0
  198. package/lib/esm/api/app-binder/ParseStreamBlockHeaderCommandTypes.js +1 -0
  199. package/lib/esm/api/app-binder/ParseStreamBlockHeaderCommandTypes.js.map +7 -0
  200. package/lib/esm/api/app-binder/ParseStreamBlockSignatureTypes.js +1 -0
  201. package/lib/esm/api/app-binder/ParseStreamBlockSignatureTypes.js.map +7 -0
  202. package/lib/esm/api/app-binder/SetTrustedMemberTypes.js +1 -0
  203. package/lib/esm/api/app-binder/SetTrustedMemberTypes.js.map +7 -0
  204. package/lib/esm/api/app-binder/SignBlockCommandTypes.js +1 -0
  205. package/lib/esm/api/app-binder/SignBlockCommandTypes.js.map +7 -0
  206. package/lib/esm/api/app-binder/SignBlockHeaderCommandTypes.js +1 -0
  207. package/lib/esm/api/app-binder/SignBlockHeaderCommandTypes.js.map +7 -0
  208. package/lib/esm/api/app-binder/SignBlockSignatureCommandTypes.js +1 -0
  209. package/lib/esm/api/app-binder/SignBlockSignatureCommandTypes.js.map +7 -0
  210. package/lib/esm/api/app-binder/SignBlockSingleCommandTypes.js +1 -0
  211. package/lib/esm/api/app-binder/SignBlockSingleCommandTypes.js.map +7 -0
  212. package/lib/esm/api/index.js +2 -0
  213. package/lib/esm/api/index.js.map +7 -0
  214. package/lib/esm/index.js +2 -0
  215. package/lib/esm/index.js.map +7 -0
  216. package/lib/esm/internal/DefaultLedgerKeyringProtocol.js +2 -0
  217. package/lib/esm/internal/DefaultLedgerKeyringProtocol.js.map +7 -0
  218. package/lib/esm/internal/app-binder/LedgerKeyringProtocolBinder.js +2 -0
  219. package/lib/esm/internal/app-binder/LedgerKeyringProtocolBinder.js.map +7 -0
  220. package/lib/esm/internal/app-binder/command/GetAppNameCommand.js +2 -0
  221. package/lib/esm/internal/app-binder/command/GetAppNameCommand.js.map +7 -0
  222. package/lib/esm/internal/app-binder/command/GetSeedIdCommand.js +2 -0
  223. package/lib/esm/internal/app-binder/command/GetSeedIdCommand.js.map +7 -0
  224. package/lib/esm/internal/app-binder/command/GetSeedIdCommand.test.js +27 -0
  225. package/lib/esm/internal/app-binder/command/GetSeedIdCommand.test.js.map +7 -0
  226. package/lib/esm/internal/app-binder/command/GetVersionCommand.js +2 -0
  227. package/lib/esm/internal/app-binder/command/GetVersionCommand.js.map +7 -0
  228. package/lib/esm/internal/app-binder/command/InitCommand.js +2 -0
  229. package/lib/esm/internal/app-binder/command/InitCommand.js.map +7 -0
  230. package/lib/esm/internal/app-binder/command/InitCommand.test.js +2 -0
  231. package/lib/esm/internal/app-binder/command/InitCommand.test.js.map +7 -0
  232. package/lib/esm/internal/app-binder/command/ParseBlockSignatureCommand.js +2 -0
  233. package/lib/esm/internal/app-binder/command/ParseBlockSignatureCommand.js.map +7 -0
  234. package/lib/esm/internal/app-binder/command/ParseBlockSignatureCommand.test.js +2 -0
  235. package/lib/esm/internal/app-binder/command/ParseBlockSignatureCommand.test.js.map +7 -0
  236. package/lib/esm/internal/app-binder/command/ParseStreamBlockCommand.js +2 -0
  237. package/lib/esm/internal/app-binder/command/ParseStreamBlockCommand.js.map +7 -0
  238. package/lib/esm/internal/app-binder/command/ParseStreamBlockCommand.test.js +2 -0
  239. package/lib/esm/internal/app-binder/command/ParseStreamBlockCommand.test.js.map +7 -0
  240. package/lib/esm/internal/app-binder/command/ParseStreamBlockHeader.js +2 -0
  241. package/lib/esm/internal/app-binder/command/ParseStreamBlockHeader.js.map +7 -0
  242. package/lib/esm/internal/app-binder/command/ParseStreamBlockHeader.test.js +2 -0
  243. package/lib/esm/internal/app-binder/command/ParseStreamBlockHeader.test.js.map +7 -0
  244. package/lib/esm/internal/app-binder/command/SetTrustedMemberCommand.js +2 -0
  245. package/lib/esm/internal/app-binder/command/SetTrustedMemberCommand.js.map +7 -0
  246. package/lib/esm/internal/app-binder/command/SetTrustedMemberCommand.test.js +2 -0
  247. package/lib/esm/internal/app-binder/command/SetTrustedMemberCommand.test.js.map +7 -0
  248. package/lib/esm/internal/app-binder/command/SignBlockHeader.js +2 -0
  249. package/lib/esm/internal/app-binder/command/SignBlockHeader.js.map +7 -0
  250. package/lib/esm/internal/app-binder/command/SignBlockHeader.test.js +2 -0
  251. package/lib/esm/internal/app-binder/command/SignBlockHeader.test.js.map +7 -0
  252. package/lib/esm/internal/app-binder/command/SignBlockSignatureCommand.js +2 -0
  253. package/lib/esm/internal/app-binder/command/SignBlockSignatureCommand.js.map +7 -0
  254. package/lib/esm/internal/app-binder/command/SignBlockSignatureCommand.test.js +2 -0
  255. package/lib/esm/internal/app-binder/command/SignBlockSignatureCommand.test.js.map +7 -0
  256. package/lib/esm/internal/app-binder/command/SignBlockSingleCommand.js +2 -0
  257. package/lib/esm/internal/app-binder/command/SignBlockSingleCommand.js.map +7 -0
  258. package/lib/esm/internal/app-binder/command/SignBlockSingleCommand.test.js +2 -0
  259. package/lib/esm/internal/app-binder/command/SignBlockSingleCommand.test.js.map +7 -0
  260. package/lib/esm/internal/app-binder/command/utils/extractTrustedProperty.js +2 -0
  261. package/lib/esm/internal/app-binder/command/utils/extractTrustedProperty.js.map +7 -0
  262. package/lib/esm/internal/app-binder/command/utils/ledgerKeyringProtocolErrors.js +2 -0
  263. package/lib/esm/internal/app-binder/command/utils/ledgerKeyringProtocolErrors.js.map +7 -0
  264. package/lib/esm/internal/app-binder/device-action/AddToTrustchainDeviceAction.js +2 -0
  265. package/lib/esm/internal/app-binder/device-action/AddToTrustchainDeviceAction.js.map +7 -0
  266. package/lib/esm/internal/app-binder/device-action/AuthenticateDeviceAction.js +2 -0
  267. package/lib/esm/internal/app-binder/device-action/AuthenticateDeviceAction.js.map +7 -0
  268. package/lib/esm/internal/app-binder/device-action/utils/raiseAndAssign.js +2 -0
  269. package/lib/esm/internal/app-binder/device-action/utils/raiseAndAssign.js.map +7 -0
  270. package/lib/esm/internal/app-binder/di/appBinderModule.js +2 -0
  271. package/lib/esm/internal/app-binder/di/appBinderModule.js.map +7 -0
  272. package/lib/esm/internal/app-binder/di/appBinderTypes.js +2 -0
  273. package/lib/esm/internal/app-binder/di/appBinderTypes.js.map +7 -0
  274. package/lib/esm/internal/app-binder/task/InitTask.js +2 -0
  275. package/lib/esm/internal/app-binder/task/InitTask.js.map +7 -0
  276. package/lib/esm/internal/app-binder/task/ParseStreamToDeviceTask.js +2 -0
  277. package/lib/esm/internal/app-binder/task/ParseStreamToDeviceTask.js.map +7 -0
  278. package/lib/esm/internal/app-binder/task/SignBlockTask.js +2 -0
  279. package/lib/esm/internal/app-binder/task/SignBlockTask.js.map +7 -0
  280. package/lib/esm/internal/app-binder/task/SignChallengeWithDeviceTask.js +2 -0
  281. package/lib/esm/internal/app-binder/task/SignChallengeWithDeviceTask.js.map +7 -0
  282. package/lib/esm/internal/app-binder/task/SignChallengeWithKeypairTask.js +2 -0
  283. package/lib/esm/internal/app-binder/task/SignChallengeWithKeypairTask.js.map +7 -0
  284. package/lib/esm/internal/app-binder/task/SignChallengeWithKeypairTask.test.js +2 -0
  285. package/lib/esm/internal/app-binder/task/SignChallengeWithKeypairTask.test.js.map +7 -0
  286. package/lib/esm/internal/app-binder/task/utils/TrustedProperties.js +2 -0
  287. package/lib/esm/internal/app-binder/task/utils/TrustedProperties.js.map +7 -0
  288. package/lib/esm/internal/di.js +2 -0
  289. package/lib/esm/internal/di.js.map +7 -0
  290. package/lib/esm/internal/externalTypes.js +2 -0
  291. package/lib/esm/internal/externalTypes.js.map +7 -0
  292. package/lib/esm/internal/lkrp-datasource/data/HttpLKRPDataSource.js +2 -0
  293. package/lib/esm/internal/lkrp-datasource/data/HttpLKRPDataSource.js.map +7 -0
  294. package/lib/esm/internal/lkrp-datasource/data/HttpLKRPDataSource.test.js +2 -0
  295. package/lib/esm/internal/lkrp-datasource/data/HttpLKRPDataSource.test.js.map +7 -0
  296. package/lib/esm/internal/lkrp-datasource/data/LKRPDataSource.js +1 -0
  297. package/lib/esm/internal/lkrp-datasource/data/LKRPDataSource.js.map +7 -0
  298. package/lib/esm/internal/lkrp-datasource/di/lkrpDatasourceModuleFactory.js +2 -0
  299. package/lib/esm/internal/lkrp-datasource/di/lkrpDatasourceModuleFactory.js.map +7 -0
  300. package/lib/esm/internal/lkrp-datasource/di/lkrpDatasourceTypes.js +2 -0
  301. package/lib/esm/internal/lkrp-datasource/di/lkrpDatasourceTypes.js.map +7 -0
  302. package/lib/esm/internal/use-cases/authentication/AuthenticateUseCase.js +2 -0
  303. package/lib/esm/internal/use-cases/authentication/AuthenticateUseCase.js.map +7 -0
  304. package/lib/esm/internal/use-cases/di/useCasesModule.js +2 -0
  305. package/lib/esm/internal/use-cases/di/useCasesModule.js.map +7 -0
  306. package/lib/esm/internal/use-cases/di/useCasesTypes.js +2 -0
  307. package/lib/esm/internal/use-cases/di/useCasesTypes.js.map +7 -0
  308. package/lib/esm/internal/utils/LKRPBlock.js +5 -0
  309. package/lib/esm/internal/utils/LKRPBlock.js.map +7 -0
  310. package/lib/esm/internal/utils/LKRPBlock.test.js +24 -0
  311. package/lib/esm/internal/utils/LKRPBlock.test.js.map +7 -0
  312. package/lib/esm/internal/utils/LKRPBlockStream.js +4 -0
  313. package/lib/esm/internal/utils/LKRPBlockStream.js.map +7 -0
  314. package/lib/esm/internal/utils/LKRPBlockStream.test.js +39 -0
  315. package/lib/esm/internal/utils/LKRPBlockStream.test.js.map +7 -0
  316. package/lib/esm/internal/utils/LKRPCommand.js +3 -0
  317. package/lib/esm/internal/utils/LKRPCommand.js.map +7 -0
  318. package/lib/esm/internal/utils/LKRPCommand.test.js +3 -0
  319. package/lib/esm/internal/utils/LKRPCommand.test.js.map +7 -0
  320. package/lib/esm/internal/utils/TLVBuilder.js +2 -0
  321. package/lib/esm/internal/utils/TLVBuilder.js.map +7 -0
  322. package/lib/esm/internal/utils/TLVParser.js +2 -0
  323. package/lib/esm/internal/utils/TLVParser.js.map +7 -0
  324. package/lib/esm/internal/utils/TLVParser.test.js +2 -0
  325. package/lib/esm/internal/utils/TLVParser.test.js.map +7 -0
  326. package/lib/esm/internal/utils/TLVTags.js +2 -0
  327. package/lib/esm/internal/utils/TLVTags.js.map +7 -0
  328. package/lib/esm/internal/utils/crypto.js +2 -0
  329. package/lib/esm/internal/utils/crypto.js.map +7 -0
  330. package/lib/esm/internal/utils/derivationPath.js +2 -0
  331. package/lib/esm/internal/utils/derivationPath.js.map +7 -0
  332. package/lib/esm/internal/utils/eitherSeqRecord.js +2 -0
  333. package/lib/esm/internal/utils/eitherSeqRecord.js.map +7 -0
  334. package/lib/esm/internal/utils/hex.js +2 -0
  335. package/lib/esm/internal/utils/hex.js.map +7 -0
  336. package/lib/esm/internal/utils/required.js +2 -0
  337. package/lib/esm/internal/utils/required.js.map +7 -0
  338. package/lib/esm/internal/utils/types.js +1 -0
  339. package/lib/esm/internal/utils/types.js.map +7 -0
  340. package/lib/esm/package.json +55 -0
  341. package/lib/types/api/LedgerKeyringProtocol.d.ts +9 -0
  342. package/lib/types/api/LedgerKeyringProtocol.d.ts.map +1 -0
  343. package/lib/types/api/LedgerKeyringProtocolBuilder.d.ts +14 -0
  344. package/lib/types/api/LedgerKeyringProtocolBuilder.d.ts.map +1 -0
  345. package/lib/types/api/app-binder/AddToTrustchainDeviceActionTypes.d.ts +27 -0
  346. package/lib/types/api/app-binder/AddToTrustchainDeviceActionTypes.d.ts.map +1 -0
  347. package/lib/types/api/app-binder/AuthenticateDeviceActionTypes.d.ts +37 -0
  348. package/lib/types/api/app-binder/AuthenticateDeviceActionTypes.d.ts.map +1 -0
  349. package/lib/types/api/app-binder/Errors.d.ts +27 -0
  350. package/lib/types/api/app-binder/Errors.d.ts.map +1 -0
  351. package/lib/types/api/app-binder/GetAppNameCommandTypes.d.ts +5 -0
  352. package/lib/types/api/app-binder/GetAppNameCommandTypes.d.ts.map +1 -0
  353. package/lib/types/api/app-binder/GetSeedIdCommandTypes.d.ts +14 -0
  354. package/lib/types/api/app-binder/GetSeedIdCommandTypes.d.ts.map +1 -0
  355. package/lib/types/api/app-binder/GetVersionCommandTypes.d.ts +5 -0
  356. package/lib/types/api/app-binder/GetVersionCommandTypes.d.ts.map +1 -0
  357. package/lib/types/api/app-binder/GetVersionDeviceActionTypes.d.ts +10 -0
  358. package/lib/types/api/app-binder/GetVersionDeviceActionTypes.d.ts.map +1 -0
  359. package/lib/types/api/app-binder/InitCommandTypes.d.ts +5 -0
  360. package/lib/types/api/app-binder/InitCommandTypes.d.ts.map +1 -0
  361. package/lib/types/api/app-binder/KeypairFromBytes.d.ts +11 -0
  362. package/lib/types/api/app-binder/KeypairFromBytes.d.ts.map +1 -0
  363. package/lib/types/api/app-binder/LKRPTypes.d.ts +24 -0
  364. package/lib/types/api/app-binder/LKRPTypes.d.ts.map +1 -0
  365. package/lib/types/api/app-binder/ParseStreamBlockCommandCommandTypes.d.ts +6 -0
  366. package/lib/types/api/app-binder/ParseStreamBlockCommandCommandTypes.d.ts.map +1 -0
  367. package/lib/types/api/app-binder/ParseStreamBlockHeaderCommandTypes.d.ts +5 -0
  368. package/lib/types/api/app-binder/ParseStreamBlockHeaderCommandTypes.d.ts.map +1 -0
  369. package/lib/types/api/app-binder/ParseStreamBlockSignatureTypes.d.ts +5 -0
  370. package/lib/types/api/app-binder/ParseStreamBlockSignatureTypes.d.ts.map +1 -0
  371. package/lib/types/api/app-binder/SetTrustedMemberTypes.d.ts +6 -0
  372. package/lib/types/api/app-binder/SetTrustedMemberTypes.d.ts.map +1 -0
  373. package/lib/types/api/app-binder/SignBlockCommandTypes.d.ts +9 -0
  374. package/lib/types/api/app-binder/SignBlockCommandTypes.d.ts.map +1 -0
  375. package/lib/types/api/app-binder/SignBlockHeaderCommandTypes.d.ts +5 -0
  376. package/lib/types/api/app-binder/SignBlockHeaderCommandTypes.d.ts.map +1 -0
  377. package/lib/types/api/app-binder/SignBlockSignatureCommandTypes.d.ts +6 -0
  378. package/lib/types/api/app-binder/SignBlockSignatureCommandTypes.d.ts.map +1 -0
  379. package/lib/types/api/app-binder/SignBlockSingleCommandTypes.d.ts +5 -0
  380. package/lib/types/api/app-binder/SignBlockSingleCommandTypes.d.ts.map +1 -0
  381. package/lib/types/api/index.d.ts +7 -0
  382. package/lib/types/api/index.d.ts.map +1 -0
  383. package/lib/types/index.d.ts +3 -0
  384. package/lib/types/index.d.ts.map +1 -0
  385. package/lib/types/internal/DefaultLedgerKeyringProtocol.d.ts +20 -0
  386. package/lib/types/internal/DefaultLedgerKeyringProtocol.d.ts.map +1 -0
  387. package/lib/types/internal/app-binder/LedgerKeyringProtocolBinder.d.ts +29 -0
  388. package/lib/types/internal/app-binder/LedgerKeyringProtocolBinder.d.ts.map +1 -0
  389. package/lib/types/internal/app-binder/command/GetAppNameCommand.d.ts +9 -0
  390. package/lib/types/internal/app-binder/command/GetAppNameCommand.d.ts.map +1 -0
  391. package/lib/types/internal/app-binder/command/GetSeedIdCommand.d.ts +11 -0
  392. package/lib/types/internal/app-binder/command/GetSeedIdCommand.d.ts.map +1 -0
  393. package/lib/types/internal/app-binder/command/GetSeedIdCommand.test.d.ts +2 -0
  394. package/lib/types/internal/app-binder/command/GetSeedIdCommand.test.d.ts.map +1 -0
  395. package/lib/types/internal/app-binder/command/GetVersionCommand.d.ts +9 -0
  396. package/lib/types/internal/app-binder/command/GetVersionCommand.d.ts.map +1 -0
  397. package/lib/types/internal/app-binder/command/InitCommand.d.ts +11 -0
  398. package/lib/types/internal/app-binder/command/InitCommand.d.ts.map +1 -0
  399. package/lib/types/internal/app-binder/command/InitCommand.test.d.ts +2 -0
  400. package/lib/types/internal/app-binder/command/InitCommand.test.d.ts.map +1 -0
  401. package/lib/types/internal/app-binder/command/ParseBlockSignatureCommand.d.ts +11 -0
  402. package/lib/types/internal/app-binder/command/ParseBlockSignatureCommand.d.ts.map +1 -0
  403. package/lib/types/internal/app-binder/command/ParseBlockSignatureCommand.test.d.ts +2 -0
  404. package/lib/types/internal/app-binder/command/ParseBlockSignatureCommand.test.d.ts.map +1 -0
  405. package/lib/types/internal/app-binder/command/ParseStreamBlockCommand.d.ts +11 -0
  406. package/lib/types/internal/app-binder/command/ParseStreamBlockCommand.d.ts.map +1 -0
  407. package/lib/types/internal/app-binder/command/ParseStreamBlockCommand.test.d.ts +2 -0
  408. package/lib/types/internal/app-binder/command/ParseStreamBlockCommand.test.d.ts.map +1 -0
  409. package/lib/types/internal/app-binder/command/ParseStreamBlockHeader.d.ts +11 -0
  410. package/lib/types/internal/app-binder/command/ParseStreamBlockHeader.d.ts.map +1 -0
  411. package/lib/types/internal/app-binder/command/ParseStreamBlockHeader.test.d.ts +2 -0
  412. package/lib/types/internal/app-binder/command/ParseStreamBlockHeader.test.d.ts.map +1 -0
  413. package/lib/types/internal/app-binder/command/SetTrustedMemberCommand.d.ts +11 -0
  414. package/lib/types/internal/app-binder/command/SetTrustedMemberCommand.d.ts.map +1 -0
  415. package/lib/types/internal/app-binder/command/SetTrustedMemberCommand.test.d.ts +2 -0
  416. package/lib/types/internal/app-binder/command/SetTrustedMemberCommand.test.d.ts.map +1 -0
  417. package/lib/types/internal/app-binder/command/SignBlockHeader.d.ts +11 -0
  418. package/lib/types/internal/app-binder/command/SignBlockHeader.d.ts.map +1 -0
  419. package/lib/types/internal/app-binder/command/SignBlockHeader.test.d.ts +2 -0
  420. package/lib/types/internal/app-binder/command/SignBlockHeader.test.d.ts.map +1 -0
  421. package/lib/types/internal/app-binder/command/SignBlockSignatureCommand.d.ts +10 -0
  422. package/lib/types/internal/app-binder/command/SignBlockSignatureCommand.d.ts.map +1 -0
  423. package/lib/types/internal/app-binder/command/SignBlockSignatureCommand.test.d.ts +2 -0
  424. package/lib/types/internal/app-binder/command/SignBlockSignatureCommand.test.d.ts.map +1 -0
  425. package/lib/types/internal/app-binder/command/SignBlockSingleCommand.d.ts +11 -0
  426. package/lib/types/internal/app-binder/command/SignBlockSingleCommand.d.ts.map +1 -0
  427. package/lib/types/internal/app-binder/command/SignBlockSingleCommand.test.d.ts +2 -0
  428. package/lib/types/internal/app-binder/command/SignBlockSingleCommand.test.d.ts.map +1 -0
  429. package/lib/types/internal/app-binder/command/utils/extractTrustedProperty.d.ts +4 -0
  430. package/lib/types/internal/app-binder/command/utils/extractTrustedProperty.d.ts.map +1 -0
  431. package/lib/types/internal/app-binder/command/utils/ledgerKeyringProtocolErrors.d.ts +9 -0
  432. package/lib/types/internal/app-binder/command/utils/ledgerKeyringProtocolErrors.d.ts.map +1 -0
  433. package/lib/types/internal/app-binder/device-action/AddToTrustchainDeviceAction.d.ts +20 -0
  434. package/lib/types/internal/app-binder/device-action/AddToTrustchainDeviceAction.d.ts.map +1 -0
  435. package/lib/types/internal/app-binder/device-action/AuthenticateDeviceAction.d.ts +42 -0
  436. package/lib/types/internal/app-binder/device-action/AuthenticateDeviceAction.d.ts.map +1 -0
  437. package/lib/types/internal/app-binder/device-action/utils/raiseAndAssign.d.ts +41 -0
  438. package/lib/types/internal/app-binder/device-action/utils/raiseAndAssign.d.ts.map +1 -0
  439. package/lib/types/internal/app-binder/di/appBinderModule.d.ts +3 -0
  440. package/lib/types/internal/app-binder/di/appBinderModule.d.ts.map +1 -0
  441. package/lib/types/internal/app-binder/di/appBinderTypes.d.ts +4 -0
  442. package/lib/types/internal/app-binder/di/appBinderTypes.d.ts.map +1 -0
  443. package/lib/types/internal/app-binder/task/InitTask.d.ts +10 -0
  444. package/lib/types/internal/app-binder/task/InitTask.d.ts.map +1 -0
  445. package/lib/types/internal/app-binder/task/ParseStreamToDeviceTask.d.ts +26 -0
  446. package/lib/types/internal/app-binder/task/ParseStreamToDeviceTask.d.ts.map +1 -0
  447. package/lib/types/internal/app-binder/task/SignBlockTask.d.ts +68 -0
  448. package/lib/types/internal/app-binder/task/SignBlockTask.d.ts.map +1 -0
  449. package/lib/types/internal/app-binder/task/SignChallengeWithDeviceTask.d.ts +10 -0
  450. package/lib/types/internal/app-binder/task/SignChallengeWithDeviceTask.d.ts.map +1 -0
  451. package/lib/types/internal/app-binder/task/SignChallengeWithKeypairTask.d.ts +15 -0
  452. package/lib/types/internal/app-binder/task/SignChallengeWithKeypairTask.d.ts.map +1 -0
  453. package/lib/types/internal/app-binder/task/SignChallengeWithKeypairTask.test.d.ts +2 -0
  454. package/lib/types/internal/app-binder/task/SignChallengeWithKeypairTask.test.d.ts.map +1 -0
  455. package/lib/types/internal/app-binder/task/utils/TrustedProperties.d.ts +26 -0
  456. package/lib/types/internal/app-binder/task/utils/TrustedProperties.d.ts.map +1 -0
  457. package/lib/types/internal/di.d.ts +10 -0
  458. package/lib/types/internal/di.d.ts.map +1 -0
  459. package/lib/types/internal/externalTypes.d.ts +14 -0
  460. package/lib/types/internal/externalTypes.d.ts.map +1 -0
  461. package/lib/types/internal/lkrp-datasource/data/HttpLKRPDataSource.d.ts +22 -0
  462. package/lib/types/internal/lkrp-datasource/data/HttpLKRPDataSource.d.ts.map +1 -0
  463. package/lib/types/internal/lkrp-datasource/data/HttpLKRPDataSource.test.d.ts +2 -0
  464. package/lib/types/internal/lkrp-datasource/data/HttpLKRPDataSource.test.d.ts.map +1 -0
  465. package/lib/types/internal/lkrp-datasource/data/LKRPDataSource.d.ts +54 -0
  466. package/lib/types/internal/lkrp-datasource/data/LKRPDataSource.d.ts.map +1 -0
  467. package/lib/types/internal/lkrp-datasource/di/lkrpDatasourceModuleFactory.d.ts +4 -0
  468. package/lib/types/internal/lkrp-datasource/di/lkrpDatasourceModuleFactory.d.ts.map +1 -0
  469. package/lib/types/internal/lkrp-datasource/di/lkrpDatasourceTypes.d.ts +5 -0
  470. package/lib/types/internal/lkrp-datasource/di/lkrpDatasourceTypes.d.ts.map +1 -0
  471. package/lib/types/internal/use-cases/authentication/AuthenticateUseCase.d.ts +9 -0
  472. package/lib/types/internal/use-cases/authentication/AuthenticateUseCase.d.ts.map +1 -0
  473. package/lib/types/internal/use-cases/di/useCasesModule.d.ts +3 -0
  474. package/lib/types/internal/use-cases/di/useCasesModule.d.ts.map +1 -0
  475. package/lib/types/internal/use-cases/di/useCasesTypes.d.ts +4 -0
  476. package/lib/types/internal/use-cases/di/useCasesTypes.d.ts.map +1 -0
  477. package/lib/types/internal/utils/LKRPBlock.d.ts +17 -0
  478. package/lib/types/internal/utils/LKRPBlock.d.ts.map +1 -0
  479. package/lib/types/internal/utils/LKRPBlock.test.d.ts +2 -0
  480. package/lib/types/internal/utils/LKRPBlock.test.d.ts.map +1 -0
  481. package/lib/types/internal/utils/LKRPBlockStream.d.ts +26 -0
  482. package/lib/types/internal/utils/LKRPBlockStream.d.ts.map +1 -0
  483. package/lib/types/internal/utils/LKRPBlockStream.test.d.ts +2 -0
  484. package/lib/types/internal/utils/LKRPBlockStream.test.d.ts.map +1 -0
  485. package/lib/types/internal/utils/LKRPCommand.d.ts +18 -0
  486. package/lib/types/internal/utils/LKRPCommand.d.ts.map +1 -0
  487. package/lib/types/internal/utils/LKRPCommand.test.d.ts +2 -0
  488. package/lib/types/internal/utils/LKRPCommand.test.d.ts.map +1 -0
  489. package/lib/types/internal/utils/TLVBuilder.d.ts +15 -0
  490. package/lib/types/internal/utils/TLVBuilder.d.ts.map +1 -0
  491. package/lib/types/internal/utils/TLVParser.d.ts +59 -0
  492. package/lib/types/internal/utils/TLVParser.d.ts.map +1 -0
  493. package/lib/types/internal/utils/TLVParser.test.d.ts +2 -0
  494. package/lib/types/internal/utils/TLVParser.test.d.ts.map +1 -0
  495. package/lib/types/internal/utils/TLVTags.d.ts +27 -0
  496. package/lib/types/internal/utils/TLVTags.d.ts.map +1 -0
  497. package/lib/types/internal/utils/crypto.d.ts +19 -0
  498. package/lib/types/internal/utils/crypto.d.ts.map +1 -0
  499. package/lib/types/internal/utils/derivationPath.d.ts +3 -0
  500. package/lib/types/internal/utils/derivationPath.d.ts.map +1 -0
  501. package/lib/types/internal/utils/eitherSeqRecord.d.ts +29 -0
  502. package/lib/types/internal/utils/eitherSeqRecord.d.ts.map +1 -0
  503. package/lib/types/internal/utils/hex.d.ts +3 -0
  504. package/lib/types/internal/utils/hex.d.ts.map +1 -0
  505. package/lib/types/internal/utils/required.d.ts +3 -0
  506. package/lib/types/internal/utils/required.d.ts.map +1 -0
  507. package/lib/types/internal/utils/types.d.ts +73 -0
  508. package/lib/types/internal/utils/types.d.ts.map +1 -0
  509. package/lib/types/tsconfig.prod.tsbuildinfo +1 -0
  510. package/package.json +54 -0
package/LICENSE.MD ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2024-present Ledger
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # Ledger Keyring Protocol
2
+
3
+ ...
4
+
5
+ ## 🔹 Index
6
+
7
+ 1. [How it works](#-how-it-works)
8
+ 2. [Installation](#-installation)
9
+ 3. [Initialisation](#-initialisation)
10
+ 4. [Use Cases](#-use-cases)
11
+ 5. [Observable Behavior](#-observable-behavior)
12
+ 6. [Example](#-example)
13
+
14
+ ## 🔹 How it works
15
+
16
+ ## 🔹 Installation
17
+
18
+ > **Note:** This module is not standalone; it depends on the [@ledgerhq/device-management-kit](https://github.com/LedgerHQ/device-sdk-ts/tree/develop/packages/device-management-kit) package, so you need to install it first.
19
+
20
+ To install the `ledger-keyring-protocol` package, run the following command:
21
+
22
+ ```sh
23
+ npm install @ledgerhq/device-trusted-app-kit-ledger-keyring-protocol
24
+ ```
25
+
26
+ ## 🔹 Initialisation
27
+
28
+ ## 🔹 Use Cases
29
+
30
+ ## 🔹 Observable Behavior
31
+
32
+ ## 🔹 Example
@@ -0,0 +1,2 @@
1
+ "use strict";var a=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var s=(r,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of y(t))!o.call(r,e)&&e!==n&&a(r,e,{get:()=>t[e],enumerable:!(i=p(t,e))||i.enumerable});return r};var m=r=>s(a({},"__esModule",{value:!0}),r);var c={};module.exports=m(c);
2
+ //# sourceMappingURL=LedgerKeyringProtocol.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/api/LedgerKeyringProtocol.ts"],
4
+ "sourcesContent": ["import { type Maybe } from \"purify-ts\";\n\nimport { type AuthenticateDAReturnType } from \"./app-binder/AuthenticateDeviceActionTypes\";\nimport {\n type JWT,\n type Keypair,\n type Permissions,\n} from \"./app-binder/LKRPTypes\";\n\nexport interface LedgerKeyringProtocol {\n authenticate: (\n keypair: Keypair,\n applicationId: number,\n clientName: string,\n permissions: Permissions,\n trustchainId?: string,\n JWT?: JWT,\n ) => AuthenticateDAReturnType;\n\n encryptData: (xpriv: Uint8Array, data: Uint8Array) => Uint8Array;\n\n decryptData: (xpriv: Uint8Array, data: Uint8Array) => Maybe<Uint8Array>;\n}\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["LedgerKeyringProtocol_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var t=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var m=(i,e)=>{for(var r in e)t(i,r,{get:e[r],enumerable:!0})},c=(i,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of a(e))!l.call(i,s)&&s!==r&&t(i,s,{get:()=>e[s],enumerable:!(o=d(e,s))||o.enumerable});return i};var g=i=>c(t({},"__esModule",{value:!0}),i);var y={};m(y,{LedgerKeyringProtocolBuilder:()=>p});module.exports=g(y);var n=require("../internal/DefaultLedgerKeyringProtocol");class p{dmk;sessionId;baseUrl;constructor({dmk:e,sessionId:r,baseUrl:o}){this.dmk=e,this.sessionId=r,this.baseUrl=o}build(){return new n.DefaultLedgerKeyringProtocol({dmk:this.dmk,sessionId:this.sessionId,baseUrl:this.baseUrl})}}0&&(module.exports={LedgerKeyringProtocolBuilder});
2
+ //# sourceMappingURL=LedgerKeyringProtocolBuilder.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/api/LedgerKeyringProtocolBuilder.ts"],
4
+ "sourcesContent": ["import {\n type DeviceManagementKit,\n type DeviceSessionId,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type LedgerKeyringProtocol } from \"@api/LedgerKeyringProtocol\";\nimport { DefaultLedgerKeyringProtocol } from \"@internal/DefaultLedgerKeyringProtocol\";\n\nexport class LedgerKeyringProtocolBuilder {\n private readonly dmk: DeviceManagementKit;\n private readonly sessionId: DeviceSessionId;\n private readonly baseUrl: string;\n\n constructor({\n dmk,\n sessionId,\n baseUrl,\n }: {\n dmk: DeviceManagementKit;\n sessionId: DeviceSessionId;\n baseUrl: string;\n }) {\n this.dmk = dmk;\n this.sessionId = sessionId;\n this.baseUrl = baseUrl;\n }\n\n build(): LedgerKeyringProtocol {\n return new DefaultLedgerKeyringProtocol({\n dmk: this.dmk,\n sessionId: this.sessionId,\n baseUrl: this.baseUrl,\n });\n }\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kCAAAE,IAAA,eAAAC,EAAAH,GAMA,IAAAI,EAA6C,kDAEtC,MAAMF,CAA6B,CACvB,IACA,UACA,QAEjB,YAAY,CACV,IAAAG,EACA,UAAAC,EACA,QAAAC,CACF,EAIG,CACD,KAAK,IAAMF,EACX,KAAK,UAAYC,EACjB,KAAK,QAAUC,CACjB,CAEA,OAA+B,CAC7B,OAAO,IAAI,+BAA6B,CACtC,IAAK,KAAK,IACV,UAAW,KAAK,UAChB,QAAS,KAAK,OAChB,CAAC,CACH,CACF",
6
+ "names": ["LedgerKeyringProtocolBuilder_exports", "__export", "LedgerKeyringProtocolBuilder", "__toCommonJS", "import_DefaultLedgerKeyringProtocol", "dmk", "sessionId", "baseUrl"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var y=(t,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of p(r))!s.call(t,e)&&e!==n&&i(t,e,{get:()=>r[e],enumerable:!(o=a(r,e))||o.enumerable});return t};var d=t=>y(i({},"__esModule",{value:!0}),t);var m={};module.exports=d(m);
2
+ //# sourceMappingURL=AddToTrustchainDeviceActionTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/AddToTrustchainDeviceActionTypes.ts"],
4
+ "sourcesContent": ["import {\n type OpenAppDAError,\n type UnknownDAError,\n} from \"@ledgerhq/device-management-kit\";\nimport { type Either } from \"purify-ts\";\n\nimport { type LKRPDeviceCommandError } from \"@internal/app-binder/command/utils/ledgerKeyringProtocolErrors\";\nimport { type LKRPDataSource } from \"@internal/lkrp-datasource/data/LKRPDataSource\";\nimport { type LKRPBlockStream } from \"@internal/utils/LKRPBlockStream\";\nimport { type Trustchain } from \"@internal/utils/types\";\n\nimport {\n type LKRPHttpRequestError,\n type LKRPMissingDataError,\n type LKRPParsingError,\n} from \"./Errors\";\nimport { type JWT, type Keypair, type Permissions } from \"./LKRPTypes\";\n\nexport type AddToTrustchainDAOutput = undefined;\n\nexport type AddToTrustchainDAInput = Either<\n LKRPMissingDataError,\n {\n readonly lkrpDataSource: LKRPDataSource;\n readonly keypair: Keypair;\n readonly jwt: JWT;\n readonly trustchainId: string;\n readonly trustchain: Trustchain;\n readonly applicationStream: LKRPBlockStream;\n readonly clientName: string;\n readonly permissions: Permissions;\n }\n>;\n\nexport type AddToTrustchainDAError =\n | LKRPDeviceCommandError\n | LKRPHttpRequestError\n | LKRPParsingError\n | LKRPMissingDataError\n | OpenAppDAError\n | UnknownDAError;\n\nexport type AddToTrustchainDAIntermediateValue = {\n readonly requiredUserInteraction: string;\n};\n\nexport type AddToTrustchainDAInternalState = Either<\n AddToTrustchainDAError,\n {\n readonly sessionKeypair: Keypair | null;\n }\n>;\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["AddToTrustchainDeviceActionTypes_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var a=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var y=(r,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of p(t))!l.call(r,e)&&e!==o&&a(r,e,{get:()=>t[e],enumerable:!(n=i(t,e))||n.enumerable});return r};var u=r=>y(a({},"__esModule",{value:!0}),r);var c={};module.exports=u(c);
2
+ //# sourceMappingURL=AuthenticateDeviceActionTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/AuthenticateDeviceActionTypes.ts"],
4
+ "sourcesContent": ["import {\n type ExecuteDeviceActionReturnType,\n type OpenAppDAError,\n type UnknownDAError,\n} from \"@ledgerhq/device-management-kit\";\nimport { type Either } from \"purify-ts\";\n\nimport { type LKRPDeviceCommandError } from \"@internal/app-binder/command/utils/ledgerKeyringProtocolErrors\";\nimport { type LKRPDataSource } from \"@internal/lkrp-datasource/data/LKRPDataSource\";\nimport { type LKRPBlockStream } from \"@internal/utils/LKRPBlockStream\";\nimport { type Trustchain } from \"@internal/utils/types\";\n\nimport {\n type LKRPHttpRequestError,\n type LKRPMissingDataError,\n type LKRPParsingError,\n type LKRPUnhandledState,\n} from \"./Errors\";\nimport { type JWT, type Keypair, type Permissions } from \"./LKRPTypes\";\n\nexport type AuthenticateDAReturnType = ExecuteDeviceActionReturnType<\n AuthenticateDAOutput,\n AuthenticateDAError,\n AuthenticateDAIntermediateValue\n>;\n\nexport type AuthenticateDAInput = {\n readonly lkrpDataSource: LKRPDataSource;\n readonly applicationId: number;\n readonly keypair: Keypair;\n readonly clientName: string;\n readonly permissions: Permissions;\n readonly trustchainId: string | null;\n readonly jwt: JWT | null;\n};\n\nexport type AuthenticateDAOutput = {\n readonly jwt: JWT | null;\n readonly trustchainId: string | null;\n readonly applicationPath: string | null;\n readonly encryptionKey: Uint8Array | null;\n};\n\nexport type AuthenticateDAError =\n | LKRPDeviceCommandError\n | LKRPHttpRequestError\n | LKRPParsingError\n | LKRPMissingDataError\n | LKRPUnhandledState\n | OpenAppDAError\n | UnknownDAError;\n\nexport type AuthenticateDAIntermediateValue = {\n readonly requiredUserInteraction: string;\n};\n\nexport type AuthenticateDAInternalState = Either<\n AuthenticateDAError,\n {\n readonly trustchainId: string | null;\n readonly jwt: JWT | null;\n readonly trustchain: Trustchain | null;\n readonly applicationStream: LKRPBlockStream | null;\n readonly encryptionKey: Uint8Array | null;\n readonly wasAddedToTrustchain: boolean;\n }\n>;\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["AuthenticateDeviceActionTypes_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var s=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var l=(o,r)=>{for(var e in r)s(o,e,{get:r[e],enumerable:!0})},p=(o,r,e,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of c(r))!i.call(o,n)&&n!==e&&s(o,n,{get:()=>r[n],enumerable:!(a=u(r,n))||a.enumerable});return o};var P=o=>p(s({},"__esModule",{value:!0}),o);var g={};l(g,{LKRPHttpRequestError:()=>d,LKRPMissingDataError:()=>K,LKRPParsingError:()=>x,LKRPUnauthorizedError:()=>R,LKRPUnhandledState:()=>L});module.exports=P(g);var t=require("@ledgerhq/device-management-kit");class d extends t.GeneralDmkError{constructor(e){super(e);this.err=e}_tag="LKRPHttpRequestError"}class R extends d{constructor(e){super(e);this.err=e}_tag="LKRPUnauthorizedError"}class x extends t.GeneralDmkError{constructor(e){super(e);this.err=e}_tag="LKRPParsingError"}class K extends t.GeneralDmkError{constructor(e){super(e);this.err=e}_tag="LKRPMissingDataError"}class L extends t.GeneralDmkError{constructor(e){super(e);this.err=e}_tag="LKRPUnhandledState"}0&&(module.exports={LKRPHttpRequestError,LKRPMissingDataError,LKRPParsingError,LKRPUnauthorizedError,LKRPUnhandledState});
2
+ //# sourceMappingURL=Errors.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/Errors.ts"],
4
+ "sourcesContent": ["import { GeneralDmkError } from \"@ledgerhq/device-management-kit\";\n\nexport class LKRPHttpRequestError extends GeneralDmkError {\n override _tag = \"LKRPHttpRequestError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class LKRPUnauthorizedError extends LKRPHttpRequestError {\n override _tag = \"LKRPUnauthorizedError\";\n constructor(override err?: unknown) {\n super(err);\n }\n}\n\nexport class LKRPParsingError extends GeneralDmkError {\n override readonly _tag = \"LKRPParsingError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class LKRPMissingDataError extends GeneralDmkError {\n override readonly _tag = \"LKRPMissingDataError\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n\nexport class LKRPUnhandledState extends GeneralDmkError {\n override readonly _tag = \"LKRPUnhandledState\";\n constructor(readonly err?: unknown) {\n super(err);\n }\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,EAAA,yBAAAC,EAAA,qBAAAC,EAAA,0BAAAC,EAAA,uBAAAC,IAAA,eAAAC,EAAAP,GAAA,IAAAQ,EAAgC,2CAEzB,MAAMN,UAA6B,iBAAgB,CAExD,YAAqBO,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHS,KAAO,sBAIlB,CAEO,MAAMJ,UAA8BH,CAAqB,CAE9D,YAAqBO,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHS,KAAO,uBAIlB,CAEO,MAAML,UAAyB,iBAAgB,CAEpD,YAAqBK,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,kBAI3B,CAEO,MAAMN,UAA6B,iBAAgB,CAExD,YAAqBM,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,sBAI3B,CAEO,MAAMH,UAA2B,iBAAgB,CAEtD,YAAqBG,EAAe,CAClC,MAAMA,CAAG,EADU,SAAAA,CAErB,CAHkB,KAAO,oBAI3B",
6
+ "names": ["Errors_exports", "__export", "LKRPHttpRequestError", "LKRPMissingDataError", "LKRPParsingError", "LKRPUnauthorizedError", "LKRPUnhandledState", "__toCommonJS", "import_device_management_kit", "err"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var t=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var s=(p,e,a,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of d(e))!r.call(p,n)&&n!==a&&t(p,n,{get:()=>e[n],enumerable:!(m=o(e,n))||m.enumerable});return p};var y=p=>s(t({},"__esModule",{value:!0}),p);var A={};module.exports=y(A);
2
+ //# sourceMappingURL=GetAppNameCommandTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/GetAppNameCommandTypes.ts"],
4
+ "sourcesContent": ["export type GetAppNameCommandResponse = {\n readonly name: string;\n};\n\nexport type GetAppNameCommandArgs = undefined;\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["GetAppNameCommandTypes_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var d=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var s=(n,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!i.call(n,r)&&r!==o&&d(n,r,{get:()=>e[r],enumerable:!(t=a(e,r))||t.enumerable});return n};var y=n=>s(d({},"__esModule",{value:!0}),n);var g={};module.exports=y(g);
2
+ //# sourceMappingURL=GetSeedIdCommandTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/GetSeedIdCommandTypes.ts"],
4
+ "sourcesContent": ["export type GetSeedIdCommandResponse = {\n readonly credential: {\n readonly version: number;\n readonly curveId: number;\n readonly signAlgorithm: number;\n readonly publicKey: string;\n };\n readonly signature: string;\n readonly attestation: string;\n};\n\nexport type GetSeedIdCommandArgs = {\n readonly challengeTLV: string;\n};\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["GetSeedIdCommandTypes_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var s=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var m=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of i(e))!p.call(n,o)&&o!==t&&s(n,o,{get:()=>e[o],enumerable:!(r=d(e,o))||r.enumerable});return n};var a=n=>m(s({},"__esModule",{value:!0}),n);var y={};module.exports=a(y);
2
+ //# sourceMappingURL=GetVersionCommandTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/GetVersionCommandTypes.ts"],
4
+ "sourcesContent": ["export type GetVersionCommandResponse = {\n readonly version: string;\n};\n\nexport type GetVersionCommandArgs = undefined;\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["GetVersionCommandTypes_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var n=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var s=(r,e,p,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of m(e))!d.call(r,t)&&t!==p&&n(r,t,{get:()=>e[t],enumerable:!(o=i(e,t))||o.enumerable});return r};var u=r=>s(n({},"__esModule",{value:!0}),r);var A={};module.exports=u(A);
2
+ //# sourceMappingURL=GetVersionDeviceActionTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/GetVersionDeviceActionTypes.ts"],
4
+ "sourcesContent": ["import {\n type CommandErrorResult,\n type ExecuteDeviceActionReturnType,\n type OpenAppDAError,\n type SendCommandInAppDAIntermediateValue,\n type SendCommandInAppDAOutput,\n type UserInteractionRequired,\n} from \"@ledgerhq/device-management-kit\";\n\nimport { type GetVersionCommandResponse } from \"@api/app-binder/GetVersionCommandTypes\";\nimport { type LedgerKeyringProtocolErrorCodes } from \"@internal/app-binder/command/utils/ledgerKeyringProtocolErrors\";\n\ntype GetVersionDAUserInteractionRequired = UserInteractionRequired.None;\n\nexport type GetVersionDAOutput =\n SendCommandInAppDAOutput<GetVersionCommandResponse>;\n\nexport type GetVersionDAError =\n | OpenAppDAError\n | CommandErrorResult<LedgerKeyringProtocolErrorCodes>[\"error\"];\n\nexport type GetVersionDAIntermediateValue =\n SendCommandInAppDAIntermediateValue<GetVersionDAUserInteractionRequired>;\n\nexport type GetVersionDAReturnType = ExecuteDeviceActionReturnType<\n GetVersionDAOutput,\n GetVersionDAError,\n GetVersionDAIntermediateValue\n>;\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["GetVersionDeviceActionTypes_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var p=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var a=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of m(e))!y.call(t,n)&&n!==i&&p(t,n,{get:()=>e[n],enumerable:!(o=r(e,n))||o.enumerable});return t};var d=t=>a(p({},"__esModule",{value:!0}),t);var s={};module.exports=d(s);
2
+ //# sourceMappingURL=InitCommandTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/InitCommandTypes.ts"],
4
+ "sourcesContent": ["export type InitCommandResponse = void;\n\nexport type InitCommandArgs = {\n publicKey: Uint8Array;\n};\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["InitCommandTypes_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var n=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var u=(t,r)=>{for(var e in r)n(t,e,{get:r[e],enumerable:!0})},K=(t,r,e,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let y of c(r))!m.call(t,y)&&y!==e&&n(t,y,{get:()=>r[y],enumerable:!(a=s(r,y))||a.enumerable});return t};var l=t=>K(n({},"__esModule",{value:!0}),t);var b={};u(b,{KeypairFromBytes:()=>U});module.exports=l(b);var i=require("@noble/secp256k1"),o=require("../../internal/utils/crypto"),p=require("../../internal/utils/hex");class U{constructor(r,e=(0,i.getPublicKey)(r)){this.privateKey=r;this.publicKey=e}pubKeyToU8a(){return this.publicKey}pubKeyToHex(){return(0,p.bytesToHex)(this.publicKey)}async sign(r){const{r:e,s:a}=await(0,i.signAsync)(r,this.privateKey);return o.CryptoUtils.derEncode(e,a)}ecdh(r,e=!0){return(0,i.getSharedSecret)(this.privateKey,r,e)}}0&&(module.exports={KeypairFromBytes});
2
+ //# sourceMappingURL=KeypairFromBytes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/KeypairFromBytes.ts"],
4
+ "sourcesContent": ["import { getPublicKey, getSharedSecret, signAsync } from \"@noble/secp256k1\";\n\nimport { type Keypair } from \"@api/index\";\nimport { CryptoUtils } from \"@internal/utils/crypto\";\nimport { bytesToHex } from \"@internal/utils/hex\";\n\nexport class KeypairFromBytes implements Keypair {\n constructor(\n private readonly privateKey: Uint8Array,\n private readonly publicKey = getPublicKey(privateKey),\n ) {}\n\n pubKeyToU8a(): Uint8Array {\n return this.publicKey;\n }\n\n pubKeyToHex(): string {\n return bytesToHex(this.publicKey);\n }\n\n async sign(message: Uint8Array): Promise<Uint8Array> {\n const { r, s } = await signAsync(message, this.privateKey);\n return CryptoUtils.derEncode(r, s);\n }\n\n ecdh(publicKey: Uint8Array, isCompressed = true): Uint8Array {\n return getSharedSecret(this.privateKey, publicKey, isCompressed);\n }\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAyD,4BAGzDC,EAA4B,kCAC5BC,EAA2B,+BAEpB,MAAMJ,CAAoC,CAC/C,YACmBK,EACAC,KAAY,gBAAaD,CAAU,EACpD,CAFiB,gBAAAA,EACA,eAAAC,CAChB,CAEH,aAA0B,CACxB,OAAO,KAAK,SACd,CAEA,aAAsB,CACpB,SAAO,cAAW,KAAK,SAAS,CAClC,CAEA,MAAM,KAAKC,EAA0C,CACnD,KAAM,CAAE,EAAAC,EAAG,EAAAC,CAAE,EAAI,QAAM,aAAUF,EAAS,KAAK,UAAU,EACzD,OAAO,cAAY,UAAUC,EAAGC,CAAC,CACnC,CAEA,KAAKH,EAAuBI,EAAe,GAAkB,CAC3D,SAAO,mBAAgB,KAAK,WAAYJ,EAAWI,CAAY,CACjE,CACF",
6
+ "names": ["KeypairFromBytes_exports", "__export", "KeypairFromBytes", "__toCommonJS", "import_secp256k1", "import_crypto", "import_hex", "privateKey", "publicKey", "message", "r", "s", "isCompressed"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var p=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var c=(a,r)=>{for(var e in r)p(a,e,{get:r[e],enumerable:!0})},U=(a,r,e,y)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of n(r))!g.call(a,t)&&t!==e&&p(a,t,{get:()=>r[t],enumerable:!(y=A(r,t))||y.enumerable});return a};var u=a=>U(p({},"__esModule",{value:!0}),a);var x={};c(x,{Permissions:()=>f});module.exports=u(x);var f=(t=>(t[t.OWNER=4294967295]="OWNER",t[t.CAN_ENCRYPT=1]="CAN_ENCRYPT",t[t.CAN_DERIVE=2]="CAN_DERIVE",t[t.CAN_ADD_BLOCK=4]="CAN_ADD_BLOCK",t))(f||{});0&&(module.exports={Permissions});
2
+ //# sourceMappingURL=LKRPTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/LKRPTypes.ts"],
4
+ "sourcesContent": ["export interface Keypair {\n pubKeyToU8a(): Uint8Array;\n pubKeyToHex(): string;\n sign(message: Uint8Array): Promise<Uint8Array>;\n ecdh(publicKey: Uint8Array): Uint8Array;\n}\n\nexport type JWT = {\n access_token: string;\n permissions: {\n [trustchainId: string]: {\n [path: string]: string[];\n };\n };\n};\n\n/**\n * https://ledgerhq.atlassian.net/wiki/spaces/TA/pages/5865144361/ARCH+LKRP+-+v2+specifications#Member-permissions\n */\nexport enum Permissions {\n OWNER = 0xffffffff, // Owners of the stream have access to everything\n CAN_ENCRYPT = 1, // The member can have access to the stream private key\n CAN_DERIVE = 1 << 1, // The member can have access to the stream chain code (if a member have access to the private key and the chain code it is able to derive sub-streams)\n CAN_ADD_BLOCK = 1 << 2, // The member is authorized to issue blocks in the current stream\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAAA,eAAAC,EAAAH,GAmBO,IAAKE,OACVA,IAAA,MAAQ,YAAR,QACAA,IAAA,YAAc,GAAd,cACAA,IAAA,WAAa,GAAb,aACAA,IAAA,cAAgB,GAAhB,gBAJUA,OAAA",
6
+ "names": ["LKRPTypes_exports", "__export", "Permissions", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var o=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var d=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of p(e))!s.call(r,a)&&a!==t&&o(r,a,{get:()=>e[a],enumerable:!(n=m(e,a))||n.enumerable});return r};var i=r=>d(o({},"__esModule",{value:!0}),r);var y={};module.exports=i(y);
2
+ //# sourceMappingURL=ParseStreamBlockCommandCommandTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/ParseStreamBlockCommandCommandTypes.ts"],
4
+ "sourcesContent": ["export type ParseSingleCommandArgs = {\n command: Uint8Array;\n outputTrustedParam?: boolean;\n};\n\nexport type ParseSingleCommandResponse = Uint8Array;\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["ParseStreamBlockCommandCommandTypes_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var t=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var m=(r,e,d,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of p(e))!s.call(r,a)&&a!==d&&t(r,a,{get:()=>e[a],enumerable:!(o=n(e,a))||o.enumerable});return r};var y=r=>m(t({},"__esModule",{value:!0}),r);var A={};module.exports=y(A);
2
+ //# sourceMappingURL=ParseStreamBlockHeaderCommandTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/ParseStreamBlockHeaderCommandTypes.ts"],
4
+ "sourcesContent": ["export type ParseBlockHeaderCommandResponse = Uint8Array;\n\nexport type ParseBlockHeaderCommandArgs = {\n header: Uint8Array;\n};\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["ParseStreamBlockHeaderCommandTypes_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var n=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var g=(e,r,o,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of i(r))!p.call(e,a)&&a!==o&&n(e,a,{get:()=>r[a],enumerable:!(t=s(r,a))||t.enumerable});return e};var m=e=>g(n({},"__esModule",{value:!0}),e);var y={};module.exports=m(y);
2
+ //# sourceMappingURL=ParseStreamBlockSignatureTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/ParseStreamBlockSignatureTypes.ts"],
4
+ "sourcesContent": ["export type ParseBlockSignatureCommandResponse = Uint8Array;\n\nexport type ParseBlockSignatureCommandArgs = { signature: Uint8Array };\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["ParseStreamBlockSignatureTypes_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var o=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var p=(r,e,d,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of a(e))!y.call(r,t)&&t!==d&&o(r,t,{get:()=>e[t],enumerable:!(m=n(e,t))||m.enumerable});return r};var s=r=>p(o({},"__esModule",{value:!0}),r);var i={};module.exports=s(i);
2
+ //# sourceMappingURL=SetTrustedMemberTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/SetTrustedMemberTypes.ts"],
4
+ "sourcesContent": ["export type SetTrustedMemberCommandResponse = void;\n\nexport type SetTrustedMemberCommandArgs = {\n readonly iv: Uint8Array;\n readonly memberTlv: Uint8Array;\n};\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["SetTrustedMemberTypes_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var p=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var l=(e,r,y,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of d(r))!n.call(e,o)&&o!==y&&p(e,o,{get:()=>r[o],enumerable:!(t=a(r,o))||t.enumerable});return e};var m=e=>l(p({},"__esModule",{value:!0}),e);var s={};module.exports=m(s);
2
+ //# sourceMappingURL=SignBlockCommandTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/SignBlockCommandTypes.ts"],
4
+ "sourcesContent": ["import { type TrustedProperty } from \"@internal/externalTypes\";\n\nexport type SignBlockCommandResponse = {\n readonly trustedProperty: Partial<TrustedProperty>;\n};\n\nexport type SignBlockCommandArgs = {\n readonly p1: 0x00 | 0x01 | 0x02;\n readonly payload: Uint8Array;\n};\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["SignBlockCommandTypes_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var o=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var p=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of i(e))!m.call(r,a)&&a!==t&&o(r,a,{get:()=>e[a],enumerable:!(n=d(e,a))||n.enumerable});return r};var c=r=>p(o({},"__esModule",{value:!0}),r);var g={};module.exports=c(g);
2
+ //# sourceMappingURL=SignBlockHeaderCommandTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/SignBlockHeaderCommandTypes.ts"],
4
+ "sourcesContent": ["export interface SignBlockHeaderCommandArgs {\n header: Uint8Array;\n}\n\nexport type SignBlockHeaderCommandResponse = Uint8Array;\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["SignBlockHeaderCommandTypes_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var t=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var c=(n,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of g(e))!s.call(n,r)&&r!==o&&t(n,r,{get:()=>e[r],enumerable:!(i=a(e,r))||i.enumerable});return n};var S=n=>c(t({},"__esModule",{value:!0}),n);var d={};module.exports=S(d);
2
+ //# sourceMappingURL=SignBlockSignatureCommandTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/SignBlockSignatureCommandTypes.ts"],
4
+ "sourcesContent": ["export type SignBlockSignatureCommandArgs = Record<string, never>;\n\nexport interface SignBlockSignatureCommandResponse {\n signature: Uint8Array;\n deviceSessionKey: Uint8Array;\n}\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["SignBlockSignatureCommandTypes_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var i=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var c=(e,n,a,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of t(n))!g.call(e,o)&&o!==a&&i(e,o,{get:()=>n[o],enumerable:!(r=m(n,o))||r.enumerable});return e};var l=e=>c(i({},"__esModule",{value:!0}),e);var p={};module.exports=l(p);
2
+ //# sourceMappingURL=SignBlockSingleCommandTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/api/app-binder/SignBlockSingleCommandTypes.ts"],
4
+ "sourcesContent": ["export interface SignBlockSingleCommandArgs {\n command: Uint8Array;\n}\n\nexport type SignBlockSingleCommandResponse = Uint8Array;\n"],
5
+ "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD",
6
+ "names": ["SignBlockSingleCommandTypes_exports", "__toCommonJS"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var t=(f,e,p,x)=>{if(e&&typeof e=="object"||typeof e=="function")for(let m of c(e))!d.call(f,m)&&m!==p&&a(f,m,{get:()=>e[m],enumerable:!(x=b(e,m))||x.enumerable});return f},r=(f,e,p)=>(t(f,e,"default"),p&&t(p,e,"default"));var g=f=>t(a({},"__esModule",{value:!0}),f);var o={};module.exports=g(o);r(o,require("./app-binder/AuthenticateDeviceActionTypes"),module.exports);r(o,require("./app-binder/KeypairFromBytes"),module.exports);r(o,require("./app-binder/LKRPTypes"),module.exports);r(o,require("./LedgerKeyringProtocol"),module.exports);r(o,require("./LedgerKeyringProtocolBuilder"),module.exports);r(o,require("../internal/externalTypes"),module.exports);0&&(module.exports={...require("./app-binder/AuthenticateDeviceActionTypes"),...require("./app-binder/KeypairFromBytes"),...require("./app-binder/LKRPTypes"),...require("./LedgerKeyringProtocol"),...require("./LedgerKeyringProtocolBuilder"),...require("../internal/externalTypes")});
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/api/index.ts"],
4
+ "sourcesContent": ["export * from \"./app-binder/AuthenticateDeviceActionTypes\";\nexport * from \"./app-binder/KeypairFromBytes\";\nexport * from \"./app-binder/LKRPTypes\";\nexport * from \"@api/LedgerKeyringProtocol\";\nexport * from \"@api/LedgerKeyringProtocolBuilder\";\nexport * from \"@internal/externalTypes\";\n"],
5
+ "mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAAAE,EAAAF,EAAc,sDAAd,gBACAE,EAAAF,EAAc,yCADd,gBAEAE,EAAAF,EAAc,kCAFd,gBAGAE,EAAAF,EAAc,sCAHd,gBAIAE,EAAAF,EAAc,6CAJd,gBAKAE,EAAAF,EAAc,mCALd",
6
+ "names": ["api_exports", "__toCommonJS", "__reExport"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var x=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var f=(r,o,t,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let m of b(o))!c.call(r,m)&&m!==t&&x(r,m,{get:()=>o[m],enumerable:!(i=a(o,m))||i.enumerable});return r},e=(r,o,t)=>(f(r,o,"default"),t&&f(t,o,"default"));var d=r=>f(x({},"__esModule",{value:!0}),r);var p={};module.exports=d(p);var h=require("reflect-metadata");e(p,require("./api/index"),module.exports);0&&(module.exports={...require("./api/index")});
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["// inversify requirement\nimport \"reflect-metadata\";\n\nexport * from \"@api/index\";\n"],
5
+ "mappings": "iaAAA,IAAAA,EAAA,kBAAAC,EAAAD,GACA,IAAAE,EAAO,4BAEPC,EAAAH,EAAc,sBAHd",
6
+ "names": ["index_exports", "__toCommonJS", "import_reflect_metadata", "__reExport"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var u=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var b=(o,e)=>{for(var a in e)u(o,a,{get:e[a],enumerable:!0})},L=(o,e,a,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of D(e))!B.call(o,r)&&r!==a&&u(o,r,{get:()=>e[r],enumerable:!(t=U(e,r))||t.enumerable});return o};var T=o=>L(u({},"__esModule",{value:!0}),o);var C={};b(C,{DefaultLedgerKeyringProtocol:()=>x});module.exports=T(C);var m=require("@ledgerhq/device-management-kit"),i=require("purify-ts"),d=require("../api/app-binder/KeypairFromBytes"),f=require("./di"),n=require("./utils/crypto"),h=require("./use-cases/di/useCasesTypes");class x{name;_container;constructor({dmk:e,sessionId:a,baseUrl:t}){this.name="Ledger Keyring Protocol",this._container=(0,f.makeContainer)({dmk:e,sessionId:a,baseUrl:t})}authenticate(e,a,t,r,c,s){return this._container.get(h.useCasesTypes.AuthenticateUseCase).execute(e,a,t,r,c,s)}encryptData(e,a){const t=new d.KeypairFromBytes(e),r=n.CryptoUtils.randomKeypair(),c=t.ecdh(r.pubKeyToU8a()).slice(1),s=n.CryptoUtils.hmac(new Uint8Array,c),y=n.CryptoUtils.randomBytes(16),p=n.CryptoUtils.encrypt(s,y,a),g=p.subarray(0,-n.AES_BLOCK_SIZE),l=p.subarray(-n.AES_BLOCK_SIZE);return new m.ByteArrayBuilder().add8BitUIntToData(0).addBufferToData(r.pubKeyToU8a()).addBufferToData(y).addBufferToData(l).addBufferToData(g).build()}decryptData(e,a){const t=new m.ByteArrayParser(a);return t.extract8BitUInt()!==0?i.Nothing:i.Maybe.sequence([i.Maybe.fromNullable(t.extractFieldByLength(33)),i.Maybe.fromNullable(t.extractFieldByLength(16)),i.Maybe.fromNullable(t.extractFieldByLength(16)),i.Maybe.fromNullable(t.extractFieldByLength(t.getUnparsedRemainingLength()))]).map(r=>{const c=r[0],s=r[1],y=r[2],p=r[3],l=new d.KeypairFromBytes(e).ecdh(c).slice(1),A=n.CryptoUtils.hmac(new Uint8Array,l),K=new Uint8Array([...p,...y]);return n.CryptoUtils.decrypt(A,s,K)})}}0&&(module.exports={DefaultLedgerKeyringProtocol});
2
+ //# sourceMappingURL=DefaultLedgerKeyringProtocol.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/internal/DefaultLedgerKeyringProtocol.ts"],
4
+ "sourcesContent": ["import {\n type DeviceManagementKit,\n type DeviceSessionId,\n} from \"@ledgerhq/device-management-kit\";\nimport {\n ByteArrayBuilder,\n ByteArrayParser,\n} from \"@ledgerhq/device-management-kit\";\nimport { type Container } from \"inversify\";\nimport { Maybe, Nothing } from \"purify-ts\";\n\nimport { type AuthenticateDAReturnType } from \"@api/app-binder/AuthenticateDeviceActionTypes\";\nimport { KeypairFromBytes } from \"@api/app-binder/KeypairFromBytes\";\nimport {\n type JWT,\n type Keypair,\n type Permissions,\n} from \"@api/app-binder/LKRPTypes\";\nimport { type LedgerKeyringProtocol } from \"@api/LedgerKeyringProtocol\";\nimport { makeContainer } from \"@internal/di\";\nimport { AES_BLOCK_SIZE, CryptoUtils } from \"@internal/utils/crypto\";\n\nimport { type AuthenticateUseCase } from \"./use-cases/authentication/AuthenticateUseCase\";\nimport { useCasesTypes } from \"./use-cases/di/useCasesTypes\";\n\ntype DefaultLedgerKeyringProtocolConstructorArgs = {\n dmk: DeviceManagementKit;\n sessionId: DeviceSessionId;\n baseUrl: string;\n};\n\nexport class DefaultLedgerKeyringProtocol implements LedgerKeyringProtocol {\n name: string;\n private _container: Container;\n\n constructor({\n dmk,\n sessionId,\n baseUrl,\n }: DefaultLedgerKeyringProtocolConstructorArgs) {\n this.name = \"Ledger Keyring Protocol\";\n this._container = makeContainer({ dmk, sessionId, baseUrl });\n }\n\n authenticate(\n keypair: Keypair,\n applicationId: number,\n clientName: string,\n permissions: Permissions,\n trustchainId?: string,\n jwt?: JWT,\n ): AuthenticateDAReturnType {\n return this._container\n .get<AuthenticateUseCase>(useCasesTypes.AuthenticateUseCase)\n .execute(\n keypair,\n applicationId,\n clientName,\n permissions,\n trustchainId,\n jwt,\n );\n }\n\n // TODO Better return type for error management instead of exceptions\n encryptData(encryptionKey: Uint8Array, data: Uint8Array): Uint8Array {\n // TODO move implem in a use case\n\n // Derive the shared secret using ECDH with an ephemeral keypair\n const privateKey = new KeypairFromBytes(encryptionKey);\n const ephemeralKeypair = CryptoUtils.randomKeypair();\n const sharedSecret = privateKey\n .ecdh(ephemeralKeypair.pubKeyToU8a())\n .slice(1);\n\n // Key derivation using HMAC-SHA256\n const key = CryptoUtils.hmac(new Uint8Array(), sharedSecret);\n\n // Generate a random IV (nonce)\n const iv = CryptoUtils.randomBytes(16);\n\n // Encrypt data\n const ciphertext = CryptoUtils.encrypt(key, iv, data);\n const encryptedData = ciphertext.subarray(0, -AES_BLOCK_SIZE);\n const tag = ciphertext.subarray(-AES_BLOCK_SIZE);\n\n // Serialize the result\n return new ByteArrayBuilder()\n .add8BitUIntToData(0) // Version of the format\n .addBufferToData(ephemeralKeypair.pubKeyToU8a())\n .addBufferToData(iv)\n .addBufferToData(tag)\n .addBufferToData(encryptedData)\n .build();\n }\n\n decryptData(encryptionKey: Uint8Array, data: Uint8Array): Maybe<Uint8Array> {\n // TODO move implem in a use case\n\n const parser = new ByteArrayParser(data);\n if (parser.extract8BitUInt() !== 0) {\n // Unsupported serialization version\n return Nothing;\n }\n return Maybe.sequence([\n Maybe.fromNullable(parser.extractFieldByLength(33)),\n Maybe.fromNullable(parser.extractFieldByLength(16)),\n Maybe.fromNullable(parser.extractFieldByLength(16)),\n Maybe.fromNullable(\n parser.extractFieldByLength(parser.getUnparsedRemainingLength()),\n ),\n ]).map((parsed) => {\n const ephemeralPublicKey = parsed[0]!;\n const iv = parsed[1]!;\n const tag = parsed[2]!;\n const encryptedData = parsed[3]!;\n\n // Derive the shared secret using ECDH with an ephemeral keypair\n const privateKey = new KeypairFromBytes(encryptionKey);\n const sharedSecret = privateKey.ecdh(ephemeralPublicKey).slice(1);\n\n // Key derivation using HMAC-SHA256\n const key = CryptoUtils.hmac(new Uint8Array(), sharedSecret);\n\n // Decrypt the data\n const ciphertext = new Uint8Array([...encryptedData, ...tag]);\n const cleartext = CryptoUtils.decrypt(key, iv, ciphertext);\n return cleartext;\n });\n }\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,kCAAAE,IAAA,eAAAC,EAAAH,GAIA,IAAAI,EAGO,2CAEPC,EAA+B,qBAG/BC,EAAiC,4CAOjCC,EAA8B,wBAC9BC,EAA4C,kCAG5CC,EAA8B,wCAQvB,MAAMP,CAA8D,CACzE,KACQ,WAER,YAAY,CACV,IAAAQ,EACA,UAAAC,EACA,QAAAC,CACF,EAAgD,CAC9C,KAAK,KAAO,0BACZ,KAAK,cAAa,iBAAc,CAAE,IAAAF,EAAK,UAAAC,EAAW,QAAAC,CAAQ,CAAC,CAC7D,CAEA,aACEC,EACAC,EACAC,EACAC,EACAC,EACAC,EAC0B,CAC1B,OAAO,KAAK,WACT,IAAyB,gBAAc,mBAAmB,EAC1D,QACCL,EACAC,EACAC,EACAC,EACAC,EACAC,CACF,CACJ,CAGA,YAAYC,EAA2BC,EAA8B,CAInE,MAAMC,EAAa,IAAI,mBAAiBF,CAAa,EAC/CG,EAAmB,cAAY,cAAc,EAC7CC,EAAeF,EAClB,KAAKC,EAAiB,YAAY,CAAC,EACnC,MAAM,CAAC,EAGJE,EAAM,cAAY,KAAK,IAAI,WAAcD,CAAY,EAGrDE,EAAK,cAAY,YAAY,EAAE,EAG/BC,EAAa,cAAY,QAAQF,EAAKC,EAAIL,CAAI,EAC9CO,EAAgBD,EAAW,SAAS,EAAG,CAAC,gBAAc,EACtDE,EAAMF,EAAW,SAAS,CAAC,gBAAc,EAG/C,OAAO,IAAI,mBAAiB,EACzB,kBAAkB,CAAC,EACnB,gBAAgBJ,EAAiB,YAAY,CAAC,EAC9C,gBAAgBG,CAAE,EAClB,gBAAgBG,CAAG,EACnB,gBAAgBD,CAAa,EAC7B,MAAM,CACX,CAEA,YAAYR,EAA2BC,EAAqC,CAG1E,MAAMS,EAAS,IAAI,kBAAgBT,CAAI,EACvC,OAAIS,EAAO,gBAAgB,IAAM,EAExB,UAEF,QAAM,SAAS,CACpB,QAAM,aAAaA,EAAO,qBAAqB,EAAE,CAAC,EAClD,QAAM,aAAaA,EAAO,qBAAqB,EAAE,CAAC,EAClD,QAAM,aAAaA,EAAO,qBAAqB,EAAE,CAAC,EAClD,QAAM,aACJA,EAAO,qBAAqBA,EAAO,2BAA2B,CAAC,CACjE,CACF,CAAC,EAAE,IAAKC,GAAW,CACjB,MAAMC,EAAqBD,EAAO,CAAC,EAC7BL,EAAKK,EAAO,CAAC,EACbF,EAAME,EAAO,CAAC,EACdH,EAAgBG,EAAO,CAAC,EAIxBP,EADa,IAAI,mBAAiBJ,CAAa,EACrB,KAAKY,CAAkB,EAAE,MAAM,CAAC,EAG1DP,EAAM,cAAY,KAAK,IAAI,WAAcD,CAAY,EAGrDG,EAAa,IAAI,WAAW,CAAC,GAAGC,EAAe,GAAGC,CAAG,CAAC,EAE5D,OADkB,cAAY,QAAQJ,EAAKC,EAAIC,CAAU,CAE3D,CAAC,CACH,CACF",
6
+ "names": ["DefaultLedgerKeyringProtocol_exports", "__export", "DefaultLedgerKeyringProtocol", "__toCommonJS", "import_device_management_kit", "import_purify_ts", "import_KeypairFromBytes", "import_di", "import_crypto", "import_useCasesTypes", "dmk", "sessionId", "baseUrl", "keypair", "applicationId", "clientName", "permissions", "trustchainId", "jwt", "encryptionKey", "data", "privateKey", "ephemeralKeypair", "sharedSecret", "key", "iv", "ciphertext", "encryptedData", "tag", "parser", "parsed", "ephemeralPublicKey"]
7
+ }