@twin.org/dlt-iota 0.0.3-next.9 → 0.9.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/es/index.js +7 -3
- package/dist/es/index.js.map +1 -1
- package/dist/es/iota.js +356 -93
- package/dist/es/iota.js.map +1 -1
- package/dist/es/iotaIdentityUtils.js +2 -4
- package/dist/es/iotaIdentityUtils.js.map +1 -1
- package/dist/es/iotaSmartContractUtils.js +31 -27
- package/dist/es/iotaSmartContractUtils.js.map +1 -1
- package/dist/es/models/IAdminCapFields.js.map +1 -1
- package/dist/es/models/IGasStationExecuteResponse.js.map +1 -1
- package/dist/es/models/IIotaConfig.js.map +1 -1
- package/dist/es/models/IIotaControllerCapInfo.js.map +1 -1
- package/dist/es/models/IIotaResponseOptions.js.map +1 -1
- package/dist/es/models/IMigrationStateFields.js.map +1 -1
- package/dist/es/models/ISmartContractObject.js.map +1 -1
- package/dist/es/models/ITransactionSigner.js +2 -0
- package/dist/es/models/ITransactionSigner.js.map +1 -0
- package/dist/es/vaultJwkStorage.js +71 -0
- package/dist/es/vaultJwkStorage.js.map +1 -0
- package/dist/es/vaultJwtSigner.js +49 -0
- package/dist/es/vaultJwtSigner.js.map +1 -0
- package/dist/es/vaultSigner.js +60 -0
- package/dist/es/vaultSigner.js.map +1 -0
- package/dist/es/vaultTransactionSigner.js +74 -0
- package/dist/es/vaultTransactionSigner.js.map +1 -0
- package/dist/types/index.d.ts +7 -3
- package/dist/types/iota.d.ts +82 -53
- package/dist/types/iotaIdentityUtils.d.ts +2 -4
- package/dist/types/iotaSmartContractUtils.d.ts +18 -17
- package/dist/types/models/IAdminCapFields.d.ts +2 -2
- package/dist/types/models/IGasStationExecuteResponse.d.ts +1 -3
- package/dist/types/models/IIotaConfig.d.ts +5 -0
- package/dist/types/models/IIotaControllerCapInfo.d.ts +3 -6
- package/dist/types/models/IIotaResponseOptions.d.ts +1 -1
- package/dist/types/models/IMigrationStateFields.d.ts +2 -2
- package/dist/types/models/ISmartContractObject.d.ts +2 -2
- package/dist/types/models/ITransactionSigner.d.ts +27 -0
- package/dist/types/vaultJwkStorage.d.ts +50 -0
- package/dist/types/vaultJwtSigner.d.ts +26 -0
- package/dist/types/vaultSigner.d.ts +32 -0
- package/dist/types/vaultTransactionSigner.d.ts +39 -0
- package/docs/changelog.md +112 -0
- package/docs/examples.md +6 -13
- package/docs/reference/classes/Iota.md +325 -189
- package/docs/reference/classes/IotaIdentityUtils.md +2 -4
- package/docs/reference/classes/IotaSmartContractUtils.md +57 -40
- package/docs/reference/classes/VaultJwtSigner.md +71 -0
- package/docs/reference/classes/VaultSigner.md +106 -0
- package/docs/reference/classes/VaultTransactionSigner.md +122 -0
- package/docs/reference/index.md +4 -0
- package/docs/reference/interfaces/IAdminCapFields.md +2 -2
- package/docs/reference/interfaces/IGasStationExecuteResponse.md +1 -3
- package/docs/reference/interfaces/IIotaConfig.md +14 -0
- package/docs/reference/interfaces/IIotaControllerCapInfo.md +3 -6
- package/docs/reference/interfaces/IIotaResponseOptions.md +1 -1
- package/docs/reference/interfaces/IMigrationStateFields.md +2 -2
- package/docs/reference/interfaces/ISmartContractObject.md +2 -2
- package/docs/reference/interfaces/ITransactionSigner.md +67 -0
- package/locales/en.json +7 -1
- package/package.json +12 -12
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# Class: IotaSmartContractUtils
|
|
2
2
|
|
|
3
3
|
Utility class providing common smart contract operations for IOTA-based contracts.
|
|
4
|
-
This class uses composition pattern to provide shared functionality without inheritance complexity.
|
|
5
4
|
|
|
6
5
|
## Constructors
|
|
7
6
|
|
|
@@ -25,7 +24,7 @@ Runtime name for the class.
|
|
|
25
24
|
|
|
26
25
|
### migrateSmartContract() {#migratesmartcontract}
|
|
27
26
|
|
|
28
|
-
> `static` **migrateSmartContract**(`config`, `client`, `vaultConnector`, `
|
|
27
|
+
> `static` **migrateSmartContract**(`config`, `client`, `vaultConnector`, `logging`, `gasBudget`, `identity`, `objectId`, `namespace`, `packageId`, `deploymentConfig`, `accountAddressIndex?`, `walletAddressIndex?`): `Promise`\<`void`\>
|
|
29
28
|
|
|
30
29
|
Migrate a smart contract object to the current version using admin privileges.
|
|
31
30
|
This is a generic migration method that works with any IOTA smart contract.
|
|
@@ -50,12 +49,6 @@ The IOTA client instance.
|
|
|
50
49
|
|
|
51
50
|
The vault connector for key management.
|
|
52
51
|
|
|
53
|
-
##### walletConnector
|
|
54
|
-
|
|
55
|
-
`IWalletConnector`
|
|
56
|
-
|
|
57
|
-
The wallet connector for address generation.
|
|
58
|
-
|
|
59
52
|
##### logging
|
|
60
53
|
|
|
61
54
|
`ILoggingComponent` \| `undefined`
|
|
@@ -98,6 +91,12 @@ The deployed package ID for the contract.
|
|
|
98
91
|
|
|
99
92
|
The deployment configuration containing object IDs.
|
|
100
93
|
|
|
94
|
+
##### accountAddressIndex?
|
|
95
|
+
|
|
96
|
+
`number`
|
|
97
|
+
|
|
98
|
+
Optional account address index for the controller.
|
|
99
|
+
|
|
101
100
|
##### walletAddressIndex?
|
|
102
101
|
|
|
103
102
|
`number`
|
|
@@ -114,7 +113,7 @@ Promise that resolves when migration is complete.
|
|
|
114
113
|
|
|
115
114
|
### enableMigration() {#enablemigration}
|
|
116
115
|
|
|
117
|
-
> `static` **enableMigration**(`config`, `client`, `vaultConnector`, `
|
|
116
|
+
> `static` **enableMigration**(`config`, `client`, `vaultConnector`, `logging`, `gasBudget`, `identity`, `namespace`, `packageId`, `deploymentConfig`, `accountAddressIndex?`, `walletAddressIndex?`): `Promise`\<`void`\>
|
|
118
117
|
|
|
119
118
|
Enable migration operations using admin privileges.
|
|
120
119
|
|
|
@@ -138,12 +137,6 @@ The IOTA client instance.
|
|
|
138
137
|
|
|
139
138
|
The vault connector for key management.
|
|
140
139
|
|
|
141
|
-
##### walletConnector
|
|
142
|
-
|
|
143
|
-
`IWalletConnector`
|
|
144
|
-
|
|
145
|
-
The wallet connector for address generation.
|
|
146
|
-
|
|
147
140
|
##### logging
|
|
148
141
|
|
|
149
142
|
`ILoggingComponent` \| `undefined`
|
|
@@ -180,6 +173,12 @@ The deployed package ID for the contract.
|
|
|
180
173
|
|
|
181
174
|
The deployment configuration containing object IDs.
|
|
182
175
|
|
|
176
|
+
##### accountAddressIndex?
|
|
177
|
+
|
|
178
|
+
`number`
|
|
179
|
+
|
|
180
|
+
Optional account address index for the controller.
|
|
181
|
+
|
|
183
182
|
##### walletAddressIndex?
|
|
184
183
|
|
|
185
184
|
`number`
|
|
@@ -196,7 +195,7 @@ Promise that resolves when migration is enabled.
|
|
|
196
195
|
|
|
197
196
|
### disableMigration() {#disablemigration}
|
|
198
197
|
|
|
199
|
-
> `static` **disableMigration**(`config`, `client`, `vaultConnector`, `
|
|
198
|
+
> `static` **disableMigration**(`config`, `client`, `vaultConnector`, `logging`, `gasBudget`, `identity`, `namespace`, `packageId`, `deploymentConfig`, `accountAddressIndex?`, `walletAddressIndex?`): `Promise`\<`void`\>
|
|
200
199
|
|
|
201
200
|
Disable migration operations using admin privileges.
|
|
202
201
|
|
|
@@ -220,12 +219,6 @@ The IOTA client instance.
|
|
|
220
219
|
|
|
221
220
|
The vault connector for key management.
|
|
222
221
|
|
|
223
|
-
##### walletConnector
|
|
224
|
-
|
|
225
|
-
`IWalletConnector`
|
|
226
|
-
|
|
227
|
-
The wallet connector for address generation.
|
|
228
|
-
|
|
229
222
|
##### logging
|
|
230
223
|
|
|
231
224
|
`ILoggingComponent` \| `undefined`
|
|
@@ -262,6 +255,12 @@ The deployed package ID for the contract.
|
|
|
262
255
|
|
|
263
256
|
The deployment configuration containing object IDs.
|
|
264
257
|
|
|
258
|
+
##### accountAddressIndex?
|
|
259
|
+
|
|
260
|
+
`number`
|
|
261
|
+
|
|
262
|
+
Optional account address index for the controller.
|
|
263
|
+
|
|
265
264
|
##### walletAddressIndex?
|
|
266
265
|
|
|
267
266
|
`number`
|
|
@@ -278,7 +277,7 @@ Promise that resolves when migration is disabled.
|
|
|
278
277
|
|
|
279
278
|
### isMigrationActive() {#ismigrationactive}
|
|
280
279
|
|
|
281
|
-
> `static` **isMigrationActive**(`config`, `client`, `namespace`, `packageId`, `deploymentConfig`, `identity`, `
|
|
280
|
+
> `static` **isMigrationActive**(`config`, `client`, `vaultConnector`, `namespace`, `packageId`, `deploymentConfig`, `identity`, `accountAddressIndex?`, `walletAddressIndex?`): `Promise`\<`boolean`\>
|
|
282
281
|
|
|
283
282
|
Check if migration is currently active for a smart contract.
|
|
284
283
|
|
|
@@ -296,6 +295,12 @@ The IOTA configuration.
|
|
|
296
295
|
|
|
297
296
|
The IOTA client instance.
|
|
298
297
|
|
|
298
|
+
##### vaultConnector
|
|
299
|
+
|
|
300
|
+
`IVaultConnector`
|
|
301
|
+
|
|
302
|
+
The vault connector for key management.
|
|
303
|
+
|
|
299
304
|
##### namespace
|
|
300
305
|
|
|
301
306
|
`string`
|
|
@@ -320,17 +325,17 @@ The deployment configuration containing object IDs.
|
|
|
320
325
|
|
|
321
326
|
The identity for MigrationState discovery.
|
|
322
327
|
|
|
323
|
-
#####
|
|
328
|
+
##### accountAddressIndex?
|
|
324
329
|
|
|
325
|
-
`
|
|
330
|
+
`number`
|
|
326
331
|
|
|
327
|
-
|
|
332
|
+
Optional account address index for the controller.
|
|
328
333
|
|
|
329
334
|
##### walletAddressIndex?
|
|
330
335
|
|
|
331
336
|
`number`
|
|
332
337
|
|
|
333
|
-
Optional wallet address index.
|
|
338
|
+
Optional wallet address index for the controller.
|
|
334
339
|
|
|
335
340
|
#### Returns
|
|
336
341
|
|
|
@@ -342,7 +347,7 @@ True if migration is enabled, false otherwise.
|
|
|
342
347
|
|
|
343
348
|
### getCurrentContractVersion() {#getcurrentcontractversion}
|
|
344
349
|
|
|
345
|
-
> `static` **getCurrentContractVersion**(`config`, `client`, `namespace`, `packageId`, `identity`, `
|
|
350
|
+
> `static` **getCurrentContractVersion**(`config`, `client`, `vaultConnector`, `namespace`, `packageId`, `identity`, `accountAddressIndex?`, `walletAddressIndex?`): `Promise`\<`number`\>
|
|
346
351
|
|
|
347
352
|
Get the current contract version from the deployed smart contract.
|
|
348
353
|
|
|
@@ -360,6 +365,12 @@ The IOTA configuration.
|
|
|
360
365
|
|
|
361
366
|
The IOTA client instance.
|
|
362
367
|
|
|
368
|
+
##### vaultConnector
|
|
369
|
+
|
|
370
|
+
`IVaultConnector`
|
|
371
|
+
|
|
372
|
+
The vault connector for key management.
|
|
373
|
+
|
|
363
374
|
##### namespace
|
|
364
375
|
|
|
365
376
|
`string`
|
|
@@ -378,17 +389,17 @@ The deployed package ID for the contract.
|
|
|
378
389
|
|
|
379
390
|
The identity for package controller address.
|
|
380
391
|
|
|
381
|
-
#####
|
|
392
|
+
##### accountAddressIndex?
|
|
382
393
|
|
|
383
|
-
`
|
|
394
|
+
`number`
|
|
384
395
|
|
|
385
|
-
|
|
396
|
+
Optional account address index for the controller.
|
|
386
397
|
|
|
387
398
|
##### walletAddressIndex?
|
|
388
399
|
|
|
389
400
|
`number`
|
|
390
401
|
|
|
391
|
-
Optional wallet address index.
|
|
402
|
+
Optional wallet address index for the controller.
|
|
392
403
|
|
|
393
404
|
#### Returns
|
|
394
405
|
|
|
@@ -400,7 +411,7 @@ The current version number of the contract.
|
|
|
400
411
|
|
|
401
412
|
### validateObjectVersion() {#validateobjectversion}
|
|
402
413
|
|
|
403
|
-
> `static` **validateObjectVersion**\<`T`\>(`config`, `client`, `namespace`, `packageId`, `identity`, `objectId`, `
|
|
414
|
+
> `static` **validateObjectVersion**\<`T`\>(`config`, `client`, `vaultConnector`, `namespace`, `packageId`, `identity`, `objectId`, `versionExtractor`, `accountAddressIndex?`, `walletAddressIndex?`): `Promise`\<`boolean`\>
|
|
404
415
|
|
|
405
416
|
Validate that an object version is compatible with the current contract.
|
|
406
417
|
|
|
@@ -424,6 +435,12 @@ The IOTA configuration.
|
|
|
424
435
|
|
|
425
436
|
The IOTA client instance.
|
|
426
437
|
|
|
438
|
+
##### vaultConnector
|
|
439
|
+
|
|
440
|
+
`IVaultConnector`
|
|
441
|
+
|
|
442
|
+
The vault connector for key management.
|
|
443
|
+
|
|
427
444
|
##### namespace
|
|
428
445
|
|
|
429
446
|
`string`
|
|
@@ -448,23 +465,23 @@ The identity for version checking.
|
|
|
448
465
|
|
|
449
466
|
The object ID to validate.
|
|
450
467
|
|
|
451
|
-
##### walletConnector
|
|
452
|
-
|
|
453
|
-
`IWalletConnector`
|
|
454
|
-
|
|
455
|
-
The wallet connector for address generation.
|
|
456
|
-
|
|
457
468
|
##### versionExtractor
|
|
458
469
|
|
|
459
470
|
(`content`) => `number`
|
|
460
471
|
|
|
461
472
|
Function to extract version from object content.
|
|
462
473
|
|
|
474
|
+
##### accountAddressIndex?
|
|
475
|
+
|
|
476
|
+
`number`
|
|
477
|
+
|
|
478
|
+
Optional account address index for the controller.
|
|
479
|
+
|
|
463
480
|
##### walletAddressIndex?
|
|
464
481
|
|
|
465
482
|
`number`
|
|
466
483
|
|
|
467
|
-
Optional wallet address index.
|
|
484
|
+
Optional wallet address index for the controller.
|
|
468
485
|
|
|
469
486
|
#### Returns
|
|
470
487
|
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Class: VaultJwtSigner
|
|
2
|
+
|
|
3
|
+
Factory that creates a vault-backed StorageSigner for IOTA Identity operations.
|
|
4
|
+
The private key never leaves the vault — only the raw signing operation is delegated.
|
|
5
|
+
|
|
6
|
+
The returned StorageSigner is a genuine WASM object, satisfying the internal validation
|
|
7
|
+
that IdentityClient.create() performs on the signer's iotaPublicKeyBytes() path.
|
|
8
|
+
|
|
9
|
+
## Constructors
|
|
10
|
+
|
|
11
|
+
### Constructor
|
|
12
|
+
|
|
13
|
+
> **new VaultJwtSigner**(): `VaultJwtSigner`
|
|
14
|
+
|
|
15
|
+
#### Returns
|
|
16
|
+
|
|
17
|
+
`VaultJwtSigner`
|
|
18
|
+
|
|
19
|
+
## Properties
|
|
20
|
+
|
|
21
|
+
### CLASS\_NAME {#class_name}
|
|
22
|
+
|
|
23
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
24
|
+
|
|
25
|
+
Runtime name for the class.
|
|
26
|
+
|
|
27
|
+
## Methods
|
|
28
|
+
|
|
29
|
+
### create() {#create}
|
|
30
|
+
|
|
31
|
+
> `static` **create**(`vaultConnector`, `config`, `identity`, `accountIndex`, `addressIndex`): `Promise`\<`StorageSigner`\>
|
|
32
|
+
|
|
33
|
+
Create a StorageSigner whose cryptographic operations are backed by the vault connector.
|
|
34
|
+
|
|
35
|
+
#### Parameters
|
|
36
|
+
|
|
37
|
+
##### vaultConnector
|
|
38
|
+
|
|
39
|
+
`IVaultConnector`
|
|
40
|
+
|
|
41
|
+
The vault connector.
|
|
42
|
+
|
|
43
|
+
##### config
|
|
44
|
+
|
|
45
|
+
[`IIotaConfig`](../interfaces/IIotaConfig.md)
|
|
46
|
+
|
|
47
|
+
The configuration.
|
|
48
|
+
|
|
49
|
+
##### identity
|
|
50
|
+
|
|
51
|
+
`string`
|
|
52
|
+
|
|
53
|
+
The identity of the user to access the vault keys.
|
|
54
|
+
|
|
55
|
+
##### accountIndex
|
|
56
|
+
|
|
57
|
+
`number`
|
|
58
|
+
|
|
59
|
+
The account index.
|
|
60
|
+
|
|
61
|
+
##### addressIndex
|
|
62
|
+
|
|
63
|
+
`number`
|
|
64
|
+
|
|
65
|
+
The address index within the account.
|
|
66
|
+
|
|
67
|
+
#### Returns
|
|
68
|
+
|
|
69
|
+
`Promise`\<`StorageSigner`\>
|
|
70
|
+
|
|
71
|
+
A StorageSigner backed by the vault for the specified key.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Class: VaultSigner
|
|
2
|
+
|
|
3
|
+
A signer that delegates all signing to the vault connector, ensuring the private key
|
|
4
|
+
is never exposed to application code.
|
|
5
|
+
|
|
6
|
+
## Extends
|
|
7
|
+
|
|
8
|
+
- `Signer`
|
|
9
|
+
|
|
10
|
+
## Constructors
|
|
11
|
+
|
|
12
|
+
### Constructor
|
|
13
|
+
|
|
14
|
+
> **new VaultSigner**(`vaultConnector`, `keyName`, `publicKey`): `VaultSigner`
|
|
15
|
+
|
|
16
|
+
Create a new VaultSigner.
|
|
17
|
+
|
|
18
|
+
#### Parameters
|
|
19
|
+
|
|
20
|
+
##### vaultConnector
|
|
21
|
+
|
|
22
|
+
`IVaultConnector`
|
|
23
|
+
|
|
24
|
+
The vault connector used to perform signing operations.
|
|
25
|
+
|
|
26
|
+
##### keyName
|
|
27
|
+
|
|
28
|
+
`string`
|
|
29
|
+
|
|
30
|
+
The name of the key in the vault to use for signing.
|
|
31
|
+
|
|
32
|
+
##### publicKey
|
|
33
|
+
|
|
34
|
+
`Uint8Array`
|
|
35
|
+
|
|
36
|
+
The public key bytes corresponding to the vault key.
|
|
37
|
+
|
|
38
|
+
#### Returns
|
|
39
|
+
|
|
40
|
+
`VaultSigner`
|
|
41
|
+
|
|
42
|
+
#### Overrides
|
|
43
|
+
|
|
44
|
+
`Signer.constructor`
|
|
45
|
+
|
|
46
|
+
## Methods
|
|
47
|
+
|
|
48
|
+
### getKeyScheme() {#getkeyscheme}
|
|
49
|
+
|
|
50
|
+
> **getKeyScheme**(): `SignatureScheme`
|
|
51
|
+
|
|
52
|
+
Get the key scheme.
|
|
53
|
+
|
|
54
|
+
#### Returns
|
|
55
|
+
|
|
56
|
+
`SignatureScheme`
|
|
57
|
+
|
|
58
|
+
The signature scheme.
|
|
59
|
+
|
|
60
|
+
#### Overrides
|
|
61
|
+
|
|
62
|
+
`Signer.getKeyScheme`
|
|
63
|
+
|
|
64
|
+
***
|
|
65
|
+
|
|
66
|
+
### getPublicKey() {#getpublickey}
|
|
67
|
+
|
|
68
|
+
> **getPublicKey**(): `Ed25519PublicKey`
|
|
69
|
+
|
|
70
|
+
Get the public key.
|
|
71
|
+
|
|
72
|
+
#### Returns
|
|
73
|
+
|
|
74
|
+
`Ed25519PublicKey`
|
|
75
|
+
|
|
76
|
+
The Ed25519 public key.
|
|
77
|
+
|
|
78
|
+
#### Overrides
|
|
79
|
+
|
|
80
|
+
`Signer.getPublicKey`
|
|
81
|
+
|
|
82
|
+
***
|
|
83
|
+
|
|
84
|
+
### sign() {#sign}
|
|
85
|
+
|
|
86
|
+
> **sign**(`bytes`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
87
|
+
|
|
88
|
+
Sign the provided bytes via the vault connector.
|
|
89
|
+
|
|
90
|
+
#### Parameters
|
|
91
|
+
|
|
92
|
+
##### bytes
|
|
93
|
+
|
|
94
|
+
`Uint8Array`
|
|
95
|
+
|
|
96
|
+
The bytes to sign.
|
|
97
|
+
|
|
98
|
+
#### Returns
|
|
99
|
+
|
|
100
|
+
`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
101
|
+
|
|
102
|
+
The raw Ed25519 signature bytes.
|
|
103
|
+
|
|
104
|
+
#### Overrides
|
|
105
|
+
|
|
106
|
+
`Signer.sign`
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Class: VaultTransactionSigner
|
|
2
|
+
|
|
3
|
+
A transaction signer that delegates all signing operations to the vault connector,
|
|
4
|
+
ensuring the private key is never exposed to application code.
|
|
5
|
+
|
|
6
|
+
## Implements
|
|
7
|
+
|
|
8
|
+
- [`ITransactionSigner`](../interfaces/ITransactionSigner.md)
|
|
9
|
+
|
|
10
|
+
## Constructors
|
|
11
|
+
|
|
12
|
+
### Constructor
|
|
13
|
+
|
|
14
|
+
> **new VaultTransactionSigner**(`vaultConnector`, `keyName`, `publicKey`): `VaultTransactionSigner`
|
|
15
|
+
|
|
16
|
+
Create a new VaultTransactionSigner.
|
|
17
|
+
|
|
18
|
+
#### Parameters
|
|
19
|
+
|
|
20
|
+
##### vaultConnector
|
|
21
|
+
|
|
22
|
+
`IVaultConnector`
|
|
23
|
+
|
|
24
|
+
The vault connector used to perform signing operations.
|
|
25
|
+
|
|
26
|
+
##### keyName
|
|
27
|
+
|
|
28
|
+
`string`
|
|
29
|
+
|
|
30
|
+
The name of the key in the vault to use for signing.
|
|
31
|
+
|
|
32
|
+
##### publicKey
|
|
33
|
+
|
|
34
|
+
`Uint8Array`
|
|
35
|
+
|
|
36
|
+
The public key bytes corresponding to the vault key.
|
|
37
|
+
|
|
38
|
+
#### Returns
|
|
39
|
+
|
|
40
|
+
`VaultTransactionSigner`
|
|
41
|
+
|
|
42
|
+
## Methods
|
|
43
|
+
|
|
44
|
+
### sign() {#sign}
|
|
45
|
+
|
|
46
|
+
> **sign**(`txDataBcs`): `Promise`\<`string`\>
|
|
47
|
+
|
|
48
|
+
Sign the BCS-encoded transaction data.
|
|
49
|
+
Applies the TransactionData intent, hashes the result, signs via the vault,
|
|
50
|
+
and returns a serialized IOTA signature string.
|
|
51
|
+
|
|
52
|
+
#### Parameters
|
|
53
|
+
|
|
54
|
+
##### txDataBcs
|
|
55
|
+
|
|
56
|
+
`Uint8Array`
|
|
57
|
+
|
|
58
|
+
The raw transaction bytes to sign.
|
|
59
|
+
|
|
60
|
+
#### Returns
|
|
61
|
+
|
|
62
|
+
`Promise`\<`string`\>
|
|
63
|
+
|
|
64
|
+
The serialized signature string.
|
|
65
|
+
|
|
66
|
+
#### Implementation of
|
|
67
|
+
|
|
68
|
+
[`ITransactionSigner`](../interfaces/ITransactionSigner.md).[`sign`](../interfaces/ITransactionSigner.md#sign)
|
|
69
|
+
|
|
70
|
+
***
|
|
71
|
+
|
|
72
|
+
### publicKey() {#publickey}
|
|
73
|
+
|
|
74
|
+
> **publicKey**(): `Promise`\<`PublicKey`\>
|
|
75
|
+
|
|
76
|
+
Get the public key for this signer.
|
|
77
|
+
|
|
78
|
+
#### Returns
|
|
79
|
+
|
|
80
|
+
`Promise`\<`PublicKey`\>
|
|
81
|
+
|
|
82
|
+
The Ed25519 public key.
|
|
83
|
+
|
|
84
|
+
#### Implementation of
|
|
85
|
+
|
|
86
|
+
[`ITransactionSigner`](../interfaces/ITransactionSigner.md).[`publicKey`](../interfaces/ITransactionSigner.md#publickey)
|
|
87
|
+
|
|
88
|
+
***
|
|
89
|
+
|
|
90
|
+
### iotaPublicKeyBytes() {#iotapublickeybytes}
|
|
91
|
+
|
|
92
|
+
> **iotaPublicKeyBytes**(): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
93
|
+
|
|
94
|
+
Get the IOTA-formatted public key bytes (scheme flag byte followed by the raw key bytes).
|
|
95
|
+
|
|
96
|
+
#### Returns
|
|
97
|
+
|
|
98
|
+
`Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
|
|
99
|
+
|
|
100
|
+
The IOTA public key bytes.
|
|
101
|
+
|
|
102
|
+
#### Implementation of
|
|
103
|
+
|
|
104
|
+
[`ITransactionSigner`](../interfaces/ITransactionSigner.md).[`iotaPublicKeyBytes`](../interfaces/ITransactionSigner.md#iotapublickeybytes)
|
|
105
|
+
|
|
106
|
+
***
|
|
107
|
+
|
|
108
|
+
### keyId() {#keyid}
|
|
109
|
+
|
|
110
|
+
> **keyId**(): `string`
|
|
111
|
+
|
|
112
|
+
Get the vault key name used by this signer.
|
|
113
|
+
|
|
114
|
+
#### Returns
|
|
115
|
+
|
|
116
|
+
`string`
|
|
117
|
+
|
|
118
|
+
The key name.
|
|
119
|
+
|
|
120
|
+
#### Implementation of
|
|
121
|
+
|
|
122
|
+
[`ITransactionSigner`](../interfaces/ITransactionSigner.md).[`keyId`](../interfaces/ITransactionSigner.md#keyid)
|
package/docs/reference/index.md
CHANGED
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
- [Iota](classes/Iota.md)
|
|
6
6
|
- [IotaIdentityUtils](classes/IotaIdentityUtils.md)
|
|
7
7
|
- [IotaSmartContractUtils](classes/IotaSmartContractUtils.md)
|
|
8
|
+
- [VaultJwtSigner](classes/VaultJwtSigner.md)
|
|
9
|
+
- [VaultSigner](classes/VaultSigner.md)
|
|
10
|
+
- [VaultTransactionSigner](classes/VaultTransactionSigner.md)
|
|
8
11
|
|
|
9
12
|
## Interfaces
|
|
10
13
|
|
|
@@ -21,6 +24,7 @@
|
|
|
21
24
|
- [IIotaResponseOptions](interfaces/IIotaResponseOptions.md)
|
|
22
25
|
- [IMigrationStateFields](interfaces/IMigrationStateFields.md)
|
|
23
26
|
- [ISmartContractObject](interfaces/ISmartContractObject.md)
|
|
27
|
+
- [ITransactionSigner](interfaces/ITransactionSigner.md)
|
|
24
28
|
|
|
25
29
|
## Type Aliases
|
|
26
30
|
|
|
@@ -8,10 +8,10 @@ Generic interface representing the storage fields of an AdminCap object.
|
|
|
8
8
|
|
|
9
9
|
> **id**: `object`
|
|
10
10
|
|
|
11
|
-
The
|
|
11
|
+
The UID wrapper of the AdminCap object.
|
|
12
12
|
|
|
13
13
|
#### id
|
|
14
14
|
|
|
15
15
|
> **id**: `string`
|
|
16
16
|
|
|
17
|
-
The ID of the AdminCap object.
|
|
17
|
+
The hex string ID of the AdminCap object.
|
|
@@ -9,14 +9,12 @@ Interface for the gas station execute transaction response.
|
|
|
9
9
|
> **effects**: `object`
|
|
10
10
|
|
|
11
11
|
The transaction effects from the IOTA network.
|
|
12
|
-
This contains the full IOTA transaction effects object.
|
|
13
12
|
|
|
14
13
|
#### Index Signature
|
|
15
14
|
|
|
16
15
|
\[`key`: `string`\]: `unknown`
|
|
17
16
|
|
|
18
|
-
Additional
|
|
19
|
-
This includes messageVersion, status, executedEpoch, gasUsed, etc.
|
|
17
|
+
Additional fields from the IOTA network effects object.
|
|
20
18
|
|
|
21
19
|
#### transactionDigest
|
|
22
20
|
|
|
@@ -113,6 +113,20 @@ The default gas budget for all transactions (including sponsored and direct).
|
|
|
113
113
|
|
|
114
114
|
***
|
|
115
115
|
|
|
116
|
+
### gasReservationDuration? {#gasreservationduration}
|
|
117
|
+
|
|
118
|
+
> `optional` **gasReservationDuration?**: `number`
|
|
119
|
+
|
|
120
|
+
The default gas reservation duration in seconds for all transactions (including sponsored and direct).
|
|
121
|
+
|
|
122
|
+
#### Default
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
60
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
***
|
|
129
|
+
|
|
116
130
|
### enableCostLogging? {#enablecostlogging}
|
|
117
131
|
|
|
118
132
|
> `optional` **enableCostLogging?**: `boolean`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Interface: IIotaControllerCapInfo
|
|
2
2
|
|
|
3
|
-
On-chain object IDs
|
|
3
|
+
On-chain object IDs for an identity and its associated controller token.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
@@ -8,8 +8,7 @@ On-chain object IDs needed to call mint_with_identity() on the NFT Move contract
|
|
|
8
8
|
|
|
9
9
|
> **identityObjectId**: `string`
|
|
10
10
|
|
|
11
|
-
The on-chain
|
|
12
|
-
Used as the Identity argument in mint_with_identity().
|
|
11
|
+
The on-chain object ID of the Identity Move object (hex string, e.g. "0x...").
|
|
13
12
|
|
|
14
13
|
***
|
|
15
14
|
|
|
@@ -17,6 +16,4 @@ Used as the Identity argument in mint_with_identity().
|
|
|
17
16
|
|
|
18
17
|
> **controllerCapObjectId**: `string`
|
|
19
18
|
|
|
20
|
-
The on-chain
|
|
21
|
-
Proves that the controller address controls identityObjectId.
|
|
22
|
-
Used as the ControllerCap argument in mint_with_identity().
|
|
19
|
+
The on-chain object ID of the ControllerToken Move object (hex string, e.g. "0x...").
|
|
@@ -8,13 +8,13 @@ Generic interface representing the storage fields of a MigrationState object.
|
|
|
8
8
|
|
|
9
9
|
> **id**: `object`
|
|
10
10
|
|
|
11
|
-
The
|
|
11
|
+
The UID wrapper of the MigrationState object.
|
|
12
12
|
|
|
13
13
|
#### id
|
|
14
14
|
|
|
15
15
|
> **id**: `string`
|
|
16
16
|
|
|
17
|
-
The ID of the MigrationState object.
|
|
17
|
+
The hex string ID of the MigrationState object.
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
@@ -8,13 +8,13 @@ Base interface for all smart contract objects with versioning support.
|
|
|
8
8
|
|
|
9
9
|
> **id**: `object`
|
|
10
10
|
|
|
11
|
-
The
|
|
11
|
+
The UID wrapper of the smart contract object.
|
|
12
12
|
|
|
13
13
|
#### id
|
|
14
14
|
|
|
15
15
|
> **id**: `string`
|
|
16
16
|
|
|
17
|
-
The ID of the smart contract object.
|
|
17
|
+
The hex string ID of the smart contract object.
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|