@miden-sdk/miden-wallet-adapter-base 0.13.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/adapter.ts +146 -0
- package/dist/adapter.d.ts +69 -0
- package/dist/adapter.js +74 -0
- package/dist/adapter.js.map +1 -0
- package/dist/errors.d.ts +70 -0
- package/dist/errors.js +75 -0
- package/dist/errors.js.map +1 -0
- package/dist/helpers.d.ts +2 -0
- package/dist/helpers.js +32 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/signer.d.ts +34 -0
- package/dist/signer.js +6 -0
- package/dist/signer.js.map +1 -0
- package/dist/transaction.d.ts +67 -0
- package/dist/transaction.js +74 -0
- package/dist/transaction.js.map +1 -0
- package/dist/types.d.ts +47 -0
- package/dist/types.js +19 -0
- package/dist/types.js.map +1 -0
- package/docs/@miden-sdk/namespaces/EventEmitter/README.md +24 -0
- package/docs/@miden-sdk/namespaces/EventEmitter/interfaces/EventEmitterStatic.md +17 -0
- package/docs/@miden-sdk/namespaces/EventEmitter/interfaces/ListenerFn.md +25 -0
- package/docs/@miden-sdk/namespaces/EventEmitter/type-aliases/ArgumentMap.md +15 -0
- package/docs/@miden-sdk/namespaces/EventEmitter/type-aliases/EventArgs.md +19 -0
- package/docs/@miden-sdk/namespaces/EventEmitter/type-aliases/EventListener.md +19 -0
- package/docs/@miden-sdk/namespaces/EventEmitter/type-aliases/EventNames.md +15 -0
- package/docs/@miden-sdk/namespaces/EventEmitter/type-aliases/ValidEventTypes.md +17 -0
- package/docs/@miden-sdk/namespaces/EventEmitter/variables/EventEmitter.md +9 -0
- package/docs/README.md +88 -0
- package/docs/classes/BaseMessageSignerWalletAdapter.md +755 -0
- package/docs/classes/BaseSignerWalletAdapter.md +579 -0
- package/docs/classes/BaseWalletAdapter.md +535 -0
- package/docs/classes/ConsumeTransaction.md +93 -0
- package/docs/classes/CustomTransaction.md +93 -0
- package/docs/classes/EventEmitter.md +305 -0
- package/docs/classes/SendTransaction.md +107 -0
- package/docs/classes/Transaction.md +151 -0
- package/docs/classes/WalletAccountError.md +223 -0
- package/docs/classes/WalletAddressError.md +223 -0
- package/docs/classes/WalletConfigError.md +223 -0
- package/docs/classes/WalletConnectionError.md +223 -0
- package/docs/classes/WalletDecryptionError.md +223 -0
- package/docs/classes/WalletDecryptionNotAllowedError.md +223 -0
- package/docs/classes/WalletDisconnectedError.md +223 -0
- package/docs/classes/WalletDisconnectionError.md +223 -0
- package/docs/classes/WalletError.md +244 -0
- package/docs/classes/WalletKeypairError.md +223 -0
- package/docs/classes/WalletLoadError.md +223 -0
- package/docs/classes/WalletNotConnectedError.md +223 -0
- package/docs/classes/WalletNotReadyError.md +223 -0
- package/docs/classes/WalletNotSelectedError.md +223 -0
- package/docs/classes/WalletPrivateDataPermissionError.md +223 -0
- package/docs/classes/WalletRecordsError.md +223 -0
- package/docs/classes/WalletSendTransactionError.md +223 -0
- package/docs/classes/WalletSignMessageError.md +223 -0
- package/docs/classes/WalletSignTransactionError.md +223 -0
- package/docs/classes/WalletTimeoutError.md +223 -0
- package/docs/classes/WalletTransactionError.md +223 -0
- package/docs/classes/WalletWindowBlockedError.md +223 -0
- package/docs/classes/WalletWindowClosedError.md +223 -0
- package/docs/enumerations/AllowedPrivateData.md +37 -0
- package/docs/enumerations/PrivateDataPermission.md +19 -0
- package/docs/enumerations/TransactionType.md +25 -0
- package/docs/enumerations/WalletAdapterNetwork.md +19 -0
- package/docs/enumerations/WalletReadyState.md +49 -0
- package/docs/functions/b64ToU8.md +19 -0
- package/docs/functions/scopePollingDetectionStrategy.md +19 -0
- package/docs/functions/u8ToB64.md +19 -0
- package/docs/interfaces/Asset.md +19 -0
- package/docs/interfaces/IFailedTransactionOutput.md +13 -0
- package/docs/interfaces/MessageSignerWalletAdapterProps.md +293 -0
- package/docs/interfaces/MidenConsumeTransaction.md +37 -0
- package/docs/interfaces/MidenCustomTransaction.md +37 -0
- package/docs/interfaces/MidenSendTransaction.md +43 -0
- package/docs/interfaces/MidenTransaction.md +19 -0
- package/docs/interfaces/SignerWalletAdapterProps.md +149 -0
- package/docs/interfaces/TransactionOutput.md +19 -0
- package/docs/interfaces/WalletAdapterEvents.md +69 -0
- package/docs/interfaces/WalletAdapterProps.md +106 -0
- package/docs/interfaces/WalletTransactionSuccessOutput.md +19 -0
- package/docs/type-aliases/Adapter.md +9 -0
- package/docs/type-aliases/FungibleAssetDetails.md +21 -0
- package/docs/type-aliases/InputNoteDetails.md +45 -0
- package/docs/type-aliases/MessageSignerWalletAdapter.md +15 -0
- package/docs/type-aliases/NoteTypeString.md +9 -0
- package/docs/type-aliases/SignKind.md +9 -0
- package/docs/type-aliases/SignerWalletAdapter.md +15 -0
- package/docs/type-aliases/SupportedTransactionVersions.md +9 -0
- package/docs/type-aliases/TransactionOrVersionedTransaction.md +15 -0
- package/docs/type-aliases/TransactionPayload.md +9 -0
- package/docs/type-aliases/WalletAdapter.md +15 -0
- package/docs/type-aliases/WalletName.md +21 -0
- package/docs/type-aliases/WalletTransactionOutput.md +9 -0
- package/errors.ts +97 -0
- package/helpers.ts +28 -0
- package/index.ts +6 -0
- package/package.json +21 -0
- package/signer.ts +71 -0
- package/transaction.ts +178 -0
- package/tsconfig.json +15 -0
- package/types.ts +68 -0
|
@@ -0,0 +1,305 @@
|
|
|
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`
|
|
@@ -0,0 +1,107 @@
|
|
|
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)
|
|
@@ -0,0 +1,151 @@
|
|
|
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`
|