@bitgo-beta/sdk-coin-dot 2.2.8-beta.122 → 2.2.8-beta.1221

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.
Files changed (87) hide show
  1. package/.mocharc.yml +1 -1
  2. package/CHANGELOG.md +1037 -0
  3. package/package.json +16 -15
  4. package/dist/src/dot.d.ts +0 -158
  5. package/dist/src/dot.d.ts.map +0 -1
  6. package/dist/src/dot.js +0 -562
  7. package/dist/src/index.d.ts +0 -5
  8. package/dist/src/index.d.ts.map +0 -1
  9. package/dist/src/index.js +0 -17
  10. package/dist/src/lib/addressInitializationBuilder.d.ts +0 -79
  11. package/dist/src/lib/addressInitializationBuilder.d.ts.map +0 -1
  12. package/dist/src/lib/addressInitializationBuilder.js +0 -184
  13. package/dist/src/lib/batchTransactionBuilder.d.ts +0 -61
  14. package/dist/src/lib/batchTransactionBuilder.d.ts.map +0 -1
  15. package/dist/src/lib/batchTransactionBuilder.js +0 -220
  16. package/dist/src/lib/claimBuilder.d.ts +0 -58
  17. package/dist/src/lib/claimBuilder.d.ts.map +0 -1
  18. package/dist/src/lib/claimBuilder.js +0 -119
  19. package/dist/src/lib/errors.d.ts +0 -8
  20. package/dist/src/lib/errors.d.ts.map +0 -1
  21. package/dist/src/lib/errors.js +0 -19
  22. package/dist/src/lib/iface.d.ts +0 -334
  23. package/dist/src/lib/iface.d.ts.map +0 -1
  24. package/dist/src/lib/iface.js +0 -128
  25. package/dist/src/lib/iface_utils.d.ts +0 -59
  26. package/dist/src/lib/iface_utils.d.ts.map +0 -1
  27. package/dist/src/lib/iface_utils.js +0 -93
  28. package/dist/src/lib/index.d.ts +0 -19
  29. package/dist/src/lib/index.d.ts.map +0 -1
  30. package/dist/src/lib/index.js +0 -57
  31. package/dist/src/lib/keyPair.d.ts +0 -31
  32. package/dist/src/lib/keyPair.d.ts.map +0 -1
  33. package/dist/src/lib/keyPair.js +0 -70
  34. package/dist/src/lib/nativeTransferBuilder.d.ts +0 -84
  35. package/dist/src/lib/nativeTransferBuilder.d.ts.map +0 -1
  36. package/dist/src/lib/nativeTransferBuilder.js +0 -221
  37. package/dist/src/lib/proxyBuilder.d.ts +0 -54
  38. package/dist/src/lib/proxyBuilder.d.ts.map +0 -1
  39. package/dist/src/lib/proxyBuilder.js +0 -118
  40. package/dist/src/lib/singletonRegistry.d.ts +0 -7
  41. package/dist/src/lib/singletonRegistry.d.ts.map +0 -1
  42. package/dist/src/lib/singletonRegistry.js +0 -20
  43. package/dist/src/lib/stakingBuilder.d.ts +0 -66
  44. package/dist/src/lib/stakingBuilder.d.ts.map +0 -1
  45. package/dist/src/lib/stakingBuilder.js +0 -169
  46. package/dist/src/lib/transaction.d.ts +0 -84
  47. package/dist/src/lib/transaction.d.ts.map +0 -1
  48. package/dist/src/lib/transaction.js +0 -590
  49. package/dist/src/lib/transactionBuilder.d.ts +0 -132
  50. package/dist/src/lib/transactionBuilder.d.ts.map +0 -1
  51. package/dist/src/lib/transactionBuilder.js +0 -337
  52. package/dist/src/lib/transactionBuilderFactory.d.ts +0 -28
  53. package/dist/src/lib/transactionBuilderFactory.d.ts.map +0 -1
  54. package/dist/src/lib/transactionBuilderFactory.js +0 -105
  55. package/dist/src/lib/transferBuilder.d.ts +0 -11
  56. package/dist/src/lib/transferBuilder.d.ts.map +0 -1
  57. package/dist/src/lib/transferBuilder.js +0 -11
  58. package/dist/src/lib/txnSchema.d.ts +0 -15
  59. package/dist/src/lib/txnSchema.d.ts.map +0 -1
  60. package/dist/src/lib/txnSchema.js +0 -117
  61. package/dist/src/lib/unnominateBuilder.d.ts +0 -24
  62. package/dist/src/lib/unnominateBuilder.d.ts.map +0 -1
  63. package/dist/src/lib/unnominateBuilder.js +0 -50
  64. package/dist/src/lib/unstakeBuilder.d.ts +0 -38
  65. package/dist/src/lib/unstakeBuilder.d.ts.map +0 -1
  66. package/dist/src/lib/unstakeBuilder.js +0 -89
  67. package/dist/src/lib/utils.d.ts +0 -253
  68. package/dist/src/lib/utils.d.ts.map +0 -1
  69. package/dist/src/lib/utils.js +0 -458
  70. package/dist/src/lib/withdrawUnstakedBuilder.d.ts +0 -38
  71. package/dist/src/lib/withdrawUnstakedBuilder.d.ts.map +0 -1
  72. package/dist/src/lib/withdrawUnstakedBuilder.js +0 -90
  73. package/dist/src/register.d.ts +0 -3
  74. package/dist/src/register.d.ts.map +0 -1
  75. package/dist/src/register.js +0 -11
  76. package/dist/src/resources/index.d.ts +0 -3
  77. package/dist/src/resources/index.d.ts.map +0 -1
  78. package/dist/src/resources/index.js +0 -15
  79. package/dist/src/resources/mainnet.d.ts +0 -2
  80. package/dist/src/resources/mainnet.d.ts.map +0 -1
  81. package/dist/src/resources/mainnet.js +0 -5
  82. package/dist/src/resources/westend.d.ts +0 -2
  83. package/dist/src/resources/westend.d.ts.map +0 -1
  84. package/dist/src/resources/westend.js +0 -5
  85. package/dist/src/tdot.d.ts +0 -12
  86. package/dist/src/tdot.d.ts.map +0 -1
  87. package/dist/src/tdot.js +0 -27
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo-beta/sdk-coin-dot",
3
- "version": "2.2.8-beta.122",
3
+ "version": "2.2.8-beta.1221",
4
4
  "description": "BitGo SDK coin library for Polkadot",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "author": "BitGo SDK Team <sdkteam@bitgo.com>",
