@bitgo/sdk-coin-iota 2.1.0 → 2.2.0
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/iota.d.ts +14 -3
- package/dist/src/iota.d.ts.map +1 -1
- package/dist/src/iota.js +43 -40
- package/dist/test/unit/iota.js +81 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
package/dist/src/iota.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuditDecryptedKeyParams, BaseCoin, BitGoBase, KeyPair, MPCAlgorithm, MPCConsolidationRecoveryOptions, MPCRecoveryOptions, MPCSweepTxs, MPCTxs, MultisigType, ParsedTransaction, PopulatedIntent, PrebuildTransactionWithIntentOptions, SignedTransaction, SignTransactionOptions, TssVerifyAddressOptions, VerifyTransactionOptions } from '@bitgo/sdk-core';
|
|
1
|
+
import { AuditDecryptedKeyParams, BaseCoin, BitGoBase, EddsaSigningMaterial, KeyPair, MPCAlgorithm, MPCConsolidationRecoveryOptions, MPCRecoveryOptions, MPCSweepTxs, MPCTxs, MultisigType, ParsedTransaction, PopulatedIntent, PrebuildTransactionWithIntentOptions, signEddsaMpcV2RecoveryTx, SignedTransaction, SignTransactionOptions, TssVerifyAddressOptions, VerifyTransactionOptions } from '@bitgo/sdk-core';
|
|
2
2
|
import { BaseCoin as StaticsBaseCoin, CoinFamily } from '@bitgo/statics';
|
|
3
3
|
import { ExplainTransactionOptions, IotaParseTransactionOptions, TransactionExplanation } from './lib/iface';
|
|
4
4
|
export interface IotaRecoveryOptions extends MPCRecoveryOptions {
|
|
@@ -101,11 +101,13 @@ export declare class Iota extends BaseCoin {
|
|
|
101
101
|
*
|
|
102
102
|
* @param {IotaRecoveryOptions} params parameters needed to construct and
|
|
103
103
|
* (maybe) sign the transaction
|
|
104
|
+
* @param {EddsaSigningMaterial} [precomputedMaterial] signing material detected once by the
|
|
105
|
+
* caller (e.g. recoverConsolidations) to avoid re-decrypting the keycard on every loop iteration
|
|
104
106
|
*
|
|
105
107
|
* @returns {MPCTx | MPCSweepTxs} array of the serialized transaction hex strings and indices
|
|
106
108
|
* of the addresses being swept
|
|
107
109
|
*/
|
|
108
|
-
recover(params: IotaRecoveryOptions): Promise<MPCTxs | MPCSweepTxs>;
|
|
110
|
+
recover(params: IotaRecoveryOptions, precomputedMaterial?: EddsaSigningMaterial): Promise<MPCTxs | MPCSweepTxs>;
|
|
109
111
|
/**
|
|
110
112
|
* Checks whether the address holds a positive balance of the specified token.
|
|
111
113
|
*/
|
|
@@ -179,7 +181,16 @@ export declare class Iota extends BaseCoin {
|
|
|
179
181
|
*/
|
|
180
182
|
private prepareGasAndObjects;
|
|
181
183
|
private recoverIotaToken;
|
|
182
|
-
|
|
184
|
+
/**
|
|
185
|
+
* Detects MPCv1 vs MPCv2 keycard format and returns typed signing material.
|
|
186
|
+
* Wrapped as a protected method so sinon can stub it in tests (matching DOT/SUI).
|
|
187
|
+
*/
|
|
188
|
+
protected getEddsaSigningMaterial(userKey: string, walletPassphrase: string): Promise<EddsaSigningMaterial>;
|
|
189
|
+
/**
|
|
190
|
+
* Runs the MPCv2 (MPS) recovery signing flow and returns the raw 64-byte Ed25519 signature.
|
|
191
|
+
* Wrapped as a protected method so sinon can stub it in tests (matching DOT/SUI).
|
|
192
|
+
*/
|
|
193
|
+
protected signIotaMpcV2Recovery(params: Parameters<typeof signEddsaMpcV2RecoveryTx>[0]): Promise<Buffer>;
|
|
183
194
|
private signRecoveryTransaction;
|
|
184
195
|
/**
|
|
185
196
|
* Fetches current reference gas price from fullnode.
|
package/dist/src/iota.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iota.d.ts","sourceRoot":"","sources":["../../src/iota.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,QAAQ,EACR,SAAS,
|
|
1
|
+
{"version":3,"file":"iota.d.ts","sourceRoot":"","sources":["../../src/iota.ts"],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