@bitgo-beta/sdk-coin-atom 3.1.2-beta.212 → 3.1.2-beta.213
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/dist/src/atom.d.ts +7 -115
- package/dist/src/atom.d.ts.map +1 -1
- package/dist/src/atom.js +12 -491
- 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 +2 -8
- 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 +11 -16
- 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 +4 -42
- package/dist/src/lib/transactionBuilderFactory.d.ts +7 -11
- package/dist/src/lib/transactionBuilderFactory.d.ts.map +1 -1
- package/dist/src/lib/transactionBuilderFactory.js +16 -11
- package/dist/src/lib/utils.d.ts +5 -181
- package/dist/src/lib/utils.d.ts.map +1 -1
- package/dist/src/lib/utils.js +8 -537
- 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 +8 -13
- 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 -279
- 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,134 +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
|
-
import { Buffer } from 'buffer';
|
|
8
|
-
/**
|
|
9
|
-
* Atom accounts support memo Id based addresses
|
|
10
|
-
*/
|
|
11
|
-
interface AddressDetails {
|
|
12
|
-
address: string;
|
|
13
|
-
memoId?: string | undefined;
|
|
14
|
-
}
|
|
15
|
-
interface RecoveryOptions {
|
|
16
|
-
userKey?: string;
|
|
17
|
-
backupKey?: string;
|
|
18
|
-
bitgoKey: string;
|
|
19
|
-
recoveryDestination: string;
|
|
20
|
-
krsProvider?: string;
|
|
21
|
-
walletPassphrase?: string;
|
|
22
|
-
startingScanIndex?: number;
|
|
23
|
-
scan?: number;
|
|
24
|
-
}
|
|
25
|
-
interface AtomTx {
|
|
26
|
-
serializedTx: string;
|
|
27
|
-
scanIndex: number;
|
|
28
|
-
}
|
|
29
|
-
export declare class Atom extends BaseCoin {
|
|
5
|
+
export declare class Atom extends CosmosCoin {
|
|
30
6
|
protected readonly _staticsCoin: Readonly<StaticsBaseCoin>;
|
|
31
7
|
protected constructor(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>);
|
|
32
8
|
static createInstance(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>): BaseCoin;
|
|
33
9
|
/** @inheritDoc **/
|
|
34
10
|
getBaseFactor(): string | number;
|
|
35
|
-
/** @inheritDoc **/
|
|
36
|
-
getChain(): string;
|
|
37
|
-
/** @inheritDoc **/
|
|
38
|
-
getFamily(): CoinFamily;
|
|
39
|
-
/** @inheritDoc **/
|
|
40
|
-
getFullName(): string;
|
|
41
|
-
/** @inheritDoc */
|
|
42
|
-
supportsTss(): boolean;
|
|
43
|
-
/** @inheritDoc **/
|
|
44
|
-
getMPCAlgorithm(): MPCAlgorithm;
|
|
45
|
-
/** @inheritDoc **/
|
|
46
|
-
isValidPub(pub: string): boolean;
|
|
47
|
-
/** @inheritDoc **/
|
|
48
|
-
isValidPrv(prv: string): boolean;
|
|
49
11
|
getBuilder(): TransactionBuilderFactory;
|
|
50
12
|
/** @inheritDoc **/
|
|
51
13
|
isValidAddress(address: string): boolean;
|
|
52
14
|
/** @inheritDoc **/
|
|
53
|
-
|
|
54
|
-
/** @inheritDoc **/
|
|
55
|
-
parseTransaction(params: ParseTransactionOptions & {
|
|
56
|
-
txHex: string;
|
|
57
|
-
}): Promise<ParsedTransaction>;
|
|
15
|
+
getDenomination(): string;
|
|
58
16
|
/** @inheritDoc **/
|
|
59
|
-
|
|
60
|
-
txHex: string;
|
|
61
|
-
}): Promise<ExplanationResult>;
|
|
17
|
+
getGasAmountDetails(): GasAmountDetails;
|
|
62
18
|
/** @inheritDoc **/
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Sign a transaction with a single private key
|
|
66
|
-
* @param params parameters in the form of { txPrebuild: {txHex}, prv }
|
|
67
|
-
* @returns signed transaction in the form of { txHex }
|
|
68
|
-
*/
|
|
69
|
-
signTransaction(params: SignTransactionOptions & {
|
|
70
|
-
txPrebuild: {
|
|
71
|
-
txHex: string;
|
|
72
|
-
};
|
|
73
|
-
prv: string;
|
|
74
|
-
}): Promise<SignedTransaction>;
|
|
75
|
-
/**
|
|
76
|
-
* Builds a funds recovery transaction without BitGo
|
|
77
|
-
* @param {RecoveryOptions} params parameters needed to construct and
|
|
78
|
-
* (maybe) sign the transaction
|
|
79
|
-
*
|
|
80
|
-
* @returns {AtomTx} the serialized transaction hex string and index
|
|
81
|
-
* of the address being swept
|
|
82
|
-
*/
|
|
83
|
-
recover(params: RecoveryOptions): Promise<AtomTx>;
|
|
84
|
-
/**
|
|
85
|
-
* Get balance from public node
|
|
86
|
-
*/
|
|
87
|
-
protected getBalanceFromNode(senderAddress: string): Promise<request.Response>;
|
|
88
|
-
/**
|
|
89
|
-
* Helper to fetch chainId
|
|
90
|
-
*/
|
|
91
|
-
protected getChainId(): Promise<string>;
|
|
92
|
-
/**
|
|
93
|
-
* Get chain id from public node
|
|
94
|
-
*/
|
|
95
|
-
protected getChainIdFromNode(): Promise<request.Response>;
|
|
96
|
-
/**
|
|
97
|
-
* Helper to fetch account number
|
|
98
|
-
*/
|
|
99
|
-
protected getAccountDetails(senderAddress: string): Promise<string[]>;
|
|
100
|
-
/**
|
|
101
|
-
* Get account number from public node
|
|
102
|
-
*/
|
|
103
|
-
protected getAccountFromNode(senderAddress: string): Promise<request.Response>;
|
|
104
|
-
/**
|
|
105
|
-
* Helper to fetch account balance
|
|
106
|
-
*/
|
|
107
|
-
protected getAccountBalance(senderAddress: string): Promise<string>;
|
|
19
|
+
getKeyPair(publicKey: string): CosmosKeyPair;
|
|
108
20
|
/**
|
|
109
21
|
* Get the public node url from the Environments constant we have defined
|
|
110
22
|
*/
|
|
111
23
|
protected getPublicNodeUrl(): string;
|
|
112
24
|
getAddressFromPublicKey(pubKey: string): string;
|
|
113
|
-
/** @inheritDoc **/
|
|
114
|
-
isWalletAddress(params: VerifyAddressOptions): Promise<boolean>;
|
|
115
|
-
getHashFunction(): Hash;
|
|
116
|
-
/**
|
|
117
|
-
* Process address into address and memo id
|
|
118
|
-
*
|
|
119
|
-
* @param address the address
|
|
120
|
-
* @returns object containing address and memo id
|
|
121
|
-
*/
|
|
122
|
-
getAddressDetails(address: string): AddressDetails;
|
|
123
|
-
/**
|
|
124
|
-
* Return boolean indicating whether a memo id is valid
|
|
125
|
-
*
|
|
126
|
-
* @param memoId memo id
|
|
127
|
-
* @returns true if memo id is valid
|
|
128
|
-
*/
|
|
129
|
-
isValidMemoId(memoId: string): boolean;
|
|
130
|
-
private getKeyCombinedFromTssKeyShares;
|
|
131
|
-
private signRecoveryTSS;
|
|
132
25
|
}
|
|
133
|
-
export {};
|
|
134
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"}
|