@twin.org/dlt-iota 0.0.3-next.13 → 0.0.3-next.15
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 +104 -89
- 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 +2 -1
- 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/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 +13 -28
- package/dist/types/iotaIdentityUtils.d.ts +2 -4
- package/dist/types/iotaSmartContractUtils.d.ts +0 -1
- package/dist/types/models/IAdminCapFields.d.ts +2 -2
- package/dist/types/models/IGasStationExecuteResponse.d.ts +1 -3
- 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 +15 -0
- package/docs/reference/classes/Iota.md +30 -82
- package/docs/reference/classes/IotaIdentityUtils.md +2 -4
- package/docs/reference/classes/IotaSmartContractUtils.md +0 -1
- 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/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 +5 -1
- package/package.json +3 -3
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { StorageSigner } from "@iota/identity-wasm/node/index.js";
|
|
2
|
+
import type { IVaultConnector } from "@twin.org/vault-models";
|
|
3
|
+
import type { IIotaConfig } from "./models/IIotaConfig.js";
|
|
4
|
+
/**
|
|
5
|
+
* Factory that creates a vault-backed StorageSigner for IOTA Identity operations.
|
|
6
|
+
* The private key never leaves the vault — only the raw signing operation is delegated.
|
|
7
|
+
*
|
|
8
|
+
* The returned StorageSigner is a genuine WASM object, satisfying the internal validation
|
|
9
|
+
* that IdentityClient.create() performs on the signer's iotaPublicKeyBytes() path.
|
|
10
|
+
*/
|
|
11
|
+
export declare class VaultJwtSigner {
|
|
12
|
+
/**
|
|
13
|
+
* Runtime name for the class.
|
|
14
|
+
*/
|
|
15
|
+
static readonly CLASS_NAME: string;
|
|
16
|
+
/**
|
|
17
|
+
* Create a StorageSigner whose cryptographic operations are backed by the vault connector.
|
|
18
|
+
* @param vaultConnector The vault connector.
|
|
19
|
+
* @param config The configuration.
|
|
20
|
+
* @param identity The identity of the user to access the vault keys.
|
|
21
|
+
* @param accountIndex The account index.
|
|
22
|
+
* @param addressIndex The address index within the account.
|
|
23
|
+
* @returns A StorageSigner backed by the vault for the specified key.
|
|
24
|
+
*/
|
|
25
|
+
static create(vaultConnector: IVaultConnector, config: IIotaConfig, identity: string, accountIndex: number, addressIndex: number): Promise<StorageSigner>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Signer, type SignatureScheme } from "@iota/iota-sdk/cryptography";
|
|
2
|
+
import { Ed25519PublicKey } from "@iota/iota-sdk/keypairs/ed25519";
|
|
3
|
+
import type { IVaultConnector } from "@twin.org/vault-models";
|
|
4
|
+
/**
|
|
5
|
+
* A signer that delegates all signing to the vault connector, ensuring the private key
|
|
6
|
+
* is never exposed to application code.
|
|
7
|
+
*/
|
|
8
|
+
export declare class VaultSigner extends Signer {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new VaultSigner.
|
|
11
|
+
* @param vaultConnector The vault connector used to perform signing operations.
|
|
12
|
+
* @param keyName The name of the key in the vault to use for signing.
|
|
13
|
+
* @param publicKey The public key bytes corresponding to the vault key.
|
|
14
|
+
*/
|
|
15
|
+
constructor(vaultConnector: IVaultConnector, keyName: string, publicKey: Uint8Array);
|
|
16
|
+
/**
|
|
17
|
+
* Get the key scheme.
|
|
18
|
+
* @returns The signature scheme.
|
|
19
|
+
*/
|
|
20
|
+
getKeyScheme(): SignatureScheme;
|
|
21
|
+
/**
|
|
22
|
+
* Get the public key.
|
|
23
|
+
* @returns The Ed25519 public key.
|
|
24
|
+
*/
|
|
25
|
+
getPublicKey(): Ed25519PublicKey;
|
|
26
|
+
/**
|
|
27
|
+
* Sign the provided bytes via the vault connector.
|
|
28
|
+
* @param bytes The bytes to sign.
|
|
29
|
+
* @returns The raw Ed25519 signature bytes.
|
|
30
|
+
*/
|
|
31
|
+
sign(bytes: Uint8Array): Promise<Uint8Array>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type PublicKey } from "@iota/iota-sdk/cryptography";
|
|
2
|
+
import type { IVaultConnector } from "@twin.org/vault-models";
|
|
3
|
+
import type { ITransactionSigner } from "./models/ITransactionSigner.js";
|
|
4
|
+
/**
|
|
5
|
+
* A transaction signer that delegates all signing operations to the vault connector,
|
|
6
|
+
* ensuring the private key is never exposed to application code.
|
|
7
|
+
*/
|
|
8
|
+
export declare class VaultTransactionSigner implements ITransactionSigner {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new VaultTransactionSigner.
|
|
11
|
+
* @param vaultConnector The vault connector used to perform signing operations.
|
|
12
|
+
* @param keyName The name of the key in the vault to use for signing.
|
|
13
|
+
* @param publicKey The public key bytes corresponding to the vault key.
|
|
14
|
+
*/
|
|
15
|
+
constructor(vaultConnector: IVaultConnector, keyName: string, publicKey: Uint8Array);
|
|
16
|
+
/**
|
|
17
|
+
* Sign the BCS-encoded transaction data.
|
|
18
|
+
* Applies the TransactionData intent, hashes the result, signs via the vault,
|
|
19
|
+
* and returns a serialized IOTA signature string.
|
|
20
|
+
* @param txDataBcs The raw transaction bytes to sign.
|
|
21
|
+
* @returns The serialized signature string.
|
|
22
|
+
*/
|
|
23
|
+
sign(txDataBcs: Uint8Array): Promise<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Get the public key for this signer.
|
|
26
|
+
* @returns The Ed25519 public key.
|
|
27
|
+
*/
|
|
28
|
+
publicKey(): Promise<PublicKey>;
|
|
29
|
+
/**
|
|
30
|
+
* Get the IOTA-formatted public key bytes (scheme flag byte followed by the raw key bytes).
|
|
31
|
+
* @returns The IOTA public key bytes.
|
|
32
|
+
*/
|
|
33
|
+
iotaPublicKeyBytes(): Promise<Uint8Array>;
|
|
34
|
+
/**
|
|
35
|
+
* Get the vault key name used by this signer.
|
|
36
|
+
* @returns The key name.
|
|
37
|
+
*/
|
|
38
|
+
keyId(): string;
|
|
39
|
+
}
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.15](https://github.com/iotaledger/twin-dlt/compare/dlt-iota-v0.0.3-next.14...dlt-iota-v0.0.3-next.15) (2026-06-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add vault signers ([#76](https://github.com/iotaledger/twin-dlt/issues/76)) ([bfdd701](https://github.com/iotaledger/twin-dlt/commit/bfdd701a010ad45d4f0cffb06d829360cf380a40))
|
|
9
|
+
|
|
10
|
+
## [0.0.3-next.14](https://github.com/iotaledger/twin-dlt/compare/dlt-iota-v0.0.3-next.13...dlt-iota-v0.0.3-next.14) (2026-06-15)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* use async getStore in tests ([0a7d4ac](https://github.com/iotaledger/twin-dlt/commit/0a7d4ac3e524481c2ca49d7fbb3507556b42473e))
|
|
16
|
+
* use async getStore in tests ([39a533d](https://github.com/iotaledger/twin-dlt/commit/39a533d9e2f806add624fc3f7ea7817f4b4c89f1))
|
|
17
|
+
|
|
3
18
|
## [0.0.3-next.13](https://github.com/iotaledger/twin-dlt/compare/dlt-iota-v0.0.3-next.12...dlt-iota-v0.0.3-next.13) (2026-05-20)
|
|
4
19
|
|
|
5
20
|
|
|
@@ -266,11 +266,11 @@ The list of addresses.
|
|
|
266
266
|
|
|
267
267
|
***
|
|
268
268
|
|
|
269
|
-
###
|
|
269
|
+
### getTransactionSigner() {#gettransactionsigner}
|
|
270
270
|
|
|
271
|
-
> `static` **
|
|
271
|
+
> `static` **getTransactionSigner**(`vaultConnector`, `config`, `identity`, `accountIndex`, `addressIndex`): `Promise`\<[`VaultTransactionSigner`](VaultTransactionSigner.md)\>
|
|
272
272
|
|
|
273
|
-
Get a
|
|
273
|
+
Get a vault-backed transaction signer for the given identity and key indices.
|
|
274
274
|
|
|
275
275
|
#### Parameters
|
|
276
276
|
|
|
@@ -296,25 +296,19 @@ The identity of the user to access the vault keys.
|
|
|
296
296
|
|
|
297
297
|
`number`
|
|
298
298
|
|
|
299
|
-
The account index
|
|
299
|
+
The account index.
|
|
300
300
|
|
|
301
301
|
##### addressIndex
|
|
302
302
|
|
|
303
303
|
`number`
|
|
304
304
|
|
|
305
|
-
The address index
|
|
306
|
-
|
|
307
|
-
##### isInternal?
|
|
308
|
-
|
|
309
|
-
`boolean`
|
|
310
|
-
|
|
311
|
-
Whether the address is internal.
|
|
305
|
+
The address index within the account.
|
|
312
306
|
|
|
313
307
|
#### Returns
|
|
314
308
|
|
|
315
|
-
`Promise
|
|
309
|
+
`Promise`\<[`VaultTransactionSigner`](VaultTransactionSigner.md)\>
|
|
316
310
|
|
|
317
|
-
|
|
311
|
+
A VaultTransactionSigner for the specified key.
|
|
318
312
|
|
|
319
313
|
***
|
|
320
314
|
|
|
@@ -466,74 +460,6 @@ The transaction response.
|
|
|
466
460
|
|
|
467
461
|
***
|
|
468
462
|
|
|
469
|
-
### findAddress() {#findaddress}
|
|
470
|
-
|
|
471
|
-
> `static` **findAddress**(`vaultConnector`, `config`, `identity`, `address`, `accountIndex`, `isInternal?`, `startScanIndex?`, `maxScanRange?`): `Promise`\<\{ `address`: `string`; `privateKey`: `Uint8Array`; `publicKey`: `Uint8Array`; \}\>
|
|
472
|
-
|
|
473
|
-
Find the address in the seed.
|
|
474
|
-
|
|
475
|
-
#### Parameters
|
|
476
|
-
|
|
477
|
-
##### vaultConnector
|
|
478
|
-
|
|
479
|
-
`IVaultConnector`
|
|
480
|
-
|
|
481
|
-
The vault connector to use.
|
|
482
|
-
|
|
483
|
-
##### config
|
|
484
|
-
|
|
485
|
-
[`IIotaConfig`](../interfaces/IIotaConfig.md)
|
|
486
|
-
|
|
487
|
-
The configuration to use.
|
|
488
|
-
|
|
489
|
-
##### identity
|
|
490
|
-
|
|
491
|
-
`string`
|
|
492
|
-
|
|
493
|
-
The identity of the user to access the vault keys.
|
|
494
|
-
|
|
495
|
-
##### address
|
|
496
|
-
|
|
497
|
-
`string`
|
|
498
|
-
|
|
499
|
-
The address to find.
|
|
500
|
-
|
|
501
|
-
##### accountIndex
|
|
502
|
-
|
|
503
|
-
`number`
|
|
504
|
-
|
|
505
|
-
The account index to search.
|
|
506
|
-
|
|
507
|
-
##### isInternal?
|
|
508
|
-
|
|
509
|
-
`boolean`
|
|
510
|
-
|
|
511
|
-
Whether to search internal addresses.
|
|
512
|
-
|
|
513
|
-
##### startScanIndex?
|
|
514
|
-
|
|
515
|
-
`number`
|
|
516
|
-
|
|
517
|
-
The address index to start scanning from.
|
|
518
|
-
|
|
519
|
-
##### maxScanRange?
|
|
520
|
-
|
|
521
|
-
`number`
|
|
522
|
-
|
|
523
|
-
The maximum range to scan.
|
|
524
|
-
|
|
525
|
-
#### Returns
|
|
526
|
-
|
|
527
|
-
`Promise`\<\{ `address`: `string`; `privateKey`: `Uint8Array`; `publicKey`: `Uint8Array`; \}\>
|
|
528
|
-
|
|
529
|
-
The address key pair.
|
|
530
|
-
|
|
531
|
-
#### Throws
|
|
532
|
-
|
|
533
|
-
Error if the address is not found.
|
|
534
|
-
|
|
535
|
-
***
|
|
536
|
-
|
|
537
463
|
### extractPayloadError() {#extractpayloaderror}
|
|
538
464
|
|
|
539
465
|
> `static` **extractPayloadError**(`error`): `IError`
|
|
@@ -627,7 +553,7 @@ The operation to log.
|
|
|
627
553
|
|
|
628
554
|
`Promise`\<[`IIotaDryRun`](../interfaces/IIotaDryRun.md)\>
|
|
629
555
|
|
|
630
|
-
|
|
556
|
+
The dry run result including status, costs, events, and object changes.
|
|
631
557
|
|
|
632
558
|
***
|
|
633
559
|
|
|
@@ -1032,3 +958,25 @@ The address to get the balance for.
|
|
|
1032
958
|
`Promise`\<`bigint`\>
|
|
1033
959
|
|
|
1034
960
|
The balance of the given address.
|
|
961
|
+
|
|
962
|
+
***
|
|
963
|
+
|
|
964
|
+
### transactionFromBytes() {#transactionfrombytes}
|
|
965
|
+
|
|
966
|
+
> `static` **transactionFromBytes**(`bytes`): `Transaction`
|
|
967
|
+
|
|
968
|
+
Create a transaction instance from the given bytes.
|
|
969
|
+
|
|
970
|
+
#### Parameters
|
|
971
|
+
|
|
972
|
+
##### bytes
|
|
973
|
+
|
|
974
|
+
`Uint8Array`
|
|
975
|
+
|
|
976
|
+
The transaction bytes to create the transaction from.
|
|
977
|
+
|
|
978
|
+
#### Returns
|
|
979
|
+
|
|
980
|
+
`Transaction`
|
|
981
|
+
|
|
982
|
+
The transaction instance created from the given bytes.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# Class: IotaIdentityUtils
|
|
2
2
|
|
|
3
|
-
Utility class for resolving IOTA Identity on-chain objects
|
|
4
|
-
the NFT mint_with_identity() Move contract function.
|
|
3
|
+
Utility class for resolving IOTA Identity on-chain objects and controller tokens.
|
|
5
4
|
|
|
6
5
|
## Constructors
|
|
7
6
|
|
|
@@ -27,8 +26,7 @@ Runtime name for the class.
|
|
|
27
26
|
|
|
28
27
|
> `static` **getControllerCapInfo**(`identityId`, `controllerAddress`, `client`): `Promise`\<[`IIotaControllerCapInfo`](../interfaces/IIotaControllerCapInfo.md)\>
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
Returns the IDs needed to call mint_with_identity() on the NFT Move contract.
|
|
29
|
+
Resolves the on-chain object IDs for an identity and its controller token.
|
|
32
30
|
|
|
33
31
|
#### Parameters
|
|
34
32
|
|
|
@@ -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
|
|
|
@@ -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...").
|