@bitgo-beta/sdk-coin-dot 2.2.8-beta.108 → 2.2.8-beta.1081
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 +1081 -0
- package/dist/src/dot.d.ts +18 -78
- package/dist/src/dot.d.ts.map +1 -1
- package/dist/src/dot.js +261 -170
- 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,9 +1,10 @@
|
|
|
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
|
+
export declare const DEFAULT_SCAN_FACTOR = 20;
|
|
7
8
|
export interface SignTransactionOptions extends BaseSignTransactionOptions {
|
|
8
9
|
txPrebuild: TransactionPrebuild;
|
|
9
10
|
prv: string;
|
|
@@ -23,71 +24,6 @@ export interface VerifiedTransactionParameters {
|
|
|
23
24
|
txHex: string;
|
|
24
25
|
prv: string;
|
|
25
26
|
}
|
|
26
|
-
interface SweepRecoveryOptions {
|
|
27
|
-
signatureShares: SignatureShares[];
|
|
28
|
-
}
|
|
29
|
-
interface SignatureShares {
|
|
30
|
-
txRequest: TxRequest;
|
|
31
|
-
tssVersion: string;
|
|
32
|
-
ovc: Ovc[];
|
|
33
|
-
}
|
|
34
|
-
interface TxRequest {
|
|
35
|
-
transactions: OvcTransaction[];
|
|
36
|
-
walletCoin: string;
|
|
37
|
-
}
|
|
38
|
-
interface OvcTransaction {
|
|
39
|
-
unsignedTx: DotTx;
|
|
40
|
-
signatureShares: SignatureShareRecord[];
|
|
41
|
-
signatureShare: SignatureShare;
|
|
42
|
-
}
|
|
43
|
-
interface SignatureShare {
|
|
44
|
-
from: string;
|
|
45
|
-
to: string;
|
|
46
|
-
share: string;
|
|
47
|
-
publicShare: string;
|
|
48
|
-
}
|
|
49
|
-
interface Ovc {
|
|
50
|
-
eddsaSignature: EDDSASignature;
|
|
51
|
-
}
|
|
52
|
-
interface RecoveryOptions {
|
|
53
|
-
userKey?: string;
|
|
54
|
-
backupKey?: string;
|
|
55
|
-
bitgoKey: string;
|
|
56
|
-
recoveryDestination: string;
|
|
57
|
-
krsProvider?: string;
|
|
58
|
-
walletPassphrase?: string;
|
|
59
|
-
startingScanIndex?: number;
|
|
60
|
-
scan?: number;
|
|
61
|
-
seed?: string;
|
|
62
|
-
}
|
|
63
|
-
interface DotTx {
|
|
64
|
-
serializedTx: string;
|
|
65
|
-
scanIndex: number;
|
|
66
|
-
coin?: string;
|
|
67
|
-
signableHex?: string;
|
|
68
|
-
derivationPath?: string;
|
|
69
|
-
parsedTx?: ParsedTransaction;
|
|
70
|
-
feeInfo?: {
|
|
71
|
-
fee: number;
|
|
72
|
-
feeString: string;
|
|
73
|
-
};
|
|
74
|
-
coinSpecific?: {
|
|
75
|
-
firstValid?: number;
|
|
76
|
-
maxDuration?: number;
|
|
77
|
-
commonKeychain?: string;
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
interface DotUnsignedTx {
|
|
81
|
-
unsignedTx: DotTx;
|
|
82
|
-
signatureShares: [];
|
|
83
|
-
}
|
|
84
|
-
interface DotTxRequest {
|
|
85
|
-
walletCoin: string;
|
|
86
|
-
transactions: DotUnsignedTx[];
|
|
87
|
-
}
|
|
88
|
-
interface DotSweepTxs {
|
|
89
|
-
txRequests: DotTxRequest[];
|
|
90
|
-
}
|
|
91
27
|
export declare class Dot extends BaseCoin {
|
|
92
28
|
protected readonly _staticsCoin: Readonly<StaticsBaseCoin>;
|
|
93
29
|
readonly MAX_VALIDITY_DURATION = 2400;
|
|
@@ -110,6 +46,8 @@ export declare class Dot extends BaseCoin {
|
|
|
110
46
|
valuelessTransferAllowed(): boolean;
|
|
111
47
|
/** @inheritDoc */
|
|
112
48
|
supportsTss(): boolean;
|
|
49
|
+
/** inherited doc */
|
|
50
|
+
getDefaultMultisigType(): MultisigType;
|
|
113
51
|
getMPCAlgorithm(): MPCAlgorithm;
|
|
114
52
|
allowsAccountConsolidations(): boolean;
|
|
115
53
|
/**
|
|
@@ -187,28 +125,30 @@ export declare class Dot extends BaseCoin {
|
|
|
187
125
|
protected getMaterial(): Promise<Material>;
|
|
188
126
|
/**
|
|
189
127
|
* Builds a funds recovery transaction without BitGo
|
|
190
|
-
* @param {
|
|
128
|
+
* @param {MPCRecoveryOptions} params parameters needed to construct and
|
|
191
129
|
* (maybe) sign the transaction
|
|
192
130
|
*
|
|
193
|
-
* @returns {
|
|
131
|
+
* @returns {MPCTx} the serialized transaction hex string and index
|
|
194
132
|
* of the address being swept
|
|
195
133
|
*/
|
|
196
|
-
recover(params:
|
|
134
|
+
recover(params: MPCRecoveryOptions): Promise<MPCTx | MPCSweepTxs>;
|
|
197
135
|
/**
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
* @param {SweepRecoveryOptions} params parameters needed to combine the signatures
|
|
201
|
-
* and transactions to create broadcastable transactions
|
|
136
|
+
* Builds native DOT recoveries of receive addresses in batch without BitGo.
|
|
137
|
+
* Funds will be recovered to base address first. You need to initiate another sweep txn after that.
|
|
202
138
|
*
|
|
203
|
-
* @
|
|
204
|
-
*
|
|
139
|
+
* @param {MPCConsolidationRecoveryOptions} params - options for consolidation recovery.
|
|
140
|
+
* @param {string} [params.startingScanIndex] - receive address index to start scanning from. default to 1 (inclusive).
|
|
141
|
+
* @param {string} [params.endingScanIndex] - receive address index to end scanning at. default to startingScanIndex + 20 (exclusive).
|
|
205
142
|
*/
|
|
206
|
-
|
|
143
|
+
recoverConsolidations(params: MPCConsolidationRecoveryOptions): Promise<MPCTxs | MPCSweepTxs>;
|
|
144
|
+
/** inherited doc */
|
|
145
|
+
createBroadcastableSweepTransaction(params: MPCSweepRecoveryOptions): Promise<MPCTxs>;
|
|
207
146
|
parseTransaction(params: ParseTransactionOptions): Promise<ParsedTransaction>;
|
|
208
147
|
isWalletAddress(params: VerifyAddressOptions): Promise<boolean>;
|
|
209
148
|
verifyTransaction(params: VerifyTransactionOptions): Promise<boolean>;
|
|
210
149
|
getAddressFromPublicKey(Pubkey: string): string;
|
|
211
150
|
private getBuilder;
|
|
151
|
+
/** @inheritDoc */
|
|
152
|
+
auditDecryptedKey({ publicKey, prv, multiSigType }: AuditDecryptedKeyParams): void;
|
|
212
153
|
}
|
|
213
|
-
export {};
|
|
214
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":"AACA,OAAO,EACL,QAAQ,EACR,SAAS,EAET,KAAK,EAEL,iBAAiB,EACjB,OAAO,EAEP,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,IAAI,0BAA0B,EACpD,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EAGxB,KAAK,EACL,kBAAkB,EAClB,+BAA+B,EAC/B,WAAW,EAGX,uBAAuB,EACvB,MAAM,EACN,YAAY,EAEZ,uBAAuB,EACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,IAAI,eAAe,EAA+B,MA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