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

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 (210) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/src/coin/hbar/utils.js +1 -1
  3. package/dist/src/coin/sol/ataInitializationBuilder.d.ts +3 -2
  4. package/dist/src/coin/sol/ataInitializationBuilder.d.ts.map +1 -1
  5. package/dist/src/coin/sol/ataInitializationBuilder.js +9 -7
  6. package/dist/src/coin/sol/ataInitializationTransaction.js +3 -3
  7. package/dist/src/coin/sol/iface.d.ts +1 -0
  8. package/dist/src/coin/sol/iface.d.ts.map +1 -1
  9. package/dist/src/coin/sol/iface.js +1 -1
  10. package/dist/src/coin/sol/instructionParamsFactory.js +17 -10
  11. package/dist/src/index.d.ts +13 -3
  12. package/dist/src/index.d.ts.map +1 -1
  13. package/dist/src/index.js +20 -10
  14. package/dist/tsconfig.tsbuildinfo +2380 -3994
  15. package/package.json +10 -16
  16. package/dist/browser/bitgo-account-lib.js +0 -2
  17. package/dist/browser/bitgo-account-lib.js.LICENSE.txt +0 -337
  18. package/dist/resources/hbar/protobuf/BasicTypes.proto +0 -424
  19. package/dist/resources/hbar/protobuf/CryptoCreate.proto +0 -47
  20. package/dist/resources/hbar/protobuf/CryptoTransfer.proto +0 -33
  21. package/dist/resources/hbar/protobuf/Duration.proto +0 -28
  22. package/dist/resources/hbar/protobuf/Timestamp.proto +0 -34
  23. package/dist/resources/hbar/protobuf/Transaction.proto +0 -35
  24. package/dist/resources/hbar/protobuf/TransactionBody.proto +0 -24
  25. package/dist/resources/hbar/protobuf/TransactionContents.proto +0 -33
  26. package/dist/resources/hbar/protobuf/hedera.d.ts +0 -4612
  27. package/dist/resources/hbar/protobuf/hedera.js +0 -12192
  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/celo/stakingUtils.d.ts +0 -15
  68. package/dist/src/coin/celo/stakingUtils.d.ts.map +0 -1
  69. package/dist/src/coin/celo/stakingUtils.js +0 -98
  70. package/dist/src/coin/cspr/constants.d.ts +0 -19
  71. package/dist/src/coin/cspr/constants.d.ts.map +0 -1
  72. package/dist/src/coin/cspr/constants.js +0 -28
  73. package/dist/src/coin/cspr/delegateBuilder.d.ts +0 -49
  74. package/dist/src/coin/cspr/delegateBuilder.d.ts.map +0 -1
  75. package/dist/src/coin/cspr/delegateBuilder.js +0 -111
  76. package/dist/src/coin/cspr/ifaces.d.ts +0 -69
  77. package/dist/src/coin/cspr/ifaces.d.ts.map +0 -1
  78. package/dist/src/coin/cspr/ifaces.js +0 -3
  79. package/dist/src/coin/cspr/index.d.ts +0 -6
  80. package/dist/src/coin/cspr/index.d.ts.map +0 -1
  81. package/dist/src/coin/cspr/index.js +0 -31
  82. package/dist/src/coin/cspr/keyPair.d.ts +0 -18
  83. package/dist/src/coin/cspr/keyPair.d.ts.map +0 -1
  84. package/dist/src/coin/cspr/keyPair.js +0 -75
  85. package/dist/src/coin/cspr/transaction.d.ts +0 -55
  86. package/dist/src/coin/cspr/transaction.d.ts.map +0 -1
  87. package/dist/src/coin/cspr/transaction.js +0 -227
  88. package/dist/src/coin/cspr/transactionBuilder.d.ts +0 -124
  89. package/dist/src/coin/cspr/transactionBuilder.d.ts.map +0 -1
  90. package/dist/src/coin/cspr/transactionBuilder.js +0 -312
  91. package/dist/src/coin/cspr/transactionBuilderFactory.d.ts +0 -46
  92. package/dist/src/coin/cspr/transactionBuilderFactory.d.ts.map +0 -1
  93. package/dist/src/coin/cspr/transactionBuilderFactory.js +0 -98
  94. package/dist/src/coin/cspr/transferBuilder.d.ts +0 -39
  95. package/dist/src/coin/cspr/transferBuilder.d.ts.map +0 -1
  96. package/dist/src/coin/cspr/transferBuilder.js +0 -106
  97. package/dist/src/coin/cspr/undelegateBuilder.d.ts +0 -49
  98. package/dist/src/coin/cspr/undelegateBuilder.d.ts.map +0 -1
  99. package/dist/src/coin/cspr/undelegateBuilder.js +0 -111
  100. package/dist/src/coin/cspr/utils.d.ts +0 -188
  101. package/dist/src/coin/cspr/utils.d.ts.map +0 -1
  102. package/dist/src/coin/cspr/utils.js +0 -477
  103. package/dist/src/coin/cspr/walletInitializationBuilder.d.ts +0 -27
  104. package/dist/src/coin/cspr/walletInitializationBuilder.d.ts.map +0 -1
  105. package/dist/src/coin/cspr/walletInitializationBuilder.js +0 -95
  106. package/dist/src/coin/eth/contractCall.d.ts +0 -8
  107. package/dist/src/coin/eth/contractCall.d.ts.map +0 -1
  108. package/dist/src/coin/eth/contractCall.js +0 -17
  109. package/dist/src/coin/eth/iface.d.ts +0 -122
  110. package/dist/src/coin/eth/iface.d.ts.map +0 -1
  111. package/dist/src/coin/eth/iface.js +0 -8
  112. package/dist/src/coin/eth/index.d.ts +0 -10
  113. package/dist/src/coin/eth/index.d.ts.map +0 -1
  114. package/dist/src/coin/eth/index.js +0 -39
  115. package/dist/src/coin/eth/keyPair.d.ts +0 -26
  116. package/dist/src/coin/eth/keyPair.d.ts.map +0 -1
  117. package/dist/src/coin/eth/keyPair.js +0 -85
  118. package/dist/src/coin/eth/transaction.d.ts +0 -64
  119. package/dist/src/coin/eth/transaction.d.ts.map +0 -1
  120. package/dist/src/coin/eth/transaction.js +0 -137
  121. package/dist/src/coin/eth/transactionBuilder.d.ts +0 -194
  122. package/dist/src/coin/eth/transactionBuilder.d.ts.map +0 -1
  123. package/dist/src/coin/eth/transactionBuilder.js +0 -624
  124. package/dist/src/coin/eth/transferBuilder/baseNFTTransferBuilder.d.ts +0 -47
  125. package/dist/src/coin/eth/transferBuilder/baseNFTTransferBuilder.d.ts.map +0 -1
  126. package/dist/src/coin/eth/transferBuilder/baseNFTTransferBuilder.js +0 -113
  127. package/dist/src/coin/eth/transferBuilder/transferBuilderERC1155.d.ts +0 -14
  128. package/dist/src/coin/eth/transferBuilder/transferBuilderERC1155.d.ts.map +0 -1
  129. package/dist/src/coin/eth/transferBuilder/transferBuilderERC1155.js +0 -83
  130. package/dist/src/coin/eth/transferBuilder/transferBuilderERC721.d.ts +0 -13
  131. package/dist/src/coin/eth/transferBuilder/transferBuilderERC721.d.ts.map +0 -1
  132. package/dist/src/coin/eth/transferBuilder/transferBuilderERC721.js +0 -68
  133. package/dist/src/coin/eth/transferBuilder.d.ts +0 -65
  134. package/dist/src/coin/eth/transferBuilder.d.ts.map +0 -1
  135. package/dist/src/coin/eth/transferBuilder.js +0 -197
  136. package/dist/src/coin/eth/types.d.ts +0 -39
  137. package/dist/src/coin/eth/types.d.ts.map +0 -1
  138. package/dist/src/coin/eth/types.js +0 -135
  139. package/dist/src/coin/eth/utils.d.ts +0 -201
  140. package/dist/src/coin/eth/utils.d.ts.map +0 -1
  141. package/dist/src/coin/eth/utils.js +0 -486
  142. package/dist/src/coin/eth/walletUtil.d.ts +0 -21
  143. package/dist/src/coin/eth/walletUtil.d.ts.map +0 -1
  144. package/dist/src/coin/eth/walletUtil.js +0 -31
  145. package/dist/src/coin/hbar/ifaces.d.ts +0 -26
  146. package/dist/src/coin/hbar/ifaces.d.ts.map +0 -1
  147. package/dist/src/coin/hbar/ifaces.js +0 -3
  148. package/dist/src/coin/stx/abstractContractBuilder.d.ts +0 -19
  149. package/dist/src/coin/stx/abstractContractBuilder.d.ts.map +0 -1
  150. package/dist/src/coin/stx/abstractContractBuilder.js +0 -70
  151. package/dist/src/coin/stx/constants.d.ts +0 -8
  152. package/dist/src/coin/stx/constants.d.ts.map +0 -1
  153. package/dist/src/coin/stx/constants.js +0 -19
  154. package/dist/src/coin/stx/contractBuilder.d.ts +0 -33
  155. package/dist/src/coin/stx/contractBuilder.d.ts.map +0 -1
  156. package/dist/src/coin/stx/contractBuilder.js +0 -116
  157. package/dist/src/coin/stx/iface.d.ts +0 -48
  158. package/dist/src/coin/stx/iface.d.ts.map +0 -1
  159. package/dist/src/coin/stx/iface.js +0 -3
  160. package/dist/src/coin/stx/index.d.ts +0 -6
  161. package/dist/src/coin/stx/index.d.ts.map +0 -1
  162. package/dist/src/coin/stx/index.js +0 -32
  163. package/dist/src/coin/stx/keyPair.d.ts +0 -55
  164. package/dist/src/coin/stx/keyPair.d.ts.map +0 -1
  165. package/dist/src/coin/stx/keyPair.js +0 -140
  166. package/dist/src/coin/stx/sendmanyBuilder.d.ts +0 -23
  167. package/dist/src/coin/stx/sendmanyBuilder.d.ts.map +0 -1
  168. package/dist/src/coin/stx/sendmanyBuilder.js +0 -75
  169. package/dist/src/coin/stx/transaction.d.ts +0 -49
  170. package/dist/src/coin/stx/transaction.d.ts.map +0 -1
  171. package/dist/src/coin/stx/transaction.js +0 -225
  172. package/dist/src/coin/stx/transactionBuilder.d.ts +0 -86
  173. package/dist/src/coin/stx/transactionBuilder.d.ts.map +0 -1
  174. package/dist/src/coin/stx/transactionBuilder.js +0 -263
  175. package/dist/src/coin/stx/transactionBuilderFactory.d.ts +0 -30
  176. package/dist/src/coin/stx/transactionBuilderFactory.d.ts.map +0 -1
  177. package/dist/src/coin/stx/transactionBuilderFactory.js +0 -81
  178. package/dist/src/coin/stx/transferBuilder.d.ts +0 -30
  179. package/dist/src/coin/stx/transferBuilder.d.ts.map +0 -1
  180. package/dist/src/coin/stx/transferBuilder.js +0 -99
  181. package/dist/src/coin/stx/utils.d.ts +0 -207
  182. package/dist/src/coin/stx/utils.d.ts.map +0 -1
  183. package/dist/src/coin/stx/utils.js +0 -503
  184. package/dist/src/coin/xtz/address.d.ts +0 -8
  185. package/dist/src/coin/xtz/address.d.ts.map +0 -1
  186. package/dist/src/coin/xtz/address.js +0 -10
  187. package/dist/src/coin/xtz/iface.d.ts +0 -81
  188. package/dist/src/coin/xtz/iface.d.ts.map +0 -1
  189. package/dist/src/coin/xtz/iface.js +0 -3
  190. package/dist/src/coin/xtz/index.d.ts +0 -8
  191. package/dist/src/coin/xtz/index.d.ts.map +0 -1
  192. package/dist/src/coin/xtz/index.js +0 -37
  193. package/dist/src/coin/xtz/keyPair.d.ts +0 -40
  194. package/dist/src/coin/xtz/keyPair.d.ts.map +0 -1
  195. package/dist/src/coin/xtz/keyPair.js +0 -136
  196. package/dist/src/coin/xtz/multisigUtils.d.ts +0 -134
  197. package/dist/src/coin/xtz/multisigUtils.d.ts.map +0 -1
  198. package/dist/src/coin/xtz/multisigUtils.js +0 -1180
  199. package/dist/src/coin/xtz/transaction.d.ts +0 -119
  200. package/dist/src/coin/xtz/transaction.d.ts.map +0 -1
  201. package/dist/src/coin/xtz/transaction.js +0 -315
  202. package/dist/src/coin/xtz/transactionBuilder.d.ts +0 -171
  203. package/dist/src/coin/xtz/transactionBuilder.d.ts.map +0 -1
  204. package/dist/src/coin/xtz/transactionBuilder.js +0 -453
  205. package/dist/src/coin/xtz/transferBuilder.d.ts +0 -24
  206. package/dist/src/coin/xtz/transferBuilder.d.ts.map +0 -1
  207. package/dist/src/coin/xtz/transferBuilder.js +0 -64
  208. package/dist/src/coin/xtz/utils.d.ts +0 -265
  209. package/dist/src/coin/xtz/utils.d.ts.map +0 -1
  210. package/dist/src/coin/xtz/utils.js +0 -460
