@miden-sdk/miden-wallet-adapter-base 0.16.2 → 0.16.3
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/adapter.js.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/helpers.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/signer.js.map +1 -1
- package/dist/transaction.js.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +9 -3
- package/__tests__/adapter.test.ts +0 -82
- package/__tests__/errors.test.ts +0 -100
- package/__tests__/helpers.test.ts +0 -39
- package/__tests__/signer.test.ts +0 -20
- package/__tests__/transaction.test.ts +0 -166
- package/adapter.ts +0 -146
- package/dist/__tests__/adapter.test.d.ts +0 -1
- package/dist/__tests__/adapter.test.js +0 -66
- package/dist/__tests__/adapter.test.js.map +0 -1
- package/dist/__tests__/errors.test.d.ts +0 -1
- package/dist/__tests__/errors.test.js +0 -70
- package/dist/__tests__/errors.test.js.map +0 -1
- package/dist/__tests__/helpers.test.d.ts +0 -1
- package/dist/__tests__/helpers.test.js +0 -35
- package/dist/__tests__/helpers.test.js.map +0 -1
- package/dist/__tests__/signer.test.d.ts +0 -1
- package/dist/__tests__/signer.test.js +0 -18
- package/dist/__tests__/signer.test.js.map +0 -1
- package/dist/__tests__/transaction.test.d.ts +0 -1
- package/dist/__tests__/transaction.test.js +0 -113
- package/dist/__tests__/transaction.test.js.map +0 -1
- package/dist/vitest.config.d.ts +0 -2
- package/dist/vitest.config.js +0 -8
- package/dist/vitest.config.js.map +0 -1
- package/docs/@miden-sdk/namespaces/EventEmitter/README.md +0 -24
- package/docs/@miden-sdk/namespaces/EventEmitter/interfaces/EventEmitterStatic.md +0 -17
- package/docs/@miden-sdk/namespaces/EventEmitter/interfaces/ListenerFn.md +0 -25
- package/docs/@miden-sdk/namespaces/EventEmitter/type-aliases/ArgumentMap.md +0 -15
- package/docs/@miden-sdk/namespaces/EventEmitter/type-aliases/EventArgs.md +0 -19
- package/docs/@miden-sdk/namespaces/EventEmitter/type-aliases/EventListener.md +0 -19
- package/docs/@miden-sdk/namespaces/EventEmitter/type-aliases/EventNames.md +0 -15
- package/docs/@miden-sdk/namespaces/EventEmitter/type-aliases/ValidEventTypes.md +0 -17
- package/docs/@miden-sdk/namespaces/EventEmitter/variables/EventEmitter.md +0 -9
- package/docs/README.md +0 -88
- package/docs/classes/BaseMessageSignerWalletAdapter.md +0 -755
- package/docs/classes/BaseSignerWalletAdapter.md +0 -579
- package/docs/classes/BaseWalletAdapter.md +0 -535
- package/docs/classes/ConsumeTransaction.md +0 -93
- package/docs/classes/CustomTransaction.md +0 -93
- package/docs/classes/EventEmitter.md +0 -305
- package/docs/classes/SendTransaction.md +0 -107
- package/docs/classes/Transaction.md +0 -151
- package/docs/classes/WalletAccountError.md +0 -223
- package/docs/classes/WalletAddressError.md +0 -223
- package/docs/classes/WalletConfigError.md +0 -223
- package/docs/classes/WalletConnectionError.md +0 -223
- package/docs/classes/WalletDecryptionError.md +0 -223
- package/docs/classes/WalletDecryptionNotAllowedError.md +0 -223
- package/docs/classes/WalletDisconnectedError.md +0 -223
- package/docs/classes/WalletDisconnectionError.md +0 -223
- package/docs/classes/WalletError.md +0 -244
- package/docs/classes/WalletKeypairError.md +0 -223
- package/docs/classes/WalletLoadError.md +0 -223
- package/docs/classes/WalletNotConnectedError.md +0 -223
- package/docs/classes/WalletNotReadyError.md +0 -223
- package/docs/classes/WalletNotSelectedError.md +0 -223
- package/docs/classes/WalletPrivateDataPermissionError.md +0 -223
- package/docs/classes/WalletRecordsError.md +0 -223
- package/docs/classes/WalletSendTransactionError.md +0 -223
- package/docs/classes/WalletSignMessageError.md +0 -223
- package/docs/classes/WalletSignTransactionError.md +0 -223
- package/docs/classes/WalletTimeoutError.md +0 -223
- package/docs/classes/WalletTransactionError.md +0 -223
- package/docs/classes/WalletWindowBlockedError.md +0 -223
- package/docs/classes/WalletWindowClosedError.md +0 -223
- package/docs/enumerations/AllowedPrivateData.md +0 -37
- package/docs/enumerations/PrivateDataPermission.md +0 -19
- package/docs/enumerations/TransactionType.md +0 -25
- package/docs/enumerations/WalletAdapterNetwork.md +0 -19
- package/docs/enumerations/WalletReadyState.md +0 -49
- package/docs/functions/b64ToU8.md +0 -19
- package/docs/functions/scopePollingDetectionStrategy.md +0 -19
- package/docs/functions/u8ToB64.md +0 -19
- package/docs/interfaces/Asset.md +0 -19
- package/docs/interfaces/IFailedTransactionOutput.md +0 -13
- package/docs/interfaces/MessageSignerWalletAdapterProps.md +0 -293
- package/docs/interfaces/MidenConsumeTransaction.md +0 -37
- package/docs/interfaces/MidenCustomTransaction.md +0 -37
- package/docs/interfaces/MidenSendTransaction.md +0 -43
- package/docs/interfaces/MidenTransaction.md +0 -19
- package/docs/interfaces/SignerWalletAdapterProps.md +0 -149
- package/docs/interfaces/TransactionOutput.md +0 -19
- package/docs/interfaces/WalletAdapterEvents.md +0 -69
- package/docs/interfaces/WalletAdapterProps.md +0 -106
- package/docs/interfaces/WalletTransactionSuccessOutput.md +0 -19
- package/docs/type-aliases/Adapter.md +0 -9
- package/docs/type-aliases/FungibleAssetDetails.md +0 -21
- package/docs/type-aliases/InputNoteDetails.md +0 -45
- package/docs/type-aliases/MessageSignerWalletAdapter.md +0 -15
- package/docs/type-aliases/NoteTypeString.md +0 -9
- package/docs/type-aliases/SignKind.md +0 -9
- package/docs/type-aliases/SignerWalletAdapter.md +0 -15
- package/docs/type-aliases/SupportedTransactionVersions.md +0 -9
- package/docs/type-aliases/TransactionOrVersionedTransaction.md +0 -15
- package/docs/type-aliases/TransactionPayload.md +0 -9
- package/docs/type-aliases/WalletAdapter.md +0 -15
- package/docs/type-aliases/WalletName.md +0 -21
- package/docs/type-aliases/WalletTransactionOutput.md +0 -9
- package/errors.ts +0 -97
- package/helpers.ts +0 -28
- package/index.ts +0 -6
- package/signer.ts +0 -84
- package/transaction.ts +0 -178
- package/tsconfig.json +0 -15
- package/types.ts +0 -93
- package/vitest.config.ts +0 -8
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
[**@miden-sdk/miden-wallet-adapter-base**](../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[@miden-sdk/miden-wallet-adapter-base](../README.md) / EventEmitter
|
|
6
|
-
|
|
7
|
-
# Class: EventEmitter\<EventTypes, Context\>
|
|
8
|
-
|
|
9
|
-
Minimal `EventEmitter` interface that is molded against the Node.js
|
|
10
|
-
`EventEmitter` interface.
|
|
11
|
-
|
|
12
|
-
## Extended by
|
|
13
|
-
|
|
14
|
-
- [`BaseWalletAdapter`](BaseWalletAdapter.md)
|
|
15
|
-
|
|
16
|
-
## Type Parameters
|
|
17
|
-
|
|
18
|
-
### EventTypes
|
|
19
|
-
|
|
20
|
-
`EventTypes` *extends* [`ValidEventTypes`](../@miden-sdk/namespaces/EventEmitter/type-aliases/ValidEventTypes.md) = `string` \| `symbol`
|
|
21
|
-
|
|
22
|
-
### Context
|
|
23
|
-
|
|
24
|
-
`Context` *extends* `any` = `any`
|
|
25
|
-
|
|
26
|
-
## Constructors
|
|
27
|
-
|
|
28
|
-
### Constructor
|
|
29
|
-
|
|
30
|
-
> **new EventEmitter**\<`EventTypes`, `Context`\>(): `EventEmitter`\<`EventTypes`, `Context`\>
|
|
31
|
-
|
|
32
|
-
#### Returns
|
|
33
|
-
|
|
34
|
-
`EventEmitter`\<`EventTypes`, `Context`\>
|
|
35
|
-
|
|
36
|
-
## Properties
|
|
37
|
-
|
|
38
|
-
### prefixed
|
|
39
|
-
|
|
40
|
-
> `static` **prefixed**: `string` \| `boolean`
|
|
41
|
-
|
|
42
|
-
## Methods
|
|
43
|
-
|
|
44
|
-
### addListener()
|
|
45
|
-
|
|
46
|
-
> **addListener**\<`T`\>(`event`, `fn`, `context?`): `this`
|
|
47
|
-
|
|
48
|
-
#### Type Parameters
|
|
49
|
-
|
|
50
|
-
##### T
|
|
51
|
-
|
|
52
|
-
`T` *extends* `string` \| `symbol`
|
|
53
|
-
|
|
54
|
-
#### Parameters
|
|
55
|
-
|
|
56
|
-
##### event
|
|
57
|
-
|
|
58
|
-
`T`
|
|
59
|
-
|
|
60
|
-
##### fn
|
|
61
|
-
|
|
62
|
-
[`EventListener`](../@miden-sdk/namespaces/EventEmitter/type-aliases/EventListener.md)\<`EventTypes`, `T`\>
|
|
63
|
-
|
|
64
|
-
##### context?
|
|
65
|
-
|
|
66
|
-
`Context`
|
|
67
|
-
|
|
68
|
-
#### Returns
|
|
69
|
-
|
|
70
|
-
`this`
|
|
71
|
-
|
|
72
|
-
***
|
|
73
|
-
|
|
74
|
-
### emit()
|
|
75
|
-
|
|
76
|
-
> **emit**\<`T`\>(`event`, ...`args`): `boolean`
|
|
77
|
-
|
|
78
|
-
Calls each of the listeners registered for a given event.
|
|
79
|
-
|
|
80
|
-
#### Type Parameters
|
|
81
|
-
|
|
82
|
-
##### T
|
|
83
|
-
|
|
84
|
-
`T` *extends* `string` \| `symbol`
|
|
85
|
-
|
|
86
|
-
#### Parameters
|
|
87
|
-
|
|
88
|
-
##### event
|
|
89
|
-
|
|
90
|
-
`T`
|
|
91
|
-
|
|
92
|
-
##### args
|
|
93
|
-
|
|
94
|
-
...`Parameters`\<[`EventListener`](../@miden-sdk/namespaces/EventEmitter/type-aliases/EventListener.md)\<`EventTypes`, `T`\>\>
|
|
95
|
-
|
|
96
|
-
#### Returns
|
|
97
|
-
|
|
98
|
-
`boolean`
|
|
99
|
-
|
|
100
|
-
***
|
|
101
|
-
|
|
102
|
-
### eventNames()
|
|
103
|
-
|
|
104
|
-
> **eventNames**(): [`EventNames`](../@miden-sdk/namespaces/EventEmitter/type-aliases/EventNames.md)\<`EventTypes`\>[]
|
|
105
|
-
|
|
106
|
-
Return an array listing the events for which the emitter has registered
|
|
107
|
-
listeners.
|
|
108
|
-
|
|
109
|
-
#### Returns
|
|
110
|
-
|
|
111
|
-
[`EventNames`](../@miden-sdk/namespaces/EventEmitter/type-aliases/EventNames.md)\<`EventTypes`\>[]
|
|
112
|
-
|
|
113
|
-
***
|
|
114
|
-
|
|
115
|
-
### listenerCount()
|
|
116
|
-
|
|
117
|
-
> **listenerCount**(`event`): `number`
|
|
118
|
-
|
|
119
|
-
Return the number of listeners listening to a given event.
|
|
120
|
-
|
|
121
|
-
#### Parameters
|
|
122
|
-
|
|
123
|
-
##### event
|
|
124
|
-
|
|
125
|
-
[`EventNames`](../@miden-sdk/namespaces/EventEmitter/type-aliases/EventNames.md)\<`EventTypes`\>
|
|
126
|
-
|
|
127
|
-
#### Returns
|
|
128
|
-
|
|
129
|
-
`number`
|
|
130
|
-
|
|
131
|
-
***
|
|
132
|
-
|
|
133
|
-
### listeners()
|
|
134
|
-
|
|
135
|
-
> **listeners**\<`T`\>(`event`): [`EventListener`](../@miden-sdk/namespaces/EventEmitter/type-aliases/EventListener.md)\<`EventTypes`, `T`\>[]
|
|
136
|
-
|
|
137
|
-
Return the listeners registered for a given event.
|
|
138
|
-
|
|
139
|
-
#### Type Parameters
|
|
140
|
-
|
|
141
|
-
##### T
|
|
142
|
-
|
|
143
|
-
`T` *extends* `string` \| `symbol`
|
|
144
|
-
|
|
145
|
-
#### Parameters
|
|
146
|
-
|
|
147
|
-
##### event
|
|
148
|
-
|
|
149
|
-
`T`
|
|
150
|
-
|
|
151
|
-
#### Returns
|
|
152
|
-
|
|
153
|
-
[`EventListener`](../@miden-sdk/namespaces/EventEmitter/type-aliases/EventListener.md)\<`EventTypes`, `T`\>[]
|
|
154
|
-
|
|
155
|
-
***
|
|
156
|
-
|
|
157
|
-
### off()
|
|
158
|
-
|
|
159
|
-
> **off**\<`T`\>(`event`, `fn?`, `context?`, `once?`): `this`
|
|
160
|
-
|
|
161
|
-
#### Type Parameters
|
|
162
|
-
|
|
163
|
-
##### T
|
|
164
|
-
|
|
165
|
-
`T` *extends* `string` \| `symbol`
|
|
166
|
-
|
|
167
|
-
#### Parameters
|
|
168
|
-
|
|
169
|
-
##### event
|
|
170
|
-
|
|
171
|
-
`T`
|
|
172
|
-
|
|
173
|
-
##### fn?
|
|
174
|
-
|
|
175
|
-
[`EventListener`](../@miden-sdk/namespaces/EventEmitter/type-aliases/EventListener.md)\<`EventTypes`, `T`\>
|
|
176
|
-
|
|
177
|
-
##### context?
|
|
178
|
-
|
|
179
|
-
`Context`
|
|
180
|
-
|
|
181
|
-
##### once?
|
|
182
|
-
|
|
183
|
-
`boolean`
|
|
184
|
-
|
|
185
|
-
#### Returns
|
|
186
|
-
|
|
187
|
-
`this`
|
|
188
|
-
|
|
189
|
-
***
|
|
190
|
-
|
|
191
|
-
### on()
|
|
192
|
-
|
|
193
|
-
> **on**\<`T`\>(`event`, `fn`, `context?`): `this`
|
|
194
|
-
|
|
195
|
-
Add a listener for a given event.
|
|
196
|
-
|
|
197
|
-
#### Type Parameters
|
|
198
|
-
|
|
199
|
-
##### T
|
|
200
|
-
|
|
201
|
-
`T` *extends* `string` \| `symbol`
|
|
202
|
-
|
|
203
|
-
#### Parameters
|
|
204
|
-
|
|
205
|
-
##### event
|
|
206
|
-
|
|
207
|
-
`T`
|
|
208
|
-
|
|
209
|
-
##### fn
|
|
210
|
-
|
|
211
|
-
[`EventListener`](../@miden-sdk/namespaces/EventEmitter/type-aliases/EventListener.md)\<`EventTypes`, `T`\>
|
|
212
|
-
|
|
213
|
-
##### context?
|
|
214
|
-
|
|
215
|
-
`Context`
|
|
216
|
-
|
|
217
|
-
#### Returns
|
|
218
|
-
|
|
219
|
-
`this`
|
|
220
|
-
|
|
221
|
-
***
|
|
222
|
-
|
|
223
|
-
### once()
|
|
224
|
-
|
|
225
|
-
> **once**\<`T`\>(`event`, `fn`, `context?`): `this`
|
|
226
|
-
|
|
227
|
-
Add a one-time listener for a given event.
|
|
228
|
-
|
|
229
|
-
#### Type Parameters
|
|
230
|
-
|
|
231
|
-
##### T
|
|
232
|
-
|
|
233
|
-
`T` *extends* `string` \| `symbol`
|
|
234
|
-
|
|
235
|
-
#### Parameters
|
|
236
|
-
|
|
237
|
-
##### event
|
|
238
|
-
|
|
239
|
-
`T`
|
|
240
|
-
|
|
241
|
-
##### fn
|
|
242
|
-
|
|
243
|
-
[`EventListener`](../@miden-sdk/namespaces/EventEmitter/type-aliases/EventListener.md)\<`EventTypes`, `T`\>
|
|
244
|
-
|
|
245
|
-
##### context?
|
|
246
|
-
|
|
247
|
-
`Context`
|
|
248
|
-
|
|
249
|
-
#### Returns
|
|
250
|
-
|
|
251
|
-
`this`
|
|
252
|
-
|
|
253
|
-
***
|
|
254
|
-
|
|
255
|
-
### removeAllListeners()
|
|
256
|
-
|
|
257
|
-
> **removeAllListeners**(`event?`): `this`
|
|
258
|
-
|
|
259
|
-
Remove all listeners, or those of the specified event.
|
|
260
|
-
|
|
261
|
-
#### Parameters
|
|
262
|
-
|
|
263
|
-
##### event?
|
|
264
|
-
|
|
265
|
-
[`EventNames`](../@miden-sdk/namespaces/EventEmitter/type-aliases/EventNames.md)\<`EventTypes`\>
|
|
266
|
-
|
|
267
|
-
#### Returns
|
|
268
|
-
|
|
269
|
-
`this`
|
|
270
|
-
|
|
271
|
-
***
|
|
272
|
-
|
|
273
|
-
### removeListener()
|
|
274
|
-
|
|
275
|
-
> **removeListener**\<`T`\>(`event`, `fn?`, `context?`, `once?`): `this`
|
|
276
|
-
|
|
277
|
-
Remove the listeners of a given event.
|
|
278
|
-
|
|
279
|
-
#### Type Parameters
|
|
280
|
-
|
|
281
|
-
##### T
|
|
282
|
-
|
|
283
|
-
`T` *extends* `string` \| `symbol`
|
|
284
|
-
|
|
285
|
-
#### Parameters
|
|
286
|
-
|
|
287
|
-
##### event
|
|
288
|
-
|
|
289
|
-
`T`
|
|
290
|
-
|
|
291
|
-
##### fn?
|
|
292
|
-
|
|
293
|
-
[`EventListener`](../@miden-sdk/namespaces/EventEmitter/type-aliases/EventListener.md)\<`EventTypes`, `T`\>
|
|
294
|
-
|
|
295
|
-
##### context?
|
|
296
|
-
|
|
297
|
-
`Context`
|
|
298
|
-
|
|
299
|
-
##### once?
|
|
300
|
-
|
|
301
|
-
`boolean`
|
|
302
|
-
|
|
303
|
-
#### Returns
|
|
304
|
-
|
|
305
|
-
`this`
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
[**@miden-sdk/miden-wallet-adapter-base**](../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[@miden-sdk/miden-wallet-adapter-base](../README.md) / SendTransaction
|
|
6
|
-
|
|
7
|
-
# Class: SendTransaction
|
|
8
|
-
|
|
9
|
-
## Implements
|
|
10
|
-
|
|
11
|
-
- [`MidenSendTransaction`](../interfaces/MidenSendTransaction.md)
|
|
12
|
-
|
|
13
|
-
## Constructors
|
|
14
|
-
|
|
15
|
-
### Constructor
|
|
16
|
-
|
|
17
|
-
> **new SendTransaction**(`sender`, `recipient`, `faucetId`, `noteType`, `amount`, `recallBlocks?`): `SendTransaction`
|
|
18
|
-
|
|
19
|
-
#### Parameters
|
|
20
|
-
|
|
21
|
-
##### sender
|
|
22
|
-
|
|
23
|
-
`string`
|
|
24
|
-
|
|
25
|
-
##### recipient
|
|
26
|
-
|
|
27
|
-
`string`
|
|
28
|
-
|
|
29
|
-
##### faucetId
|
|
30
|
-
|
|
31
|
-
`string`
|
|
32
|
-
|
|
33
|
-
##### noteType
|
|
34
|
-
|
|
35
|
-
[`NoteTypeString`](../type-aliases/NoteTypeString.md)
|
|
36
|
-
|
|
37
|
-
##### amount
|
|
38
|
-
|
|
39
|
-
`number`
|
|
40
|
-
|
|
41
|
-
##### recallBlocks?
|
|
42
|
-
|
|
43
|
-
`number`
|
|
44
|
-
|
|
45
|
-
#### Returns
|
|
46
|
-
|
|
47
|
-
`SendTransaction`
|
|
48
|
-
|
|
49
|
-
## Properties
|
|
50
|
-
|
|
51
|
-
### amount
|
|
52
|
-
|
|
53
|
-
> **amount**: `number`
|
|
54
|
-
|
|
55
|
-
#### Implementation of
|
|
56
|
-
|
|
57
|
-
[`MidenSendTransaction`](../interfaces/MidenSendTransaction.md).[`amount`](../interfaces/MidenSendTransaction.md#amount)
|
|
58
|
-
|
|
59
|
-
***
|
|
60
|
-
|
|
61
|
-
### faucetId
|
|
62
|
-
|
|
63
|
-
> **faucetId**: `string`
|
|
64
|
-
|
|
65
|
-
#### Implementation of
|
|
66
|
-
|
|
67
|
-
[`MidenSendTransaction`](../interfaces/MidenSendTransaction.md).[`faucetId`](../interfaces/MidenSendTransaction.md#faucetid)
|
|
68
|
-
|
|
69
|
-
***
|
|
70
|
-
|
|
71
|
-
### noteType
|
|
72
|
-
|
|
73
|
-
> **noteType**: [`NoteTypeString`](../type-aliases/NoteTypeString.md)
|
|
74
|
-
|
|
75
|
-
#### Implementation of
|
|
76
|
-
|
|
77
|
-
[`MidenSendTransaction`](../interfaces/MidenSendTransaction.md).[`noteType`](../interfaces/MidenSendTransaction.md#notetype)
|
|
78
|
-
|
|
79
|
-
***
|
|
80
|
-
|
|
81
|
-
### recallBlocks?
|
|
82
|
-
|
|
83
|
-
> `optional` **recallBlocks**: `number`
|
|
84
|
-
|
|
85
|
-
#### Implementation of
|
|
86
|
-
|
|
87
|
-
[`MidenSendTransaction`](../interfaces/MidenSendTransaction.md).[`recallBlocks`](../interfaces/MidenSendTransaction.md#recallblocks)
|
|
88
|
-
|
|
89
|
-
***
|
|
90
|
-
|
|
91
|
-
### recipientAddress
|
|
92
|
-
|
|
93
|
-
> **recipientAddress**: `string`
|
|
94
|
-
|
|
95
|
-
#### Implementation of
|
|
96
|
-
|
|
97
|
-
[`MidenSendTransaction`](../interfaces/MidenSendTransaction.md).[`recipientAddress`](../interfaces/MidenSendTransaction.md#recipientaddress)
|
|
98
|
-
|
|
99
|
-
***
|
|
100
|
-
|
|
101
|
-
### senderAddress
|
|
102
|
-
|
|
103
|
-
> **senderAddress**: `string`
|
|
104
|
-
|
|
105
|
-
#### Implementation of
|
|
106
|
-
|
|
107
|
-
[`MidenSendTransaction`](../interfaces/MidenSendTransaction.md).[`senderAddress`](../interfaces/MidenSendTransaction.md#senderaddress)
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
[**@miden-sdk/miden-wallet-adapter-base**](../README.md)
|
|
2
|
-
|
|
3
|
-
***
|
|
4
|
-
|
|
5
|
-
[@miden-sdk/miden-wallet-adapter-base](../README.md) / Transaction
|
|
6
|
-
|
|
7
|
-
# Class: Transaction
|
|
8
|
-
|
|
9
|
-
## Implements
|
|
10
|
-
|
|
11
|
-
- [`MidenTransaction`](../interfaces/MidenTransaction.md)
|
|
12
|
-
|
|
13
|
-
## Constructors
|
|
14
|
-
|
|
15
|
-
### Constructor
|
|
16
|
-
|
|
17
|
-
> **new Transaction**(`type`, `payload`): `Transaction`
|
|
18
|
-
|
|
19
|
-
#### Parameters
|
|
20
|
-
|
|
21
|
-
##### type
|
|
22
|
-
|
|
23
|
-
[`TransactionType`](../enumerations/TransactionType.md)
|
|
24
|
-
|
|
25
|
-
##### payload
|
|
26
|
-
|
|
27
|
-
[`TransactionPayload`](../type-aliases/TransactionPayload.md)
|
|
28
|
-
|
|
29
|
-
#### Returns
|
|
30
|
-
|
|
31
|
-
`Transaction`
|
|
32
|
-
|
|
33
|
-
## Properties
|
|
34
|
-
|
|
35
|
-
### payload
|
|
36
|
-
|
|
37
|
-
> **payload**: [`TransactionPayload`](../type-aliases/TransactionPayload.md)
|
|
38
|
-
|
|
39
|
-
#### Implementation of
|
|
40
|
-
|
|
41
|
-
[`MidenTransaction`](../interfaces/MidenTransaction.md).[`payload`](../interfaces/MidenTransaction.md#payload)
|
|
42
|
-
|
|
43
|
-
***
|
|
44
|
-
|
|
45
|
-
### type
|
|
46
|
-
|
|
47
|
-
> **type**: [`TransactionType`](../enumerations/TransactionType.md)
|
|
48
|
-
|
|
49
|
-
#### Implementation of
|
|
50
|
-
|
|
51
|
-
[`MidenTransaction`](../interfaces/MidenTransaction.md).[`type`](../interfaces/MidenTransaction.md#type)
|
|
52
|
-
|
|
53
|
-
## Methods
|
|
54
|
-
|
|
55
|
-
### createConsumeTransaction()
|
|
56
|
-
|
|
57
|
-
> `static` **createConsumeTransaction**(`faucetId`, `noteId`, `noteType`, `amount`, `noteBytes?`): `Transaction`
|
|
58
|
-
|
|
59
|
-
#### Parameters
|
|
60
|
-
|
|
61
|
-
##### faucetId
|
|
62
|
-
|
|
63
|
-
`string`
|
|
64
|
-
|
|
65
|
-
##### noteId
|
|
66
|
-
|
|
67
|
-
`string`
|
|
68
|
-
|
|
69
|
-
##### noteType
|
|
70
|
-
|
|
71
|
-
[`NoteTypeString`](../type-aliases/NoteTypeString.md)
|
|
72
|
-
|
|
73
|
-
##### amount
|
|
74
|
-
|
|
75
|
-
`number`
|
|
76
|
-
|
|
77
|
-
##### noteBytes?
|
|
78
|
-
|
|
79
|
-
`Uint8Array`
|
|
80
|
-
|
|
81
|
-
#### Returns
|
|
82
|
-
|
|
83
|
-
`Transaction`
|
|
84
|
-
|
|
85
|
-
***
|
|
86
|
-
|
|
87
|
-
### createCustomTransaction()
|
|
88
|
-
|
|
89
|
-
> `static` **createCustomTransaction**(`address`, `recipientAddress`, `transactionRequest`, `inputNoteIds?`, `noteBytes?`): `Transaction`
|
|
90
|
-
|
|
91
|
-
#### Parameters
|
|
92
|
-
|
|
93
|
-
##### address
|
|
94
|
-
|
|
95
|
-
`string`
|
|
96
|
-
|
|
97
|
-
##### recipientAddress
|
|
98
|
-
|
|
99
|
-
`string`
|
|
100
|
-
|
|
101
|
-
##### transactionRequest
|
|
102
|
-
|
|
103
|
-
`TransactionRequest`
|
|
104
|
-
|
|
105
|
-
##### inputNoteIds?
|
|
106
|
-
|
|
107
|
-
`string`[]
|
|
108
|
-
|
|
109
|
-
##### noteBytes?
|
|
110
|
-
|
|
111
|
-
`Uint8Array`\<`ArrayBufferLike`\>[]
|
|
112
|
-
|
|
113
|
-
#### Returns
|
|
114
|
-
|
|
115
|
-
`Transaction`
|
|
116
|
-
|
|
117
|
-
***
|
|
118
|
-
|
|
119
|
-
### createSendTransaction()
|
|
120
|
-
|
|
121
|
-
> `static` **createSendTransaction**(`sender`, `recipient`, `faucetId`, `noteType`, `amount`, `recallBlocks?`): `Transaction`
|
|
122
|
-
|
|
123
|
-
#### Parameters
|
|
124
|
-
|
|
125
|
-
##### sender
|
|
126
|
-
|
|
127
|
-
`string`
|
|
128
|
-
|
|
129
|
-
##### recipient
|
|
130
|
-
|
|
131
|
-
`string`
|
|
132
|
-
|
|
133
|
-
##### faucetId
|
|
134
|
-
|
|
135
|
-
`string`
|
|
136
|
-
|
|
137
|
-
##### noteType
|
|
138
|
-
|
|
139
|
-
[`NoteTypeString`](../type-aliases/NoteTypeString.md)
|
|
140
|
-
|
|
141
|
-
##### amount
|
|
142
|
-
|
|
143
|
-
`number`
|
|
144
|
-
|
|
145
|
-
##### recallBlocks?
|
|
146
|
-
|
|
147
|
-
`number`
|
|
148
|
-
|
|
149
|
-
#### Returns
|
|
150
|
-
|
|
151
|
-
`Transaction`
|