@bitgo/account-lib 3.0.0-hotfix.0 → 3.0.0

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 (621) hide show
  1. package/.mocharc.js +1 -1
  2. package/CHANGELOG.md +192 -30
  3. package/README.md +5 -7
  4. package/dist/resources/README.md +0 -22
  5. package/dist/src/index.d.ts +34 -20
  6. package/dist/src/index.d.ts.map +1 -1
  7. package/dist/src/index.js +57 -40
  8. package/dist/tsconfig.tsbuildinfo +25937 -40830
  9. package/package.json +29 -77
  10. package/resources/README.md +0 -22
  11. package/dist/browser/bitgo-account-lib.js +0 -2
  12. package/dist/browser/bitgo-account-lib.js.LICENSE.txt +0 -335
  13. package/dist/resources/hbar/protobuf/BasicTypes.proto +0 -424
  14. package/dist/resources/hbar/protobuf/CryptoCreate.proto +0 -47
  15. package/dist/resources/hbar/protobuf/CryptoTransfer.proto +0 -33
  16. package/dist/resources/hbar/protobuf/Duration.proto +0 -28
  17. package/dist/resources/hbar/protobuf/Timestamp.proto +0 -34
  18. package/dist/resources/hbar/protobuf/Transaction.proto +0 -35
  19. package/dist/resources/hbar/protobuf/TransactionBody.proto +0 -24
  20. package/dist/resources/hbar/protobuf/TransactionContents.proto +0 -33
  21. package/dist/resources/hbar/protobuf/hedera.d.ts +0 -4612
  22. package/dist/resources/hbar/protobuf/hedera.js +0 -12192
  23. package/dist/resources/trx/protobuf/Contract.proto +0 -256
  24. package/dist/resources/trx/protobuf/Discover.proto +0 -44
  25. package/dist/resources/trx/protobuf/tron.d.ts +0 -11024
  26. package/dist/resources/trx/protobuf/tron.js +0 -31510
  27. package/dist/resources/trx/protobuf/tron.proto +0 -677
  28. package/dist/src/coin/algo/assetTransferBuilder.d.ts +0 -42
  29. package/dist/src/coin/algo/assetTransferBuilder.d.ts.map +0 -1
  30. package/dist/src/coin/algo/assetTransferBuilder.js +0 -105
  31. package/dist/src/coin/algo/errors.d.ts +0 -11
  32. package/dist/src/coin/algo/errors.d.ts.map +0 -1
  33. package/dist/src/coin/algo/errors.js +0 -27
  34. package/dist/src/coin/algo/ifaces.d.ts +0 -46
  35. package/dist/src/coin/algo/ifaces.d.ts.map +0 -1
  36. package/dist/src/coin/algo/ifaces.js +0 -3
  37. package/dist/src/coin/algo/index.d.ts +0 -13
  38. package/dist/src/coin/algo/index.d.ts.map +0 -1
  39. package/dist/src/coin/algo/index.js +0 -47
  40. package/dist/src/coin/algo/keyPair.d.ts +0 -25
  41. package/dist/src/coin/algo/keyPair.d.ts.map +0 -1
  42. package/dist/src/coin/algo/keyPair.js +0 -77
  43. package/dist/src/coin/algo/keyRegistrationBuilder.d.ts +0 -104
  44. package/dist/src/coin/algo/keyRegistrationBuilder.d.ts.map +0 -1
  45. package/dist/src/coin/algo/keyRegistrationBuilder.js +0 -239
  46. package/dist/src/coin/algo/seedEncoding.d.ts +0 -25
  47. package/dist/src/coin/algo/seedEncoding.d.ts.map +0 -1
  48. package/dist/src/coin/algo/seedEncoding.js +0 -97
  49. package/dist/src/coin/algo/transaction.d.ts +0 -75
  50. package/dist/src/coin/algo/transaction.d.ts.map +0 -1
  51. package/dist/src/coin/algo/transaction.js +0 -251
  52. package/dist/src/coin/algo/transactionBuilder.d.ts +0 -204
  53. package/dist/src/coin/algo/transactionBuilder.d.ts.map +0 -1
  54. package/dist/src/coin/algo/transactionBuilder.js +0 -373
  55. package/dist/src/coin/algo/transactionBuilderFactory.d.ts +0 -16
  56. package/dist/src/coin/algo/transactionBuilderFactory.d.ts.map +0 -1
  57. package/dist/src/coin/algo/transactionBuilderFactory.js +0 -52
  58. package/dist/src/coin/algo/transferBuilder.d.ts +0 -40
  59. package/dist/src/coin/algo/transferBuilder.d.ts.map +0 -1
  60. package/dist/src/coin/algo/transferBuilder.js +0 -89
  61. package/dist/src/coin/algo/txnSchema.d.ts +0 -7
  62. package/dist/src/coin/algo/txnSchema.d.ts.map +0 -1
  63. package/dist/src/coin/algo/txnSchema.js +0 -68
  64. package/dist/src/coin/algo/utils.d.ts +0 -249
  65. package/dist/src/coin/algo/utils.d.ts.map +0 -1
  66. package/dist/src/coin/algo/utils.js +0 -539
  67. package/dist/src/coin/avaxc/index.d.ts +0 -8
  68. package/dist/src/coin/avaxc/index.d.ts.map +0 -1
  69. package/dist/src/coin/avaxc/index.js +0 -35
  70. package/dist/src/coin/avaxc/keyPair.d.ts +0 -26
  71. package/dist/src/coin/avaxc/keyPair.d.ts.map +0 -1
  72. package/dist/src/coin/avaxc/keyPair.js +0 -83
  73. package/dist/src/coin/avaxc/resources.d.ts +0 -12
  74. package/dist/src/coin/avaxc/resources.d.ts.map +0 -1
  75. package/dist/src/coin/avaxc/resources.js +0 -27
  76. package/dist/src/coin/avaxc/transactionBuilder.d.ts +0 -17
  77. package/dist/src/coin/avaxc/transactionBuilder.d.ts.map +0 -1
  78. package/dist/src/coin/avaxc/transactionBuilder.js +0 -45
  79. package/dist/src/coin/avaxc/transferBuilder.d.ts +0 -17
  80. package/dist/src/coin/avaxc/transferBuilder.d.ts.map +0 -1
  81. package/dist/src/coin/avaxc/transferBuilder.js +0 -25
  82. package/dist/src/coin/avaxc/utils.d.ts +0 -39
  83. package/dist/src/coin/avaxc/utils.d.ts.map +0 -1
  84. package/dist/src/coin/avaxc/utils.js +0 -70
  85. package/dist/src/coin/avaxc/walletUtil.d.ts +0 -22
  86. package/dist/src/coin/avaxc/walletUtil.d.ts.map +0 -1
  87. package/dist/src/coin/avaxc/walletUtil.js +0 -62
  88. package/dist/src/coin/baseCoin/baseKeyPair.d.ts +0 -27
  89. package/dist/src/coin/baseCoin/baseKeyPair.d.ts.map +0 -1
  90. package/dist/src/coin/baseCoin/baseKeyPair.js +0 -3
  91. package/dist/src/coin/baseCoin/baseTransaction.d.ts +0 -71
  92. package/dist/src/coin/baseCoin/baseTransaction.d.ts.map +0 -1
  93. package/dist/src/coin/baseCoin/baseTransaction.js +0 -94
  94. package/dist/src/coin/baseCoin/baseTransactionBuilder.d.ts +0 -128
  95. package/dist/src/coin/baseCoin/baseTransactionBuilder.d.ts.map +0 -1
  96. package/dist/src/coin/baseCoin/baseTransactionBuilder.js +0 -179
  97. package/dist/src/coin/baseCoin/baseTransactionBuilderFactory.d.ts +0 -30
  98. package/dist/src/coin/baseCoin/baseTransactionBuilderFactory.d.ts.map +0 -1
  99. package/dist/src/coin/baseCoin/baseTransactionBuilderFactory.js +0 -20
  100. package/dist/src/coin/baseCoin/baseUtils.d.ts +0 -45
  101. package/dist/src/coin/baseCoin/baseUtils.d.ts.map +0 -1
  102. package/dist/src/coin/baseCoin/baseUtils.js +0 -3
  103. package/dist/src/coin/baseCoin/blsKeyPair.d.ts +0 -75
  104. package/dist/src/coin/baseCoin/blsKeyPair.d.ts.map +0 -1
  105. package/dist/src/coin/baseCoin/blsKeyPair.js +0 -232
  106. package/dist/src/coin/baseCoin/ed25519KeyPair.d.ts +0 -50
  107. package/dist/src/coin/baseCoin/ed25519KeyPair.d.ts.map +0 -1
  108. package/dist/src/coin/baseCoin/ed25519KeyPair.js +0 -141
  109. package/dist/src/coin/baseCoin/enum.d.ts +0 -43
  110. package/dist/src/coin/baseCoin/enum.d.ts.map +0 -1
  111. package/dist/src/coin/baseCoin/enum.js +0 -70
  112. package/dist/src/coin/baseCoin/errors.d.ts +0 -65
  113. package/dist/src/coin/baseCoin/errors.d.ts.map +0 -1
  114. package/dist/src/coin/baseCoin/errors.js +0 -156
  115. package/dist/src/coin/baseCoin/iface.d.ts +0 -162
  116. package/dist/src/coin/baseCoin/iface.d.ts.map +0 -1
  117. package/dist/src/coin/baseCoin/iface.js +0 -38
  118. package/dist/src/coin/baseCoin/index.d.ts +0 -12
  119. package/dist/src/coin/baseCoin/index.d.ts.map +0 -1
  120. package/dist/src/coin/baseCoin/index.js +0 -41
  121. package/dist/src/coin/baseCoin/secp256k1ExtendedKeyPair.d.ts +0 -55
  122. package/dist/src/coin/baseCoin/secp256k1ExtendedKeyPair.d.ts.map +0 -1
  123. package/dist/src/coin/baseCoin/secp256k1ExtendedKeyPair.js +0 -124
  124. package/dist/src/coin/celo/index.d.ts +0 -8
  125. package/dist/src/coin/celo/index.d.ts.map +0 -1
  126. package/dist/src/coin/celo/index.js +0 -35
  127. package/dist/src/coin/celo/resources.d.ts +0 -10
  128. package/dist/src/coin/celo/resources.d.ts.map +0 -1
  129. package/dist/src/coin/celo/resources.js +0 -26
  130. package/dist/src/coin/celo/stakingBuilder.d.ts +0 -91
  131. package/dist/src/coin/celo/stakingBuilder.d.ts.map +0 -1
  132. package/dist/src/coin/celo/stakingBuilder.js +0 -277
  133. package/dist/src/coin/celo/stakingCall.d.ts +0 -7
  134. package/dist/src/coin/celo/stakingCall.d.ts.map +0 -1
  135. package/dist/src/coin/celo/stakingCall.js +0 -13
  136. package/dist/src/coin/celo/stakingUtils.d.ts +0 -15
  137. package/dist/src/coin/celo/stakingUtils.d.ts.map +0 -1
  138. package/dist/src/coin/celo/stakingUtils.js +0 -98
  139. package/dist/src/coin/celo/transaction.d.ts +0 -10
  140. package/dist/src/coin/celo/transaction.d.ts.map +0 -1
  141. package/dist/src/coin/celo/transaction.js +0 -37
  142. package/dist/src/coin/celo/transactionBuilder.d.ts +0 -86
  143. package/dist/src/coin/celo/transactionBuilder.d.ts.map +0 -1
  144. package/dist/src/coin/celo/transactionBuilder.js +0 -228
  145. package/dist/src/coin/celo/transferBuilder.d.ts +0 -19
  146. package/dist/src/coin/celo/transferBuilder.d.ts.map +0 -1
  147. package/dist/src/coin/celo/transferBuilder.js +0 -27
  148. package/dist/src/coin/celo/types.d.ts +0 -52
  149. package/dist/src/coin/celo/types.d.ts.map +0 -1
  150. package/dist/src/coin/celo/types.js +0 -222
  151. package/dist/src/coin/celo/utils.d.ts +0 -18
  152. package/dist/src/coin/celo/utils.d.ts.map +0 -1
  153. package/dist/src/coin/celo/utils.js +0 -99
  154. package/dist/src/coin/cspr/constants.d.ts +0 -19
  155. package/dist/src/coin/cspr/constants.d.ts.map +0 -1
  156. package/dist/src/coin/cspr/constants.js +0 -28
  157. package/dist/src/coin/cspr/delegateBuilder.d.ts +0 -49
  158. package/dist/src/coin/cspr/delegateBuilder.d.ts.map +0 -1
  159. package/dist/src/coin/cspr/delegateBuilder.js +0 -111
  160. package/dist/src/coin/cspr/ifaces.d.ts +0 -69
  161. package/dist/src/coin/cspr/ifaces.d.ts.map +0 -1
  162. package/dist/src/coin/cspr/ifaces.js +0 -3
  163. package/dist/src/coin/cspr/index.d.ts +0 -5
  164. package/dist/src/coin/cspr/index.d.ts.map +0 -1
  165. package/dist/src/coin/cspr/index.js +0 -29
  166. package/dist/src/coin/cspr/keyPair.d.ts +0 -18
  167. package/dist/src/coin/cspr/keyPair.d.ts.map +0 -1
  168. package/dist/src/coin/cspr/keyPair.js +0 -75
  169. package/dist/src/coin/cspr/transaction.d.ts +0 -55
  170. package/dist/src/coin/cspr/transaction.d.ts.map +0 -1
  171. package/dist/src/coin/cspr/transaction.js +0 -227
  172. package/dist/src/coin/cspr/transactionBuilder.d.ts +0 -124
  173. package/dist/src/coin/cspr/transactionBuilder.d.ts.map +0 -1
  174. package/dist/src/coin/cspr/transactionBuilder.js +0 -312
  175. package/dist/src/coin/cspr/transactionBuilderFactory.d.ts +0 -46
  176. package/dist/src/coin/cspr/transactionBuilderFactory.d.ts.map +0 -1
  177. package/dist/src/coin/cspr/transactionBuilderFactory.js +0 -98
  178. package/dist/src/coin/cspr/transferBuilder.d.ts +0 -39
  179. package/dist/src/coin/cspr/transferBuilder.d.ts.map +0 -1
  180. package/dist/src/coin/cspr/transferBuilder.js +0 -106
  181. package/dist/src/coin/cspr/undelegateBuilder.d.ts +0 -49
  182. package/dist/src/coin/cspr/undelegateBuilder.d.ts.map +0 -1
  183. package/dist/src/coin/cspr/undelegateBuilder.js +0 -111
  184. package/dist/src/coin/cspr/utils.d.ts +0 -188
  185. package/dist/src/coin/cspr/utils.d.ts.map +0 -1
  186. package/dist/src/coin/cspr/utils.js +0 -478
  187. package/dist/src/coin/cspr/walletInitializationBuilder.d.ts +0 -27
  188. package/dist/src/coin/cspr/walletInitializationBuilder.d.ts.map +0 -1
  189. package/dist/src/coin/cspr/walletInitializationBuilder.js +0 -95
  190. package/dist/src/coin/dot/addressInitializationBuilder.d.ts +0 -79
  191. package/dist/src/coin/dot/addressInitializationBuilder.d.ts.map +0 -1
  192. package/dist/src/coin/dot/addressInitializationBuilder.js +0 -182
  193. package/dist/src/coin/dot/batchTransactionBuilder.d.ts +0 -47
  194. package/dist/src/coin/dot/batchTransactionBuilder.d.ts.map +0 -1
  195. package/dist/src/coin/dot/batchTransactionBuilder.js +0 -122
  196. package/dist/src/coin/dot/claimBuilder.d.ts +0 -58
  197. package/dist/src/coin/dot/claimBuilder.d.ts.map +0 -1
  198. package/dist/src/coin/dot/claimBuilder.js +0 -117
  199. package/dist/src/coin/dot/errors.d.ts +0 -8
  200. package/dist/src/coin/dot/errors.d.ts.map +0 -1
  201. package/dist/src/coin/dot/errors.js +0 -19
  202. package/dist/src/coin/dot/iface.d.ts +0 -194
  203. package/dist/src/coin/dot/iface.d.ts.map +0 -1
  204. package/dist/src/coin/dot/iface.js +0 -39
  205. package/dist/src/coin/dot/index.d.ts +0 -17
  206. package/dist/src/coin/dot/index.d.ts.map +0 -1
  207. package/dist/src/coin/dot/index.js +0 -53
  208. package/dist/src/coin/dot/keyPair.d.ts +0 -31
  209. package/dist/src/coin/dot/keyPair.d.ts.map +0 -1
  210. package/dist/src/coin/dot/keyPair.js +0 -74
  211. package/dist/src/coin/dot/singletonRegistry.d.ts +0 -7
  212. package/dist/src/coin/dot/singletonRegistry.d.ts.map +0 -1
  213. package/dist/src/coin/dot/singletonRegistry.js +0 -20
  214. package/dist/src/coin/dot/stakingBuilder.d.ts +0 -58
  215. package/dist/src/coin/dot/stakingBuilder.d.ts.map +0 -1
  216. package/dist/src/coin/dot/stakingBuilder.js +0 -135
  217. package/dist/src/coin/dot/transaction.d.ts +0 -65
  218. package/dist/src/coin/dot/transaction.d.ts.map +0 -1
  219. package/dist/src/coin/dot/transaction.js +0 -396
  220. package/dist/src/coin/dot/transactionBuilder.d.ts +0 -131
  221. package/dist/src/coin/dot/transactionBuilder.d.ts.map +0 -1
  222. package/dist/src/coin/dot/transactionBuilder.js +0 -332
  223. package/dist/src/coin/dot/transactionBuilderFactory.d.ts +0 -26
  224. package/dist/src/coin/dot/transactionBuilderFactory.d.ts.map +0 -1
  225. package/dist/src/coin/dot/transactionBuilderFactory.js +0 -93
  226. package/dist/src/coin/dot/transferBuilder.d.ts +0 -71
  227. package/dist/src/coin/dot/transferBuilder.d.ts.map +0 -1
  228. package/dist/src/coin/dot/transferBuilder.js +0 -171
  229. package/dist/src/coin/dot/txnSchema.d.ts +0 -14
  230. package/dist/src/coin/dot/txnSchema.d.ts.map +0 -1
  231. package/dist/src/coin/dot/txnSchema.js +0 -104
  232. package/dist/src/coin/dot/unnominateBuilder.d.ts +0 -24
  233. package/dist/src/coin/dot/unnominateBuilder.d.ts.map +0 -1
  234. package/dist/src/coin/dot/unnominateBuilder.js +0 -50
  235. package/dist/src/coin/dot/unstakeBuilder.d.ts +0 -38
  236. package/dist/src/coin/dot/unstakeBuilder.d.ts.map +0 -1
  237. package/dist/src/coin/dot/unstakeBuilder.js +0 -89
  238. package/dist/src/coin/dot/utils.d.ts +0 -138
  239. package/dist/src/coin/dot/utils.d.ts.map +0 -1
  240. package/dist/src/coin/dot/utils.js +0 -269
  241. package/dist/src/coin/dot/withdrawUnstakedBuilder.d.ts +0 -38
  242. package/dist/src/coin/dot/withdrawUnstakedBuilder.d.ts.map +0 -1
  243. package/dist/src/coin/dot/withdrawUnstakedBuilder.js +0 -90
  244. package/dist/src/coin/etc/index.d.ts +0 -8
  245. package/dist/src/coin/etc/index.d.ts.map +0 -1
  246. package/dist/src/coin/etc/index.js +0 -35
  247. package/dist/src/coin/etc/resources.d.ts +0 -10
  248. package/dist/src/coin/etc/resources.d.ts.map +0 -1
  249. package/dist/src/coin/etc/resources.js +0 -26
  250. package/dist/src/coin/etc/transactionBuilder.d.ts +0 -17
  251. package/dist/src/coin/etc/transactionBuilder.d.ts.map +0 -1
  252. package/dist/src/coin/etc/transactionBuilder.js +0 -45
  253. package/dist/src/coin/etc/transferBuilder.d.ts +0 -19
  254. package/dist/src/coin/etc/transferBuilder.d.ts.map +0 -1
  255. package/dist/src/coin/etc/transferBuilder.js +0 -27
  256. package/dist/src/coin/etc/utils.d.ts +0 -18
  257. package/dist/src/coin/etc/utils.d.ts.map +0 -1
  258. package/dist/src/coin/etc/utils.js +0 -42
  259. package/dist/src/coin/eth/contractCall.d.ts +0 -8
  260. package/dist/src/coin/eth/contractCall.d.ts.map +0 -1
  261. package/dist/src/coin/eth/contractCall.js +0 -17
  262. package/dist/src/coin/eth/iface.d.ts +0 -122
  263. package/dist/src/coin/eth/iface.d.ts.map +0 -1
  264. package/dist/src/coin/eth/iface.js +0 -8
  265. package/dist/src/coin/eth/index.d.ts +0 -10
  266. package/dist/src/coin/eth/index.d.ts.map +0 -1
  267. package/dist/src/coin/eth/index.js +0 -39
  268. package/dist/src/coin/eth/keyPair.d.ts +0 -26
  269. package/dist/src/coin/eth/keyPair.d.ts.map +0 -1
  270. package/dist/src/coin/eth/keyPair.js +0 -85
  271. package/dist/src/coin/eth/transaction.d.ts +0 -64
  272. package/dist/src/coin/eth/transaction.d.ts.map +0 -1
  273. package/dist/src/coin/eth/transaction.js +0 -137
  274. package/dist/src/coin/eth/transactionBuilder.d.ts +0 -194
  275. package/dist/src/coin/eth/transactionBuilder.d.ts.map +0 -1
  276. package/dist/src/coin/eth/transactionBuilder.js +0 -624
  277. package/dist/src/coin/eth/transferBuilder/baseNFTTransferBuilder.d.ts +0 -47
  278. package/dist/src/coin/eth/transferBuilder/baseNFTTransferBuilder.d.ts.map +0 -1
  279. package/dist/src/coin/eth/transferBuilder/baseNFTTransferBuilder.js +0 -113
  280. package/dist/src/coin/eth/transferBuilder/transferBuilderERC1155.d.ts +0 -14
  281. package/dist/src/coin/eth/transferBuilder/transferBuilderERC1155.d.ts.map +0 -1
  282. package/dist/src/coin/eth/transferBuilder/transferBuilderERC1155.js +0 -83
  283. package/dist/src/coin/eth/transferBuilder/transferBuilderERC721.d.ts +0 -13
  284. package/dist/src/coin/eth/transferBuilder/transferBuilderERC721.d.ts.map +0 -1
  285. package/dist/src/coin/eth/transferBuilder/transferBuilderERC721.js +0 -68
  286. package/dist/src/coin/eth/transferBuilder.d.ts +0 -65
  287. package/dist/src/coin/eth/transferBuilder.d.ts.map +0 -1
  288. package/dist/src/coin/eth/transferBuilder.js +0 -197
  289. package/dist/src/coin/eth/types.d.ts +0 -39
  290. package/dist/src/coin/eth/types.d.ts.map +0 -1
  291. package/dist/src/coin/eth/types.js +0 -135
  292. package/dist/src/coin/eth/utils.d.ts +0 -202
  293. package/dist/src/coin/eth/utils.d.ts.map +0 -1
  294. package/dist/src/coin/eth/utils.js +0 -485
  295. package/dist/src/coin/eth/walletUtil.d.ts +0 -19
  296. package/dist/src/coin/eth/walletUtil.d.ts.map +0 -1
  297. package/dist/src/coin/eth/walletUtil.js +0 -29
  298. package/dist/src/coin/eth2/index.d.ts +0 -2
  299. package/dist/src/coin/eth2/index.d.ts.map +0 -1
  300. package/dist/src/coin/eth2/index.js +0 -6
  301. package/dist/src/coin/eth2/keyPair.d.ts +0 -33
  302. package/dist/src/coin/eth2/keyPair.d.ts.map +0 -1
  303. package/dist/src/coin/eth2/keyPair.js +0 -65
  304. package/dist/src/coin/hbar/ifaces.d.ts +0 -26
  305. package/dist/src/coin/hbar/ifaces.d.ts.map +0 -1
  306. package/dist/src/coin/hbar/ifaces.js +0 -3
  307. package/dist/src/coin/hbar/index.d.ts +0 -6
  308. package/dist/src/coin/hbar/index.d.ts.map +0 -1
  309. package/dist/src/coin/hbar/index.js +0 -31
  310. package/dist/src/coin/hbar/keyPair.d.ts +0 -23
  311. package/dist/src/coin/hbar/keyPair.d.ts.map +0 -1
  312. package/dist/src/coin/hbar/keyPair.js +0 -70
  313. package/dist/src/coin/hbar/transaction.d.ts +0 -98
  314. package/dist/src/coin/hbar/transaction.d.ts.map +0 -1
  315. package/dist/src/coin/hbar/transaction.js +0 -245
  316. package/dist/src/coin/hbar/transactionBuilder.d.ts +0 -112
  317. package/dist/src/coin/hbar/transactionBuilder.d.ts.map +0 -1
  318. package/dist/src/coin/hbar/transactionBuilder.js +0 -264
  319. package/dist/src/coin/hbar/transactionBuilderFactory.d.ts +0 -37
  320. package/dist/src/coin/hbar/transactionBuilderFactory.d.ts.map +0 -1
  321. package/dist/src/coin/hbar/transactionBuilderFactory.js +0 -77
  322. package/dist/src/coin/hbar/transferBuilder.d.ts +0 -44
  323. package/dist/src/coin/hbar/transferBuilder.d.ts.map +0 -1
  324. package/dist/src/coin/hbar/transferBuilder.js +0 -130
  325. package/dist/src/coin/hbar/utils.d.ts +0 -139
  326. package/dist/src/coin/hbar/utils.d.ts.map +0 -1
  327. package/dist/src/coin/hbar/utils.js +0 -310
  328. package/dist/src/coin/hbar/walletInitializationBuilder.d.ts +0 -28
  329. package/dist/src/coin/hbar/walletInitializationBuilder.d.ts.map +0 -1
  330. package/dist/src/coin/hbar/walletInitializationBuilder.js +0 -90
  331. package/dist/src/coin/near/constants.d.ts +0 -12
  332. package/dist/src/coin/near/constants.d.ts.map +0 -1
  333. package/dist/src/coin/near/constants.js +0 -15
  334. package/dist/src/coin/near/contractCallWrapper.d.ts +0 -33
  335. package/dist/src/coin/near/contractCallWrapper.d.ts.map +0 -1
  336. package/dist/src/coin/near/contractCallWrapper.js +0 -68
  337. package/dist/src/coin/near/errors.d.ts +0 -5
  338. package/dist/src/coin/near/errors.d.ts.map +0 -1
  339. package/dist/src/coin/near/errors.js +0 -12
  340. package/dist/src/coin/near/iface.d.ts +0 -40
  341. package/dist/src/coin/near/iface.d.ts.map +0 -1
  342. package/dist/src/coin/near/iface.js +0 -8
  343. package/dist/src/coin/near/index.d.ts +0 -11
  344. package/dist/src/coin/near/index.d.ts.map +0 -1
  345. package/dist/src/coin/near/index.js +0 -41
  346. package/dist/src/coin/near/keyPair.d.ts +0 -25
  347. package/dist/src/coin/near/keyPair.d.ts.map +0 -1
  348. package/dist/src/coin/near/keyPair.js +0 -73
  349. package/dist/src/coin/near/stakingActivateBuilder.d.ts +0 -32
  350. package/dist/src/coin/near/stakingActivateBuilder.d.ts.map +0 -1
  351. package/dist/src/coin/near/stakingActivateBuilder.js +0 -90
  352. package/dist/src/coin/near/stakingDeactivateBuilder.d.ts +0 -32
  353. package/dist/src/coin/near/stakingDeactivateBuilder.d.ts.map +0 -1
  354. package/dist/src/coin/near/stakingDeactivateBuilder.js +0 -89
  355. package/dist/src/coin/near/stakingWithdrawBuilder.d.ts +0 -32
  356. package/dist/src/coin/near/stakingWithdrawBuilder.d.ts.map +0 -1
  357. package/dist/src/coin/near/stakingWithdrawBuilder.js +0 -89
  358. package/dist/src/coin/near/transaction.d.ts +0 -90
  359. package/dist/src/coin/near/transaction.d.ts.map +0 -1
  360. package/dist/src/coin/near/transaction.js +0 -368
  361. package/dist/src/coin/near/transactionBuilder.d.ts +0 -89
  362. package/dist/src/coin/near/transactionBuilder.d.ts.map +0 -1
  363. package/dist/src/coin/near/transactionBuilder.js +0 -216
  364. package/dist/src/coin/near/transactionBuilderFactory.d.ts +0 -30
  365. package/dist/src/coin/near/transactionBuilderFactory.d.ts.map +0 -1
  366. package/dist/src/coin/near/transactionBuilderFactory.js +0 -71
  367. package/dist/src/coin/near/transferBuilder.d.ts +0 -26
  368. package/dist/src/coin/near/transferBuilder.d.ts.map +0 -1
  369. package/dist/src/coin/near/transferBuilder.js +0 -72
  370. package/dist/src/coin/near/utils.d.ts +0 -42
  371. package/dist/src/coin/near/utils.d.ts.map +0 -1
  372. package/dist/src/coin/near/utils.js +0 -92
  373. package/dist/src/coin/near/walletInitializationBuilder.d.ts +0 -12
  374. package/dist/src/coin/near/walletInitializationBuilder.d.ts.map +0 -1
  375. package/dist/src/coin/near/walletInitializationBuilder.js +0 -20
  376. package/dist/src/coin/rbtc/index.d.ts +0 -8
  377. package/dist/src/coin/rbtc/index.d.ts.map +0 -1
  378. package/dist/src/coin/rbtc/index.js +0 -35
  379. package/dist/src/coin/rbtc/resources.d.ts +0 -10
  380. package/dist/src/coin/rbtc/resources.d.ts.map +0 -1
  381. package/dist/src/coin/rbtc/resources.js +0 -25
  382. package/dist/src/coin/rbtc/transactionBuilder.d.ts +0 -17
  383. package/dist/src/coin/rbtc/transactionBuilder.d.ts.map +0 -1
  384. package/dist/src/coin/rbtc/transactionBuilder.js +0 -44
  385. package/dist/src/coin/rbtc/transferBuilder.d.ts +0 -19
  386. package/dist/src/coin/rbtc/transferBuilder.d.ts.map +0 -1
  387. package/dist/src/coin/rbtc/transferBuilder.js +0 -27
  388. package/dist/src/coin/rbtc/utils.d.ts +0 -18
  389. package/dist/src/coin/rbtc/utils.d.ts.map +0 -1
  390. package/dist/src/coin/rbtc/utils.js +0 -42
  391. package/dist/src/coin/sol/ataInitializationBuilder.d.ts +0 -33
  392. package/dist/src/coin/sol/ataInitializationBuilder.d.ts.map +0 -1
  393. package/dist/src/coin/sol/ataInitializationBuilder.js +0 -93
  394. package/dist/src/coin/sol/ataInitializationTransaction.d.ts +0 -14
  395. package/dist/src/coin/sol/ataInitializationTransaction.d.ts.map +0 -1
  396. package/dist/src/coin/sol/ataInitializationTransaction.js +0 -81
  397. package/dist/src/coin/sol/constants.d.ts +0 -58
  398. package/dist/src/coin/sol/constants.d.ts.map +0 -1
  399. package/dist/src/coin/sol/constants.js +0 -76
  400. package/dist/src/coin/sol/iface.d.ts +0 -99
  401. package/dist/src/coin/sol/iface.d.ts.map +0 -1
  402. package/dist/src/coin/sol/iface.js +0 -3
  403. package/dist/src/coin/sol/index.d.ts +0 -11
  404. package/dist/src/coin/sol/index.d.ts.map +0 -1
  405. package/dist/src/coin/sol/index.js +0 -41
  406. package/dist/src/coin/sol/instructionParamsFactory.d.ts +0 -12
  407. package/dist/src/coin/sol/instructionParamsFactory.d.ts.map +0 -1
  408. package/dist/src/coin/sol/instructionParamsFactory.js +0 -260
  409. package/dist/src/coin/sol/keyPair.d.ts +0 -26
  410. package/dist/src/coin/sol/keyPair.d.ts.map +0 -1
  411. package/dist/src/coin/sol/keyPair.js +0 -63
  412. package/dist/src/coin/sol/solInstructionFactory.d.ts +0 -10
  413. package/dist/src/coin/sol/solInstructionFactory.d.ts.map +0 -1
  414. package/dist/src/coin/sol/solInstructionFactory.js +0 -213
  415. package/dist/src/coin/sol/stakingActivateBuilder.d.ts +0 -41
  416. package/dist/src/coin/sol/stakingActivateBuilder.d.ts.map +0 -1
  417. package/dist/src/coin/sol/stakingActivateBuilder.js +0 -94
  418. package/dist/src/coin/sol/stakingDeactivateBuilder.d.ts +0 -23
  419. package/dist/src/coin/sol/stakingDeactivateBuilder.d.ts.map +0 -1
  420. package/dist/src/coin/sol/stakingDeactivateBuilder.js +0 -62
  421. package/dist/src/coin/sol/stakingWithdrawBuilder.d.ts +0 -31
  422. package/dist/src/coin/sol/stakingWithdrawBuilder.d.ts.map +0 -1
  423. package/dist/src/coin/sol/stakingWithdrawBuilder.js +0 -78
  424. package/dist/src/coin/sol/tokenEncodeDecode.d.ts +0 -85
  425. package/dist/src/coin/sol/tokenEncodeDecode.d.ts.map +0 -1
  426. package/dist/src/coin/sol/tokenEncodeDecode.js +0 -133
  427. package/dist/src/coin/sol/tokenTransferBuilder.d.ts +0 -27
  428. package/dist/src/coin/sol/tokenTransferBuilder.d.ts.map +0 -1
  429. package/dist/src/coin/sol/tokenTransferBuilder.js +0 -73
  430. package/dist/src/coin/sol/transaction.d.ts +0 -61
  431. package/dist/src/coin/sol/transaction.d.ts.map +0 -1
  432. package/dist/src/coin/sol/transaction.js +0 -369
  433. package/dist/src/coin/sol/transactionBuilder.d.ts +0 -101
  434. package/dist/src/coin/sol/transactionBuilder.d.ts.map +0 -1
  435. package/dist/src/coin/sol/transactionBuilder.js +0 -261
  436. package/dist/src/coin/sol/transactionBuilderFactory.d.ts +0 -76
  437. package/dist/src/coin/sol/transactionBuilderFactory.d.ts.map +0 -1
  438. package/dist/src/coin/sol/transactionBuilderFactory.js +0 -136
  439. package/dist/src/coin/sol/transferBuilder.d.ts +0 -26
  440. package/dist/src/coin/sol/transferBuilder.d.ts.map +0 -1
  441. package/dist/src/coin/sol/transferBuilder.js +0 -67
  442. package/dist/src/coin/sol/utils.d.ts +0 -146
  443. package/dist/src/coin/sol/utils.d.ts.map +0 -1
  444. package/dist/src/coin/sol/utils.js +0 -361
  445. package/dist/src/coin/sol/walletInitializationBuilder.d.ts +0 -26
  446. package/dist/src/coin/sol/walletInitializationBuilder.d.ts.map +0 -1
  447. package/dist/src/coin/sol/walletInitializationBuilder.js +0 -71
  448. package/dist/src/coin/stx/abstractContractBuilder.d.ts +0 -19
  449. package/dist/src/coin/stx/abstractContractBuilder.d.ts.map +0 -1
  450. package/dist/src/coin/stx/abstractContractBuilder.js +0 -70
  451. package/dist/src/coin/stx/constants.d.ts +0 -8
  452. package/dist/src/coin/stx/constants.d.ts.map +0 -1
  453. package/dist/src/coin/stx/constants.js +0 -19
  454. package/dist/src/coin/stx/contractBuilder.d.ts +0 -33
  455. package/dist/src/coin/stx/contractBuilder.d.ts.map +0 -1
  456. package/dist/src/coin/stx/contractBuilder.js +0 -116
  457. package/dist/src/coin/stx/iface.d.ts +0 -48
  458. package/dist/src/coin/stx/iface.d.ts.map +0 -1
  459. package/dist/src/coin/stx/iface.js +0 -3
  460. package/dist/src/coin/stx/index.d.ts +0 -6
  461. package/dist/src/coin/stx/index.d.ts.map +0 -1
  462. package/dist/src/coin/stx/index.js +0 -32
  463. package/dist/src/coin/stx/keyPair.d.ts +0 -55
  464. package/dist/src/coin/stx/keyPair.d.ts.map +0 -1
  465. package/dist/src/coin/stx/keyPair.js +0 -140
  466. package/dist/src/coin/stx/sendmanyBuilder.d.ts +0 -23
  467. package/dist/src/coin/stx/sendmanyBuilder.d.ts.map +0 -1
  468. package/dist/src/coin/stx/sendmanyBuilder.js +0 -75
  469. package/dist/src/coin/stx/transaction.d.ts +0 -49
  470. package/dist/src/coin/stx/transaction.d.ts.map +0 -1
  471. package/dist/src/coin/stx/transaction.js +0 -225
  472. package/dist/src/coin/stx/transactionBuilder.d.ts +0 -86
  473. package/dist/src/coin/stx/transactionBuilder.d.ts.map +0 -1
  474. package/dist/src/coin/stx/transactionBuilder.js +0 -263
  475. package/dist/src/coin/stx/transactionBuilderFactory.d.ts +0 -30
  476. package/dist/src/coin/stx/transactionBuilderFactory.d.ts.map +0 -1
  477. package/dist/src/coin/stx/transactionBuilderFactory.js +0 -81
  478. package/dist/src/coin/stx/transferBuilder.d.ts +0 -30
  479. package/dist/src/coin/stx/transferBuilder.d.ts.map +0 -1
  480. package/dist/src/coin/stx/transferBuilder.js +0 -99
  481. package/dist/src/coin/stx/utils.d.ts +0 -207
  482. package/dist/src/coin/stx/utils.d.ts.map +0 -1
  483. package/dist/src/coin/stx/utils.js +0 -504
  484. package/dist/src/coin/trx/address.d.ts +0 -11
  485. package/dist/src/coin/trx/address.d.ts.map +0 -1
  486. package/dist/src/coin/trx/address.js +0 -13
  487. package/dist/src/coin/trx/contractCallBuilder.d.ts +0 -96
  488. package/dist/src/coin/trx/contractCallBuilder.d.ts.map +0 -1
  489. package/dist/src/coin/trx/contractCallBuilder.js +0 -281
  490. package/dist/src/coin/trx/enum.d.ts +0 -23
  491. package/dist/src/coin/trx/enum.d.ts.map +0 -1
  492. package/dist/src/coin/trx/enum.js +0 -28
  493. package/dist/src/coin/trx/iface.d.ts +0 -92
  494. package/dist/src/coin/trx/iface.d.ts.map +0 -1
  495. package/dist/src/coin/trx/iface.js +0 -3
  496. package/dist/src/coin/trx/index.d.ts +0 -10
  497. package/dist/src/coin/trx/index.d.ts.map +0 -1
  498. package/dist/src/coin/trx/index.js +0 -39
  499. package/dist/src/coin/trx/keyPair.d.ts +0 -44
  500. package/dist/src/coin/trx/keyPair.d.ts.map +0 -1
  501. package/dist/src/coin/trx/keyPair.js +0 -121
  502. package/dist/src/coin/trx/transaction.d.ts +0 -74
  503. package/dist/src/coin/trx/transaction.d.ts.map +0 -1
  504. package/dist/src/coin/trx/transaction.js +0 -205
  505. package/dist/src/coin/trx/transactionBuilder.d.ts +0 -65
  506. package/dist/src/coin/trx/transactionBuilder.d.ts.map +0 -1
  507. package/dist/src/coin/trx/transactionBuilder.js +0 -215
  508. package/dist/src/coin/trx/utils.d.ts +0 -127
  509. package/dist/src/coin/trx/utils.d.ts.map +0 -1
  510. package/dist/src/coin/trx/utils.js +0 -369
  511. package/dist/src/coin/trx/wrappedBuilder.d.ts +0 -52
  512. package/dist/src/coin/trx/wrappedBuilder.d.ts.map +0 -1
  513. package/dist/src/coin/trx/wrappedBuilder.js +0 -104
  514. package/dist/src/coin/xrp/index.d.ts +0 -5
  515. package/dist/src/coin/xrp/index.d.ts.map +0 -1
  516. package/dist/src/coin/xrp/index.js +0 -29
  517. package/dist/src/coin/xrp/keyPair.d.ts +0 -10
  518. package/dist/src/coin/xrp/keyPair.d.ts.map +0 -1
  519. package/dist/src/coin/xrp/keyPair.js +0 -16
  520. package/dist/src/coin/xrp/transaction.d.ts +0 -10
  521. package/dist/src/coin/xrp/transaction.d.ts.map +0 -1
  522. package/dist/src/coin/xrp/transaction.js +0 -20
  523. package/dist/src/coin/xrp/transactionBuilder.d.ts +0 -27
  524. package/dist/src/coin/xrp/transactionBuilder.d.ts.map +0 -1
  525. package/dist/src/coin/xrp/transactionBuilder.js +0 -46
  526. package/dist/src/coin/xrp/transactionBuilderFactory.d.ts +0 -24
  527. package/dist/src/coin/xrp/transactionBuilderFactory.d.ts.map +0 -1
  528. package/dist/src/coin/xrp/transactionBuilderFactory.js +0 -38
  529. package/dist/src/coin/xrp/transferBuilder.d.ts +0 -14
  530. package/dist/src/coin/xrp/transferBuilder.d.ts.map +0 -1
  531. package/dist/src/coin/xrp/transferBuilder.js +0 -24
  532. package/dist/src/coin/xrp/utils.d.ts +0 -16
  533. package/dist/src/coin/xrp/utils.d.ts.map +0 -1
  534. package/dist/src/coin/xrp/utils.js +0 -32
  535. package/dist/src/coin/xrp/walletInitializationBuilder.d.ts +0 -14
  536. package/dist/src/coin/xrp/walletInitializationBuilder.d.ts.map +0 -1
  537. package/dist/src/coin/xrp/walletInitializationBuilder.js +0 -24
  538. package/dist/src/coin/xtz/address.d.ts +0 -8
  539. package/dist/src/coin/xtz/address.d.ts.map +0 -1
  540. package/dist/src/coin/xtz/address.js +0 -10
  541. package/dist/src/coin/xtz/iface.d.ts +0 -81
  542. package/dist/src/coin/xtz/iface.d.ts.map +0 -1
  543. package/dist/src/coin/xtz/iface.js +0 -3
  544. package/dist/src/coin/xtz/index.d.ts +0 -8
  545. package/dist/src/coin/xtz/index.d.ts.map +0 -1
  546. package/dist/src/coin/xtz/index.js +0 -37
  547. package/dist/src/coin/xtz/keyPair.d.ts +0 -40
  548. package/dist/src/coin/xtz/keyPair.d.ts.map +0 -1
  549. package/dist/src/coin/xtz/keyPair.js +0 -136
  550. package/dist/src/coin/xtz/multisigUtils.d.ts +0 -134
  551. package/dist/src/coin/xtz/multisigUtils.d.ts.map +0 -1
  552. package/dist/src/coin/xtz/multisigUtils.js +0 -1180
  553. package/dist/src/coin/xtz/transaction.d.ts +0 -119
  554. package/dist/src/coin/xtz/transaction.d.ts.map +0 -1
  555. package/dist/src/coin/xtz/transaction.js +0 -315
  556. package/dist/src/coin/xtz/transactionBuilder.d.ts +0 -171
  557. package/dist/src/coin/xtz/transactionBuilder.d.ts.map +0 -1
  558. package/dist/src/coin/xtz/transactionBuilder.js +0 -453
  559. package/dist/src/coin/xtz/transferBuilder.d.ts +0 -24
  560. package/dist/src/coin/xtz/transferBuilder.d.ts.map +0 -1
  561. package/dist/src/coin/xtz/transferBuilder.js +0 -64
  562. package/dist/src/coin/xtz/utils.d.ts +0 -265
  563. package/dist/src/coin/xtz/utils.d.ts.map +0 -1
  564. package/dist/src/coin/xtz/utils.js +0 -460
  565. package/dist/src/mpc/curves/baseCurve.d.ts +0 -18
  566. package/dist/src/mpc/curves/baseCurve.d.ts.map +0 -1
  567. package/dist/src/mpc/curves/baseCurve.js +0 -6
  568. package/dist/src/mpc/curves/ed25519.d.ts +0 -17
  569. package/dist/src/mpc/curves/ed25519.d.ts.map +0 -1
  570. package/dist/src/mpc/curves/ed25519.js +0 -48
  571. package/dist/src/mpc/curves/index.d.ts +0 -5
  572. package/dist/src/mpc/curves/index.d.ts.map +0 -1
  573. package/dist/src/mpc/curves/index.js +0 -6
  574. package/dist/src/mpc/curves/secp256k1.d.ts +0 -16
  575. package/dist/src/mpc/curves/secp256k1.d.ts.map +0 -1
  576. package/dist/src/mpc/curves/secp256k1.js +0 -66
  577. package/dist/src/mpc/hdTree.d.ts +0 -24
  578. package/dist/src/mpc/hdTree.d.ts.map +0 -1
  579. package/dist/src/mpc/hdTree.js +0 -94
  580. package/dist/src/mpc/shamir.d.ts +0 -26
  581. package/dist/src/mpc/shamir.d.ts.map +0 -1
  582. package/dist/src/mpc/shamir.js +0 -86
  583. package/dist/src/mpc/tss/eddsa/eddsa.d.ts +0 -29
  584. package/dist/src/mpc/tss/eddsa/eddsa.d.ts.map +0 -1
  585. package/dist/src/mpc/tss/eddsa/eddsa.js +0 -273
  586. package/dist/src/mpc/tss/eddsa/index.d.ts +0 -4
  587. package/dist/src/mpc/tss/eddsa/index.d.ts.map +0 -1
  588. package/dist/src/mpc/tss/eddsa/index.js +0 -30
  589. package/dist/src/mpc/tss/eddsa/types.d.ts +0 -70
  590. package/dist/src/mpc/tss/eddsa/types.d.ts.map +0 -1
  591. package/dist/src/mpc/tss/eddsa/types.js +0 -3
  592. package/dist/src/mpc/tss/index.d.ts +0 -5
  593. package/dist/src/mpc/tss/index.d.ts.map +0 -1
  594. package/dist/src/mpc/tss/index.js +0 -32
  595. package/dist/src/mpc/tss.d.ts +0 -98
  596. package/dist/src/mpc/tss.d.ts.map +0 -1
  597. package/dist/src/mpc/tss.js +0 -277
  598. package/dist/src/mpc/util.d.ts +0 -7
  599. package/dist/src/mpc/util.d.ts.map +0 -1
  600. package/dist/src/mpc/util.js +0 -38
  601. package/dist/src/utils/crypto.d.ts +0 -99
  602. package/dist/src/utils/crypto.d.ts.map +0 -1
  603. package/dist/src/utils/crypto.js +0 -260
  604. package/dist/src/utils/ed25519KeyDeriver.d.ts +0 -49
  605. package/dist/src/utils/ed25519KeyDeriver.d.ts.map +0 -1
  606. package/dist/src/utils/ed25519KeyDeriver.js +0 -92
  607. package/resources/hbar/protobuf/BasicTypes.proto +0 -424
  608. package/resources/hbar/protobuf/CryptoCreate.proto +0 -47
  609. package/resources/hbar/protobuf/CryptoTransfer.proto +0 -33
  610. package/resources/hbar/protobuf/Duration.proto +0 -28
  611. package/resources/hbar/protobuf/Timestamp.proto +0 -34
  612. package/resources/hbar/protobuf/Transaction.proto +0 -35
  613. package/resources/hbar/protobuf/TransactionBody.proto +0 -24
  614. package/resources/hbar/protobuf/TransactionContents.proto +0 -33
  615. package/resources/hbar/protobuf/hedera.d.ts +0 -4612
  616. package/resources/hbar/protobuf/hedera.js +0 -12192
  617. package/resources/trx/protobuf/Contract.proto +0 -256
  618. package/resources/trx/protobuf/Discover.proto +0 -44
  619. package/resources/trx/protobuf/tron.d.ts +0 -11024
  620. package/resources/trx/protobuf/tron.js +0 -31510
  621. package/resources/trx/protobuf/tron.proto +0 -677