19
19
  "license": "MIT",
20
20
  "engines": {
21
- "node": ">=16 <19"
21
+ "node": ">=20 <23"
22
22
  },
23
23
  "repository": {
24
24
  "type": "git",
@@ -40,16 +40,17 @@
40
40
  ]
41
41
  },
42
42
  "dependencies": {
43
- "@bitgo-beta/sdk-core": "8.2.1-beta.122",
44
- "@bitgo-beta/sdk-lib-mpc": "8.2.0-beta.114",
45
- "@bitgo-beta/statics": "15.1.1-beta.125",
46
- "@polkadot/api": "10.9.1",
47
- "@polkadot/keyring": "12.3.2",
48
- "@polkadot/types": "10.9.1",
49
- "@polkadot/util": "12.3.2",
50
- "@polkadot/util-crypto": "12.3.2",
51
- "@substrate/txwrapper-core": "7.0.1",
52
- "@substrate/txwrapper-polkadot": "7.0.1",
43
+ "@bitgo-beta/sdk-core": "8.2.1-beta.1224",
44
+ "@bitgo-beta/sdk-lib-mpc": "8.2.0-beta.1216",
45
+ "@bitgo-beta/statics": "15.1.1-beta.1227",
46
+ "@polkadot/api": "14.1.1",
47
+ "@polkadot/api-augment": "14.1.1",
48
+ "@polkadot/keyring": "13.3.1",
49
+ "@polkadot/types": "14.1.1",
50
+ "@polkadot/util": "13.3.1",
51
+ "@polkadot/util-crypto": "13.3.1",
52
+ "@substrate/txwrapper-core": "7.5.2",
53
+ "@substrate/txwrapper-polkadot": "7.5.2",
53
54
  "bignumber.js": "^9.0.0",
54
55
  "bs58": "^4.0.1",
55
56
  "hi-base32": "^0.5.1",
@@ -58,9 +59,9 @@
58
59
  "tweetnacl": "^1.0.3"
59
60
  },