@@ -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,GA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AAG,CAAC;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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWZhY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29pbi94dHovaWZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEJhc2VGZWUsIEJhc2VLZXkgfSBmcm9tICdAYml0Z28vc2RrLWNvcmUnO1xuXG5leHBvcnQgaW50ZXJmYWNlIEhhc2hUeXBlIHtcbiAgcHJlZml4OiBCdWZmZXI7XG4gIGJ5dGVMZW5ndGg6IG51bWJlcjtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBPcGVyYXRpb24ge1xuICBraW5kOiBzdHJpbmc7XG4gIGNvdW50ZXI6IHN0cmluZztcbiAgc291cmNlOiBzdHJpbmc7XG4gIGZlZTogc3RyaW5nO1xuICBnYXNfbGltaXQ6IHN0cmluZztcbiAgc3RvcmFnZV9saW1pdDogc3RyaW5nO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIFJldmVhbE9wIGV4dGVuZHMgT3BlcmF0aW9uIHtcbiAgcHVibGljX2tleTogc3RyaW5nO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIE9yaWdpbmF0aW9uT3AgZXh0ZW5kcyBPcGVyYXRpb24ge1xuICBiYWxhbmNlOiBzdHJpb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IHJldHVybiB0eXBlIGZvciBzaWduIG9wZXJhdGlvbnNcbiAqL1xuZXhwb3J0IGludGVyZmFjZSBTaWduUmVzcG9uc2Uge1xuICBieXRlczogc3RyaW5nO1xuICBzaWc6IGFueTtcbiAgcHJlZml4U2lnOiBhbnk7XG4gIHNieXRlczogc3RyaW5nO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGV4ZWREYXRhIHtcbiAgaW5kZXg/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,eyJ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-1,40 +0,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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2V5UGFpci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb2luL3h0ei9rZXlQYWlyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxtQ0FBcUM7QUFDckMsNkNBQStCO0FBQy9CLDZEQUFxQztBQUNyQyxpREFBdUM7QUFDdkMsOENBV3lCO0FBQ3pCLCtDQUFpQztBQUVqQyxNQUFNLHVCQUF1QixHQUFHLEVBQUUsQ0FBQztBQUVuQzs7R0FFRztBQUNILE1BQWEsT0FBUSxTQUFRLG1DQUF3QjtJQUNuRDs7Ozs7T0FLRztJQUNILFlBQVksTUFBdUI7UUFDakMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxDQUF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{ IndexedSignature, 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,EA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