@bitgo-beta/sdk-coin-atom 3.1.2-beta.99 → 3.1.2-beta.990
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 +809 -0
- package/dist/src/atom.d.ts +7 -114
- package/dist/src/atom.d.ts.map +1 -1
- package/dist/src/atom.js +12 -498
- package/dist/src/index.js +6 -2
- package/dist/src/lib/constants.d.ts +0 -6
- package/dist/src/lib/constants.d.ts.map +1 -1
- package/dist/src/lib/constants.js +5 -11
- package/dist/src/lib/index.d.ts +3 -8
- package/dist/src/lib/index.d.ts.map +1 -1
- package/dist/src/lib/index.js +33 -24
- package/dist/src/lib/keyPair.d.ts +3 -12
- package/dist/src/lib/keyPair.d.ts.map +1 -1
- package/dist/src/lib/keyPair.js +5 -43
- package/dist/src/lib/transactionBuilderFactory.d.ts +8 -11
- package/dist/src/lib/transactionBuilderFactory.d.ts.map +1 -1
- package/dist/src/lib/transactionBuilderFactory.js +21 -11
- package/dist/src/lib/utils.d.ts +5 -159
- package/dist/src/lib/utils.d.ts.map +1 -1
- package/dist/src/lib/utils.js +32 -498
- package/dist/src/tatom.d.ts +0 -8
- package/dist/src/tatom.d.ts.map +1 -1
- package/dist/src/tatom.js +1 -13
- package/package.json +10 -15
- package/dist/src/lib/StakingActivateBuilder.d.ts +0 -11
- package/dist/src/lib/StakingActivateBuilder.d.ts.map +0 -1
- package/dist/src/lib/StakingActivateBuilder.js +0 -31
- package/dist/src/lib/StakingDeactivateBuilder.d.ts +0 -11
- package/dist/src/lib/StakingDeactivateBuilder.d.ts.map +0 -1
- package/dist/src/lib/StakingDeactivateBuilder.js +0 -31
- package/dist/src/lib/StakingWithdrawRewardsBuilder.d.ts +0 -11
- package/dist/src/lib/StakingWithdrawRewardsBuilder.d.ts.map +0 -1
- package/dist/src/lib/StakingWithdrawRewardsBuilder.js +0 -31
- package/dist/src/lib/iface.d.ts +0 -46
- package/dist/src/lib/iface.d.ts.map +0 -1
- package/dist/src/lib/iface.js +0 -3
- package/dist/src/lib/transaction.d.ts +0 -58
- package/dist/src/lib/transaction.d.ts.map +0 -1
- package/dist/src/lib/transaction.js +0 -271
- package/dist/src/lib/transactionBuilder.d.ts +0 -78
- package/dist/src/lib/transactionBuilder.d.ts.map +0 -1
- package/dist/src/lib/transactionBuilder.js +0 -179
- package/dist/src/lib/transferBuilder.d.ts +0 -11
- package/dist/src/lib/transferBuilder.d.ts.map +0 -1
- package/dist/src/lib/transferBuilder.js +0 -31
package/dist/src/atom.d.ts
CHANGED
|
@@ -1,133 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
import { BaseCoin, BitGoBase
|
|
3
|
-
import { BaseCoin as StaticsBaseCoin
|
|
4
|
-
import { Hash } from 'crypto';
|
|
1
|
+
import { CosmosCoin, CosmosKeyPair, GasAmountDetails } from '@bitgo-beta/abstract-cosmos';
|
|
2
|
+
import { BaseCoin, BitGoBase } from '@bitgo-beta/sdk-core';
|
|
3
|
+
import { BaseCoin as StaticsBaseCoin } from '@bitgo-beta/statics';
|
|
5
4
|
import { TransactionBuilderFactory } from './lib';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Atom accounts support memo Id based addresses
|
|
9
|
-
*/
|
|
10
|
-
interface AddressDetails {
|
|
11
|
-
address: string;
|
|
12
|
-
memoId?: string | undefined;
|
|
13
|
-
}
|
|
14
|
-
interface RecoveryOptions {
|
|
15
|
-
userKey?: string;
|
|
16
|
-
backupKey?: string;
|
|
17
|
-
bitgoKey: string;
|
|
18
|
-
recoveryDestination: string;
|
|
19
|
-
krsProvider?: string;
|
|
20
|
-
walletPassphrase?: string;
|
|
21
|
-
startingScanIndex?: number;
|
|
22
|
-
scan?: number;
|
|
23
|
-
}
|
|
24
|
-
interface AtomTx {
|
|
25
|
-
serializedTx: string;
|
|
26
|
-
scanIndex: number;
|
|
27
|
-
}
|
|
28
|
-
export declare class Atom extends BaseCoin {
|
|
5
|
+
export declare class Atom extends CosmosCoin {
|
|
29
6
|
protected readonly _staticsCoin: Readonly<StaticsBaseCoin>;
|
|
30
7
|
protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>);
|
|
31
8
|
static createInstance(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>): BaseCoin;
|
|
32
9
|
/** @inheritDoc **/
|
|
33
10
|
getBaseFactor(): string | number;
|
|
34
|
-
/** @inheritDoc **/
|
|
35
|
-
getChain(): string;
|
|
36
|
-
/** @inheritDoc **/
|
|
37
|
-
getFamily(): CoinFamily;
|
|
38
|
-
/** @inheritDoc **/
|
|
39
|
-
getFullName(): string;
|
|
40
|
-
/** @inheritDoc */
|
|
41
|
-
supportsTss(): boolean;
|
|
42
|
-
/** @inheritDoc **/
|
|
43
|
-
getMPCAlgorithm(): MPCAlgorithm;
|
|
44
|
-
/** @inheritDoc **/
|
|
45
|
-
isValidPub(pub: string): boolean;
|
|
46
|
-
/** @inheritDoc **/
|
|
47
|
-
isValidPrv(prv: string): boolean;
|
|
48
11
|
getBuilder(): TransactionBuilderFactory;
|
|
49
12
|
/** @inheritDoc **/
|
|
50
13
|
isValidAddress(address: string): boolean;
|
|
51
14
|
/** @inheritDoc **/
|
|
52
|
-
|
|
53
|
-
/** @inheritDoc **/
|
|
54
|
-
parseTransaction(params: ParseTransactionOptions & {
|
|
55
|
-
txHex: string;
|
|
56
|
-
}): Promise<ParsedTransaction>;
|
|
15
|
+
getDenomination(): string;
|
|
57
16
|
/** @inheritDoc **/
|
|
58
|
-
|
|
59
|
-
txHex: string;
|
|
60
|
-
}): Promise<ExplanationResult>;
|
|
17
|
+
getGasAmountDetails(): GasAmountDetails;
|
|
61
18
|
/** @inheritDoc **/
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Sign a transaction with a single private key
|
|
65
|
-
* @param params parameters in the form of { txPrebuild: {txHex}, prv }
|
|
66
|
-
* @returns signed transaction in the form of { txHex }
|
|
67
|
-
*/
|
|
68
|
-
signTransaction(params: SignTransactionOptions & {
|
|
69
|
-
txPrebuild: {
|
|
70
|
-
txHex: string;
|
|
71
|
-
};
|
|
72
|
-
prv: string;
|
|
73
|
-
}): Promise<SignedTransaction>;
|
|
74
|
-
/**
|
|
75
|
-
* Builds a funds recovery transaction without BitGo
|
|
76
|
-
* @param {RecoveryOptions} params parameters needed to construct and
|
|
77
|
-
* (maybe) sign the transaction
|
|
78
|
-
*
|
|
79
|
-
* @returns {AtomTx} the serialized transaction hex string and index
|
|
80
|
-
* of the address being swept
|
|
81
|
-
*/
|
|
82
|
-
recover(params: RecoveryOptions): Promise<AtomTx>;
|
|
83
|
-
/**
|
|
84
|
-
* Get balance from public node
|
|
85
|
-
*/
|
|
86
|
-
protected getBalanceFromNode(senderAddress: string): Promise<request.Response>;
|
|
87
|
-
/**
|
|
88
|
-
* Helper to fetch chainId
|
|
89
|
-
*/
|
|
90
|
-
protected getChainId(): Promise<string>;
|
|
91
|
-
/**
|
|
92
|
-
* Get chain id from public node
|
|
93
|
-
*/
|
|
94
|
-
protected getChainIdFromNode(): Promise<request.Response>;
|
|
95
|
-
/**
|
|
96
|
-
* Helper to fetch account number
|
|
97
|
-
*/
|
|
98
|
-
protected getAccountDetails(senderAddress: string): Promise<string[]>;
|
|
99
|
-
/**
|
|
100
|
-
* Get account number from public node
|
|
101
|
-
*/
|
|
102
|
-
protected getAccountFromNode(senderAddress: string): Promise<request.Response>;
|
|
103
|
-
/**
|
|
104
|
-
* Helper to fetch account balance
|
|
105
|
-
*/
|
|
106
|
-
protected getAccountBalance(senderAddress: string): Promise<string>;
|
|
19
|
+
getKeyPair(publicKey: string): CosmosKeyPair;
|
|
107
20
|
/**
|
|
108
21
|
* Get the public node url from the Environments constant we have defined
|
|
109
22
|
*/
|
|
110
23
|
protected getPublicNodeUrl(): string;
|
|
111
24
|
getAddressFromPublicKey(pubKey: string): string;
|
|
112
|
-
/** @inheritDoc **/
|
|
113
|
-
isWalletAddress(params: VerifyAddressOptions): Promise<boolean>;
|
|
114
|
-
getHashFunction(): Hash;
|
|
115
|
-
/**
|
|
116
|
-
* Process address into address and memo id
|
|
117
|
-
*
|
|
118
|
-
* @param address the address
|
|
119
|
-
* @returns object containing address and memo id
|
|
120
|
-
*/
|
|
121
|
-
getAddressDetails(address: string): AddressDetails;
|
|
122
|
-
/**
|
|
123
|
-
* Return boolean indicating whether a memo id is valid
|
|
124
|
-
*
|
|
125
|
-
* @param memoId memo id
|
|
126
|
-
* @returns true if memo id is valid
|
|
127
|
-
*/
|
|
128
|
-
isValidMemoId(memoId: string): boolean;
|
|
129
|
-
private getKeyCombinedFromTssKeyShares;
|
|
130
|
-
private signRecoveryTSS;
|
|
131
25
|
}
|
|
132
|
-
export {};
|
|
133
26
|
//# sourceMappingURL=atom.d.ts.map
|
package/dist/src/atom.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"atom.d.ts","sourceRoot":"","sources":["../../src/atom.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"atom.d.ts","sourceRoot":"","sources":["../../src/atom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAgB,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAY,QAAQ,IAAI,eAAe,EAAS,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAW,yBAAyB,EAAE,MAAM,OAAO,CAAC;AAI3D,qBAAa,IAAK,SAAQ,UAAU;IAClC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC3D,SAAS,aAAa,KAAK,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC;IAU/E,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,GAAG,QAAQ;IAI1F,mBAAmB;IACnB,aAAa,IAAI,MAAM,GAAG,MAAM;IAIhC,UAAU,IAAI,yBAAyB;IAIvC,mBAAmB;IACnB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAIxC,mBAAmB;IACnB,eAAe,IAAI,MAAM;IAIzB,mBAAmB;IACnB,mBAAmB,IAAI,gBAAgB;IAOvC,mBAAmB;IACnB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa;IAI5C;;OAEG;IACH,SAAS,CAAC,gBAAgB,IAAI,MAAM;IAIpC,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CAGhD"}
|