@bitgo-beta/sdk-coin-ada 2.3.14-beta.97 → 2.3.14-beta.970
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 +912 -0
- package/dist/src/ada.d.ts +37 -20
- package/dist/src/ada.d.ts.map +1 -1
- package/dist/src/ada.js +304 -97
- package/dist/src/adaToken.d.ts +1 -1
- package/dist/src/adaToken.d.ts.map +1 -1
- package/dist/src/adaToken.js +3 -3
- package/dist/src/index.js +6 -2
- package/dist/src/lib/index.d.ts +1 -0
- package/dist/src/lib/index.d.ts.map +1 -1
- package/dist/src/lib/index.js +26 -10
- package/dist/src/lib/keyPair.js +29 -16
- package/dist/src/lib/stakingActivateBuilder.d.ts +1 -1
- package/dist/src/lib/stakingActivateBuilder.d.ts.map +1 -1
- package/dist/src/lib/stakingActivateBuilder.js +30 -10
- package/dist/src/lib/stakingDeactivateBuilder.js +24 -10
- package/dist/src/lib/transaction.d.ts +12 -6
- package/dist/src/lib/transaction.d.ts.map +1 -1
- package/dist/src/lib/transaction.js +49 -16
- package/dist/src/lib/transactionBuilder.d.ts +3 -2
- package/dist/src/lib/transactionBuilder.d.ts.map +1 -1
- package/dist/src/lib/transactionBuilder.js +153 -21
- package/dist/src/lib/transactionBuilderFactory.d.ts +2 -0
- package/dist/src/lib/transactionBuilderFactory.d.ts.map +1 -1
- package/dist/src/lib/transactionBuilderFactory.js +7 -1
- package/dist/src/lib/utils.d.ts +23 -0
- package/dist/src/lib/utils.d.ts.map +1 -1
- package/dist/src/lib/utils.js +153 -17
- package/dist/src/lib/voteDelegationBuilder.d.ts +24 -0
- package/dist/src/lib/voteDelegationBuilder.d.ts.map +1 -0
- package/dist/src/lib/voteDelegationBuilder.js +84 -0
- package/package.json +13 -10
package/dist/src/ada.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import { BaseCoin, BitGoBase, KeyPair, MPCAlgorithm, ParsedTransaction, ParseTransactionOptions as BaseParseTransactionOptions, SignedTransaction, SignTransactionOptions as BaseSignTransactionOptions, TransactionExplanation, VerifyAddressOptions, VerifyTransactionOptions } from '@bitgo-beta/sdk-core';
|
|
1
|
+
import { BaseCoin, BitGoBase, KeyPair, MPCAlgorithm, ParsedTransaction, ParseTransactionOptions as BaseParseTransactionOptions, SignedTransaction, SignTransactionOptions as BaseSignTransactionOptions, TransactionExplanation, VerifyAddressOptions, VerifyTransactionOptions, MPCTx, MPCRecoveryOptions, MPCConsolidationRecoveryOptions, MPCSweepTxs, MPCSweepRecoveryOptions, MPCTxs, PopulatedIntent, PrebuildTransactionWithIntentOptions, MultisigType, AuditDecryptedKeyParams } from '@bitgo-beta/sdk-core';
|
|
3
2
|
import { BaseCoin as StaticsBaseCoin, CoinFamily } from '@bitgo-beta/statics';
|
|
4
3
|
import * as request from 'superagent';
|
|
4
|
+
export declare const DEFAULT_SCAN_FACTOR = 20;
|
|
5
5
|
export interface TransactionPrebuild {
|
|
6
6
|
txHex: string;
|
|
7
7
|
}
|
|
@@ -15,22 +15,16 @@ export interface SignTransactionOptions extends BaseSignTransactionOptions {
|
|
|
15
15
|
txPrebuild: TransactionPrebuild;
|
|
16
16
|
prv: string;
|
|
17
17
|
}
|
|
18
|
-
interface
|
|
19
|
-
userKey?: string;
|
|
20
|
-
backupKey?: string;
|
|
18
|
+
interface AdaAddressParams {
|
|
21
19
|
bitgoKey: string;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
walletPassphrase?: string;
|
|
25
|
-
startingScanIndex?: number;
|
|
26
|
-
scan?: number;
|
|
20
|
+
index: number;
|
|
21
|
+
seed?: string;
|
|
27
22
|
}
|
|
28
|
-
interface
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
coin?: string;
|
|
23
|
+
interface AdaAddressAndAccountId {
|
|
24
|
+
address: string;
|
|
25
|
+
accountId: string;
|
|
32
26
|
}
|
|
33
|
-
export
|
|
27
|
+
export type AdaTransactionExplanation = TransactionExplanation;
|
|
34
28
|
export declare class Ada extends BaseCoin {
|
|
35
29
|
protected readonly _staticsCoin: Readonly<StaticsBaseCoin>;
|
|
36
30
|
protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>);
|
|
@@ -75,23 +69,46 @@ export declare class Ada extends BaseCoin {
|
|
|
75
69
|
utxoSet: Array<Record<string, any>>;
|
|
76
70
|
}>;
|
|
77
71
|
protected getChainTipInfo(): Promise<Record<string, string>>;
|
|
72
|
+
/** inherited doc */
|
|
73
|
+
createBroadcastableSweepTransaction(params: MPCSweepRecoveryOptions): Promise<MPCTxs>;
|
|
78
74
|
/**
|
|
79
|
-
* Builds
|
|
75
|
+
* Builds funds recovery transaction(s) without BitGo
|
|
80
76
|
*
|
|
81
|
-
* @param {
|
|
77
|
+
* @param {MPCRecoveryOptions} params parameters needed to construct and
|
|
82
78
|
* (maybe) sign the transaction
|
|
83
79
|
*
|
|
84
|
-
* @returns {
|
|
85
|
-
* of the
|
|
80
|
+
* @returns {MPCTx | MPCSweepTxs} array of the serialized transaction hex strings and indices
|
|
81
|
+
* of the addresses being swept
|
|
82
|
+
*/
|
|
83
|
+
recover(params: MPCRecoveryOptions): Promise<MPCTx | MPCSweepTxs>;
|
|
84
|
+
/**
|
|
85
|
+
* Builds native ADA recoveries of receive addresses in batch without BitGo.
|
|
86
|
+
* Funds will be recovered to base address first. You need to initiate another sweep txn after that.
|
|
87
|
+
*
|
|
88
|
+
* @param {MPCConsolidationRecoveryOptions} params - options for consolidation recovery.
|
|
89
|
+
* @param {string} [params.startingScanIndex] - receive address index to start scanning from. default to 1 (inclusive).
|
|
90
|
+
* @param {string} [params.endingScanIndex] - receive address index to end scanning at. default to startingScanIndex + 20 (exclusive).
|
|
91
|
+
*/
|
|
92
|
+
recoverConsolidations(params: MPCConsolidationRecoveryOptions): Promise<MPCTxs | MPCSweepTxs>;
|
|
93
|
+
/**
|
|
94
|
+
* Obtains ADA address and account id from provided bitgo key for the given index and seed (optional).
|
|
95
|
+
*
|
|
96
|
+
* @param {AdaAddressParams} params - params to obtain ada address and account id
|
|
86
97
|
*/
|
|
87
|
-
|
|
98
|
+
getAdaAddressAndAccountId(params: AdaAddressParams): Promise<AdaAddressAndAccountId>;
|
|
88
99
|
/** inherited doc */
|
|
89
100
|
supportsTss(): boolean;
|
|
90
101
|
/** inherited doc */
|
|
102
|
+
getDefaultMultisigType(): MultisigType;
|
|
103
|
+
/** inherited doc */
|
|
91
104
|
getMPCAlgorithm(): MPCAlgorithm;
|
|
92
105
|
/** inherited doc */
|
|
93
106
|
allowsAccountConsolidations(): boolean;
|
|
94
107
|
private getBuilder;
|
|
108
|
+
/** inherited doc */
|
|
109
|
+
setCoinSpecificFieldsInIntent(intent: PopulatedIntent, params: PrebuildTransactionWithIntentOptions): void;
|
|
110
|
+
/** inherited doc */
|
|
111
|
+
auditDecryptedKey({ publicKey, prv, multiSigType }: AuditDecryptedKeyParams): void;
|
|
95
112
|
}
|
|
96
113
|
export {};
|
|
97
114
|
//# sourceMappingURL=ada.d.ts.map
|
package/dist/src/ada.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ada.d.ts","sourceRoot":"","sources":["../../src/ada.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ada.d.ts","sourceRoot":"","sources":["../../src/ada.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAER,SAAS,EAET,OAAO,EACP,YAAY,EAEZ,iBAAiB,EACjB,uBAAuB,IAAI,2BAA2B,EACtD,iBAAiB,EACjB,sBAAsB,IAAI,0BAA0B,EACpD,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EAMxB,KAAK,EACL,kBAAkB,EAClB,+BAA+B,EAC/B,WAAW,EAGX,uBAAuB,EACvB,MAAM,EACN,eAAe,EACf,oCAAoC,EACpC,YAAY,EAEZ,uBAAuB,EACxB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,QAAQ,IAA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