@bitgo-beta/abstract-substrate 1.0.1-beta.58 → 1.0.1-beta.581

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 (55) hide show
  1. package/.mocharc.yml +1 -1
  2. package/CHANGELOG.md +214 -0
  3. package/dist/src/abstractSubstrateCoin.d.ts +57 -23
  4. package/dist/src/abstractSubstrateCoin.d.ts.map +1 -1
  5. package/dist/src/abstractSubstrateCoin.js +335 -62
  6. package/dist/src/lib/constants.d.ts +2 -0
  7. package/dist/src/lib/constants.d.ts.map +1 -0
  8. package/dist/src/lib/constants.js +5 -0
  9. package/dist/src/lib/errors.d.ts +8 -0
  10. package/dist/src/lib/errors.d.ts.map +1 -0
  11. package/dist/src/lib/errors.js +19 -0
  12. package/dist/src/lib/iface.d.ts +115 -202
  13. package/dist/src/lib/iface.d.ts.map +1 -1
  14. package/dist/src/lib/iface.js +35 -80
  15. package/dist/src/lib/index.d.ts +9 -2
  16. package/dist/src/lib/index.d.ts.map +1 -1
  17. package/dist/src/lib/index.js +22 -4
  18. package/dist/src/lib/keyPair.d.ts +6 -13
  19. package/dist/src/lib/keyPair.d.ts.map +1 -1
  20. package/dist/src/lib/keyPair.js +12 -19
  21. package/dist/src/lib/nativeTransferBuilder.d.ts +61 -0
  22. package/dist/src/lib/nativeTransferBuilder.d.ts.map +1 -0
  23. package/dist/src/lib/nativeTransferBuilder.js +150 -0
  24. package/dist/src/lib/singletonRegistry.d.ts +8 -0
  25. package/dist/src/lib/singletonRegistry.d.ts.map +1 -0
  26. package/dist/src/lib/singletonRegistry.js +20 -0
  27. package/dist/src/lib/transaction.d.ts +74 -0
  28. package/dist/src/lib/transaction.d.ts.map +1 -0
  29. package/dist/src/lib/transaction.js +553 -0
  30. package/dist/src/lib/transactionBuilder.d.ts +121 -0
  31. package/dist/src/lib/transactionBuilder.d.ts.map +1 -0
  32. package/dist/src/lib/transactionBuilder.js +334 -0
  33. package/dist/src/lib/transferBuilder.d.ts +6 -0
  34. package/dist/src/lib/transferBuilder.d.ts.map +1 -0
  35. package/dist/src/lib/transferBuilder.js +11 -0
  36. package/dist/src/lib/txnSchema.d.ts +12 -0
  37. package/dist/src/lib/txnSchema.d.ts.map +1 -0
  38. package/dist/src/lib/txnSchema.js +71 -0
  39. package/dist/src/lib/utils.d.ts +21 -140
  40. package/dist/src/lib/utils.d.ts.map +1 -1
  41. package/dist/src/lib/utils.js +52 -238
  42. package/dist/tsconfig.tsbuildinfo +1 -1
  43. package/package.json +10 -5
  44. package/dist/src/lib/iface_utils.d.ts +0 -59
  45. package/dist/src/lib/iface_utils.d.ts.map +0 -1
  46. package/dist/src/lib/iface_utils.js +0 -92
  47. package/dist/src/resources/index.d.ts +0 -3
  48. package/dist/src/resources/index.d.ts.map +0 -1
  49. package/dist/src/resources/index.js +0 -19
  50. package/dist/src/resources/mainnet.d.ts +0 -2
  51. package/dist/src/resources/mainnet.d.ts.map +0 -1
  52. package/dist/src/resources/mainnet.js +0 -5
  53. package/dist/src/resources/westend.d.ts +0 -2
  54. package/dist/src/resources/westend.d.ts.map +0 -1
  55. package/dist/src/resources/westend.js +0 -5
package/.mocharc.yml CHANGED
@@ -1,4 +1,4 @@
1
- require: 'ts-node/register'
1
+ require: 'tsx'
2
2
  timeout: '60000'
3
3
  reporter: 'min'
4
4
  reporter-option:
