@bitgo-beta/sdk-coin-dot 1.3.3-alpha.21 → 1.3.3-alpha.210
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 +1022 -0
- package/dist/src/dot.d.ts +17 -19
- package/dist/src/dot.d.ts.map +1 -1
- package/dist/src/dot.js +257 -82
- package/dist/src/index.js +6 -2
- package/dist/src/lib/addressInitializationBuilder.js +3 -3
- 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 +18 -9
- 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 +1 -1
- package/dist/src/lib/index.js +6 -2
- 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 +41 -4
- package/dist/src/lib/nativeTransferBuilder.js +5 -5
- package/dist/src/lib/proxyBuilder.js +3 -3
- package/dist/src/lib/singletonRegistry.js +2 -2
- package/dist/src/lib/stakingBuilder.d.ts.map +1 -1
- package/dist/src/lib/stakingBuilder.js +3 -4
- package/dist/src/lib/transaction.d.ts.map +1 -1
- package/dist/src/lib/transaction.js +46 -32
- package/dist/src/lib/transactionBuilder.d.ts.map +1 -1
- package/dist/src/lib/transactionBuilder.js +12 -7
- package/dist/src/lib/transactionBuilderFactory.js +2 -2
- package/dist/src/lib/txnSchema.js +2 -2
- 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 +43 -29
- package/dist/src/resources/index.d.ts +3 -0
- package/dist/src/resources/index.d.ts.map +1 -0
- package/dist/src/resources/index.js +19 -0
- package/dist/src/resources/mainnet.d.ts +2 -0
- package/dist/src/resources/mainnet.d.ts.map +1 -0
- package/dist/src/resources/mainnet.js +5 -0
- package/dist/src/resources/westend.d.ts +2 -0
- package/dist/src/resources/westend.d.ts.map +1 -0
- package/dist/src/resources/westend.js +5 -0
- package/package.json +16 -14
package/dist/src/dot.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { BaseCoin, BitGoBase, Eddsa, ExplanationResult, KeyPair, MPCAlgorithm, ParsedTransaction, ParseTransactionOptions, SignedTransaction, SignTransactionOptions as BaseSignTransactionOptions, UnsignedTransaction, VerifyAddressOptions, VerifyTransactionOptions } from '@bitgo-beta/sdk-core';
|
|
2
|
+
import { BaseCoin, BitGoBase, Eddsa, ExplanationResult, KeyPair, MPCAlgorithm, ParsedTransaction, ParseTransactionOptions, SignedTransaction, SignTransactionOptions as BaseSignTransactionOptions, UnsignedTransaction, VerifyAddressOptions, VerifyTransactionOptions, MPCTx, MPCRecoveryOptions, MPCConsolidationRecoveryOptions, MPCSweepTxs, MPCSweepRecoveryOptions, MPCTxs } from '@bitgo-beta/sdk-core';
|
|
3
3
|
import { BaseCoin as StaticsBaseCoin } from '@bitgo-beta/statics';
|
|
4
4
|
import { Interface } from './lib';
|
|
5
|
+
import '@polkadot/api-augment';
|
|
5
6
|
import { ApiPromise } from '@polkadot/api';
|
|
6
7
|
import { Material } from './lib/iface';
|
|
8
|
+
export declare const DEFAULT_SCAN_FACTOR = 20;
|
|
7
9
|
export interface SignTransactionOptions extends BaseSignTransactionOptions {
|
|
8
10
|
txPrebuild: TransactionPrebuild;
|
|
9
11
|
prv: string;
|
|
@@ -23,20 +25,6 @@ export interface VerifiedTransactionParameters {
|
|
|
23
25
|
txHex: string;
|
|
24
26
|
prv: string;
|
|
25
27
|
}
|
|
26
|
-
interface RecoveryOptions {
|
|
27
|
-
userKey?: string;
|
|
28
|
-
backupKey?: string;
|
|
29
|
-
bitgoKey: string;
|
|
30
|
-
recoveryDestination: string;
|
|
31
|
-
krsProvider?: string;
|
|
32
|
-
walletPassphrase?: string;
|
|
33
|
-
startingScanIndex?: number;
|
|
34
|
-
scan?: number;
|
|
35
|
-
}
|
|
36
|
-
interface DotTx {
|
|
37
|
-
serializedTx: string;
|
|
38
|
-
scanIndex: number;
|
|
39
|
-
}
|
|
40
28
|
export declare class Dot extends BaseCoin {
|
|
41
29
|
protected readonly _staticsCoin: Readonly<StaticsBaseCoin>;
|
|
42
30
|
readonly MAX_VALIDITY_DURATION = 2400;
|
|
@@ -136,18 +124,28 @@ export declare class Dot extends BaseCoin {
|
|
|
136
124
|
protected getMaterial(): Promise<Material>;
|
|
137
125
|
/**
|
|
138
126
|
* Builds a funds recovery transaction without BitGo
|
|
139
|
-
* @param {
|
|
127
|
+
* @param {MPCRecoveryOptions} params parameters needed to construct and
|
|
140
128
|
* (maybe) sign the transaction
|
|
141
129
|
*
|
|
142
|
-
* @returns {
|
|
130
|
+
* @returns {MPCTx} the serialized transaction hex string and index
|
|
143
131
|
* of the address being swept
|
|
144
132
|
*/
|
|
145
|
-
recover(params:
|
|
133
|
+
recover(params: MPCRecoveryOptions): Promise<MPCTx | MPCSweepTxs>;
|
|
134
|
+
/**
|
|
135
|
+
* Builds native DOT recoveries of receive addresses in batch without BitGo.
|
|
136
|
+
* Funds will be recovered to base address first. You need to initiate another sweep txn after that.
|
|
137
|
+
*
|
|
138
|
+
* @param {MPCConsolidationRecoveryOptions} params - options for consolidation recovery.
|
|
139
|
+
* @param {string} [params.startingScanIndex] - receive address index to start scanning from. default to 1 (inclusive).
|
|
140
|
+
* @param {string} [params.endingScanIndex] - receive address index to end scanning at. default to startingScanIndex + 20 (exclusive).
|
|
141
|
+
*/
|
|
142
|
+
recoverConsolidations(params: MPCConsolidationRecoveryOptions): Promise<MPCTxs | MPCSweepTxs>;
|
|
143
|
+
/** inherited doc */
|
|
144
|
+
createBroadcastableSweepTransaction(params: MPCSweepRecoveryOptions): Promise<MPCTxs>;
|
|
146
145
|
parseTransaction(params: ParseTransactionOptions): Promise<ParsedTransaction>;
|
|
147
146
|
isWalletAddress(params: VerifyAddressOptions): Promise<boolean>;
|
|
148
147
|
verifyTransaction(params: VerifyTransactionOptions): Promise<boolean>;
|
|
149
148
|
getAddressFromPublicKey(Pubkey: string): string;
|
|
150
149
|
private getBuilder;
|
|
151
150
|
}
|
|
152
|
-
export {};
|
|
153
151
|
//# 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":";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,
|
|
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,EACP,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,IAAI,eAAe,EAA+B,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAAE,SAAS,EAAwE,MAAM,OAAO,CAAC;AACxG,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAc,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAIvC,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,MAAM,WAAW,sBAAuB,SAAQ,0BAA0B;IAC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