60
61
  "devDependencies": {
61
- "@bitgo-beta/sdk-api": "1.10.1-beta.122",
62
- "@bitgo-beta/sdk-test": "^1.2.40",
62
+ "@bitgo-beta/sdk-api": "1.10.1-beta.1223",
63
+ "@bitgo-beta/sdk-test": "^9.1.1",
63
64
  "@types/lodash": "^4.14.151"
64
65
  },
65
- "gitHead": "cbf91ecd1eb440eb5d839c7a5ef6046a5aa1fc8c"
66
+ "gitHead": "4f1bde3a4efba7c1153e94cd128c3946d50a2a78"
66
67
  }
package/dist/src/dot.d.ts DELETED
@@ -1,158 +0,0 @@
1
- /// <reference types="node" />
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
- import { BaseCoin as StaticsBaseCoin } from '@bitgo-beta/statics';
4
- import { Interface } from './lib';
5
- import { ApiPromise } from '@polkadot/api';
6
- import { Material } from './lib/iface';
7
- export declare const DEFAULT_SCAN_FACTOR = 20;
8
- export interface SignTransactionOptions extends BaseSignTransactionOptions {
9
- txPrebuild: TransactionPrebuild;
10
- prv: string;
11
- }
12
- export interface TransactionPrebuild {
13
- txHex: string;
14
- transaction: Interface.TxData;
15
- }
16
- export interface ExplainTransactionOptions {
17
- txPrebuild: TransactionPrebuild;
18
- publicKey: string;
19
- feeInfo: {
20
- fee: string;
21
- };
22
- }
23
- export interface VerifiedTransactionParameters {
24
- txHex: string;
25
- prv: string;
26
- }
27
- export declare class Dot extends BaseCoin {
28
- protected readonly _staticsCoin: Readonly<StaticsBaseCoin>;
29
- readonly MAX_VALIDITY_DURATION = 2400;
30
- readonly SWEEP_TXN_DURATION = 64;
31
- constructor(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>);
32
- protected static initialized: boolean;
33
- protected static MPC: Eddsa;
34
- protected static nodeApiInitialized: boolean;
35
- protected static API: ApiPromise;
36
- static createInstance(bitgo: BitGoBase, staticsCoin?: Readonly<StaticsBaseCoin>): BaseCoin;
37
- getChain(): string;
38
- getBaseChain(): string;
39
- getFamily(): string;
40
- getFullName(): string;
41
- getBaseFactor(): number;
42
- /**
43
- * Flag for sending value of 0
44
- * @returns {boolean} True if okay to send 0 value, false otherwise
45
- */
46
- valuelessTransferAllowed(): boolean;
47
- /** @inheritDoc */
48
- supportsTss(): boolean;
49
- getMPCAlgorithm(): MPCAlgorithm;
50
- allowsAccountConsolidations(): boolean;
51
- /**
52
- * Generate ed25519 key pair
53
- *
54
- * @param seed
55
- * @returns {Object} object with generated pub, prv
56
- */
57
- generateKeyPair(seed?: Buffer): KeyPair;
58
- /**
59
- * Return boolean indicating whether input is valid public key for the coin.
60
- *
61
- * @param {String} pub the pub to be checked
62
- * @returns {Boolean} is it valid?
63
- */
64
- isValidPub(pub: string): boolean;
65
- /**
66
- * Return boolean indicating whether the supplied private key is a valid dot private key
67
- *
68
- * @param {String} prv the prv to be checked
69
- * @returns {Boolean} is it valid?
70
- */
71
- isValidPrv(prv: string): boolean;
72
- /**
73
- * Return boolean indicating whether input is valid public key for the coin
74
- *
75
- * @param {String} address the pub to be checked
76
- * @returns {Boolean} is it valid?
77
- */
78
- isValidAddress(address: string): boolean;
79
- /**
80
- * Sign message with private key
81
- *
82
- * @param key
83
- * @param message
84
- * @return {Buffer} A signature over the given message using the given key
85
- */
86
- signMessage(key: KeyPair, message: string | Buffer): Promise<Buffer>;
87
- /**
88
- * Explain/parse transaction
89
- * @param unsignedTransaction
90
- */
91
- explainTransaction(unsignedTransaction: UnsignedTransaction): Promise<ExplanationResult>;
92
- verifySignTransactionParams(params: SignTransactionOptions): VerifiedTransactionParameters;
93
- /**
94
- * Assemble keychain and half-sign prebuilt transaction
95
- *
96
- * @param params
97
- * @param params.txPrebuild {TransactionPrebuild} prebuild object returned by platform
98
- * @param params.prv {String} user prv
99
- * @returns {Promise<SignedTransaction>}
100
- */
101
- signTransaction(params: SignTransactionOptions): Promise<SignedTransaction>;
102
- protected getInitializedNodeAPI(): Promise<ApiPromise>;
103
- protected getAccountInfo(walletAddr: string): Promise<{
104
- nonce: number;
105
- freeBalance: number;
106
- }>;
107
- protected getHeaderInfo(): Promise<{
108
- headerNumber: number;
109
- headerHash: string;
110
- }>;
111
- /**
112
- *
113
- * Estimate the fee of the transaction
114
- *
115
- * @param {string} destAddr destination wallet address
116
- * @param {string} srcAddr source wallet address
117
- * @param {string} amount amount to transfer
118
- * @returns {number} the estimated fee the transaction will cost
119
- *
120
- * @see https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-estimate-the-transaction-fees
121
- */
122
- protected getFee(destAddr: string, srcAddr: string, amount: number): Promise<number>;
123
- protected getMaterial(): Promise<Material>;
124
- /**
125
- * Builds a funds recovery transaction without BitGo
126
- * @param {MPCRecoveryOptions} params parameters needed to construct and
127
- * (maybe) sign the transaction
128
- *
129
- * @returns {MPCTx} the serialized transaction hex string and index
130
- * of the address being swept
131
- */
132
- recover(params: MPCRecoveryOptions): Promise<MPCTx | MPCSweepTxs>;
133
- /**
134
- * Builds native DOT recoveries of receive addresses in batch without BitGo.
135
- * Funds will be recovered to base address first. You need to initiate another sweep txn after that.
136
- *
137
- * @param {MPCConsolidationRecoveryOptions} params - options for consolidation recovery.
138
- * @param {string} [params.startingScanIndex] - receive address index to start scanning from. default to 1 (inclusive).
139
- * @param {string} [params.endingScanIndex] - receive address index to end scanning at. default to startingScanIndex + 20 (exclusive).
140
- */
141
- recoverConsolidations(params: MPCConsolidationRecoveryOptions): Promise<MPCTxs | MPCSweepTxs>;
142
- /**
143
- * Creates funds sweep recovery transaction(s) without BitGo
144
- *
145
- * @param {MPCSweepRecoveryOptions} params parameters needed to combine the signatures
146
- * and transactions to create broadcastable transactions
147
- *
148
- * @returns {MPCTx[]} array of the serialized transaction hex strings and indices
149
- * of the addresses being swept
150
- */
151
- createBroadcastableSweepTransaction(params: MPCSweepRecoveryOptions): Promise<MPCTxs>;
152
- parseTransaction(params: ParseTransactionOptions): Promise<ParsedTransaction>;
153
- isWalletAddress(params: VerifyAddressOptions): Promise<boolean>;
154
- verifyTransaction(params: VerifyTransactionOptions): Promise<boolean>;
155
- getAddressFromPublicKey(Pubkey: string): string;
156
- private getBuilder;
157
- }
158
- //# sourceMappingURL=dot.d.ts.map
@@ -1 +0,0 @@
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,+B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