package/CHANGELOG.md CHANGED
@@ -3,6 +3,220 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.11.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.11.0...@bitgo/abstract-substrate@1.11.1) (2025-09-29)
7
+
8
+ **Note:** Version bump only for package @bitgo/abstract-substrate
9
+
10
+ # [1.11.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.10.4...@bitgo/abstract-substrate@1.11.0) (2025-09-25)
11
+
12
+ ### Features
13
+
14
+ - configure learn to skip git operations ([ee3a622](https://github.com/BitGo/BitGoJS/commit/ee3a6220496476aa7f4545b5f4a9a3bf97d9bdb9))
15
+ - **sdk-coin-polyx:** add decodeTransaction in utils ([4d6f451](https://github.com/BitGo/BitGoJS/commit/4d6f4510dd10bc4e92a29117de33d9ce1c6b521c))
16
+ - **sdk-coin-tao:** add moveStakeBuilder ([03a7b36](https://github.com/BitGo/BitGoJS/commit/03a7b368414b61ccfc45f0df5e56378fcd32168c))
17
+
18
+ ## [1.10.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.10.3...@bitgo/abstract-substrate@1.10.4) (2025-09-03)
19
+
20
+ **Note:** Version bump only for package @bitgo/abstract-substrate
21
+
22
+ ## [1.10.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.10.2...@bitgo/abstract-substrate@1.10.3) (2025-08-30)
23
+
24
+ **Note:** Version bump only for package @bitgo/abstract-substrate
25
+
26
+ ## [1.10.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.10.1...@bitgo/abstract-substrate@1.10.2) (2025-08-29)
27
+
28
+ **Note:** Version bump only for package @bitgo/abstract-substrate
29
+
30
+ ## [1.10.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.10.0...@bitgo/abstract-substrate@1.10.1) (2025-08-27)
31
+
32
+ **Note:** Version bump only for package @bitgo/abstract-substrate
33
+
34
+ # [1.10.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.9.2...@bitgo/abstract-substrate@1.10.0) (2025-08-22)
35
+
36
+ ### Features
37
+
38
+ - **root:** migrate ts-node -> tsx ([ea180b4](https://github.com/BitGo/BitGoJS/commit/ea180b43001d8e956196bc07b32798e3a7031eeb))
39
+
40
+ ## [1.9.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.9.1...@bitgo/abstract-substrate@1.9.2) (2025-08-22)
41
+
42
+ **Note:** Version bump only for package @bitgo/abstract-substrate
43
+
44
+ ## [1.9.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.9.0...@bitgo/abstract-substrate@1.9.1) (2025-08-19)
45
+
46
+ **Note:** Version bump only for package @bitgo/abstract-substrate
47
+
48
+ # [1.9.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.8.10...@bitgo/abstract-substrate@1.9.0) (2025-08-14)
49
+
50
+ ### Features
51
+
52
+ - **sdk-coin-polyx:** add token builders ([6860780](https://github.com/BitGo/BitGoJS/commit/68607804efc1191ff396e05f20466526246b7d87))
53
+ - **sdk-coin-tao:** add tokenTransferBuilder ([43fc839](https://github.com/BitGo/BitGoJS/commit/43fc839f87e81d2592bcd249b14d7aef815a0927))
54
+
55
+ ## [1.8.10](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.8.9...@bitgo/abstract-substrate@1.8.10) (2025-08-07)
56
+
57
+ **Note:** Version bump only for package @bitgo/abstract-substrate
58
+
59
+ ## [1.8.9](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.8.8...@bitgo/abstract-substrate@1.8.9) (2025-07-31)
60
+
61
+ **Note:** Version bump only for package @bitgo/abstract-substrate
62
+
63
+ ## [1.8.8](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.8.7...@bitgo/abstract-substrate@1.8.8) (2025-07-30)
64
+
65
+ **Note:** Version bump only for package @bitgo/abstract-substrate
66
+
67
+ ## [1.8.7](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.8.5...@bitgo/abstract-substrate@1.8.7) (2025-07-25)
68
+
69
+ **Note:** Version bump only for package @bitgo/abstract-substrate
70
+
71
+ ## [1.8.6](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.8.5...@bitgo/abstract-substrate@1.8.6) (2025-07-23)
72
+
73
+ **Note:** Version bump only for package @bitgo/abstract-substrate
74
+
75
+ ## [1.8.5](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.8.4...@bitgo/abstract-substrate@1.8.5) (2025-07-15)
76
+
77
+ **Note:** Version bump only for package @bitgo/abstract-substrate
78
+
79
+ ## [1.8.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.8.3...@bitgo/abstract-substrate@1.8.4) (2025-07-10)
80
+
81
+ **Note:** Version bump only for package @bitgo/abstract-substrate
82
+
83
+ ## [1.8.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.8.2...@bitgo/abstract-substrate@1.8.3) (2025-07-03)
84
+
85
+ **Note:** Version bump only for package @bitgo/abstract-substrate
86
+
87
+ ## [1.8.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.8.1...@bitgo/abstract-substrate@1.8.2) (2025-06-25)
88
+
89
+ **Note:** Version bump only for package @bitgo/abstract-substrate
90
+
91
+ ## [1.8.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.8.0...@bitgo/abstract-substrate@1.8.1) (2025-06-24)
92
+
93
+ **Note:** Version bump only for package @bitgo/abstract-substrate
94
+
95
+ # [1.8.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.7.1...@bitgo/abstract-substrate@1.8.0) (2025-06-18)
96
+
97
+ ### Features
98
+
99
+ - add decoding support for polyx staking related txns ([f680b01](https://github.com/BitGo/BitGoJS/commit/f680b011c6c89b4c3c04ede21f089e8efc1c0ee8))
100
+
101
+ ## [1.7.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.7.0...@bitgo/abstract-substrate@1.7.1) (2025-06-10)
102
+
103
+ **Note:** Version bump only for package @bitgo/abstract-substrate
104
+
105
+ # [1.7.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.6.0...@bitgo/abstract-substrate@1.7.0) (2025-06-05)
106
+
107
+ ### Features
108
+
109
+ - **root:** support node 22 ([c4ad6af](https://github.com/BitGo/BitGoJS/commit/c4ad6af2e8896221417c303f0f6b84652b493216))
110
+
111
+ # [1.6.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.5.2...@bitgo/abstract-substrate@1.6.0) (2025-06-02)
112
+
113
+ ### Bug Fixes
114
+
115
+ - **sdk-coin-polyx:** fix to toJson method in polyx transaction ([8f8ef0b](https://github.com/BitGo/BitGoJS/commit/8f8ef0b8fa420dadb41989465b2380af73466ae0))
116
+
117
+ ### Features
118
+
119
+ - rename audit function naming and signature ([1a885ab](https://github.com/BitGo/BitGoJS/commit/1a885ab60d30ca8595e284a728f2ab9d3c09994e))
120
+ - **root:** add new audit key baseCoin method ([57c1778](https://github.com/BitGo/BitGoJS/commit/57c17784a72ea364f18e3af9dbd83da877827e69))
121
+
122
+ ## [1.5.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.5.1...@bitgo/abstract-substrate@1.5.2) (2025-05-28)
123
+
124
+ **Note:** Version bump only for package @bitgo/abstract-substrate
125
+
126
+ ## [1.5.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.5.0...@bitgo/abstract-substrate@1.5.1) (2025-05-22)
127
+
128
+ ### Bug Fixes
129
+
130
+ - **sdk-coin-polyx:** all fixed ([f9c23bc](https://github.com/BitGo/BitGoJS/commit/f9c23bc9a8bc609be5f41a4ffd980138ecb63148))
131
+ - **sdk-coin-polyx:** fix cdd builder ([2461fbf](https://github.com/BitGo/BitGoJS/commit/2461fbfcc76f8f6e7f89302f5e3c4b99097cb97a))
132
+
133
+ # [1.5.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.4.9...@bitgo/abstract-substrate@1.5.0) (2025-05-20)
134
+
135
+ ### Features
136
+
137
+ - **sdk-coin-polyx:** add transaction builders ([31c96bb](https://github.com/BitGo/BitGoJS/commit/31c96bbbce60b93e13208e3eab06bd144cfe57e4))
138
+
139
+ ## [1.4.9](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.4.8...@bitgo/abstract-substrate@1.4.9) (2025-05-07)
140
+
141
+ **Note:** Version bump only for package @bitgo/abstract-substrate
142
+
143
+ ## [1.4.8](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.4.7...@bitgo/abstract-substrate@1.4.8) (2025-04-29)
144
+
145
+ **Note:** Version bump only for package @bitgo/abstract-substrate
146
+
147
+ ## [1.4.7](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.4.6...@bitgo/abstract-substrate@1.4.7) (2025-04-25)
148
+
149
+ **Note:** Version bump only for package @bitgo/abstract-substrate
150
+
151
+ ## [1.4.6](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.4.5...@bitgo/abstract-substrate@1.4.6) (2025-04-15)
152
+
153
+ **Note:** Version bump only for package @bitgo/abstract-substrate
154
+
155
+ ## [1.4.5](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.4.4...@bitgo/abstract-substrate@1.4.5) (2025-04-04)
156
+
157
+ **Note:** Version bump only for package @bitgo/abstract-substrate
158
+
159
+ ## [1.4.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.4.3...@bitgo/abstract-substrate@1.4.4) (2025-04-02)
160
+
161
+ **Note:** Version bump only for package @bitgo/abstract-substrate
162
+
163
+ ## [1.4.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.4.2...@bitgo/abstract-substrate@1.4.3) (2025-03-28)
164
+
165
+ **Note:** Version bump only for package @bitgo/abstract-substrate
166
+
167
+ ## [1.4.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.4.1...@bitgo/abstract-substrate@1.4.2) (2025-03-20)
168
+
169
+ **Note:** Version bump only for package @bitgo/abstract-substrate
170
+
171
+ ## [1.4.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.4.0...@bitgo/abstract-substrate@1.4.1) (2025-03-18)
172
+
173
+ ### Bug Fixes
174
+
175
+ - **sdk-core:** set default multisig if empty ([e2727df](https://github.com/BitGo/BitGoJS/commit/e2727dfc89dd314a607b737e761e5eff824606af))
176
+
177
+ # [1.4.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.3.0...@bitgo/abstract-substrate@1.4.0) (2025-03-06)
178
+
179
+ ### Features
180
+
181
+ - **abstract-substrate:** add wrw for tao ([9f30890](https://github.com/BitGo/BitGoJS/commit/9f3089000330d47696ab057891cd8d1083004a2a))
182
+
183
+ # [1.3.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.1.5...@bitgo/abstract-substrate@1.3.0) (2025-03-04)
184
+
185
+ ### Bug Fixes
186
+
187
+ - **sdk-coin-tao:** change amount and netuid type to string ([bbb92aa](https://github.com/BitGo/BitGoJS/commit/bbb92aa3e9def1e6260a074761cdf4a38888ebd6))
188
+
189
+ ### Features
190
+
191
+ - **abstract-substrate:** add common types to abstract-substrate ([6298a42](https://github.com/BitGo/BitGoJS/commit/6298a42c0b476e87b3a5e0a3cd5e57cc5c262f50))
192
+ - **abstract-substrate:** add missing methods for TAO stake/unstake ([635854c](https://github.com/BitGo/BitGoJS/commit/635854cbd04f473c20d20820d03d1b82f8d013e9))
193
+
194
+ # [1.2.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.1.5...@bitgo/abstract-substrate@1.2.0) (2025-02-26)
195
+
196
+ ### Features
197
+
198
+ - **abstract-substrate:** add common types to abstract-substrate ([6298a42](https://github.com/BitGo/BitGoJS/commit/6298a42c0b476e87b3a5e0a3cd5e57cc5c262f50))
199
+ - **abstract-substrate:** add missing methods for TAO stake/unstake ([635854c](https://github.com/BitGo/BitGoJS/commit/635854cbd04f473c20d20820d03d1b82f8d013e9))
200
+
201
+ ## [1.1.6](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.1.5...@bitgo/abstract-substrate@1.1.6) (2025-02-20)
202
+
203
+ **Note:** Version bump only for package @bitgo/abstract-substrate
204
+
205
+ ## [1.1.5](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.1.3...@bitgo/abstract-substrate@1.1.5) (2025-02-19)
206
+
207
+ ### Bug Fixes
208
+
209
+ - **abstract-substrate:** fix abstract-substrate implementation ([1c986da](https://github.com/BitGo/BitGoJS/commit/1c986daa817353ca522c0e8e72e67a6dffa00fac))
210
+ - **abstract-substrate:** fix Material specName type ([2971d82](https://github.com/BitGo/BitGoJS/commit/2971d82879879c04190b45454a21f48473d13181))
211
+ - **abstract-substrate:** use correct error for isWalletAddress ([f50c557](https://github.com/BitGo/BitGoJS/commit/f50c557df66a331b30c1a790884ab1d69b635390))
212
+
213
+ ## [1.1.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.1.3...@bitgo/abstract-substrate@1.1.4) (2025-02-11)
214
+
215
+ ### Bug Fixes
216
+
217
+ - **abstract-substrate:** fix abstract-substrate implementation ([1c986da](https://github.com/BitGo/BitGoJS/commit/1c986daa817353ca522c0e8e72e67a6dffa00fac))
218
+ - **abstract-substrate:** fix Material specName type ([2971d82](https://github.com/BitGo/BitGoJS/commit/2971d82879879c04190b45454a21f48473d13181))
219
+
6
220
  ## [1.1.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/abstract-substrate@1.1.2...@bitgo/abstract-substrate@1.1.3) (2025-02-05)
7
221
 
8
222
  **Note:** Version bump only for package @bitgo/abstract-substrate
@@ -1,31 +1,13 @@
1
- import { BaseCoin, BitGoBase, KeyPair, MPCAlgorithm, ParsedTransaction, ParseTransactionOptions, SignedTransaction, SignTransactionOptions as BaseSignTransactionOptions, VerifyAddressOptions, VerifyTransactionOptions } from '@bitgo-beta/sdk-core';
2
- import { BaseCoin as StaticsBaseCoin, CoinFamily } from '@bitgo-beta/statics';
3
- import { Interface } from './lib';
1
+ import { AuditDecryptedKeyParams, BaseCoin, BitGoBase, KeyPair, MPCAlgorithm, MPCConsolidationRecoveryOptions, MPCRecoveryOptions, MPCSweepRecoveryOptions, MPCSweepTxs, MPCTx, MPCTxs, MultisigType, ParsedTransaction, ParseTransactionOptions, SignedTransaction, VerifyAddressOptions, VerifyTransactionOptions } from '@bitgo-beta/sdk-core';
2
+ import { CoinFamily, BaseCoin as StaticsBaseCoin } from '@bitgo-beta/statics';
3
+ import { SignTransactionOptions, VerifiedTransactionParameters, Material } from './lib/iface';
4
+ import { ApiPromise } from '@polkadot/api';
4
5
  export declare const DEFAULT_SCAN_FACTOR = 20;
5
- export interface SignTransactionOptions extends BaseSignTransactionOptions {
6
- txPrebuild: TransactionPrebuild;
7
- prv: string;
8
- }
9
- export interface TransactionPrebuild {
10
- txHex: string;
11
- transaction: Interface.TxData;
12
- }
13
- export interface ExplainTransactionOptions {
14
- txPrebuild: TransactionPrebuild;
15
- publicKey: string;
16
- feeInfo: {
17
- fee: string;
18
- };
19
- }
20
- export interface VerifiedTransactionParameters {
21
- txHex: string;
22
- prv: string;
23
- }
24
6
  export declare class SubstrateCoin extends BaseCoin {
25
7
  protected readonly _staticsCoin: Readonly<StaticsBaseCoin>;
26
8
  readonly MAX_VALIDITY_DURATION = 2400;
9
+ readonly SWEEP_TXN_DURATION = 64;
27
10
  protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>);
28
- static createInstance(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>): BaseCoin;
29
11
  /**
30
12
  * Creates an instance of TransactionBuilderFactory for the coin specific sdk
31
13
  */
@@ -40,6 +22,8 @@ export declare class SubstrateCoin extends BaseCoin {
40
22
  getFullName(): string;
41
23
  /** @inheritDoc */
42
24
  supportsTss(): boolean;
25
+ /** inherited doc */
26
+ getDefaultMultisigType(): MultisigType;
43
27
  /** @inheritDoc **/
44
28
  getMPCAlgorithm(): MPCAlgorithm;
45
29
  /** @inheritDoc **/
@@ -57,5 +41,55 @@ export declare class SubstrateCoin extends BaseCoin {
57
41
  verifySignTransactionParams(params: SignTransactionOptions): VerifiedTransactionParameters;
58
42
  /** @inheritDoc **/
59
43
  signTransaction(params: SignTransactionOptions): Promise<SignedTransaction>;
44
+ /**
45
+ * Retrieves the address format for the substrate coin.
46
+ *
47
+ * @returns {number} The address format as a number.
48
+ */
49
+ protected getAddressFormat(): number;
50
+ /**
51
+ * Retrieves the maximum validity duration in blocks.
52
+ *
53
+ * This method is intended to be overridden by subclasses to provide the specific
54
+ * maximum validity duration for different types of Substrate-based coins.
55
+ *
56
+ * @returns {number} The maximum validity duration in blocks.
57
+ * @throws {Error} If the method is not implemented by the subclass.
58
+ */
59
+ protected getMaxValidityDurationBlocks(): number;
60
+ protected getAddressFromPublicKey(Pubkey: string): string;
61
+ protected getInitializedNodeAPI(): Promise<ApiPromise>;
62
+ protected getAccountInfo(walletAddr: string): Promise<{
63
+ nonce: number;
64
+ freeBalance: number;
65
+ }>;
66
+ protected getFee(destAddr: string, srcAddr: string, amount: number): Promise<number>;
67
+ protected getHeaderInfo(): Promise<{
68
+ headerNumber: number;
69
+ headerHash: string;
70
+ }>;
71
+ protected getMaterial(): Promise<Material>;
72
+ /**
73
+ * Builds a funds recovery transaction without BitGo
74
+ * @param {MPCRecoveryOptions} params parameters needed to construct and
75
+ * (maybe) sign the transaction
76
+ *
77
+ * @returns {MPCTx} the serialized transaction hex string and index
78
+ * of the address being swept
79
+ */
80
+ recover(params: MPCRecoveryOptions): Promise<MPCTx | MPCSweepTxs>;
81
+ /**
82
+ * Builds native TAO recoveries of receive addresses in batch without BitGo.
83
+ * Funds will be recovered to base address first. You need to initiate another sweep txn after that.
84
+ *
85
+ * @param {MPCConsolidationRecoveryOptions} params - options for consolidation recovery.
86
+ * @param {string} [params.startingScanIndex] - receive address index to start scanning from. default to 1 (inclusive).
87
+ * @param {string} [params.endingScanIndex] - receive address index to end scanning at. default to startingScanIndex + 20 (exclusive).
88
+ */
89
+ recoverConsolidations(params: MPCConsolidationRecoveryOptions): Promise<MPCTxs | MPCSweepTxs>;
90
+ /** inherited doc */
91
+ createBroadcastableSweepTransaction(params: MPCSweepRecoveryOptions): Promise<MPCTxs>;
92
+ /** inherited doc */
93
+ auditDecryptedKey({ publicKey, prv, multiSigType }: AuditDecryptedKeyParams): void;
60
94
  }
61
95
  //# sourceMappingURL=abstractSubstrateCoin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"abstractSubstrateCoin.d.ts","sourceRoot":"","sources":["../../src/abstractSubstrateCoin.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EACR,SAAS,EACT,OAAO,EACP,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,IAAI,0BAA0B,EACpD,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAsC,MAAM,OAAO,CAAC;AAItE,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,MAAM,WAAW,sBAAuB,SAAQ,0BAA0B;IACxE,UAAU,EAAE,mBAAmB,CAAC;IAChC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,SAAS,CAAC,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,mBAAmB,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QACP,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH;AAED,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,qBAAa,aAAc,SAAQ,QAAQ;IACzC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC3D,QAAQ,CAAC,qBAAqB,QAAQ;IAEtC,SAAS,aAAa,KAAK,EAA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