@@ -1,99 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.TransferBuilder = void 0;
7
- const bn_js_1 = __importDefault(require("bn.js"));
8
- const transactions_1 = require("@stacks/transactions");
9
- const sdk_core_1 = require("@bitgo/sdk-core");
10
- const transactionBuilder_1 = require("./transactionBuilder");
11
- const utils_1 = require("./utils");
12
- class TransferBuilder extends transactionBuilder_1.TransactionBuilder {
13
- constructor(_coinConfig) {
14
- super(_coinConfig);
15
- }
16
- initBuilder(tx) {
17
- const txData = tx.toJson();
18
- if (txData.payload === undefined) {
19
- throw new sdk_core_1.InvalidTransactionError('payload must not be undefined');
20
- }
21
- if (txData.payload.payloadType === transactions_1.PayloadType.TokenTransfer) {
22
- this.to(txData.payload.to);
23
- this.amount(txData.payload.amount);
24
- if (txData.payload.memo) {
25
- this.memo(txData.payload.memo);
26
- }
27
- super.initBuilder(tx);
28
- }
29
- else {
30
- throw new sdk_core_1.BuildTransactionError('Transaction should be transfer');
31
- }
32
- }
33
- /** @inheritdoc */
34
- async buildImplementation() {
35
- this._options = this.buildTokenTransferOptions();
36
- this.transaction.setTransactionType(sdk_core_1.TransactionType.Send);
37
- this.transaction.stxTransaction = await transactions_1.makeUnsignedSTXTokenTransfer(this._options);
38
- return await super.buildImplementation();
39
- }
40
- buildTokenTransferOptions() {
41
- const defaultOpts = {
42
- recipient: this._toAddress,
43
- amount: this._amount,
44
- memo: this._memo,
45
- anchorMode: this._anchorMode,
46
- network: this._network,
47
- fee: new bn_js_1.default(this._fee.fee),
48
- nonce: new bn_js_1.default(this._nonce),
49
- };
50
- if (this._fromPubKeys.length > 0) {
51
- if (this._fromPubKeys.length === 1) {
52
- return {
53
- ...defaultOpts,
54
- publicKey: this._fromPubKeys[0],
55
- };
56
- }
57
- else {
58
- return {
59
- ...defaultOpts,
60
- publicKeys: this._fromPubKeys,
61
- numSignatures: this._numberSignatures,
62
- };
63
- }
64
- }
65
- else {
66
- throw new sdk_core_1.InvalidParameterValueError('supply at least 1 public key');
67
- }
68
- }
69
- // region Transfer fields
70
- /**
71
- * Set the destination address where the funds will be sent,
72
- * it may take the format `'<shard>.<realm>.<account>'` or `'<account>'`
73
- *
74
- * @param {string} address the address to transfer funds to
75
- * @returns {TransferBuilder} the builder with the new parameter set
76
- */
77
- to(address) {
78
- if (!utils_1.isValidAddress(address)) {
79
- throw new sdk_core_1.InvalidParameterValueError('Invalid address');
80
- }
81
- this._toAddress = address;
82
- return this;
83
- }
84
- /**
85
- * Set the amount to be transferred
86
- *
87
- * @param {string} amount amount to transfer in tinyBars (there are 100,000,000 tinyBars in one Hbar)
88
- * @returns {TransferBuilder} the builder with the new parameter set
89
- */
90
- amount(amount) {
91
- if (!utils_1.isValidAmount(amount)) {
92
- throw new sdk_core_1.InvalidParameterValueError('Invalid amount');
93
- }
94
- this._amount = new bn_js_1.default(amount);
95
- return this;
96
- }
97
- }
98
- exports.TransferBuilder = TransferBuilder;
99
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNmZXJCdWlsZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2NvaW4vc3R4L3RyYW5zZmVyQnVpbGRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFDQSxrREFBMkI7QUFDM0IsdURBTThCO0FBQzlCLDhDQUt5QjtBQUV6Qiw2REFBMEQ7QUFDMUQsbUNBQXdEO0FBRXhELE1BQWEsZUFBZ0IsU0FBUSx1Q0FBa0I7SUFLckQsWUFBWSxXQUFpQztRQUMzQyxLQUFLLENBQUMsV0FBVyxDQUFDLENBQUM7SUFDckIsQ0FBQztJQUVELFdBQVcsQ0FBQyxFQUFlO1FBQ3pCLE1BQU0sTUFBTSxHQUFHLEVBQUUsQ0FBQyxNQUFNLEVBQUUsQ0FBQztRQUMzQixJQUFJLE1BQU0sQ0FBQyxPQUFPLEtBQUssU0FBUyxFQUFFO1lBQ2hDLE1BQU0sSUFBSSxrQ0FBdUIsQ0FBQywrQkFBK0IsQ0FBQyxDQUFDO1NBQ3BFO1FBQ0QsSUFBSSxNQUFNLENBQUMsT0FBTyxDQUFDLFdBQVcsS0FBSywwQkFBVyxDQUFDLGFBQWEsRUFBRTtZQUM1RCxJQUFJLENBQUMsRUFBRSxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLENBQUM7WUFDM0IsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQ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hZGRyZXNzO1xuICAgIHJldHVybiB0aGlzO1xuICB9XG5cbiAgLyoqXG4gICAqIFNldCB0aGUgYW1vdW50IHRvIGJlIHRyYW5zZmVycmVkXG4gICAqXG4gICAqIEBwYXJhbSB7c3RyaW5nfSBhbW91bnQgYW1vdW50IHRvIHRyYW5zZmVyIGluIHRpbnlCYXJzICh0aGVyZSBhcmUgMTAwLDAwMCwwMDAgdGlueUJhcnMgaW4gb25lIEhiYXIpXG4gICAqIEByZXR1cm5zIHtUcmFuc2ZlckJ1aWxkZXJ9IHRoZSBidWlsZGVyIHdpdGggdGhlIG5ldyBwYXJhbWV0ZXIgc2V0XG4gICAqL1xuICBhbW91bnQoYW1vdW50OiBzdHJpbmcpOiB0aGlzIHtcbiAgICBpZiAoIWlzVmFsaWRBbW91bnQoYW1vdW50KSkge1xuICAgICAgdGhyb3cgbmV3IEludmFsaWRQYXJhbWV0ZXJWYWx1ZUVycm9yKCdJbnZhbGlkIGFtb3VudCcpO1xuICAgIH1cbiAgICB0aGlzLl9hbW91bnQgPSBuZXcgQmlnTnVtKGFtb3VudCk7XG4gICAgcmV0dXJuIHRoaXM7XG4gIH1cbn1cbiJdfQ==
@@ -1,207 +0,0 @@
1
- /// <reference types="node" />
2
- import { AddressHashMode, AddressVersion, ClarityValue, StacksTransaction } from '@stacks/transactions';
3
- import { AddressDetails, SendParams } from './iface';
4
- import { KeyPair } from '.';
5
- import { StacksNetwork as BitgoStacksNetwork } from '@bitgo/statics';
6
- /**
7
- * Encodes a buffer as a "0x" prefixed lower-case hex string.
8
- *
9
- * @param {Buffer} buff - a buffer with a hexadecimal string
10
- * @returns {string} - the hexadecimal string prefixed with "0x"
11
- */
12
- export declare function bufferToHexPrefixString(buff: Buffer): string;
13
- /**
14
- * Remove the "0x" prefix from the given string, if present.
15
- *
16
- * @param {string} hex - a hexadecimal string
17
- * @returns {string} - the hexadecimal string without a leading "0x"
18
- */
19
- export declare function removeHexPrefix(hex: string): string;
20
- /**
21
- * @param tx
22
- */
23
- export declare function getTxSenderAddress(tx: StacksTransaction): string;
24
- /**
25
- * Returns whether or not the string is a valid amount number
26
- *
27
- * @param {string} amount - the string to validate
28
- * @returns {boolean} - the validation result
29
- */
30
- export declare function isValidAmount(amount: string): boolean;
31
- /**
32
- * Returns whether or not the string is a valid protocol address
33
- *
34
- * @param {string} address - the address to be validated
35
- * @returns {boolean} - the validation result
36
- */
37
- export declare function isValidAddress(address: string): boolean;
38
- /**
39
- * Returns whether or not the string is a valid protocol transaction id or not.
40
- *
41
- * A valid transaction id is a SHA-512/256 hash of a serialized transaction; see
42
- * the txidFromData function in @stacks/transaction:
43
- * https://github.com/blockstack/stacks.js/blob/master/packages/transactions/src/utils.ts#L97
44
- *
45
- * @param {string} txId - the transaction id to be validated
46
- * @returns {boolean} - the validation result
47
- */
48
- export declare function isValidTransactionId(txId: string): boolean;
49
- /**
50
- * Returns whether or not the string is a valid protocol public key or
51
- * extended public key.
52
- *
53
- * The key format is documented at
54
- * https://github.com/stacksgov/sips/blob/main/sips/sip-005/sip-005-blocks-and-transactions.md#transaction-authorization
55
- *
56
- * @param {string} pub - the public key to be validated
57
- * @returns {boolean} - the validation result
58
- */
59
- export declare function isValidPublicKey(pub: string): boolean;
60
- /**
61
- * Returns whether or not the string is a valid protocol private key, or extended
62
- * private key.
63
- *
64
- * The protocol key format is described in the @stacks/transactions npm package, in the
65
- * createStacksPrivateKey function:
66
- * https://github.com/blockstack/stacks.js/blob/master/packages/transactions/src/keys.ts#L125
67
- *
68
- * @param {string} prv - the private key (or extended private key) to be validated
69
- * @returns {boolean} - the validation result
70
- */
71
- export declare function isValidPrivateKey(prv: string): boolean;
72
- /**
73
- * Checks if raw transaction can be deserialized
74
- *
75
- * @param {unknown} rawTransaction - transaction in raw hex format
76
- * @returns {boolean} - the validation result
77
- */
78
- export declare function isValidRawTransaction(rawTransaction: unknown): boolean;
79
- /**
80
- * Returns whether or not the memo string is valid
81
- *
82
- * @param {string} memo - the string to be validated
83
- * @returns {boolean} - the validation result
84
- */
85
- export declare function isValidMemo(memo: string): boolean;
86
- /**
87
- * Checks for valid contract address
88
- *
89
- * @param {string} addr - contract deployer address
90
- * @param {BitgoStacksNetwork} network - network object
91
- * @returns {boolean} - the validation result
92
- */
93
- export declare function isValidContractAddress(addr: string, network: BitgoStacksNetwork): boolean;
94
- /**
95
- * Check if the name is one of valid contract names
96
- *
97
- * @param {string} name - function name
98
- * @returns {boolean} - validation result
99
- */
100
- export declare function isValidContractFunctionName(name: string): boolean;
101
- /**
102
- * Unpads a memo string, so it removes nulls.
103
- *
104
- * Useful when memo is fill up the length. Result is becomes readable.
105
- *
106
- * @param {string} memo - the string to be validated
107
- * @returns {boolean} - the validation result
108
- */
109
- export declare function unpadMemo(memo: string): string;
110
- /**
111
- * Generate a multisig address from multiple STX public keys
112
- *
113
- * @param {string[]} pubKeys - list of public keys as strings
114
- * @param {AddressVersion} addressVersion - MainnetMultiSig, TestnetMultiSig
115
- * @param {AddressHashMode} addressHashMode - SerializeP2SH
116
- * @param {number} [signaturesRequired] - number of signatures required, default value its 2
117
- * @returns {address: string, hash160: string} - a multisig address
118
- */
119
- export declare function getSTXAddressFromPubKeys(pubKeys: string[], addressVersion?: AddressVersion, addressHashMode?: AddressHashMode, signaturesRequired?: number): {
120
- address: string;
121
- hash160: string;
122
- };
123
- /**
124
- * signs a string message
125
- *
126
- * @param keyPair
127
- * @param data - message to be signed
128
- * @returns signed message string
129
- */
130
- export declare function signMessage(keyPair: KeyPair, data: string): string;
131
- /**
132
- * Verifies a signed message
133
- *
134
- * The signature must be 130 bytes long -- see RECOVERABLE_ECDSA_SIG_LENGTH_BYTES
135
- * in @stacks/transactions/src/constants.ts
136
- *
137
- * @param {string} message - message to verify the signature
138
- * @param {string} signature - signature to verify
139
- * @param {string} publicKey - public key as hex string used to verify the signature
140
- * @returns {boolean} - verification result
141
- */
142
- export declare function verifySignature(message: string, signature: string, publicKey: string): boolean;
143
- /**
144
- * Process address into address and memo id
145
- *
146
- * @param {string} address the address to process
147
- * @returns {Object} object containing address and memo id
148
- */
149
- export declare function getAddressDetails(address: string): AddressDetails;
150
- /**
151
- * Validate and return address with appended memo id
152
- *
153
- * @param {AddressDetails} addressDetails
154
- * @returns {string} address with memo id
155
- */
156
- export declare function normalizeAddress({ address, memoId }: AddressDetails): string;
157
- /**
158
- * Return boolean indicating whether input is a valid address with memo id
159
- *
160
- * @param {string} address address in the form <address>?memoId=<memoId>
161
- * @returns {boolean} true is input is a valid address
162
- */
163
- export declare function isValidAddressWithPaymentId(address: string): boolean;
164
- /**
165
- * Return string representation of clarity value input
166
- *
167
- * @param {ClarityValue} cv clarity value function argument
168
- * @returns {String} stringified clarity value
169
- */
170
- export declare function stringifyCv(cv: ClarityValue): any;
171
- /**
172
- * Parse functionArgs into send params for send-many-memo contract calls
173
- *
174
- * @param {ClarityValue[]} args functionArgs from a contract call payload
175
- * @returns {SendParams[]} An array of sendParams
176
- */
177
- export declare function functionArgsToSendParams(args: ClarityValue[]): SendParams[];
178
- /**
179
- * Gets the version of an address
180
- *
181
- * @param {String} address the address with or without the memoId
182
- * @returns {AddressVersion} A number that represent the Address Version
183
- */
184
- export declare function getAddressVersion(address: string): AddressVersion;
185
- /**
186
- * Returns a STX pub key from an xpub
187
- *
188
- * @param {String} xpub an xpub
189
- * @returns {String} a compressed STX pub key
190
- */
191
- export declare function xpubToSTXPubkey(xpub: string, compressed?: boolean): string;
192
- /**
193
- * Returns the base address portion of an address
194
- *
195
- * @param {String} address - an address
196
- * @returns {String} - the base address
197
- */
198
- export declare function getBaseAddress(address: string): string;
199
- /**
200
- * Compares an address to the base address to check if matchs.
201
- *
202
- * @param {String} address - an address
203
- * @param {String} baseAddress - a base address
204
- * @returns {boolean}
205
- */
206
- export declare function isSameBaseAddress(address: string, baseAddress: string): boolean;
207
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/coin/stx/utils.ts"],"names":[],"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