@bitgo/account-lib 2.20.0-rc.30 → 2.20.0-rc.33

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 (440) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/resources/README.md +0 -22
  3. package/dist/src/coin/hbar/coinTransferBuilder.js +2 -2
  4. package/dist/src/coin/hbar/iface.d.ts +21 -4
  5. package/dist/src/coin/hbar/iface.d.ts.map +1 -1
  6. package/dist/src/coin/hbar/iface.js +1 -1
  7. package/dist/src/coin/hbar/index.d.ts +3 -0
  8. package/dist/src/coin/hbar/index.d.ts.map +1 -1
  9. package/dist/src/coin/hbar/index.js +8 -2
  10. package/dist/src/coin/hbar/tokenAssociateBuilder.d.ts +4 -1
  11. package/dist/src/coin/hbar/tokenAssociateBuilder.d.ts.map +1 -1
  12. package/dist/src/coin/hbar/tokenAssociateBuilder.js +18 -10
  13. package/dist/src/coin/hbar/tokenTransferBuilder.js +2 -2
  14. package/dist/src/coin/hbar/transaction.d.ts +10 -2
  15. package/dist/src/coin/hbar/transaction.d.ts.map +1 -1
  16. package/dist/src/coin/hbar/transaction.js +76 -29
  17. package/dist/src/coin/hbar/utils.d.ts +0 -1
  18. package/dist/src/coin/hbar/utils.d.ts.map +1 -1
  19. package/dist/src/coin/hbar/utils.js +1 -2
  20. package/dist/src/index.d.ts +20 -10
  21. package/dist/src/index.d.ts.map +1 -1
  22. package/dist/src/index.js +27 -17
  23. package/dist/tsconfig.tsbuildinfo +6757 -19435
  24. package/package.json +19 -32
  25. package/resources/README.md +0 -22
  26. package/dist/browser/bitgo-account-lib.js +0 -2
  27. package/dist/browser/bitgo-account-lib.js.LICENSE.txt +0 -337
  28. package/dist/resources/hbar/protobuf/BasicTypes.proto +0 -424
  29. package/dist/resources/hbar/protobuf/CryptoCreate.proto +0 -47
  30. package/dist/resources/hbar/protobuf/CryptoTransfer.proto +0 -33
  31. package/dist/resources/hbar/protobuf/Duration.proto +0 -28
  32. package/dist/resources/hbar/protobuf/Timestamp.proto +0 -34
  33. package/dist/resources/hbar/protobuf/Transaction.proto +0 -35
  34. package/dist/resources/hbar/protobuf/TransactionBody.proto +0 -24
  35. package/dist/resources/hbar/protobuf/TransactionContents.proto +0 -33
  36. package/dist/resources/hbar/protobuf/hedera.d.ts +0 -4612
  37. package/dist/resources/hbar/protobuf/hedera.js +0 -12192
  38. package/dist/resources/trx/protobuf/Contract.proto +0 -256
  39. package/dist/resources/trx/protobuf/Discover.proto +0 -44
  40. package/dist/resources/trx/protobuf/tron.d.ts +0 -11024
  41. package/dist/resources/trx/protobuf/tron.js +0 -31510
  42. package/dist/resources/trx/protobuf/tron.proto +0 -677
  43. package/dist/src/coin/algo/assetTransferBuilder.d.ts +0 -42
  44. package/dist/src/coin/algo/assetTransferBuilder.d.ts.map +0 -1
  45. package/dist/src/coin/algo/assetTransferBuilder.js +0 -105
  46. package/dist/src/coin/algo/errors.d.ts +0 -11
  47. package/dist/src/coin/algo/errors.d.ts.map +0 -1
  48. package/dist/src/coin/algo/errors.js +0 -27
  49. package/dist/src/coin/algo/ifaces.d.ts +0 -46
  50. package/dist/src/coin/algo/ifaces.d.ts.map +0 -1
  51. package/dist/src/coin/algo/ifaces.js +0 -3
  52. package/dist/src/coin/algo/index.d.ts +0 -13
  53. package/dist/src/coin/algo/index.d.ts.map +0 -1
  54. package/dist/src/coin/algo/index.js +0 -47
  55. package/dist/src/coin/algo/keyPair.d.ts +0 -25
  56. package/dist/src/coin/algo/keyPair.d.ts.map +0 -1
  57. package/dist/src/coin/algo/keyPair.js +0 -77
  58. package/dist/src/coin/algo/keyRegistrationBuilder.d.ts +0 -104
  59. package/dist/src/coin/algo/keyRegistrationBuilder.d.ts.map +0 -1
  60. package/dist/src/coin/algo/keyRegistrationBuilder.js +0 -239
  61. package/dist/src/coin/algo/seedEncoding.d.ts +0 -25
  62. package/dist/src/coin/algo/seedEncoding.d.ts.map +0 -1
  63. package/dist/src/coin/algo/seedEncoding.js +0 -97
  64. package/dist/src/coin/algo/transaction.d.ts +0 -75
  65. package/dist/src/coin/algo/transaction.d.ts.map +0 -1
  66. package/dist/src/coin/algo/transaction.js +0 -251
  67. package/dist/src/coin/algo/transactionBuilder.d.ts +0 -204
  68. package/dist/src/coin/algo/transactionBuilder.d.ts.map +0 -1
  69. package/dist/src/coin/algo/transactionBuilder.js +0 -373
  70. package/dist/src/coin/algo/transactionBuilderFactory.d.ts +0 -16
  71. package/dist/src/coin/algo/transactionBuilderFactory.d.ts.map +0 -1
  72. package/dist/src/coin/algo/transactionBuilderFactory.js +0 -52
  73. package/dist/src/coin/algo/transferBuilder.d.ts +0 -40
  74. package/dist/src/coin/algo/transferBuilder.d.ts.map +0 -1
  75. package/dist/src/coin/algo/transferBuilder.js +0 -89
  76. package/dist/src/coin/algo/txnSchema.d.ts +0 -7
  77. package/dist/src/coin/algo/txnSchema.d.ts.map +0 -1
  78. package/dist/src/coin/algo/txnSchema.js +0 -68
  79. package/dist/src/coin/algo/utils.d.ts +0 -249
  80. package/dist/src/coin/algo/utils.d.ts.map +0 -1
  81. package/dist/src/coin/algo/utils.js +0 -539
  82. package/dist/src/coin/avaxc/index.d.ts +0 -7
  83. package/dist/src/coin/avaxc/index.d.ts.map +0 -1
  84. package/dist/src/coin/avaxc/index.js +0 -34
  85. package/dist/src/coin/avaxc/keyPair.d.ts +0 -26
  86. package/dist/src/coin/avaxc/keyPair.d.ts.map +0 -1
  87. package/dist/src/coin/avaxc/keyPair.js +0 -83
  88. package/dist/src/coin/avaxc/resources.d.ts +0 -12
  89. package/dist/src/coin/avaxc/resources.d.ts.map +0 -1
  90. package/dist/src/coin/avaxc/resources.js +0 -27
  91. package/dist/src/coin/avaxc/transactionBuilder.d.ts +0 -17
  92. package/dist/src/coin/avaxc/transactionBuilder.d.ts.map +0 -1
  93. package/dist/src/coin/avaxc/transactionBuilder.js +0 -45
  94. package/dist/src/coin/avaxc/transferBuilder.d.ts +0 -17
  95. package/dist/src/coin/avaxc/transferBuilder.d.ts.map +0 -1
  96. package/dist/src/coin/avaxc/transferBuilder.js +0 -25
  97. package/dist/src/coin/avaxc/utils.d.ts +0 -38
  98. package/dist/src/coin/avaxc/utils.d.ts.map +0 -1
  99. package/dist/src/coin/avaxc/utils.js +0 -70
  100. package/dist/src/coin/avaxc/walletUtil.d.ts +0 -22
  101. package/dist/src/coin/avaxc/walletUtil.d.ts.map +0 -1
  102. package/dist/src/coin/avaxc/walletUtil.js +0 -62
  103. package/dist/src/coin/celo/index.d.ts +0 -7
  104. package/dist/src/coin/celo/index.d.ts.map +0 -1
  105. package/dist/src/coin/celo/index.js +0 -34
  106. package/dist/src/coin/celo/resources.d.ts +0 -10
  107. package/dist/src/coin/celo/resources.d.ts.map +0 -1
  108. package/dist/src/coin/celo/resources.js +0 -26
  109. package/dist/src/coin/celo/stakingBuilder.d.ts +0 -91
  110. package/dist/src/coin/celo/stakingBuilder.d.ts.map +0 -1
  111. package/dist/src/coin/celo/stakingBuilder.js +0 -276
  112. package/dist/src/coin/celo/stakingCall.d.ts +0 -7
  113. package/dist/src/coin/celo/stakingCall.d.ts.map +0 -1
  114. package/dist/src/coin/celo/stakingCall.js +0 -13
  115. package/dist/src/coin/celo/stakingUtils.d.ts +0 -15
  116. package/dist/src/coin/celo/stakingUtils.d.ts.map +0 -1
  117. package/dist/src/coin/celo/stakingUtils.js +0 -98
  118. package/dist/src/coin/celo/transaction.d.ts +0 -9
  119. package/dist/src/coin/celo/transaction.d.ts.map +0 -1
  120. package/dist/src/coin/celo/transaction.js +0 -37
  121. package/dist/src/coin/celo/transactionBuilder.d.ts +0 -85
  122. package/dist/src/coin/celo/transactionBuilder.d.ts.map +0 -1
  123. package/dist/src/coin/celo/transactionBuilder.js +0 -208
  124. package/dist/src/coin/celo/transferBuilder.d.ts +0 -19
  125. package/dist/src/coin/celo/transferBuilder.d.ts.map +0 -1
  126. package/dist/src/coin/celo/transferBuilder.js +0 -27
  127. package/dist/src/coin/celo/types.d.ts +0 -51
  128. package/dist/src/coin/celo/types.d.ts.map +0 -1
  129. package/dist/src/coin/celo/types.js +0 -222
  130. package/dist/src/coin/celo/utils.d.ts +0 -18
  131. package/dist/src/coin/celo/utils.d.ts.map +0 -1
  132. package/dist/src/coin/celo/utils.js +0 -99
  133. package/dist/src/coin/cspr/constants.d.ts +0 -19
  134. package/dist/src/coin/cspr/constants.d.ts.map +0 -1
  135. package/dist/src/coin/cspr/constants.js +0 -28
  136. package/dist/src/coin/cspr/delegateBuilder.d.ts +0 -49
  137. package/dist/src/coin/cspr/delegateBuilder.d.ts.map +0 -1
  138. package/dist/src/coin/cspr/delegateBuilder.js +0 -111
  139. package/dist/src/coin/cspr/ifaces.d.ts +0 -69
  140. package/dist/src/coin/cspr/ifaces.d.ts.map +0 -1
  141. package/dist/src/coin/cspr/ifaces.js +0 -3
  142. package/dist/src/coin/cspr/index.d.ts +0 -6
  143. package/dist/src/coin/cspr/index.d.ts.map +0 -1
  144. package/dist/src/coin/cspr/index.js +0 -31
  145. package/dist/src/coin/cspr/keyPair.d.ts +0 -18
  146. package/dist/src/coin/cspr/keyPair.d.ts.map +0 -1
  147. package/dist/src/coin/cspr/keyPair.js +0 -75
  148. package/dist/src/coin/cspr/transaction.d.ts +0 -55
  149. package/dist/src/coin/cspr/transaction.d.ts.map +0 -1
  150. package/dist/src/coin/cspr/transaction.js +0 -227
  151. package/dist/src/coin/cspr/transactionBuilder.d.ts +0 -124
  152. package/dist/src/coin/cspr/transactionBuilder.d.ts.map +0 -1
  153. package/dist/src/coin/cspr/transactionBuilder.js +0 -312
  154. package/dist/src/coin/cspr/transactionBuilderFactory.d.ts +0 -46
  155. package/dist/src/coin/cspr/transactionBuilderFactory.d.ts.map +0 -1
  156. package/dist/src/coin/cspr/transactionBuilderFactory.js +0 -98
  157. package/dist/src/coin/cspr/transferBuilder.d.ts +0 -39
  158. package/dist/src/coin/cspr/transferBuilder.d.ts.map +0 -1
  159. package/dist/src/coin/cspr/transferBuilder.js +0 -106
  160. package/dist/src/coin/cspr/undelegateBuilder.d.ts +0 -49
  161. package/dist/src/coin/cspr/undelegateBuilder.d.ts.map +0 -1
  162. package/dist/src/coin/cspr/undelegateBuilder.js +0 -111
  163. package/dist/src/coin/cspr/utils.d.ts +0 -188
  164. package/dist/src/coin/cspr/utils.d.ts.map +0 -1
  165. package/dist/src/coin/cspr/utils.js +0 -477
  166. package/dist/src/coin/cspr/walletInitializationBuilder.d.ts +0 -27
  167. package/dist/src/coin/cspr/walletInitializationBuilder.d.ts.map +0 -1
  168. package/dist/src/coin/cspr/walletInitializationBuilder.js +0 -95
  169. package/dist/src/coin/etc/index.d.ts +0 -6
  170. package/dist/src/coin/etc/index.d.ts.map +0 -1
  171. package/dist/src/coin/etc/index.js +0 -33
  172. package/dist/src/coin/etc/resources.d.ts +0 -10
  173. package/dist/src/coin/etc/resources.d.ts.map +0 -1
  174. package/dist/src/coin/etc/resources.js +0 -26
  175. package/dist/src/coin/etc/transactionBuilder.d.ts +0 -17
  176. package/dist/src/coin/etc/transactionBuilder.d.ts.map +0 -1
  177. package/dist/src/coin/etc/transactionBuilder.js +0 -45
  178. package/dist/src/coin/etc/transferBuilder.d.ts +0 -19
  179. package/dist/src/coin/etc/transferBuilder.d.ts.map +0 -1
  180. package/dist/src/coin/etc/transferBuilder.js +0 -27
  181. package/dist/src/coin/etc/utils.d.ts +0 -17
  182. package/dist/src/coin/etc/utils.d.ts.map +0 -1
  183. package/dist/src/coin/etc/utils.js +0 -42
  184. package/dist/src/coin/eth/contractCall.d.ts +0 -8
  185. package/dist/src/coin/eth/contractCall.d.ts.map +0 -1
  186. package/dist/src/coin/eth/contractCall.js +0 -17
  187. package/dist/src/coin/eth/iface.d.ts +0 -122
  188. package/dist/src/coin/eth/iface.d.ts.map +0 -1
  189. package/dist/src/coin/eth/iface.js +0 -8
  190. package/dist/src/coin/eth/index.d.ts +0 -10
  191. package/dist/src/coin/eth/index.d.ts.map +0 -1
  192. package/dist/src/coin/eth/index.js +0 -39
  193. package/dist/src/coin/eth/keyPair.d.ts +0 -26
  194. package/dist/src/coin/eth/keyPair.d.ts.map +0 -1
  195. package/dist/src/coin/eth/keyPair.js +0 -85
  196. package/dist/src/coin/eth/transaction.d.ts +0 -64
  197. package/dist/src/coin/eth/transaction.d.ts.map +0 -1
  198. package/dist/src/coin/eth/transaction.js +0 -137
  199. package/dist/src/coin/eth/transactionBuilder.d.ts +0 -194
  200. package/dist/src/coin/eth/transactionBuilder.d.ts.map +0 -1
  201. package/dist/src/coin/eth/transactionBuilder.js +0 -624
  202. package/dist/src/coin/eth/transferBuilder/baseNFTTransferBuilder.d.ts +0 -47
  203. package/dist/src/coin/eth/transferBuilder/baseNFTTransferBuilder.d.ts.map +0 -1
  204. package/dist/src/coin/eth/transferBuilder/baseNFTTransferBuilder.js +0 -113
  205. package/dist/src/coin/eth/transferBuilder/transferBuilderERC1155.d.ts +0 -14
  206. package/dist/src/coin/eth/transferBuilder/transferBuilderERC1155.d.ts.map +0 -1
  207. package/dist/src/coin/eth/transferBuilder/transferBuilderERC1155.js +0 -83
  208. package/dist/src/coin/eth/transferBuilder/transferBuilderERC721.d.ts +0 -13
  209. package/dist/src/coin/eth/transferBuilder/transferBuilderERC721.d.ts.map +0 -1
  210. package/dist/src/coin/eth/transferBuilder/transferBuilderERC721.js +0 -68
  211. package/dist/src/coin/eth/transferBuilder.d.ts +0 -65
  212. package/dist/src/coin/eth/transferBuilder.d.ts.map +0 -1
  213. package/dist/src/coin/eth/transferBuilder.js +0 -197
  214. package/dist/src/coin/eth/types.d.ts +0 -39
  215. package/dist/src/coin/eth/types.d.ts.map +0 -1
  216. package/dist/src/coin/eth/types.js +0 -135
  217. package/dist/src/coin/eth/utils.d.ts +0 -201
  218. package/dist/src/coin/eth/utils.d.ts.map +0 -1
  219. package/dist/src/coin/eth/utils.js +0 -486
  220. package/dist/src/coin/eth/walletUtil.d.ts +0 -21
  221. package/dist/src/coin/eth/walletUtil.d.ts.map +0 -1
  222. package/dist/src/coin/eth/walletUtil.js +0 -31
  223. package/dist/src/coin/hbar/ifaces.d.ts +0 -26
  224. package/dist/src/coin/hbar/ifaces.d.ts.map +0 -1
  225. package/dist/src/coin/hbar/ifaces.js +0 -3
  226. package/dist/src/coin/near/constants.d.ts +0 -12
  227. package/dist/src/coin/near/constants.d.ts.map +0 -1
  228. package/dist/src/coin/near/constants.js +0 -15
  229. package/dist/src/coin/near/contractCallWrapper.d.ts +0 -33
  230. package/dist/src/coin/near/contractCallWrapper.d.ts.map +0 -1
  231. package/dist/src/coin/near/contractCallWrapper.js +0 -68
  232. package/dist/src/coin/near/errors.d.ts +0 -5
  233. package/dist/src/coin/near/errors.d.ts.map +0 -1
  234. package/dist/src/coin/near/errors.js +0 -12
  235. package/dist/src/coin/near/iface.d.ts +0 -40
  236. package/dist/src/coin/near/iface.d.ts.map +0 -1
  237. package/dist/src/coin/near/iface.js +0 -8
  238. package/dist/src/coin/near/index.d.ts +0 -11
  239. package/dist/src/coin/near/index.d.ts.map +0 -1
  240. package/dist/src/coin/near/index.js +0 -41
  241. package/dist/src/coin/near/keyPair.d.ts +0 -25
  242. package/dist/src/coin/near/keyPair.d.ts.map +0 -1
  243. package/dist/src/coin/near/keyPair.js +0 -73
  244. package/dist/src/coin/near/stakingActivateBuilder.d.ts +0 -32
  245. package/dist/src/coin/near/stakingActivateBuilder.d.ts.map +0 -1
  246. package/dist/src/coin/near/stakingActivateBuilder.js +0 -90
  247. package/dist/src/coin/near/stakingDeactivateBuilder.d.ts +0 -32
  248. package/dist/src/coin/near/stakingDeactivateBuilder.d.ts.map +0 -1
  249. package/dist/src/coin/near/stakingDeactivateBuilder.js +0 -89
  250. package/dist/src/coin/near/stakingWithdrawBuilder.d.ts +0 -32
  251. package/dist/src/coin/near/stakingWithdrawBuilder.d.ts.map +0 -1
  252. package/dist/src/coin/near/stakingWithdrawBuilder.js +0 -89
  253. package/dist/src/coin/near/transaction.d.ts +0 -90
  254. package/dist/src/coin/near/transaction.d.ts.map +0 -1
  255. package/dist/src/coin/near/transaction.js +0 -368
  256. package/dist/src/coin/near/transactionBuilder.d.ts +0 -89
  257. package/dist/src/coin/near/transactionBuilder.d.ts.map +0 -1
  258. package/dist/src/coin/near/transactionBuilder.js +0 -216
  259. package/dist/src/coin/near/transactionBuilderFactory.d.ts +0 -30
  260. package/dist/src/coin/near/transactionBuilderFactory.d.ts.map +0 -1
  261. package/dist/src/coin/near/transactionBuilderFactory.js +0 -71
  262. package/dist/src/coin/near/transferBuilder.d.ts +0 -26
  263. package/dist/src/coin/near/transferBuilder.d.ts.map +0 -1
  264. package/dist/src/coin/near/transferBuilder.js +0 -72
  265. package/dist/src/coin/near/utils.d.ts +0 -42
  266. package/dist/src/coin/near/utils.d.ts.map +0 -1
  267. package/dist/src/coin/near/utils.js +0 -85
  268. package/dist/src/coin/near/walletInitializationBuilder.d.ts +0 -12
  269. package/dist/src/coin/near/walletInitializationBuilder.d.ts.map +0 -1
  270. package/dist/src/coin/near/walletInitializationBuilder.js +0 -20
  271. package/dist/src/coin/rbtc/index.d.ts +0 -6
  272. package/dist/src/coin/rbtc/index.d.ts.map +0 -1
  273. package/dist/src/coin/rbtc/index.js +0 -33
  274. package/dist/src/coin/rbtc/resources.d.ts +0 -10
  275. package/dist/src/coin/rbtc/resources.d.ts.map +0 -1
  276. package/dist/src/coin/rbtc/resources.js +0 -25
  277. package/dist/src/coin/rbtc/transactionBuilder.d.ts +0 -17
  278. package/dist/src/coin/rbtc/transactionBuilder.d.ts.map +0 -1
  279. package/dist/src/coin/rbtc/transactionBuilder.js +0 -44
  280. package/dist/src/coin/rbtc/transferBuilder.d.ts +0 -19
  281. package/dist/src/coin/rbtc/transferBuilder.d.ts.map +0 -1
  282. package/dist/src/coin/rbtc/transferBuilder.js +0 -27
  283. package/dist/src/coin/rbtc/utils.d.ts +0 -17
  284. package/dist/src/coin/rbtc/utils.d.ts.map +0 -1
  285. package/dist/src/coin/rbtc/utils.js +0 -42
  286. package/dist/src/coin/sol/ataInitializationBuilder.d.ts +0 -41
  287. package/dist/src/coin/sol/ataInitializationBuilder.d.ts.map +0 -1
  288. package/dist/src/coin/sol/ataInitializationBuilder.js +0 -110
  289. package/dist/src/coin/sol/ataInitializationTransaction.d.ts +0 -14
  290. package/dist/src/coin/sol/ataInitializationTransaction.d.ts.map +0 -1
  291. package/dist/src/coin/sol/ataInitializationTransaction.js +0 -81
  292. package/dist/src/coin/sol/constants.d.ts +0 -58
  293. package/dist/src/coin/sol/constants.d.ts.map +0 -1
  294. package/dist/src/coin/sol/constants.js +0 -76
  295. package/dist/src/coin/sol/iface.d.ts +0 -99
  296. package/dist/src/coin/sol/iface.d.ts.map +0 -1
  297. package/dist/src/coin/sol/iface.js +0 -3
  298. package/dist/src/coin/sol/index.d.ts +0 -11
  299. package/dist/src/coin/sol/index.d.ts.map +0 -1
  300. package/dist/src/coin/sol/index.js +0 -41
  301. package/dist/src/coin/sol/instructionParamsFactory.d.ts +0 -12
  302. package/dist/src/coin/sol/instructionParamsFactory.d.ts.map +0 -1
  303. package/dist/src/coin/sol/instructionParamsFactory.js +0 -260
  304. package/dist/src/coin/sol/keyPair.d.ts +0 -26
  305. package/dist/src/coin/sol/keyPair.d.ts.map +0 -1
  306. package/dist/src/coin/sol/keyPair.js +0 -63
  307. package/dist/src/coin/sol/solInstructionFactory.d.ts +0 -10
  308. package/dist/src/coin/sol/solInstructionFactory.d.ts.map +0 -1
  309. package/dist/src/coin/sol/solInstructionFactory.js +0 -213
  310. package/dist/src/coin/sol/stakingActivateBuilder.d.ts +0 -41
  311. package/dist/src/coin/sol/stakingActivateBuilder.d.ts.map +0 -1
  312. package/dist/src/coin/sol/stakingActivateBuilder.js +0 -94
  313. package/dist/src/coin/sol/stakingDeactivateBuilder.d.ts +0 -23
  314. package/dist/src/coin/sol/stakingDeactivateBuilder.d.ts.map +0 -1
  315. package/dist/src/coin/sol/stakingDeactivateBuilder.js +0 -62
  316. package/dist/src/coin/sol/stakingWithdrawBuilder.d.ts +0 -31
  317. package/dist/src/coin/sol/stakingWithdrawBuilder.d.ts.map +0 -1
  318. package/dist/src/coin/sol/stakingWithdrawBuilder.js +0 -78
  319. package/dist/src/coin/sol/tokenEncodeDecode.d.ts +0 -85
  320. package/dist/src/coin/sol/tokenEncodeDecode.d.ts.map +0 -1
  321. package/dist/src/coin/sol/tokenEncodeDecode.js +0 -133
  322. package/dist/src/coin/sol/tokenTransferBuilder.d.ts +0 -27
  323. package/dist/src/coin/sol/tokenTransferBuilder.d.ts.map +0 -1
  324. package/dist/src/coin/sol/tokenTransferBuilder.js +0 -73
  325. package/dist/src/coin/sol/transaction.d.ts +0 -61
  326. package/dist/src/coin/sol/transaction.d.ts.map +0 -1
  327. package/dist/src/coin/sol/transaction.js +0 -369
  328. package/dist/src/coin/sol/transactionBuilder.d.ts +0 -101
  329. package/dist/src/coin/sol/transactionBuilder.d.ts.map +0 -1
  330. package/dist/src/coin/sol/transactionBuilder.js +0 -261
  331. package/dist/src/coin/sol/transactionBuilderFactory.d.ts +0 -76
  332. package/dist/src/coin/sol/transactionBuilderFactory.d.ts.map +0 -1
  333. package/dist/src/coin/sol/transactionBuilderFactory.js +0 -136
  334. package/dist/src/coin/sol/transferBuilder.d.ts +0 -26
  335. package/dist/src/coin/sol/transferBuilder.d.ts.map +0 -1
  336. package/dist/src/coin/sol/transferBuilder.js +0 -67
  337. package/dist/src/coin/sol/utils.d.ts +0 -146
  338. package/dist/src/coin/sol/utils.d.ts.map +0 -1
  339. package/dist/src/coin/sol/utils.js +0 -361
  340. package/dist/src/coin/sol/walletInitializationBuilder.d.ts +0 -26
  341. package/dist/src/coin/sol/walletInitializationBuilder.d.ts.map +0 -1
  342. package/dist/src/coin/sol/walletInitializationBuilder.js +0 -71
  343. package/dist/src/coin/stx/abstractContractBuilder.d.ts +0 -19
  344. package/dist/src/coin/stx/abstractContractBuilder.d.ts.map +0 -1
  345. package/dist/src/coin/stx/abstractContractBuilder.js +0 -70
  346. package/dist/src/coin/stx/constants.d.ts +0 -8
  347. package/dist/src/coin/stx/constants.d.ts.map +0 -1
  348. package/dist/src/coin/stx/constants.js +0 -19
  349. package/dist/src/coin/stx/contractBuilder.d.ts +0 -33
  350. package/dist/src/coin/stx/contractBuilder.d.ts.map +0 -1
  351. package/dist/src/coin/stx/contractBuilder.js +0 -116
  352. package/dist/src/coin/stx/iface.d.ts +0 -48
  353. package/dist/src/coin/stx/iface.d.ts.map +0 -1
  354. package/dist/src/coin/stx/iface.js +0 -3
  355. package/dist/src/coin/stx/index.d.ts +0 -6
  356. package/dist/src/coin/stx/index.d.ts.map +0 -1
  357. package/dist/src/coin/stx/index.js +0 -32
  358. package/dist/src/coin/stx/keyPair.d.ts +0 -55
  359. package/dist/src/coin/stx/keyPair.d.ts.map +0 -1
  360. package/dist/src/coin/stx/keyPair.js +0 -140
  361. package/dist/src/coin/stx/sendmanyBuilder.d.ts +0 -23
  362. package/dist/src/coin/stx/sendmanyBuilder.d.ts.map +0 -1
  363. package/dist/src/coin/stx/sendmanyBuilder.js +0 -75
  364. package/dist/src/coin/stx/transaction.d.ts +0 -49
  365. package/dist/src/coin/stx/transaction.d.ts.map +0 -1
  366. package/dist/src/coin/stx/transaction.js +0 -225
  367. package/dist/src/coin/stx/transactionBuilder.d.ts +0 -86
  368. package/dist/src/coin/stx/transactionBuilder.d.ts.map +0 -1
  369. package/dist/src/coin/stx/transactionBuilder.js +0 -263
  370. package/dist/src/coin/stx/transactionBuilderFactory.d.ts +0 -30
  371. package/dist/src/coin/stx/transactionBuilderFactory.d.ts.map +0 -1
  372. package/dist/src/coin/stx/transactionBuilderFactory.js +0 -81
  373. package/dist/src/coin/stx/transferBuilder.d.ts +0 -30
  374. package/dist/src/coin/stx/transferBuilder.d.ts.map +0 -1
  375. package/dist/src/coin/stx/transferBuilder.js +0 -99
  376. package/dist/src/coin/stx/utils.d.ts +0 -207
  377. package/dist/src/coin/stx/utils.d.ts.map +0 -1
  378. package/dist/src/coin/stx/utils.js +0 -503
  379. package/dist/src/coin/trx/address.d.ts +0 -11
  380. package/dist/src/coin/trx/address.d.ts.map +0 -1
  381. package/dist/src/coin/trx/address.js +0 -13
  382. package/dist/src/coin/trx/contractCallBuilder.d.ts +0 -96
  383. package/dist/src/coin/trx/contractCallBuilder.d.ts.map +0 -1
  384. package/dist/src/coin/trx/contractCallBuilder.js +0 -281
  385. package/dist/src/coin/trx/enum.d.ts +0 -23
  386. package/dist/src/coin/trx/enum.d.ts.map +0 -1
  387. package/dist/src/coin/trx/enum.js +0 -28
  388. package/dist/src/coin/trx/iface.d.ts +0 -92
  389. package/dist/src/coin/trx/iface.d.ts.map +0 -1
  390. package/dist/src/coin/trx/iface.js +0 -3
  391. package/dist/src/coin/trx/index.d.ts +0 -10
  392. package/dist/src/coin/trx/index.d.ts.map +0 -1
  393. package/dist/src/coin/trx/index.js +0 -39
  394. package/dist/src/coin/trx/keyPair.d.ts +0 -44
  395. package/dist/src/coin/trx/keyPair.d.ts.map +0 -1
  396. package/dist/src/coin/trx/keyPair.js +0 -121
  397. package/dist/src/coin/trx/transaction.d.ts +0 -74
  398. package/dist/src/coin/trx/transaction.d.ts.map +0 -1
  399. package/dist/src/coin/trx/transaction.js +0 -205
  400. package/dist/src/coin/trx/transactionBuilder.d.ts +0 -65
  401. package/dist/src/coin/trx/transactionBuilder.d.ts.map +0 -1
  402. package/dist/src/coin/trx/transactionBuilder.js +0 -215
  403. package/dist/src/coin/trx/utils.d.ts +0 -127
  404. package/dist/src/coin/trx/utils.d.ts.map +0 -1
  405. package/dist/src/coin/trx/utils.js +0 -369
  406. package/dist/src/coin/trx/wrappedBuilder.d.ts +0 -52
  407. package/dist/src/coin/trx/wrappedBuilder.d.ts.map +0 -1
  408. package/dist/src/coin/trx/wrappedBuilder.js +0 -104
  409. package/dist/src/coin/xtz/address.d.ts +0 -8
  410. package/dist/src/coin/xtz/address.d.ts.map +0 -1
  411. package/dist/src/coin/xtz/address.js +0 -10
  412. package/dist/src/coin/xtz/iface.d.ts +0 -81
  413. package/dist/src/coin/xtz/iface.d.ts.map +0 -1
  414. package/dist/src/coin/xtz/iface.js +0 -3
  415. package/dist/src/coin/xtz/index.d.ts +0 -8
  416. package/dist/src/coin/xtz/index.d.ts.map +0 -1
  417. package/dist/src/coin/xtz/index.js +0 -37
  418. package/dist/src/coin/xtz/keyPair.d.ts +0 -40
  419. package/dist/src/coin/xtz/keyPair.d.ts.map +0 -1
  420. package/dist/src/coin/xtz/keyPair.js +0 -136
  421. package/dist/src/coin/xtz/multisigUtils.d.ts +0 -134
  422. package/dist/src/coin/xtz/multisigUtils.d.ts.map +0 -1
  423. package/dist/src/coin/xtz/multisigUtils.js +0 -1180
  424. package/dist/src/coin/xtz/transaction.d.ts +0 -119
  425. package/dist/src/coin/xtz/transaction.d.ts.map +0 -1
  426. package/dist/src/coin/xtz/transaction.js +0 -315
  427. package/dist/src/coin/xtz/transactionBuilder.d.ts +0 -171
  428. package/dist/src/coin/xtz/transactionBuilder.d.ts.map +0 -1
  429. package/dist/src/coin/xtz/transactionBuilder.js +0 -453
  430. package/dist/src/coin/xtz/transferBuilder.d.ts +0 -24
  431. package/dist/src/coin/xtz/transferBuilder.d.ts.map +0 -1
  432. package/dist/src/coin/xtz/transferBuilder.js +0 -64
  433. package/dist/src/coin/xtz/utils.d.ts +0 -265
  434. package/dist/src/coin/xtz/utils.d.ts.map +0 -1
  435. package/dist/src/coin/xtz/utils.js +0 -460
  436. package/resources/trx/protobuf/Contract.proto +0 -256
  437. package/resources/trx/protobuf/Discover.proto +0 -44
  438. package/resources/trx/protobuf/tron.d.ts +0 -11024
  439. package/resources/trx/protobuf/tron.js +0 -31510
  440. package/resources/trx/protobuf/tron.proto +0 -677
