@bitgo-beta/sdk-coin-dot 1.3.3-alpha.400 → 1.3.3-alpha.401

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 (86) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/package.json +7 -7
  3. package/dist/src/dot.d.ts +0 -154
  4. package/dist/src/dot.d.ts.map +0 -1
  5. package/dist/src/dot.js +0 -576
  6. package/dist/src/index.d.ts +0 -5
  7. package/dist/src/index.d.ts.map +0 -1
  8. package/dist/src/index.js +0 -21
  9. package/dist/src/lib/addressInitializationBuilder.d.ts +0 -79
  10. package/dist/src/lib/addressInitializationBuilder.d.ts.map +0 -1
  11. package/dist/src/lib/addressInitializationBuilder.js +0 -182
  12. package/dist/src/lib/batchTransactionBuilder.d.ts +0 -62
  13. package/dist/src/lib/batchTransactionBuilder.d.ts.map +0 -1
  14. package/dist/src/lib/batchTransactionBuilder.js +0 -229
  15. package/dist/src/lib/claimBuilder.d.ts +0 -58
  16. package/dist/src/lib/claimBuilder.d.ts.map +0 -1
  17. package/dist/src/lib/claimBuilder.js +0 -117
  18. package/dist/src/lib/errors.d.ts +0 -8
  19. package/dist/src/lib/errors.d.ts.map +0 -1
  20. package/dist/src/lib/errors.js +0 -19
  21. package/dist/src/lib/iface.d.ts +0 -337
  22. package/dist/src/lib/iface.d.ts.map +0 -1
  23. package/dist/src/lib/iface.js +0 -128
  24. package/dist/src/lib/iface_utils.d.ts +0 -59
  25. package/dist/src/lib/iface_utils.d.ts.map +0 -1
  26. package/dist/src/lib/iface_utils.js +0 -92
  27. package/dist/src/lib/index.d.ts +0 -19
  28. package/dist/src/lib/index.d.ts.map +0 -1
  29. package/dist/src/lib/index.js +0 -71
  30. package/dist/src/lib/keyPair.d.ts +0 -38
  31. package/dist/src/lib/keyPair.d.ts.map +0 -1
  32. package/dist/src/lib/keyPair.js +0 -117
  33. package/dist/src/lib/nativeTransferBuilder.d.ts +0 -84
  34. package/dist/src/lib/nativeTransferBuilder.d.ts.map +0 -1
  35. package/dist/src/lib/nativeTransferBuilder.js +0 -219
  36. package/dist/src/lib/proxyBuilder.d.ts +0 -54
  37. package/dist/src/lib/proxyBuilder.d.ts.map +0 -1
  38. package/dist/src/lib/proxyBuilder.js +0 -116
  39. package/dist/src/lib/singletonRegistry.d.ts +0 -7
  40. package/dist/src/lib/singletonRegistry.d.ts.map +0 -1
  41. package/dist/src/lib/singletonRegistry.js +0 -20
  42. package/dist/src/lib/stakingBuilder.d.ts +0 -66
  43. package/dist/src/lib/stakingBuilder.d.ts.map +0 -1
  44. package/dist/src/lib/stakingBuilder.js +0 -167
  45. package/dist/src/lib/transaction.d.ts +0 -83
  46. package/dist/src/lib/transaction.d.ts.map +0 -1
  47. package/dist/src/lib/transaction.js +0 -610
  48. package/dist/src/lib/transactionBuilder.d.ts +0 -131
  49. package/dist/src/lib/transactionBuilder.d.ts.map +0 -1
  50. package/dist/src/lib/transactionBuilder.js +0 -351
  51. package/dist/src/lib/transactionBuilderFactory.d.ts +0 -28
  52. package/dist/src/lib/transactionBuilderFactory.d.ts.map +0 -1
  53. package/dist/src/lib/transactionBuilderFactory.js +0 -104
  54. package/dist/src/lib/transferBuilder.d.ts +0 -11
  55. package/dist/src/lib/transferBuilder.d.ts.map +0 -1
  56. package/dist/src/lib/transferBuilder.js +0 -11
  57. package/dist/src/lib/txnSchema.d.ts +0 -15
  58. package/dist/src/lib/txnSchema.d.ts.map +0 -1
  59. package/dist/src/lib/txnSchema.js +0 -117
  60. package/dist/src/lib/unnominateBuilder.d.ts +0 -24
  61. package/dist/src/lib/unnominateBuilder.d.ts.map +0 -1
  62. package/dist/src/lib/unnominateBuilder.js +0 -48
  63. package/dist/src/lib/unstakeBuilder.d.ts +0 -38
  64. package/dist/src/lib/unstakeBuilder.d.ts.map +0 -1
  65. package/dist/src/lib/unstakeBuilder.js +0 -87
  66. package/dist/src/lib/utils.d.ts +0 -261
  67. package/dist/src/lib/utils.d.ts.map +0 -1
  68. package/dist/src/lib/utils.js +0 -482
  69. package/dist/src/lib/withdrawUnstakedBuilder.d.ts +0 -38
  70. package/dist/src/lib/withdrawUnstakedBuilder.d.ts.map +0 -1
  71. package/dist/src/lib/withdrawUnstakedBuilder.js +0 -88
  72. package/dist/src/register.d.ts +0 -3
  73. package/dist/src/register.d.ts.map +0 -1
  74. package/dist/src/register.js +0 -11
  75. package/dist/src/resources/index.d.ts +0 -3
  76. package/dist/src/resources/index.d.ts.map +0 -1
  77. package/dist/src/resources/index.js +0 -19
  78. package/dist/src/resources/mainnet.d.ts +0 -2
  79. package/dist/src/resources/mainnet.d.ts.map +0 -1
  80. package/dist/src/resources/mainnet.js +0 -5
  81. package/dist/src/resources/westend.d.ts +0 -2
  82. package/dist/src/resources/westend.d.ts.map +0 -1
  83. package/dist/src/resources/westend.js +0 -5
  84. package/dist/src/tdot.d.ts +0 -12
  85. package/dist/src/tdot.d.ts.map +0 -1
  86. package/dist/src/tdot.js +0 -27
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [4.5.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/sdk-coin-dot@4.4.4...@bitgo/sdk-coin-dot@4.5.0) (2025-09-25)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **sdk-coin-dot:** handles breaking test cases ([aed9e9f](https://github.com/BitGo/BitGoJS/commit/aed9e9f99853d20ef527f1e6f44912b701715d5c))
11
+ - **sdk-coin-dot:** update tests ([2e94080](https://github.com/BitGo/BitGoJS/commit/2e94080a7fb6c8ed42e8eff48f033d6d7e4c7a40))
12
+
13
+ ### Features
14
+
15
+ - **sdk-coin-dot:** integrate the Westend AssetHub chain for tdot ([0d90a2b](https://github.com/BitGo/BitGoJS/commit/0d90a2b4d659e1690e600d46df5ca24ea23db3b7))
16
+
6
17
  ## [4.4.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/sdk-coin-dot@4.4.3...@bitgo/sdk-coin-dot@4.4.4) (2025-09-03)
7
18
 
8
19
  **Note:** Version bump only for package @bitgo/sdk-coin-dot
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo-beta/sdk-coin-dot",
3
- "version": "1.3.3-alpha.400",
3
+ "version": "1.3.3-alpha.401",
4
4
  "description": "BitGo SDK coin library for Polkadot",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
@@ -40,9 +40,9 @@
40
40
  ]
41
41
  },
42
42
  "dependencies": {
43
- "@bitgo-beta/sdk-core": "2.4.1-alpha.401",
44
- "@bitgo-beta/sdk-lib-mpc": "8.2.1-alpha.357",
45
- "@bitgo-beta/statics": "10.0.1-alpha.401",
43
+ "@bitgo-beta/sdk-core": "2.4.1-alpha.402",
44
+ "@bitgo-beta/sdk-lib-mpc": "8.2.1-alpha.358",
45
+ "@bitgo-beta/statics": "10.0.1-alpha.402",
46
46
  "@polkadot/api": "14.1.1",
47
47
  "@polkadot/api-augment": "14.1.1",
48
48
  "@polkadot/keyring": "13.3.1",
@@ -59,9 +59,9 @@
59
59
  "tweetnacl": "^1.0.3"
60
60
  },
61
61
  "devDependencies": {
62
- "@bitgo-beta/sdk-api": "1.6.1-alpha.401",
63
- "@bitgo-beta/sdk-test": "0.0.0-alpha.0",
62
+ "@bitgo-beta/sdk-api": "1.6.1-alpha.402",
63
+ "@bitgo-beta/sdk-test": "^9.1.0",
64
64
  "@types/lodash": "^4.14.151"
65
65
  },
66
- "gitHead": "28e541a84412c3351b43dad5b22ff8cbb3ab0b81"
66
+ "gitHead": "c7380a4d991afeab7fb19c4e4c654e73d6fb466b"
67
67
  }
package/dist/src/dot.d.ts DELETED
@@ -1,154 +0,0 @@
1
- import { BaseCoin, BitGoBase, Eddsa, ExplanationResult, KeyPair, MPCAlgorithm, ParsedTransaction, ParseTransactionOptions, SignedTransaction, SignTransactionOptions as BaseSignTransactionOptions, UnsignedTransaction, VerifyAddressOptions, VerifyTransactionOptions, MPCTx, MPCRecoveryOptions, MPCConsolidationRecoveryOptions, MPCSweepTxs, MPCSweepRecoveryOptions, MPCTxs, MultisigType, AuditDecryptedKeyParams } from '@bitgo-beta/sdk-core';
2
- import { BaseCoin as StaticsBaseCoin } from '@bitgo-beta/statics';
3
- import { Interface } from './lib';
4
- import '@polkadot/api-augment';
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
- /** inherited doc */
50
- getDefaultMultisigType(): MultisigType;
51
- getMPCAlgorithm(): MPCAlgorithm;
52
- allowsAccountConsolidations(): boolean;
53
- /**
54
- * Generate ed25519 key pair
55
- *
56
- * @param seed
57
- * @returns {Object} object with generated pub, prv
58
- */
59
- generateKeyPair(seed?: Buffer): KeyPair;
60
- /**
61
- * Return boolean indicating whether input is valid public key for the coin.
62
- *
63
- * @param {String} pub the pub to be checked
64
- * @returns {Boolean} is it valid?
65
- */
66
- isValidPub(pub: string): boolean;
67
- /**
68
- * Return boolean indicating whether the supplied private key is a valid dot private key
69
- *
70
- * @param {String} prv the prv to be checked
71
- * @returns {Boolean} is it valid?
72
- */
73
- isValidPrv(prv: string): boolean;
74
- /**
75
- * Return boolean indicating whether input is valid public key for the coin
76
- *
77
- * @param {String} address the pub to be checked
78
- * @returns {Boolean} is it valid?
79
- */
80
- isValidAddress(address: string): boolean;
81
- /**
82
- * Sign message with private key
83
- *
84
- * @param key
85
- * @param message
86
- * @return {Buffer} A signature over the given message using the given key
87
- */
88
- signMessage(key: KeyPair, message: string | Buffer): Promise<Buffer>;
89
- /**
90
- * Explain/parse transaction
91
- * @param unsignedTransaction
92
- */
93
- explainTransaction(unsignedTransaction: UnsignedTransaction): Promise<ExplanationResult>;
94
- verifySignTransactionParams(params: SignTransactionOptions): VerifiedTransactionParameters;
95
- /**
96
- * Assemble keychain and half-sign prebuilt transaction
97
- *
98
- * @param params
99
- * @param params.txPrebuild {TransactionPrebuild} prebuild object returned by platform
100
- * @param params.prv {String} user prv
101
- * @returns {Promise<SignedTransaction>}
102
- */
103
- signTransaction(params: SignTransactionOptions): Promise<SignedTransaction>;
104
- protected getInitializedNodeAPI(): Promise<ApiPromise>;
105
- protected getAccountInfo(walletAddr: string): Promise<{
106
- nonce: number;
107
- freeBalance: number;
108
- }>;
109
- protected getHeaderInfo(): Promise<{
110
- headerNumber: number;
111
- headerHash: string;
112
- }>;
113
- /**
114
- *
115
- * Estimate the fee of the transaction
116
- *
117
- * @param {string} destAddr destination wallet address
118
- * @param {string} srcAddr source wallet address
119
- * @param {string} amount amount to transfer
120
- * @returns {number} the estimated fee the transaction will cost
121
- *
122
- * @see https://polkadot.js.org/docs/api/cookbook/tx#how-do-i-estimate-the-transaction-fees
123
- */
124
- protected getFee(destAddr: string, srcAddr: string, amount: number): Promise<number>;
125
- protected getMaterial(): Promise<Material>;
126
- /**
127
- * Builds a funds recovery transaction without BitGo
128
- * @param {MPCRecoveryOptions} params parameters needed to construct and
129
- * (maybe) sign the transaction
130
- *
131
- * @returns {MPCTx} the serialized transaction hex string and index
132
- * of the address being swept
133
- */
134
- recover(params: MPCRecoveryOptions): Promise<MPCTx | MPCSweepTxs>;
135
- /**
136
- * Builds native DOT recoveries of receive addresses in batch without BitGo.
137
- * Funds will be recovered to base address first. You need to initiate another sweep txn after that.
138
- *
139
- * @param {MPCConsolidationRecoveryOptions} params - options for consolidation recovery.
140
- * @param {string} [params.startingScanIndex] - receive address index to start scanning from. default to 1 (inclusive).
141
- * @param {string} [params.endingScanIndex] - receive address index to end scanning at. default to startingScanIndex + 20 (exclusive).
142
- */
143
- recoverConsolidations(params: MPCConsolidationRecoveryOptions): Promise<MPCTxs | MPCSweepTxs>;
144
- /** inherited doc */
145
- createBroadcastableSweepTransaction(params: MPCSweepRecoveryOptions): Promise<MPCTxs>;
146
- parseTransaction(params: ParseTransactionOptions): Promise<ParsedTransaction>;
147
- isWalletAddress(params: VerifyAddressOptions): Promise<boolean>;
148
- verifyTransaction(params: VerifyTransactionOptions): Promise<boolean>;
149
- getAddressFromPublicKey(Pubkey: string): string;
150
- private getBuilder;
151
- /** @inheritDoc */
152
- auditDecryptedKey({ publicKey, prv, multiSigType }: AuditDecryptedKeyParams): void;
153
- }
154
- //# 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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