@dynamic-labs/midnight 4.91.0 → 4.91.1
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 +19 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +8 -8
- package/src/connectors/MidnightWalletConnector.cjs +29 -0
- package/src/connectors/MidnightWalletConnector.d.ts +36 -0
- package/src/connectors/MidnightWalletConnector.js +29 -0
- package/src/waas/connector/DynamicWaasMidnightConnector.cjs +15 -2
- package/src/waas/connector/DynamicWaasMidnightConnector.d.ts +32 -6
- package/src/waas/connector/DynamicWaasMidnightConnector.js +15 -2
- package/src/wallet/MidnightWallet.cjs +29 -0
- package/src/wallet/MidnightWallet.d.ts +15 -0
- package/src/wallet/MidnightWallet.js +29 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
|
|
2
|
+
### [4.91.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.91.0...v4.91.1) (2026-06-24)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **aleo:** update sendBalance with individual and marketplace logic ([#11709](https://github.com/dynamic-labs/dynamic-auth/issues/11709)) ([f8dfc48](https://github.com/dynamic-labs/dynamic-auth/commit/f8dfc488ae607fbbbcc3432a3ef69f746f0b7df0))
|
|
8
|
+
* **sdk-react-core:** surface shielded address in Midnight deposit view ([#11698](https://github.com/dynamic-labs/dynamic-auth/issues/11698)) ([79c5402](https://github.com/dynamic-labs/dynamic-auth/commit/79c54029b1d8f722cf9f1d8b4c11977898442ac0))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* display actual error message for WaaS export failures instead of generic fallback ([#11498](https://github.com/dynamic-labs/dynamic-auth/issues/11498)) ([373c931](https://github.com/dynamic-labs/dynamic-auth/commit/373c931eb96c88e484c557ee8f2934660d028f97))
|
|
14
|
+
* **wallet-book:** guard replaceKey and remove stale override ([#11682](https://github.com/dynamic-labs/dynamic-auth/issues/11682)) ([13947d9](https://github.com/dynamic-labs/dynamic-auth/commit/13947d972ed1f8227712bfc01af9cc2be616a78a))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Performance Improvements
|
|
18
|
+
|
|
19
|
+
* **e2e:** prebuild Expo web bundle for RN e2e tests ([#11674](https://github.com/dynamic-labs/dynamic-auth/issues/11674)) ([16e002d](https://github.com/dynamic-labs/dynamic-auth/commit/16e002d59b2035e3f2c116879a78418a959da8bc))
|
|
20
|
+
|
|
2
21
|
## [4.91.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.90.0...v4.91.0) (2026-06-23)
|
|
3
22
|
|
|
4
23
|
|
package/package.cjs
CHANGED
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/midnight",
|
|
3
|
-
"version": "4.91.
|
|
3
|
+
"version": "4.91.1",
|
|
4
4
|
"description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
|
|
5
5
|
"author": "Dynamic Labs, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://www.dynamic.xyz/",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dynamic-labs/assert-package-version": "4.91.
|
|
21
|
+
"@dynamic-labs/assert-package-version": "4.91.1",
|
|
22
22
|
"@dynamic-labs/sdk-api-core": "0.0.1046",
|
|
23
23
|
"@midnight-ntwrk/dapp-connector-api": "4.0.1",
|
|
24
|
-
"@dynamic-labs/logger": "4.91.
|
|
25
|
-
"@dynamic-labs/types": "4.91.
|
|
26
|
-
"@dynamic-labs/utils": "4.91.
|
|
27
|
-
"@dynamic-labs/waas": "4.91.
|
|
28
|
-
"@dynamic-labs/wallet-book": "4.91.
|
|
29
|
-
"@dynamic-labs/wallet-connector-core": "4.91.
|
|
24
|
+
"@dynamic-labs/logger": "4.91.1",
|
|
25
|
+
"@dynamic-labs/types": "4.91.1",
|
|
26
|
+
"@dynamic-labs/utils": "4.91.1",
|
|
27
|
+
"@dynamic-labs/waas": "4.91.1",
|
|
28
|
+
"@dynamic-labs/wallet-book": "4.91.1",
|
|
29
|
+
"@dynamic-labs/wallet-connector-core": "4.91.1"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {}
|
|
32
32
|
}
|
|
@@ -74,6 +74,35 @@ class MidnightWalletConnector extends walletConnectorCore.WalletConnectorBase {
|
|
|
74
74
|
throw new Error('signTransaction is not supported by this connector');
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
+
createTransferTransaction(
|
|
78
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
79
|
+
params) {
|
|
80
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
throw new Error('createTransferTransaction is not supported by this connector');
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
registerDust() {
|
|
85
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
throw new Error('registerDust is not supported by this connector');
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
revertTransaction(
|
|
90
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
91
|
+
serializedTransaction) {
|
|
92
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
throw new Error('revertTransaction is not supported by this connector');
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
revertAllPending() {
|
|
97
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
throw new Error('revertAllPending is not supported by this connector');
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
resetWalletCache() {
|
|
102
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
throw new Error('resetWalletCache is not supported by this connector');
|
|
104
|
+
});
|
|
105
|
+
}
|
|
77
106
|
getShieldedBalances() {
|
|
78
107
|
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
79
108
|
const api = yield this.getConnectedAPI();
|
|
@@ -31,6 +31,42 @@ export declare abstract class MidnightWalletConnector extends WalletConnectorBas
|
|
|
31
31
|
}>;
|
|
32
32
|
}): Promise<string>;
|
|
33
33
|
signTransaction(serializedTransaction: string): Promise<string>;
|
|
34
|
+
createTransferTransaction(params: {
|
|
35
|
+
transfers: Array<{
|
|
36
|
+
type: 'unshielded' | 'shielded';
|
|
37
|
+
recipientAddress: string;
|
|
38
|
+
amount: string;
|
|
39
|
+
tokenType?: string;
|
|
40
|
+
}>;
|
|
41
|
+
ttlMinutes?: number;
|
|
42
|
+
}): Promise<{
|
|
43
|
+
serializedTransaction: string;
|
|
44
|
+
}>;
|
|
45
|
+
registerDust(): Promise<{
|
|
46
|
+
dustBalance: string;
|
|
47
|
+
txId?: string;
|
|
48
|
+
status: 'registered' | 'already_registered' | 'already_has_dust' | 'no_utxos';
|
|
49
|
+
message: string;
|
|
50
|
+
registeredCount: number;
|
|
51
|
+
}>;
|
|
52
|
+
revertTransaction(serializedTransaction: string): Promise<{
|
|
53
|
+
reverted: boolean;
|
|
54
|
+
count: number;
|
|
55
|
+
cacheCleared: boolean;
|
|
56
|
+
message: string;
|
|
57
|
+
}>;
|
|
58
|
+
revertAllPending(): Promise<{
|
|
59
|
+
reverted: boolean;
|
|
60
|
+
count: number;
|
|
61
|
+
cacheCleared: boolean;
|
|
62
|
+
message: string;
|
|
63
|
+
}>;
|
|
64
|
+
resetWalletCache(): Promise<{
|
|
65
|
+
reverted: boolean;
|
|
66
|
+
count: number;
|
|
67
|
+
cacheCleared: boolean;
|
|
68
|
+
message: string;
|
|
69
|
+
}>;
|
|
34
70
|
getShieldedBalances(): Promise<Record<TokenType, bigint>>;
|
|
35
71
|
getUnshieldedBalances(): Promise<Record<TokenType, bigint>>;
|
|
36
72
|
getDustBalance(): Promise<{
|
|
@@ -70,6 +70,35 @@ class MidnightWalletConnector extends WalletConnectorBase {
|
|
|
70
70
|
throw new Error('signTransaction is not supported by this connector');
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
+
createTransferTransaction(
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
75
|
+
params) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
throw new Error('createTransferTransaction is not supported by this connector');
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
registerDust() {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
throw new Error('registerDust is not supported by this connector');
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
revertTransaction(
|
|
86
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
87
|
+
serializedTransaction) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
throw new Error('revertTransaction is not supported by this connector');
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
revertAllPending() {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
throw new Error('revertAllPending is not supported by this connector');
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
resetWalletCache() {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
throw new Error('resetWalletCache is not supported by this connector');
|
|
100
|
+
});
|
|
101
|
+
}
|
|
73
102
|
getShieldedBalances() {
|
|
74
103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
104
|
const api = yield this.getConnectedAPI();
|
|
@@ -18,8 +18,6 @@ var buildMidnightWaasConnectedApi = require('./buildMidnightWaasConnectedApi.cjs
|
|
|
18
18
|
/**
|
|
19
19
|
* WaaS (Wallet-as-a-Service) connector for Midnight blockchain.
|
|
20
20
|
* Extends the WaaS-specific Midnight base with MPC wallet functionality.
|
|
21
|
-
*
|
|
22
|
-
* Phase 1: Supports unshielded assets (NIGHT, MNTs) only.
|
|
23
21
|
*/
|
|
24
22
|
class DynamicWaasMidnightConnector extends waas.withDynamicWaas(WaasMidnightWalletConnector.WaasMidnightWalletConnector) {
|
|
25
23
|
constructor(props) {
|
|
@@ -441,6 +439,21 @@ class DynamicWaasMidnightConnector extends waas.withDynamicWaas(WaasMidnightWall
|
|
|
441
439
|
});
|
|
442
440
|
});
|
|
443
441
|
}
|
|
442
|
+
/**
|
|
443
|
+
* One-call transfer: runs the full build → sign (ZK prove) → submit flow and
|
|
444
|
+
* returns the broadcast tx hash. This is what backs `wallet.sendBalance` for
|
|
445
|
+
* embedded Midnight wallets; use the individual steps
|
|
446
|
+
* (`createTransferTransaction` / `signTransaction` / `submitTransaction`) when
|
|
447
|
+
* you need to inspect or persist the transaction between stages.
|
|
448
|
+
*/
|
|
449
|
+
createTransfer(params) {
|
|
450
|
+
return _tslib.__awaiter(this, void 0, void 0, function* () {
|
|
451
|
+
const { serializedTransaction } = yield this.createTransferTransaction(params);
|
|
452
|
+
const finalizedTransaction = yield this.signTransaction(serializedTransaction);
|
|
453
|
+
const { txHash } = yield this.submitTransaction(finalizedTransaction);
|
|
454
|
+
return txHash;
|
|
455
|
+
});
|
|
456
|
+
}
|
|
444
457
|
/**
|
|
445
458
|
* Step 1 of the Midnight transfer flow.
|
|
446
459
|
* Builds an unsigned UnprovenTransaction from one or more transfer specs.
|
|
@@ -67,6 +67,11 @@ declare const DynamicWaasMidnightConnector_base: (abstract new (...args: any[])
|
|
|
67
67
|
password?: string | undefined;
|
|
68
68
|
bitcoinConfig?: import("@dynamic-labs-wallet/browser-wallet-client").BitcoinConfig | undefined;
|
|
69
69
|
} | undefined): Promise<{
|
|
70
|
+
/**
|
|
71
|
+
* Requires and returns the signed session ID
|
|
72
|
+
* @returns The signed session ID
|
|
73
|
+
* @throws {DynamicError} If signed session ID is not available
|
|
74
|
+
*/
|
|
70
75
|
chainName: string;
|
|
71
76
|
accountAddress: string;
|
|
72
77
|
publicKeyHex: string;
|
|
@@ -77,6 +82,12 @@ declare const DynamicWaasMidnightConnector_base: (abstract new (...args: any[])
|
|
|
77
82
|
thresholdSignatureScheme?: string | undefined;
|
|
78
83
|
publicAddressCheck?: string | undefined;
|
|
79
84
|
addressType?: string | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Validates that the expected wallet address matches the active wallet
|
|
87
|
+
* Updates the active account address if it doesn't match
|
|
88
|
+
* @param expectedAddress - The expected wallet address to validate
|
|
89
|
+
* @throws {DynamicError} If signed session ID is not available or account is not found
|
|
90
|
+
*/
|
|
80
91
|
legacyWalletId?: string | undefined;
|
|
81
92
|
password?: string | undefined;
|
|
82
93
|
}): Promise<void>;
|
|
@@ -124,15 +135,15 @@ declare const DynamicWaasMidnightConnector_base: (abstract new (...args: any[])
|
|
|
124
135
|
password?: string | undefined;
|
|
125
136
|
}): Promise<void>;
|
|
126
137
|
updatePassword({ accountAddress, existingPassword, newPassword, }: {
|
|
127
|
-
accountAddress: string;
|
|
138
|
+
accountAddress: string; /**
|
|
139
|
+
* Connects to the WaaS wallet client
|
|
140
|
+
*/
|
|
128
141
|
existingPassword?: string | undefined;
|
|
129
142
|
newPassword: string;
|
|
130
143
|
}): Promise<void>;
|
|
131
144
|
setPassword({ accountAddress, newPassword, }: {
|
|
132
145
|
accountAddress: string;
|
|
133
|
-
newPassword: string;
|
|
134
|
-
* Disconnects from the wallet (no-op for WaaS)
|
|
135
|
-
*/
|
|
146
|
+
newPassword: string;
|
|
136
147
|
}): Promise<void>;
|
|
137
148
|
signRawMessage({ accountAddress, message, password, }: {
|
|
138
149
|
accountAddress: string;
|
|
@@ -180,8 +191,6 @@ declare const DynamicWaasMidnightConnector_base: (abstract new (...args: any[])
|
|
|
180
191
|
/**
|
|
181
192
|
* WaaS (Wallet-as-a-Service) connector for Midnight blockchain.
|
|
182
193
|
* Extends the WaaS-specific Midnight base with MPC wallet functionality.
|
|
183
|
-
*
|
|
184
|
-
* Phase 1: Supports unshielded assets (NIGHT, MNTs) only.
|
|
185
194
|
*/
|
|
186
195
|
export declare class DynamicWaasMidnightConnector extends DynamicWaasMidnightConnector_base implements IDynamicWaasConnector {
|
|
187
196
|
ChainWallet: typeof MidnightWallet;
|
|
@@ -373,6 +382,23 @@ export declare class DynamicWaasMidnightConnector extends DynamicWaasMidnightCon
|
|
|
373
382
|
message: string;
|
|
374
383
|
registeredCount: number;
|
|
375
384
|
}>;
|
|
385
|
+
/**
|
|
386
|
+
* One-call transfer: runs the full build → sign (ZK prove) → submit flow and
|
|
387
|
+
* returns the broadcast tx hash. This is what backs `wallet.sendBalance` for
|
|
388
|
+
* embedded Midnight wallets; use the individual steps
|
|
389
|
+
* (`createTransferTransaction` / `signTransaction` / `submitTransaction`) when
|
|
390
|
+
* you need to inspect or persist the transaction between stages.
|
|
391
|
+
*/
|
|
392
|
+
createTransfer(params: {
|
|
393
|
+
transfers: Array<{
|
|
394
|
+
type: 'unshielded' | 'shielded';
|
|
395
|
+
recipientAddress: string;
|
|
396
|
+
amount: string;
|
|
397
|
+
tokenType?: string;
|
|
398
|
+
}>;
|
|
399
|
+
/** Optional TTL in minutes. Defaults to 5. */
|
|
400
|
+
ttlMinutes?: number;
|
|
401
|
+
}): Promise<string>;
|
|
376
402
|
/**
|
|
377
403
|
* Step 1 of the Midnight transfer flow.
|
|
378
404
|
* Builds an unsigned UnprovenTransaction from one or more transfer specs.
|
|
@@ -14,8 +14,6 @@ import { buildMidnightWaasConnectedApi, normalizeDustBalance, toBigIntBalanceMap
|
|
|
14
14
|
/**
|
|
15
15
|
* WaaS (Wallet-as-a-Service) connector for Midnight blockchain.
|
|
16
16
|
* Extends the WaaS-specific Midnight base with MPC wallet functionality.
|
|
17
|
-
*
|
|
18
|
-
* Phase 1: Supports unshielded assets (NIGHT, MNTs) only.
|
|
19
17
|
*/
|
|
20
18
|
class DynamicWaasMidnightConnector extends withDynamicWaas(WaasMidnightWalletConnector) {
|
|
21
19
|
constructor(props) {
|
|
@@ -437,6 +435,21 @@ class DynamicWaasMidnightConnector extends withDynamicWaas(WaasMidnightWalletCon
|
|
|
437
435
|
});
|
|
438
436
|
});
|
|
439
437
|
}
|
|
438
|
+
/**
|
|
439
|
+
* One-call transfer: runs the full build → sign (ZK prove) → submit flow and
|
|
440
|
+
* returns the broadcast tx hash. This is what backs `wallet.sendBalance` for
|
|
441
|
+
* embedded Midnight wallets; use the individual steps
|
|
442
|
+
* (`createTransferTransaction` / `signTransaction` / `submitTransaction`) when
|
|
443
|
+
* you need to inspect or persist the transaction between stages.
|
|
444
|
+
*/
|
|
445
|
+
createTransfer(params) {
|
|
446
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
447
|
+
const { serializedTransaction } = yield this.createTransferTransaction(params);
|
|
448
|
+
const finalizedTransaction = yield this.signTransaction(serializedTransaction);
|
|
449
|
+
const { txHash } = yield this.submitTransaction(finalizedTransaction);
|
|
450
|
+
return txHash;
|
|
451
|
+
});
|
|
452
|
+
}
|
|
440
453
|
/**
|
|
441
454
|
* Step 1 of the Midnight transfer flow.
|
|
442
455
|
* Builds an unsigned UnprovenTransaction from one or more transfer specs.
|
|
@@ -87,6 +87,35 @@ class MidnightWallet extends walletConnectorCore.Wallet {
|
|
|
87
87
|
};
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
+
// Exclusive for embedded Midnight wallets
|
|
91
|
+
/** Builds an unsigned transaction from one or more transfer specs (step 1). */
|
|
92
|
+
createTransferTransaction(...args) {
|
|
93
|
+
return this._connector.createTransferTransaction(...args);
|
|
94
|
+
}
|
|
95
|
+
/** Signs and ZK-proves an unsigned transaction via MPC (step 2). */
|
|
96
|
+
signTransaction(...args) {
|
|
97
|
+
return this._connector.signTransaction(...args);
|
|
98
|
+
}
|
|
99
|
+
/** Broadcasts a finalized transaction (step 3). */
|
|
100
|
+
submitTransaction(...args) {
|
|
101
|
+
return this._connector.submitTransaction(...args);
|
|
102
|
+
}
|
|
103
|
+
/** Registers the wallet's NIGHT for DUST generation. */
|
|
104
|
+
registerDust(...args) {
|
|
105
|
+
return this._connector.registerDust(...args);
|
|
106
|
+
}
|
|
107
|
+
/** Releases the reserved inputs of a specific built/signed transaction. */
|
|
108
|
+
revertTransaction(...args) {
|
|
109
|
+
return this._connector.revertTransaction(...args);
|
|
110
|
+
}
|
|
111
|
+
/** Releases every finalized-but-unsubmitted transaction's reserved inputs. */
|
|
112
|
+
revertAllPending(...args) {
|
|
113
|
+
return this._connector.revertAllPending(...args);
|
|
114
|
+
}
|
|
115
|
+
/** Clears the wallet's persisted state and forces a cold re-sync. */
|
|
116
|
+
resetWalletCache(...args) {
|
|
117
|
+
return this._connector.resetWalletCache(...args);
|
|
118
|
+
}
|
|
90
119
|
}
|
|
91
120
|
|
|
92
121
|
exports.MidnightWallet = MidnightWallet;
|
|
@@ -20,6 +20,7 @@ export declare class MidnightWallet extends Wallet<MidnightWalletConnector> {
|
|
|
20
20
|
cap: bigint;
|
|
21
21
|
balance: bigint;
|
|
22
22
|
};
|
|
23
|
+
dustSyncing?: boolean;
|
|
23
24
|
}>;
|
|
24
25
|
getShieldedBalance(): Promise<string | undefined>;
|
|
25
26
|
getUnshieldedBalance(): Promise<string | undefined>;
|
|
@@ -28,4 +29,18 @@ export declare class MidnightWallet extends Wallet<MidnightWalletConnector> {
|
|
|
28
29
|
cap: string;
|
|
29
30
|
}>;
|
|
30
31
|
getFormattedBalances(): Promise<MidnightFormattedBalances>;
|
|
32
|
+
/** Builds an unsigned transaction from one or more transfer specs (step 1). */
|
|
33
|
+
createTransferTransaction(...args: Parameters<MidnightWalletConnector['createTransferTransaction']>): ReturnType<MidnightWalletConnector['createTransferTransaction']>;
|
|
34
|
+
/** Signs and ZK-proves an unsigned transaction via MPC (step 2). */
|
|
35
|
+
signTransaction(...args: Parameters<MidnightWalletConnector['signTransaction']>): ReturnType<MidnightWalletConnector['signTransaction']>;
|
|
36
|
+
/** Broadcasts a finalized transaction (step 3). */
|
|
37
|
+
submitTransaction(...args: Parameters<MidnightWalletConnector['submitTransaction']>): ReturnType<MidnightWalletConnector['submitTransaction']>;
|
|
38
|
+
/** Registers the wallet's NIGHT for DUST generation. */
|
|
39
|
+
registerDust(...args: Parameters<MidnightWalletConnector['registerDust']>): ReturnType<MidnightWalletConnector['registerDust']>;
|
|
40
|
+
/** Releases the reserved inputs of a specific built/signed transaction. */
|
|
41
|
+
revertTransaction(...args: Parameters<MidnightWalletConnector['revertTransaction']>): ReturnType<MidnightWalletConnector['revertTransaction']>;
|
|
42
|
+
/** Releases every finalized-but-unsubmitted transaction's reserved inputs. */
|
|
43
|
+
revertAllPending(...args: Parameters<MidnightWalletConnector['revertAllPending']>): ReturnType<MidnightWalletConnector['revertAllPending']>;
|
|
44
|
+
/** Clears the wallet's persisted state and forces a cold re-sync. */
|
|
45
|
+
resetWalletCache(...args: Parameters<MidnightWalletConnector['resetWalletCache']>): ReturnType<MidnightWalletConnector['resetWalletCache']>;
|
|
31
46
|
}
|
|
@@ -83,6 +83,35 @@ class MidnightWallet extends Wallet {
|
|
|
83
83
|
};
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
+
// Exclusive for embedded Midnight wallets
|
|
87
|
+
/** Builds an unsigned transaction from one or more transfer specs (step 1). */
|
|
88
|
+
createTransferTransaction(...args) {
|
|
89
|
+
return this._connector.createTransferTransaction(...args);
|
|
90
|
+
}
|
|
91
|
+
/** Signs and ZK-proves an unsigned transaction via MPC (step 2). */
|
|
92
|
+
signTransaction(...args) {
|
|
93
|
+
return this._connector.signTransaction(...args);
|
|
94
|
+
}
|
|
95
|
+
/** Broadcasts a finalized transaction (step 3). */
|
|
96
|
+
submitTransaction(...args) {
|
|
97
|
+
return this._connector.submitTransaction(...args);
|
|
98
|
+
}
|
|
99
|
+
/** Registers the wallet's NIGHT for DUST generation. */
|
|
100
|
+
registerDust(...args) {
|
|
101
|
+
return this._connector.registerDust(...args);
|
|
102
|
+
}
|
|
103
|
+
/** Releases the reserved inputs of a specific built/signed transaction. */
|
|
104
|
+
revertTransaction(...args) {
|
|
105
|
+
return this._connector.revertTransaction(...args);
|
|
106
|
+
}
|
|
107
|
+
/** Releases every finalized-but-unsubmitted transaction's reserved inputs. */
|
|
108
|
+
revertAllPending(...args) {
|
|
109
|
+
return this._connector.revertAllPending(...args);
|
|
110
|
+
}
|
|
111
|
+
/** Clears the wallet's persisted state and forces a cold re-sync. */
|
|
112
|
+
resetWalletCache(...args) {
|
|
113
|
+
return this._connector.resetWalletCache(...args);
|
|
114
|
+
}
|
|
86
115
|
}
|
|
87
116
|
|
|
88
117
|
export { MidnightWallet };
|