@bitgo-beta/sdk-coin-dot 2.2.8-beta.111 → 2.2.8-beta.1111
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.
- package/CHANGELOG.md +1070 -0
- package/dist/src/dot.d.ts +13 -96
- package/dist/src/dot.d.ts.map +1 -1
- package/dist/src/dot.js +64 -39
- package/dist/src/index.js +6 -2
- package/dist/src/lib/addressInitializationBuilder.js +8 -10
- package/dist/src/lib/batchTransactionBuilder.d.ts +1 -0
- package/dist/src/lib/batchTransactionBuilder.d.ts.map +1 -1
- package/dist/src/lib/batchTransactionBuilder.js +21 -12
- package/dist/src/lib/claimBuilder.js +4 -6
- package/dist/src/lib/iface.d.ts +16 -13
- package/dist/src/lib/iface.d.ts.map +1 -1
- package/dist/src/lib/iface.js +5 -5
- package/dist/src/lib/iface_utils.js +8 -9
- package/dist/src/lib/index.js +23 -9
- package/dist/src/lib/keyPair.d.ts +7 -0
- package/dist/src/lib/keyPair.d.ts.map +1 -1
- package/dist/src/lib/keyPair.js +51 -4
- package/dist/src/lib/nativeTransferBuilder.js +10 -12
- package/dist/src/lib/proxyBuilder.js +6 -8
- package/dist/src/lib/singletonRegistry.js +2 -2
- package/dist/src/lib/stakingBuilder.js +6 -8
- package/dist/src/lib/transaction.d.ts +0 -1
- package/dist/src/lib/transaction.d.ts.map +1 -1
- package/dist/src/lib/transaction.js +72 -52
- package/dist/src/lib/transactionBuilder.d.ts +0 -1
- package/dist/src/lib/transactionBuilder.d.ts.map +1 -1
- package/dist/src/lib/transactionBuilder.js +30 -16
- package/dist/src/lib/transactionBuilderFactory.js +3 -4
- package/dist/src/lib/txnSchema.js +2 -2
- package/dist/src/lib/unnominateBuilder.js +4 -6
- package/dist/src/lib/unstakeBuilder.js +4 -6
- package/dist/src/lib/utils.d.ts +10 -2
- package/dist/src/lib/utils.d.ts.map +1 -1
- package/dist/src/lib/utils.js +57 -33
- package/dist/src/lib/withdrawUnstakedBuilder.js +4 -6
- package/dist/src/resources/index.js +6 -2
- package/dist/src/tdot.js +1 -1
- package/package.json +16 -15
package/dist/src/dot.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import { BaseCoin, BitGoBase, Eddsa, ExplanationResult, KeyPair, MPCAlgorithm, ParsedTransaction, ParseTransactionOptions, SignedTransaction, SignTransactionOptions as BaseSignTransactionOptions, UnsignedTransaction, VerifyAddressOptions, VerifyTransactionOptions, EDDSASignature, SignatureShareRecord } from '@bitgo-beta/sdk-core';
|
|
1
|
+
import { BaseCoin, BitGoBase, Eddsa, ExplanationResult, KeyPair, MPCAlgorithm, ParsedTransaction, ParseTransactionOptions, SignedTransaction, SignTransactionOptions as BaseSignTransactionOptions, UnsignedTransaction, VerifyAddressOptions, VerifyTransactionOptions, MPCTx, MPCRecoveryOptions, MPCConsolidationRecoveryOptions, MPCSweepTxs, MPCSweepRecoveryOptions, MPCTxs, MultisigType, AuditDecryptedKeyParams } from '@bitgo-beta/sdk-core';
|
|
3
2
|
import { BaseCoin as StaticsBaseCoin } from '@bitgo-beta/statics';
|
|
4
3
|
import { Interface } from './lib';
|
|
4
|
+
import '@polkadot/api-augment';
|
|
5
5
|
import { ApiPromise } from '@polkadot/api';
|
|
6
6
|
import { Material } from './lib/iface';
|
|
7
7
|
export declare const DEFAULT_SCAN_FACTOR = 20;
|
|
@@ -24,84 +24,6 @@ export interface VerifiedTransactionParameters {
|
|
|
24
24
|
txHex: string;
|
|
25
25
|
prv: string;
|
|
26
26
|
}
|
|
27
|
-
interface SweepRecoveryOptions {
|
|
28
|
-
signatureShares: SignatureShares[];
|
|
29
|
-
}
|
|
30
|
-
interface SignatureShares {
|
|
31
|
-
txRequest: TxRequest;
|
|
32
|
-
tssVersion: string;
|
|
33
|
-
ovc: Ovc[];
|
|
34
|
-
}
|
|
35
|
-
interface TxRequest {
|
|
36
|
-
transactions: OvcTransaction[];
|
|
37
|
-
walletCoin: string;
|
|
38
|
-
}
|
|
39
|
-
interface OvcTransaction {
|
|
40
|
-
unsignedTx: DotTx;
|
|
41
|
-
signatureShares: SignatureShareRecord[];
|
|
42
|
-
signatureShare: SignatureShare;
|
|
43
|
-
}
|
|
44
|
-
interface SignatureShare {
|
|
45
|
-
from: string;
|
|
46
|
-
to: string;
|
|
47
|
-
share: string;
|
|
48
|
-
publicShare: string;
|
|
49
|
-
}
|
|
50
|
-
interface Ovc {
|
|
51
|
-
eddsaSignature: EDDSASignature;
|
|
52
|
-
}
|
|
53
|
-
interface RecoveryOptions {
|
|
54
|
-
userKey?: string;
|
|
55
|
-
backupKey?: string;
|
|
56
|
-
bitgoKey: string;
|
|
57
|
-
recoveryDestination: string;
|
|
58
|
-
krsProvider?: string;
|
|
59
|
-
walletPassphrase?: string;
|
|
60
|
-
seed?: string;
|
|
61
|
-
index?: number;
|
|
62
|
-
}
|
|
63
|
-
interface ConsolidationRecoveryOptions {
|
|
64
|
-
userKey?: string;
|
|
65
|
-
backupKey?: string;
|
|
66
|
-
bitgoKey: string;
|
|
67
|
-
walletPassphrase?: string;
|
|
68
|
-
startingScanIndex?: number;
|
|
69
|
-
endingScanIndex?: number;
|
|
70
|
-
seed?: string;
|
|
71
|
-
}
|
|
72
|
-
interface DotTx {
|
|
73
|
-
serializedTx: string;
|
|
74
|
-
scanIndex: number;
|
|
75
|
-
coin?: string;
|
|
76
|
-
signableHex?: string;
|
|
77
|
-
derivationPath?: string;
|
|
78
|
-
parsedTx?: ParsedTransaction;
|
|
79
|
-
feeInfo?: {
|
|
80
|
-
fee: number;
|
|
81
|
-
feeString: string;
|
|
82
|
-
};
|
|
83
|
-
coinSpecific?: {
|
|
84
|
-
firstValid?: number;
|
|
85
|
-
maxDuration?: number;
|
|
86
|
-
commonKeychain?: string;
|
|
87
|
-
lastScanIndex?: number;
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
interface DotTxs {
|
|
91
|
-
transactions: DotTx[];
|
|
92
|
-
lastScanIndex: number;
|
|
93
|
-
}
|
|
94
|
-
interface DotUnsignedTx {
|
|
95
|
-
unsignedTx: DotTx;
|
|
96
|
-
signatureShares: [];
|
|
97
|
-
}
|
|
98
|
-
interface DotTxRequest {
|
|
99
|
-
walletCoin: string;
|
|
100
|
-
transactions: DotUnsignedTx[];
|
|
101
|
-
}
|
|
102
|
-
interface DotSweepTxs {
|
|
103
|
-
txRequests: DotTxRequest[];
|
|
104
|
-
}
|
|
105
27
|
export declare class Dot extends BaseCoin {
|
|
106
28
|
protected readonly _staticsCoin: Readonly<StaticsBaseCoin>;
|
|
107
29
|
readonly MAX_VALIDITY_DURATION = 2400;
|
|
@@ -124,6 +46,8 @@ export declare class Dot extends BaseCoin {
|
|
|
124
46
|
valuelessTransferAllowed(): boolean;
|
|
125
47
|
/** @inheritDoc */
|
|
126
48
|
supportsTss(): boolean;
|
|
49
|
+
/** inherited doc */
|
|
50
|
+
getDefaultMultisigType(): MultisigType;
|
|
127
51
|
getMPCAlgorithm(): MPCAlgorithm;
|
|
128
52
|
allowsAccountConsolidations(): boolean;
|
|
129
53
|
/**
|
|
@@ -201,37 +125,30 @@ export declare class Dot extends BaseCoin {
|
|
|
201
125
|
protected getMaterial(): Promise<Material>;
|
|
202
126
|
/**
|
|
203
127
|
* Builds a funds recovery transaction without BitGo
|
|
204
|
-
* @param {
|
|
128
|
+
* @param {MPCRecoveryOptions} params parameters needed to construct and
|
|
205
129
|
* (maybe) sign the transaction
|
|
206
130
|
*
|
|
207
|
-
* @returns {
|
|
131
|
+
* @returns {MPCTx} the serialized transaction hex string and index
|
|
208
132
|
* of the address being swept
|
|
209
133
|
*/
|
|
210
|
-
recover(params:
|
|
134
|
+
recover(params: MPCRecoveryOptions): Promise<MPCTx | MPCSweepTxs>;
|
|
211
135
|
/**
|
|
212
136
|
* Builds native DOT recoveries of receive addresses in batch without BitGo.
|
|
213
137
|
* Funds will be recovered to base address first. You need to initiate another sweep txn after that.
|
|
214
138
|
*
|
|
215
|
-
* @param {
|
|
139
|
+
* @param {MPCConsolidationRecoveryOptions} params - options for consolidation recovery.
|
|
216
140
|
* @param {string} [params.startingScanIndex] - receive address index to start scanning from. default to 1 (inclusive).
|
|
217
141
|
* @param {string} [params.endingScanIndex] - receive address index to end scanning at. default to startingScanIndex + 20 (exclusive).
|
|
218
142
|
*/
|
|
219
|
-
recoverConsolidations(params:
|
|
220
|
-
/**
|
|
221
|
-
|
|
222
|
-
*
|
|
223
|
-
* @param {SweepRecoveryOptions} params parameters needed to combine the signatures
|
|
224
|
-
* and transactions to create broadcastable transactions
|
|
225
|
-
*
|
|
226
|
-
* @returns {DotTx[]} array of the serialized transaction hex strings and indices
|
|
227
|
-
* of the addresses being swept
|
|
228
|
-
*/
|
|
229
|
-
createBroadcastableSweepTransaction(params: SweepRecoveryOptions): Promise<DotTxs>;
|
|
143
|
+
recoverConsolidations(params: MPCConsolidationRecoveryOptions): Promise<MPCTxs | MPCSweepTxs>;
|
|
144
|
+
/** inherited doc */
|
|
145
|
+
createBroadcastableSweepTransaction(params: MPCSweepRecoveryOptions): Promise<MPCTxs>;
|
|
230
146
|
parseTransaction(params: ParseTransactionOptions): Promise<ParsedTransaction>;
|
|
231
147
|
isWalletAddress(params: VerifyAddressOptions): Promise<boolean>;
|
|
232
148
|
verifyTransaction(params: VerifyTransactionOptions): Promise<boolean>;
|
|
233
149
|
getAddressFromPublicKey(Pubkey: string): string;
|
|
234
150
|
private getBuilder;
|
|
151
|
+
/** @inheritDoc */
|
|
152
|
+
auditDecryptedKey({ publicKey, prv, multiSigType }: AuditDecryptedKeyParams): void;
|
|
235
153
|
}
|
|
236
|
-
export {};
|
|
237
154
|
//# sourceMappingURL=dot.d.ts.map
|
package/dist/src/dot.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dot.d.ts","sourceRoot":"","sources":["../../src/dot.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dot.d.ts","sourceRoot":"","sources":["../../src/dot.ts"],"names":[],"mappings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