@@ -1,81 +0,0 @@
1
- /// <reference types="node" />
2
- import { BaseFee, BaseKey } from '@bitgo/sdk-core';
3
- export interface HashType {
4
- prefix: Buffer;
5
- byteLength: number;
6
- }
7
- export interface Operation {
8
- kind: string;
9
- counter: string;
10
- source: string;
11
- fee: string;
12
- gas_limit: string;
13
- storage_limit: string;
14
- }
15
- export interface RevealOp extends Operation {
16
- public_key: string;
17
- }
18
- export interface OriginationOp extends Operation {
19
- balance: string;
20
- script: any;
21
- delegate?: string;
22
- }
23
- export interface TransactionOp extends Operation {
24
- parameters?: any;
25
- destination: string;
26
- amount: string;
27
- }
28
- export interface ParsedTransaction {
29
- branch: string;
30
- contents: Operation[];
31
- }
32
- /**
33
- * Different Tezos specific fees
34
- */
35
- export interface Fee extends BaseFee {
36
- gasLimit?: string;
37
- storageLimit?: string;
38
- }
39
- /**
40
- * Send transaction information
41
- */
42
- export interface TransferData {
43
- amount: string;
44
- coin?: string;
45
- from: string;
46
- to: string;
47
- fee: Fee;
48
- dataToSign?: string;
49
- counter?: string;
50
- }
51
- /**
52
- * Origination transaction information
53
- */
54
- export interface OriginationData {
55
- fee: Fee;
56
- counter?: string;
57
- balance?: string;
58
- from?: string;
59
- forwarderDestination?: string;
60
- }
61
- /**
62
- * Taquito return type for sign operations
63
- */
64
- export interface SignResponse {
65
- bytes: string;
66
- sig: any;
67
- prefixSig: any;
68
- sbytes: string;
69
- }
70
- export interface IndexedData {
71
- index?: number;
72
- }
73
- /**
74
- * Tezos keys can have a specific order in the smart contracts, hence the need to add an index field
75
- */
76
- export interface Key extends BaseKey, IndexedData {
77
- }
78
- export interface IndexedSignature extends IndexedData {
79
- signature: string;
80
- }
81
- //# sourceMappingURL=iface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"iface.d.ts","sourceRoot":"","sources":["../../../../src/coin/xtz/iface.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE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C;IACT,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,GAAI,SAAQ,OAAO,EAAE,WAAW;CAAG;AAEpD,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWZhY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29pbi94dHovaWZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEJhc2VGZWUsIEJhc2VLZXkgfSBmcm9tICdAYml0Z28vc2RrLWNvcmUnO1xuXG5leHBvcnQgaW50ZXJmYWNlIEhhc2hUeXBlIHtcbiAgcHJlZml4OiBCdWZmZXI7XG4gIGJ5dGVMZW5ndGg6IG51bWJlcjtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBPcGVyYXRpb24ge1xuICBraW5kOiBzdHJpbmc7XG4gIGNvdW50ZXI6IHN0cmluZztcbiAgc291cmNlOiBzdHJpbmc7XG4gIGZlZTogc3RyaW5nO1xuICBnYXNfbGltaXQ6IHN0cmluZztcbiAgc3RvcmFnZV9saW1pdDogc3RyaW5nO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIFJldmVhbE9wIGV4dGVuZHMgT3BlcmF0aW9uIHtcbiAgcHVibGljX2tleTogc3RyaW5nO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIE9yaWdpbmF0aW9uT3AgZXh0ZW5kcyBPcGVyYXRpb24ge1xuICBiYWxhbmNlOiBzdHJpbmc7XG4g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iB0eXBlIGZvciBzaWduIG9wZXJhdGlvbnNcbiAqL1xuZXhwb3J0IGludGVyZmFjZSBTaWduUmVzcG9uc2Uge1xuICBieXRlczogc3RyaW5nO1xuICBzaWc6IGFueTtcbiAgcHJlZml4U2lnOiBhbnk7XG4gIHNieXRlczogc3RyaW5nO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGV4ZWREYXRhIHtcbiAgaW5kZXg/OiBudW1iZXI7XG59XG5cbi8qKlxuICogVGV6b3Mga2V5cyBjYW4gaGF2ZSBhIHNwZWNpZmljIG9yZGVyIGluIHRoZSBzbWFydCBjb250cmFjdHMsIGhlbmNlIHRoZSBuZWVkIHRvIGFkZCBhbiBpbmRleCBmaWVsZFxuICovXG5leHBvcnQgaW50ZXJmYWNlIEtleSBleHRlbmRzIEJhc2VLZXksIEluZGV4ZWREYXRhIHt9XG5cbmV4cG9ydCBpbnRlcmZhY2UgSW5kZXhlZFNpZ25hdHVyZSBleHRlbmRzIEluZGV4ZWREYXRhIHtcbiAgc2lnbmF0dXJlOiBzdHJpbmc7XG59XG4iXX0=
@@ -1,8 +0,0 @@
1
- export { KeyPair } from './keyPair';
2
- export { Address } from './address';
3
- export { Transaction } from './transaction';
4
- export { TransactionBuilder } from './transactionBuilder';
5
- import * as Interface from './iface';
6
- import * as Utils from './utils';
7
- export { Interface, Utils };
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/coin/xtz/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,SAAS,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAIjC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.Utils = exports.Interface = exports.TransactionBuilder = exports.Transaction = exports.Address = exports.KeyPair = void 0;
23
- var keyPair_1 = require("./keyPair");
24
- Object.defineProperty(exports, "KeyPair", { enumerable: true, get: function () { return keyPair_1.KeyPair; } });
25
- var address_1 = require("./address");
26
- Object.defineProperty(exports, "Address", { enumerable: true, get: function () { return address_1.Address; } });
27
- var transaction_1 = require("./transaction");
28
- Object.defineProperty(exports, "Transaction", { enumerable: true, get: function () { return transaction_1.Transaction; } });
29
- var transactionBuilder_1 = require("./transactionBuilder");
30
- Object.defineProperty(exports, "TransactionBuilder", { enumerable: true, get: function () { return transactionBuilder_1.TransactionBuilder; } });
31
- const Interface = __importStar(require("./iface"));
32
- exports.Interface = Interface;
33
- const Utils = __importStar(require("./utils"));
34
- exports.Utils = Utils;
35
- const MultisigUtils = __importStar(require("./multisigUtils"));
36
- Object.assign(Utils, MultisigUtils);
37
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJza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,0 @@
1
- import { DefaultKeys, KeyPairOptions, Secp256k1ExtendedKeyPair } from '@bitgo/sdk-core';
2
- /**
3
- * Tezos keys and address management.
4
- */
5
- export declare class KeyPair extends Secp256k1ExtendedKeyPair {
6
- /**
7
- * Public constructor. By default, creates a key pair with a random master seed.
8
- *
9
- * @param {KeyPairOptions} source Either a master seed, a private key (extended or raw), or a public key
10
- * (extended, compressed, or uncompressed)
11
- */
12
- constructor(source?: KeyPairOptions);
13
- /**
14
- * Build a Hierarchical Deterministic node or an ECPair from a private key.
15
- * Specific Tezos implementation
16
- *
17
- * @param {string} prv An extended or raw private key
18
- */
19
- recordKeysFromPrivateKey(prv: string): void;
20
- /**
21
- * Build a Hierarchical Deterministic node or an ECPair from a public key.
22
- * Specific Tezos implementation
23
- *
24
- * @param {string} pub - An extended, compressed, or uncompressed public key
25
- */
26
- recordKeysFromPublicKey(pub: string): void;
27
- /**
28
- * Return Tezos default keys with the respective prefixes
29
- *
30
- * @returns {DefaultKeys} The keys in the protocol default key format
31
- */
32
- getKeys(): DefaultKeys;
33
- /**
34
- * Get a public address.
35
- *
36
- * @returns {string} The public address
37
- */
38
- getAddress(): string;
39
- }
40
- //# sourceMappingURL=keyPair.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"keyPair.d.ts","sourceRoot":"","sources":["../../../../src/coin/xtz/keyPair.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EAQX,cAAc,EACd,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AAKzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,wBAAwB;IACnD;;;;;OAKG;gBACS,MAAM,CAAC,EAAE,cAAc;IAoBnC;;;;;OAKG;IACH,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAa3C;;;;;OAKG;IACH,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAa1C;;;;OAIG;IACH,OAAO,IAAI,WAAW;IAYtB;;;;OAIG;IACH,UAAU,IAAI,MAAM;CAMrB"}
@@ -1,136 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.KeyPair = void 0;
26
- const crypto_1 = require("crypto");
27
- const bip32 = __importStar(require("bip32"));
28
- const blake2b_1 = __importDefault(require("@bitgo/blake2b"));
29
- const bitcoinjs_lib_1 = require("bitcoinjs-lib");
30
- const sdk_core_1 = require("@bitgo/sdk-core");
31
- const Utils = __importStar(require("./utils"));
32
- const DEFAULT_SEED_SIZE_BYTES = 16;
33
- /**
34
- * Tezos keys and address management.
35
- */
36
- class KeyPair extends sdk_core_1.Secp256k1ExtendedKeyPair {
37
- /**
38
- * Public constructor. By default, creates a key pair with a random master seed.
39
- *
40
- * @param {KeyPairOptions} source Either a master seed, a private key (extended or raw), or a public key
41
- * (extended, compressed, or uncompressed)
42
- */
43
- constructor(source) {
44
- super(source);
45
- if (!source) {
46
- const seed = crypto_1.randomBytes(DEFAULT_SEED_SIZE_BYTES);
47
- this.hdNode = bip32.fromSeed(seed);
48
- }
49
- else if (sdk_core_1.isSeed(source)) {
50
- this.hdNode = bip32.fromSeed(source.seed);
51
- }
52
- else if (sdk_core_1.isPrivateKey(source)) {
53
- this.recordKeysFromPrivateKey(source.prv);
54
- }
55
- else if (sdk_core_1.isPublicKey(source)) {
56
- this.recordKeysFromPublicKey(source.pub);
57
- }
58
- else {
59
- throw new Error('Invalid key pair options');
60
- }
61
- if (this.hdNode) {
62
- this.keyPair = sdk_core_1.Secp256k1ExtendedKeyPair.toKeyPair(this.hdNode);
63
- }
64
- }
65
- /**
66
- * Build a Hierarchical Deterministic node or an ECPair from a private key.
67
- * Specific Tezos implementation
68
- *
69
- * @param {string} prv An extended or raw private key
70
- */
71
- recordKeysFromPrivateKey(prv) {
72
- if (sdk_core_1.isValidXprv(prv)) {
73
- this.hdNode = bip32.fromBase58(prv);
74
- }
75
- else if (sdk_core_1.isValidPrv(prv)) {
76
- // Cannot create the HD node without the chain code, so create a regular Key Chain
77
- this.keyPair = bitcoinjs_lib_1.ECPair.fromPrivateKey(Buffer.from(prv, 'hex'));
78
- }
79
- else if (Utils.isValidKey(prv, Utils.hashTypes.spsk)) {
80
- this.keyPair = bitcoinjs_lib_1.ECPair.fromPrivateKey(Utils.decodeKey(prv, Utils.hashTypes.spsk));
81
- }
82
- else {
83
- throw new Error('Unsupported private key');
84
- }
85
- }
86
- /**
87
- * Build a Hierarchical Deterministic node or an ECPair from a public key.
88
- * Specific Tezos implementation
89
- *
90
- * @param {string} pub - An extended, compressed, or uncompressed public key
91
- */
92
- recordKeysFromPublicKey(pub) {
93
- if (sdk_core_1.isValidXpub(pub)) {
94
- this.hdNode = bip32.fromBase58(pub);
95
- }
96
- else if (sdk_core_1.isValidPub(pub)) {
97
- // Cannot create an HD node without the chain code, so create a regular Key Chain
98
- this.keyPair = bitcoinjs_lib_1.ECPair.fromPublicKey(Buffer.from(pub, 'hex'));
99
- }
100
- else if (Utils.isValidKey(pub, Utils.hashTypes.sppk)) {
101
- this.keyPair = bitcoinjs_lib_1.ECPair.fromPublicKey(Utils.decodeKey(pub, Utils.hashTypes.sppk));
102
- }
103
- else {
104
- throw new Error('Unsupported public key: ' + pub);
105
- }
106
- }
107
- /**
108
- * Return Tezos default keys with the respective prefixes
109
- *
110
- * @returns {DefaultKeys} The keys in the protocol default key format
111
- */
112
- getKeys() {
113
- // Always use the compressed version to be consistent
114
- const result = {
115
- pub: Utils.base58encode(Utils.hashTypes.sppk.prefix, this.getPublicKey({ compressed: true })),
116
- };
117
- const prvBuffer = this.getPrivateKey();
118
- if (prvBuffer) {
119
- result.prv = Utils.base58encode(Utils.hashTypes.spsk.prefix, prvBuffer);
120
- }
121
- return result;
122
- }
123
- /**
124
- * Get a public address.
125
- *
126
- * @returns {string} The public address
127
- */
128
- getAddress() {
129
- const pub = this.getPublicKey({ compressed: true });
130
- const out = Buffer.alloc(20);
131
- const b2b = blake2b_1.default(out.length).update(pub).digest(out);
132
- return Utils.base58encode(Utils.hashTypes.tz2.prefix, b2b);
133
- }
134
- }
135
- exports.KeyPair = KeyPair;
136
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2V5UGFpci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb2luL3h0ei9rZXlQYWlyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxtQ0FBcUM7QUFDckMsNkNBQStCO0FBQy9CLDZEQUFxQztBQUNyQyxpREFBdUM7QUFDdkMsOENBV3lCO0FBQ3pCLCtDQUFpQztBQUVqQyxNQUFNLHVCQUF1QixHQUFHLEVBQUUsQ0FBQztBQUVuQzs7R0FFRztBQUNILE1BQWEsT0FBUSxTQUFRLG1DQUF3QjtJQUNuRDs7Ozs7T0FLRztJQUNILFlBQVksTUFBdUI7UUFDakMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxDQUFDO1FBQ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ature, OriginationData, OriginationOp, RevealOp, TransactionOp, TransferData } from './iface';
2
- /**
3
- * Helper method to get the transfer details from a generic multisig transaction operation.
4
- *
5
- * @param {TransactionOp} operation A transaction operation JSON
6
- * @returns {TransferData} Information about the destination, token and transfer amount
7
- */
8
- export declare function getMultisigTransferDataFromOperation(operation: TransactionOp): TransferData;
9
- /**
10
- * Helper method to get the wallet or address initialization tx from an origination operation
11
- *
12
- * @param {OriginationOp} operation
13
- * @returns {OriginationData} Information about the wallet contract creating a forwarder contract
14
- */
15
- export declare function getOriginationDataFromOperation(operation: OriginationOp): OriginationData;
16
- /**
17
- * Helper method to build a singlesig transaction operation.
18
- *
19
- * @param {string} counter Source account next counter
20
- * @param {string} source The account that will pay for fees, and in singlesig transactions, where
21
- * the funds are taken from
22
- * @param {string} amount The amount in mutez to be transferred
23
- * @param {string} destination The account address to send the funds to
24
- * @param {string} fee Fees in mutez to pay by the source account
25
- * @param {string} gasLimit Maximum amount in mutez to spend in gas fees
26
- * @param {string} storageLimit Maximum amount in mutez to spend in storage fees
27
- * @returns {TransactionOp}A Tezos transaction operation
28
- */
29
- export declare function singlesigTransactionOperation(counter: string, source: string, amount: string, destination: string, fee?: string, gasLimit?: string, storageLimit?: string): TransactionOp;
30
- /**
31
- * Create a multisig wallet transaction operation.
32
- *
33
- * @see {@link transactionOperation}
34
- * @param {string} counter Source account next counter
35
- * @param {string} source The account that will pay for fees, and in singlesig transactions, where
36
- * the funds are taken from
37
- * @param {string} amount The amount in mutez to be transferred
38
- * @param {string} contractAddress If it is a multisig transfer, the smart contract address with the
39
- * funds to be transferred from
40
- * @param {string} contractCounter If it is a multisig transfer, the smart contract counter to use
41
- * in the next transaction
42
- * @param {string} destinationAddress An implicit or originated address to transfer fudns to
43
- * @param {string[]} signatures signatures List of signatures authorizing the funds transfer form
44
- * the multisig wallet
45
- * @param {string} fee Fees in mutez to pay by the source account
46
- * @param {string} gasLimit Maximum amount in mutez to spend in gas fees
47
- * @param {string} storageLimit Maximum amount in mutez to spend in storage fees
48
- * @param {number} m The number of signers (owners) for the multisig wallet being used. Default is 3
49
- * @returns {TransactionOp} A Tezos operation with a generic multisig transfer
50
- */
51
- export declare function multisigTransactionOperation(counter: string, source: string, amount: string, contractAddress: string, contractCounter: string, destinationAddress: string, signatures: IndexedSignature[], fee?: string, gasLimit?: string, storageLimit?: string, m?: number): TransactionOp;
52
- /**
53
- * Replace the signatures in a multisig transaction operation with new ones.
54
- *
55
- * @param {TransactionOp} transaction Transaction to mutate
56
- * @param {IndexedSignature[]} signatures List of transactions and their order
57
- */
58
- export declare function updateMultisigTransferSignatures(transaction: TransactionOp, signatures: IndexedSignature[]): void;
59
- /**
60
- * Ge the list if multisig signatures if any in a convenient format.
61
- *
62
- * @param {TransactionOp} transaction The transaction to search the signatures in
63
- * @returns {IndexedSignature[]} A list of signatures and their order in teh transfer script
64
- */
65
- export declare function getMultisigTransferSignatures(transaction: TransactionOp): IndexedSignature[];
66
- /**
67
- * Helper function to build the Michelson script to be signed to transfer funds from a multisig
68
- * wallet.
69
- *
70
- * @param contractAddress The multisig smart contract address
71
- * @param {string} destinationAddress The destination account address (implicit or originated)
72
- * @param {number} amount Number of mutez to transfer
73
- * @param {string} contractCounter Wallet counter to use in the transaction
74
- * @returns A JSON representation of the Michelson script to sign and approve a transfer
75
- */
76
- export declare function genericMultisigDataToSign(contractAddress: string, destinationAddress: string, amount: string, contractCounter: string): {
77
- data: {
78
- prim: string;
79
- args: any[];
80
- };
81
- type: {
82
- prim: string;
83
- args: any[];
84
- };
85
- };
86
- /**
87
- * Create a reveal operation for a public key.
88
- *
89
- * @param {string} counter Source account next counter
90
- * @param {string} source Source account address
91
- * @param {string} pubKey The public key to reveal
92
- * @param {string} fee Fees in mutez to pay by the source account
93
- * @param {string} gasLimit Maximum amount in mutez to spend in gas fees
94
- * @param {string} storageLimit Maximum amount in mutez to spend in storage fees
95
- * @returns An origination operation
96
- */
97
- export declare function revealOperation(counter: string, source: string, pubKey: string, fee?: string, gasLimit?: string, storageLimit?: string): RevealOp;
98
- /**
99
- * Create an origination operation for the generic multisg contract. It does not create a reveal
100
- * operation for the source account.
101
- *
102
- * @param {string} counter Valid source account counter to use
103
- * @param {string} source Source account address
104
- * @param {string} fee Fees in mutez to pay by the source account
105
- * @param {string} gasLimit Maximum amount in mutez to spend in gas fees
106
- * @param {string} storageLimit Maximum amount in mutez to spend in storage fees
107
- * @param {string} balance New multisig account initial balance taken from the source account
108
- * @param {string[]} pubKeys List of public keys of the multisig owner
109
- * @param {string} delegate Optional implicit address to delegate the wallet funds to
110
- * @param {number} threshold Minimum number of signatures required to authorize a multisig operation
111
- * @returns An origination operation
112
- */
113
- export declare function genericMultisigOriginationOperation(counter: string, source: string, fee: string, gasLimit: string, storageLimit: string, balance: string, pubKeys: string[], delegate?: string, threshold?: number): OriginationOp;
114
- /**
115
- * Get the public key of each owner of an multisig wallet origination contract.
116
- *
117
- * @param {OriginationOp} operation An operation with the generic multisig wallet origination
118
- * @returns {string[]} List of all the owners set in the origination transaction
119
- */
120
- export declare function getOwnersPublicKeys(operation: OriginationOp): string[];
121
- /**
122
- * Create an origination operation for a forwarder contract
123
- *
124
- * @param {string} contractAddress originated multisig address to forward funds
125
- * @param {string} counter Valid source account counter to use
126
- * @param {string} source Source account address
127
- * @param {string} fee Fees in mutez to pay by the source account
128
- * @param {string} gasLimit Maximum amount in mutez to spend in gas fees
129
- * @param {string} storageLimit Maximum amount in mutez to spend in storage fees
130
- * @param {string} balance New multisig account initial balance taken from the source account
131
- * @returns {OriginationOp} the operation
132
- */
133
- export declare function forwarderOriginationOperation(contractAddress: string, counter: string, source: string, fee: string, gasLimit: string, storageLimit: string, balance: string): OriginationOp;
134
- //# sourceMappingURL=multisigUtils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"multisigUtils.d.ts","sourceRoot":"","sources":["../../../../src/coin/xtz/multisigUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,aAAa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