@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.
Files changed (56) hide show
  1. package/dist/es/index.js +7 -3
  2. package/dist/es/index.js.map +1 -1
  3. package/dist/es/iota.js +104 -89
  4. package/dist/es/iota.js.map +1 -1
  5. package/dist/es/iotaIdentityUtils.js +2 -4
  6. package/dist/es/iotaIdentityUtils.js.map +1 -1
  7. package/dist/es/iotaSmartContractUtils.js +2 -1
  8. package/dist/es/iotaSmartContractUtils.js.map +1 -1
  9. package/dist/es/models/IAdminCapFields.js.map +1 -1
  10. package/dist/es/models/IGasStationExecuteResponse.js.map +1 -1
  11. package/dist/es/models/IIotaControllerCapInfo.js.map +1 -1
  12. package/dist/es/models/IIotaResponseOptions.js.map +1 -1
  13. package/dist/es/models/IMigrationStateFields.js.map +1 -1
  14. package/dist/es/models/ISmartContractObject.js.map +1 -1
  15. package/dist/es/models/ITransactionSigner.js +2 -0
  16. package/dist/es/models/ITransactionSigner.js.map +1 -0
  17. package/dist/es/vaultJwkStorage.js +71 -0
  18. package/dist/es/vaultJwkStorage.js.map +1 -0
  19. package/dist/es/vaultJwtSigner.js +49 -0
  20. package/dist/es/vaultJwtSigner.js.map +1 -0
  21. package/dist/es/vaultSigner.js +60 -0
  22. package/dist/es/vaultSigner.js.map +1 -0
  23. package/dist/es/vaultTransactionSigner.js +74 -0
  24. package/dist/es/vaultTransactionSigner.js.map +1 -0
  25. package/dist/types/index.d.ts +7 -3
  26. package/dist/types/iota.d.ts +13 -28
  27. package/dist/types/iotaIdentityUtils.d.ts +2 -4
  28. package/dist/types/iotaSmartContractUtils.d.ts +0 -1
  29. package/dist/types/models/IAdminCapFields.d.ts +2 -2
  30. package/dist/types/models/IGasStationExecuteResponse.d.ts +1 -3
  31. package/dist/types/models/IIotaControllerCapInfo.d.ts +3 -6
  32. package/dist/types/models/IIotaResponseOptions.d.ts +1 -1
  33. package/dist/types/models/IMigrationStateFields.d.ts +2 -2
  34. package/dist/types/models/ISmartContractObject.d.ts +2 -2
  35. package/dist/types/models/ITransactionSigner.d.ts +27 -0
  36. package/dist/types/vaultJwkStorage.d.ts +50 -0
  37. package/dist/types/vaultJwtSigner.d.ts +26 -0
  38. package/dist/types/vaultSigner.d.ts +32 -0
  39. package/dist/types/vaultTransactionSigner.d.ts +39 -0
  40. package/docs/changelog.md +15 -0
  41. package/docs/reference/classes/Iota.md +30 -82
  42. package/docs/reference/classes/IotaIdentityUtils.md +2 -4
  43. package/docs/reference/classes/IotaSmartContractUtils.md +0 -1
  44. package/docs/reference/classes/VaultJwtSigner.md +71 -0
  45. package/docs/reference/classes/VaultSigner.md +106 -0
  46. package/docs/reference/classes/VaultTransactionSigner.md +122 -0
  47. package/docs/reference/index.md +4 -0
  48. package/docs/reference/interfaces/IAdminCapFields.md +2 -2
  49. package/docs/reference/interfaces/IGasStationExecuteResponse.md +1 -3
  50. package/docs/reference/interfaces/IIotaControllerCapInfo.md +3 -6
  51. package/docs/reference/interfaces/IIotaResponseOptions.md +1 -1
  52. package/docs/reference/interfaces/IMigrationStateFields.md +2 -2
  53. package/docs/reference/interfaces/ISmartContractObject.md +2 -2
  54. package/docs/reference/interfaces/ITransactionSigner.md +67 -0
  55. package/locales/en.json +5 -1
  56. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"IMigrationStateFields.js","sourceRoot":"","sources":["../../../src/models/IMigrationStateFields.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Generic interface representing the storage fields of a MigrationState object.\n */\nexport interface IMigrationStateFields {\n\t/**\n\t * The ID of the MigrationState object.\n\t */\n\tid: {\n\t\t/**\n\t\t * The ID of the MigrationState object.\n\t\t */\n\t\tid: string; // UID is an object with an 'id' field\n\t};\n\n\t/**\n\t * Whether migration is currently enabled.\n\t */\n\tenabled: boolean;\n}\n"]}
1
+ {"version":3,"file":"IMigrationStateFields.js","sourceRoot":"","sources":["../../../src/models/IMigrationStateFields.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Generic interface representing the storage fields of a MigrationState object.\n */\nexport interface IMigrationStateFields {\n\t/**\n\t * The UID wrapper of the MigrationState object.\n\t */\n\tid: {\n\t\t/**\n\t\t * The hex string ID of the MigrationState object.\n\t\t */\n\t\tid: string;\n\t};\n\n\t/**\n\t * Whether migration is currently enabled.\n\t */\n\tenabled: boolean;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ISmartContractObject.js","sourceRoot":"","sources":["../../../src/models/ISmartContractObject.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Base interface for all smart contract objects with versioning support.\n */\nexport interface ISmartContractObject {\n\t/**\n\t * The ID of the smart contract object.\n\t */\n\tid: {\n\t\t/**\n\t\t * The ID of the smart contract object.\n\t\t */\n\t\tid: string; // UID is an object with an 'id' field\n\t};\n\n\t/**\n\t * The version of the contract that created this object.\n\t */\n\tversion: string;\n}\n"]}
1
+ {"version":3,"file":"ISmartContractObject.js","sourceRoot":"","sources":["../../../src/models/ISmartContractObject.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Base interface for all smart contract objects with versioning support.\n */\nexport interface ISmartContractObject {\n\t/**\n\t * The UID wrapper of the smart contract object.\n\t */\n\tid: {\n\t\t/**\n\t\t * The hex string ID of the smart contract object.\n\t\t */\n\t\tid: string;\n\t};\n\n\t/**\n\t * The version of the contract that created this object.\n\t */\n\tversion: string;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ITransactionSigner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITransactionSigner.js","sourceRoot":"","sources":["../../../src/models/ITransactionSigner.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { PublicKey } from \"@iota/iota-sdk/cryptography\";\n\n/**\n * Interface for a transaction signer backed by a secure key store.\n */\nexport interface ITransactionSigner {\n\t/**\n\t * Sign the BCS-encoded transaction data and return a serialized IOTA signature string.\n\t * @param txDataBcs The raw transaction bytes to sign.\n\t * @returns The serialized signature string (scheme flag + signature + public key, base64-encoded).\n\t */\n\tsign(txDataBcs: Uint8Array): Promise<string>;\n\n\t/**\n\t * Get the public key for this signer.\n\t * @returns The public key.\n\t */\n\tpublicKey(): Promise<PublicKey>;\n\n\t/**\n\t * Get the IOTA-formatted public key bytes (scheme flag byte followed by the raw key bytes).\n\t * @returns The IOTA public key bytes.\n\t */\n\tiotaPublicKeyBytes(): Promise<Uint8Array>;\n\n\t/**\n\t * Get the key identifier for this signer.\n\t * @returns The key identifier.\n\t */\n\tkeyId(): string;\n}\n"]}
@@ -0,0 +1,71 @@
1
+ import { GeneralError } from "@twin.org/core";
2
+ /**
3
+ * JwkStorage implementation that delegates the sign operation to the vault connector,
4
+ * keeping the private key inside the vault at all times.
5
+ */
6
+ export class VaultJwkStorage {
7
+ /**
8
+ * Runtime name for the class.
9
+ */
10
+ static CLASS_NAME = "VaultJwkStorage";
11
+ /**
12
+ * The vault connector used to perform signing.
13
+ * @internal
14
+ */
15
+ _vaultConnector;
16
+ /**
17
+ * The vault key name to use when signing.
18
+ * @internal
19
+ */
20
+ _keyName;
21
+ /**
22
+ * Create a new VaultJwkStorage.
23
+ * @param vaultConnector The vault connector used to perform signing operations.
24
+ * @param keyName The name of the key in the vault to use for signing.
25
+ */
26
+ constructor(vaultConnector, keyName) {
27
+ this._vaultConnector = vaultConnector;
28
+ this._keyName = keyName;
29
+ }
30
+ /**
31
+ * Sign data by delegating to the vault connector.
32
+ * @param keyId The key identifier (unused; the vault key name is used directly).
33
+ * @param data The data to sign.
34
+ * @param publicKey The public key JWK (unused; the vault connector handles key lookup).
35
+ * @returns The raw signature bytes.
36
+ */
37
+ async sign(keyId, data, publicKey) {
38
+ return this._vaultConnector.sign(this._keyName, data);
39
+ }
40
+ /**
41
+ * Accept a JWK entry and return the vault key name as the stable key identifier.
42
+ * @param jwk The JWK to register.
43
+ * @returns The key identifier.
44
+ */
45
+ async insert(jwk) {
46
+ return this._keyName;
47
+ }
48
+ /**
49
+ * Check whether the given key identifier is managed by this storage.
50
+ * @param keyId The key identifier to check.
51
+ * @returns True if the key exists in this storage.
52
+ */
53
+ async exists(keyId) {
54
+ return keyId === this._keyName;
55
+ }
56
+ /**
57
+ * Key generation is not supported; keys are managed entirely by the vault.
58
+ * @param keyType The key type requested.
59
+ * @param algorithm The JWS algorithm requested.
60
+ * @returns Never returns.
61
+ */
62
+ async generate(keyType, algorithm) {
63
+ throw new GeneralError(VaultJwkStorage.CLASS_NAME, "generateNotSupported");
64
+ }
65
+ /**
66
+ * Deletion is a no-op; keys are managed by the vault.
67
+ * @param keyId The key identifier to delete.
68
+ */
69
+ async delete(keyId) { }
70
+ }
71
+ //# sourceMappingURL=vaultJwkStorage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vaultJwkStorage.js","sourceRoot":"","sources":["../../src/vaultJwkStorage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9C;;;GAGG;AACH,MAAM,OAAO,eAAe;IAC3B;;OAEG;IACI,MAAM,CAAU,UAAU,qBAAqC;IAEtE;;;OAGG;IACc,eAAe,CAAkB;IAElD;;;OAGG;IACc,QAAQ,CAAS;IAElC;;;;OAIG;IACH,YAAY,cAA+B,EAAE,OAAe;QAC3D,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,IAAI,CAAC,KAAa,EAAE,IAAgB,EAAE,SAAc;QAChE,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,CAAC,GAAQ;QAC3B,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,CAAC,KAAa;QAChC,OAAO,KAAK,KAAK,IAAI,CAAC,QAAQ,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,QAAQ,CAAC,OAAe,EAAE,SAAuB;QAC7D,MAAM,IAAI,YAAY,CAAC,eAAe,CAAC,UAAU,EAAE,sBAAsB,CAAC,CAAC;IAC5E,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAAM,CAAC,KAAa,IAAkB,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { Jwk, JwkStorage, JwsAlgorithm } from \"@iota/identity-wasm/node/index.js\";\nimport { GeneralError } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type { IVaultConnector } from \"@twin.org/vault-models\";\n\n/**\n * JwkStorage implementation that delegates the sign operation to the vault connector,\n * keeping the private key inside the vault at all times.\n */\nexport class VaultJwkStorage implements JwkStorage {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<VaultJwkStorage>();\n\n\t/**\n\t * The vault connector used to perform signing.\n\t * @internal\n\t */\n\tprivate readonly _vaultConnector: IVaultConnector;\n\n\t/**\n\t * The vault key name to use when signing.\n\t * @internal\n\t */\n\tprivate readonly _keyName: string;\n\n\t/**\n\t * Create a new VaultJwkStorage.\n\t * @param vaultConnector The vault connector used to perform signing operations.\n\t * @param keyName The name of the key in the vault to use for signing.\n\t */\n\tconstructor(vaultConnector: IVaultConnector, keyName: string) {\n\t\tthis._vaultConnector = vaultConnector;\n\t\tthis._keyName = keyName;\n\t}\n\n\t/**\n\t * Sign data by delegating to the vault connector.\n\t * @param keyId The key identifier (unused; the vault key name is used directly).\n\t * @param data The data to sign.\n\t * @param publicKey The public key JWK (unused; the vault connector handles key lookup).\n\t * @returns The raw signature bytes.\n\t */\n\tpublic async sign(keyId: string, data: Uint8Array, publicKey: Jwk): Promise<Uint8Array> {\n\t\treturn this._vaultConnector.sign(this._keyName, data);\n\t}\n\n\t/**\n\t * Accept a JWK entry and return the vault key name as the stable key identifier.\n\t * @param jwk The JWK to register.\n\t * @returns The key identifier.\n\t */\n\tpublic async insert(jwk: Jwk): Promise<string> {\n\t\treturn this._keyName;\n\t}\n\n\t/**\n\t * Check whether the given key identifier is managed by this storage.\n\t * @param keyId The key identifier to check.\n\t * @returns True if the key exists in this storage.\n\t */\n\tpublic async exists(keyId: string): Promise<boolean> {\n\t\treturn keyId === this._keyName;\n\t}\n\n\t/**\n\t * Key generation is not supported; keys are managed entirely by the vault.\n\t * @param keyType The key type requested.\n\t * @param algorithm The JWS algorithm requested.\n\t * @returns Never returns.\n\t */\n\tpublic async generate(keyType: string, algorithm: JwsAlgorithm): Promise<never> {\n\t\tthrow new GeneralError(VaultJwkStorage.CLASS_NAME, \"generateNotSupported\");\n\t}\n\n\t/**\n\t * Deletion is a no-op; keys are managed by the vault.\n\t * @param keyId The key identifier to delete.\n\t */\n\tpublic async delete(keyId: string): Promise<void> {}\n}\n"]}
@@ -0,0 +1,49 @@
1
+ // Copyright 2026 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ import { Jwk, KeyIdMemStore, Storage, StorageSigner } from "@iota/identity-wasm/node/index.js";
4
+ import { Base64Url, Guards } from "@twin.org/core";
5
+ import { Iota } from "./iota.js";
6
+ import { VaultJwkStorage } from "./vaultJwkStorage.js";
7
+ /**
8
+ * Factory that creates a vault-backed StorageSigner for IOTA Identity operations.
9
+ * The private key never leaves the vault — only the raw signing operation is delegated.
10
+ *
11
+ * The returned StorageSigner is a genuine WASM object, satisfying the internal validation
12
+ * that IdentityClient.create() performs on the signer's iotaPublicKeyBytes() path.
13
+ */
14
+ export class VaultJwtSigner {
15
+ /**
16
+ * Runtime name for the class.
17
+ */
18
+ static CLASS_NAME = "VaultJwtSigner";
19
+ /**
20
+ * Create a StorageSigner whose cryptographic operations are backed by the vault connector.
21
+ * @param vaultConnector The vault connector.
22
+ * @param config The configuration.
23
+ * @param identity The identity of the user to access the vault keys.
24
+ * @param accountIndex The account index.
25
+ * @param addressIndex The address index within the account.
26
+ * @returns A StorageSigner backed by the vault for the specified key.
27
+ */
28
+ static async create(vaultConnector, config, identity, accountIndex, addressIndex) {
29
+ Guards.object(VaultJwtSigner.CLASS_NAME, "vaultConnector", vaultConnector);
30
+ Guards.object(VaultJwtSigner.CLASS_NAME, "config", config);
31
+ Guards.stringValue(VaultJwtSigner.CLASS_NAME, "identity", identity);
32
+ Guards.integer(VaultJwtSigner.CLASS_NAME, "accountIndex", accountIndex);
33
+ Guards.integer(VaultJwtSigner.CLASS_NAME, "addressIndex", addressIndex);
34
+ const transactionSigner = await Iota.getTransactionSigner(vaultConnector, config, identity, accountIndex, addressIndex);
35
+ const keyName = transactionSigner.keyId();
36
+ const publicKey = await transactionSigner.publicKey();
37
+ const publicJwk = new Jwk({
38
+ kty: "OKP" /* JwkType.Okp */,
39
+ crv: "Ed25519",
40
+ alg: "EdDSA" /* JwsAlgorithm.EdDSA */,
41
+ x: Base64Url.encode(publicKey.toRawBytes())
42
+ });
43
+ const vaultJwkStorage = new VaultJwkStorage(vaultConnector, keyName);
44
+ const keyId = await vaultJwkStorage.insert(publicJwk);
45
+ const storage = new Storage(vaultJwkStorage, new KeyIdMemStore());
46
+ return new StorageSigner(storage, keyId, publicJwk);
47
+ }
48
+ }
49
+ //# sourceMappingURL=vaultJwtSigner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vaultJwtSigner.js","sourceRoot":"","sources":["../../src/vaultJwtSigner.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EACN,GAAG,EAGH,aAAa,EACb,OAAO,EACP,aAAa,EACb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,OAAO,cAAc;IAC1B;;OAEG;IACI,MAAM,CAAU,UAAU,oBAAoC;IAErE;;;;;;;;OAQG;IACI,MAAM,CAAC,KAAK,CAAC,MAAM,CACzB,cAA+B,EAC/B,MAAmB,EACnB,QAAgB,EAChB,YAAoB,EACpB,YAAoB;QAEpB,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,UAAU,oBAA0B,cAAc,CAAC,CAAC;QACjF,MAAM,CAAC,MAAM,CAAc,cAAc,CAAC,UAAU,YAAkB,MAAM,CAAC,CAAC;QAC9E,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,UAAU,cAAoB,QAAQ,CAAC,CAAC;QAC1E,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,UAAU,kBAAwB,YAAY,CAAC,CAAC;QAC9E,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,UAAU,kBAAwB,YAAY,CAAC,CAAC;QAE9E,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,oBAAoB,CACxD,cAAc,EACd,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,YAAY,CACZ,CAAC;QAEF,MAAM,OAAO,GAAG,iBAAiB,CAAC,KAAK,EAAE,CAAC;QAC1C,MAAM,SAAS,GAAG,MAAM,iBAAiB,CAAC,SAAS,EAAE,CAAC;QAEtD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;YACzB,GAAG,yBAAa;YAChB,GAAG,EAAE,SAAS;YACd,GAAG,kCAAoB;YACvB,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;SAC3C,CAAC,CAAC;QAEH,MAAM,eAAe,GAAG,IAAI,eAAe,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QACrE,MAAM,KAAK,GAAG,MAAM,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACtD,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,eAAe,EAAE,IAAI,aAAa,EAAE,CAAC,CAAC;QAElE,OAAO,IAAI,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport {\n\tJwk,\n\tJwkType,\n\tJwsAlgorithm,\n\tKeyIdMemStore,\n\tStorage,\n\tStorageSigner\n} from \"@iota/identity-wasm/node/index.js\";\nimport { Base64Url, Guards } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type { IVaultConnector } from \"@twin.org/vault-models\";\nimport { Iota } from \"./iota.js\";\nimport type { IIotaConfig } from \"./models/IIotaConfig.js\";\nimport { VaultJwkStorage } from \"./vaultJwkStorage.js\";\n\n/**\n * Factory that creates a vault-backed StorageSigner for IOTA Identity operations.\n * The private key never leaves the vault — only the raw signing operation is delegated.\n *\n * The returned StorageSigner is a genuine WASM object, satisfying the internal validation\n * that IdentityClient.create() performs on the signer's iotaPublicKeyBytes() path.\n */\nexport class VaultJwtSigner {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<VaultJwtSigner>();\n\n\t/**\n\t * Create a StorageSigner whose cryptographic operations are backed by the vault connector.\n\t * @param vaultConnector The vault connector.\n\t * @param config The configuration.\n\t * @param identity The identity of the user to access the vault keys.\n\t * @param accountIndex The account index.\n\t * @param addressIndex The address index within the account.\n\t * @returns A StorageSigner backed by the vault for the specified key.\n\t */\n\tpublic static async create(\n\t\tvaultConnector: IVaultConnector,\n\t\tconfig: IIotaConfig,\n\t\tidentity: string,\n\t\taccountIndex: number,\n\t\taddressIndex: number\n\t): Promise<StorageSigner> {\n\t\tGuards.object(VaultJwtSigner.CLASS_NAME, nameof(vaultConnector), vaultConnector);\n\t\tGuards.object<IIotaConfig>(VaultJwtSigner.CLASS_NAME, nameof(config), config);\n\t\tGuards.stringValue(VaultJwtSigner.CLASS_NAME, nameof(identity), identity);\n\t\tGuards.integer(VaultJwtSigner.CLASS_NAME, nameof(accountIndex), accountIndex);\n\t\tGuards.integer(VaultJwtSigner.CLASS_NAME, nameof(addressIndex), addressIndex);\n\n\t\tconst transactionSigner = await Iota.getTransactionSigner(\n\t\t\tvaultConnector,\n\t\t\tconfig,\n\t\t\tidentity,\n\t\t\taccountIndex,\n\t\t\taddressIndex\n\t\t);\n\n\t\tconst keyName = transactionSigner.keyId();\n\t\tconst publicKey = await transactionSigner.publicKey();\n\n\t\tconst publicJwk = new Jwk({\n\t\t\tkty: JwkType.Okp,\n\t\t\tcrv: \"Ed25519\",\n\t\t\talg: JwsAlgorithm.EdDSA,\n\t\t\tx: Base64Url.encode(publicKey.toRawBytes())\n\t\t});\n\n\t\tconst vaultJwkStorage = new VaultJwkStorage(vaultConnector, keyName);\n\t\tconst keyId = await vaultJwkStorage.insert(publicJwk);\n\t\tconst storage = new Storage(vaultJwkStorage, new KeyIdMemStore());\n\n\t\treturn new StorageSigner(storage, keyId, publicJwk);\n\t}\n}\n"]}
@@ -0,0 +1,60 @@
1
+ // Copyright 2026 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ import { Signer } from "@iota/iota-sdk/cryptography";
4
+ import { Ed25519PublicKey } from "@iota/iota-sdk/keypairs/ed25519";
5
+ /**
6
+ * A signer that delegates all signing to the vault connector, ensuring the private key
7
+ * is never exposed to application code.
8
+ */
9
+ export class VaultSigner extends Signer {
10
+ /**
11
+ * The vault connector used to perform signing.
12
+ * @internal
13
+ */
14
+ _vaultConnector;
15
+ /**
16
+ * The vault key name to use when signing.
17
+ * @internal
18
+ */
19
+ _keyName;
20
+ /**
21
+ * The public key for this signer.
22
+ * @internal
23
+ */
24
+ _publicKey;
25
+ /**
26
+ * Create a new VaultSigner.
27
+ * @param vaultConnector The vault connector used to perform signing operations.
28
+ * @param keyName The name of the key in the vault to use for signing.
29
+ * @param publicKey The public key bytes corresponding to the vault key.
30
+ */
31
+ constructor(vaultConnector, keyName, publicKey) {
32
+ super();
33
+ this._vaultConnector = vaultConnector;
34
+ this._keyName = keyName;
35
+ this._publicKey = new Ed25519PublicKey(publicKey);
36
+ }
37
+ /**
38
+ * Get the key scheme.
39
+ * @returns The signature scheme.
40
+ */
41
+ getKeyScheme() {
42
+ return "ED25519";
43
+ }
44
+ /**
45
+ * Get the public key.
46
+ * @returns The Ed25519 public key.
47
+ */
48
+ getPublicKey() {
49
+ return this._publicKey;
50
+ }
51
+ /**
52
+ * Sign the provided bytes via the vault connector.
53
+ * @param bytes The bytes to sign.
54
+ * @returns The raw Ed25519 signature bytes.
55
+ */
56
+ async sign(bytes) {
57
+ return this._vaultConnector.sign(this._keyName, bytes);
58
+ }
59
+ }
60
+ //# sourceMappingURL=vaultSigner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vaultSigner.js","sourceRoot":"","sources":["../../src/vaultSigner.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAwB,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGnE;;;GAGG;AACH,MAAM,OAAO,WAAY,SAAQ,MAAM;IACtC;;;OAGG;IACc,eAAe,CAAkB;IAElD;;;OAGG;IACc,QAAQ,CAAS;IAElC;;;OAGG;IACc,UAAU,CAAmB;IAE9C;;;;;OAKG;IACH,YAAY,cAA+B,EAAE,OAAe,EAAE,SAAqB;QAClF,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,IAAI,gBAAgB,CAAC,SAAS,CAAC,CAAC;IACnD,CAAC;IAED;;;OAGG;IACI,YAAY;QAClB,OAAO,SAAS,CAAC;IAClB,CAAC;IAED;;;OAGG;IACI,YAAY;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,IAAI,CAAC,KAAiB;QAClC,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IACxD,CAAC;CACD","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { Signer, type SignatureScheme } from \"@iota/iota-sdk/cryptography\";\nimport { Ed25519PublicKey } from \"@iota/iota-sdk/keypairs/ed25519\";\nimport type { IVaultConnector } from \"@twin.org/vault-models\";\n\n/**\n * A signer that delegates all signing to the vault connector, ensuring the private key\n * is never exposed to application code.\n */\nexport class VaultSigner extends Signer {\n\t/**\n\t * The vault connector used to perform signing.\n\t * @internal\n\t */\n\tprivate readonly _vaultConnector: IVaultConnector;\n\n\t/**\n\t * The vault key name to use when signing.\n\t * @internal\n\t */\n\tprivate readonly _keyName: string;\n\n\t/**\n\t * The public key for this signer.\n\t * @internal\n\t */\n\tprivate readonly _publicKey: Ed25519PublicKey;\n\n\t/**\n\t * Create a new VaultSigner.\n\t * @param vaultConnector The vault connector used to perform signing operations.\n\t * @param keyName The name of the key in the vault to use for signing.\n\t * @param publicKey The public key bytes corresponding to the vault key.\n\t */\n\tconstructor(vaultConnector: IVaultConnector, keyName: string, publicKey: Uint8Array) {\n\t\tsuper();\n\t\tthis._vaultConnector = vaultConnector;\n\t\tthis._keyName = keyName;\n\t\tthis._publicKey = new Ed25519PublicKey(publicKey);\n\t}\n\n\t/**\n\t * Get the key scheme.\n\t * @returns The signature scheme.\n\t */\n\tpublic getKeyScheme(): SignatureScheme {\n\t\treturn \"ED25519\";\n\t}\n\n\t/**\n\t * Get the public key.\n\t * @returns The Ed25519 public key.\n\t */\n\tpublic getPublicKey(): Ed25519PublicKey {\n\t\treturn this._publicKey;\n\t}\n\n\t/**\n\t * Sign the provided bytes via the vault connector.\n\t * @param bytes The bytes to sign.\n\t * @returns The raw Ed25519 signature bytes.\n\t */\n\tpublic async sign(bytes: Uint8Array): Promise<Uint8Array> {\n\t\treturn this._vaultConnector.sign(this._keyName, bytes);\n\t}\n}\n"]}
@@ -0,0 +1,74 @@
1
+ // Copyright 2026 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ import { Signer, toSerializedSignature } from "@iota/iota-sdk/cryptography";
4
+ import { Ed25519PublicKey } from "@iota/iota-sdk/keypairs/ed25519";
5
+ /**
6
+ * A transaction signer that delegates all signing operations to the vault connector,
7
+ * ensuring the private key is never exposed to application code.
8
+ */
9
+ export class VaultTransactionSigner {
10
+ /**
11
+ * The vault connector used to perform signing.
12
+ * @internal
13
+ */
14
+ _vaultConnector;
15
+ /**
16
+ * The vault key name to use when signing.
17
+ * @internal
18
+ */
19
+ _keyName;
20
+ /**
21
+ * The public key for this signer.
22
+ * @internal
23
+ */
24
+ _publicKey;
25
+ /**
26
+ * Create a new VaultTransactionSigner.
27
+ * @param vaultConnector The vault connector used to perform signing operations.
28
+ * @param keyName The name of the key in the vault to use for signing.
29
+ * @param publicKey The public key bytes corresponding to the vault key.
30
+ */
31
+ constructor(vaultConnector, keyName, publicKey) {
32
+ this._vaultConnector = vaultConnector;
33
+ this._keyName = keyName;
34
+ this._publicKey = new Ed25519PublicKey(publicKey);
35
+ }
36
+ /**
37
+ * Sign the BCS-encoded transaction data.
38
+ * Applies the TransactionData intent, hashes the result, signs via the vault,
39
+ * and returns a serialized IOTA signature string.
40
+ * @param txDataBcs The raw transaction bytes to sign.
41
+ * @returns The serialized signature string.
42
+ */
43
+ async sign(txDataBcs) {
44
+ const digest = Signer.signingDigest(txDataBcs, "TransactionData");
45
+ const rawSignature = await this._vaultConnector.sign(this._keyName, digest);
46
+ return toSerializedSignature({
47
+ signature: rawSignature,
48
+ signatureScheme: "ED25519",
49
+ publicKey: this._publicKey
50
+ });
51
+ }
52
+ /**
53
+ * Get the public key for this signer.
54
+ * @returns The Ed25519 public key.
55
+ */
56
+ async publicKey() {
57
+ return this._publicKey;
58
+ }
59
+ /**
60
+ * Get the IOTA-formatted public key bytes (scheme flag byte followed by the raw key bytes).
61
+ * @returns The IOTA public key bytes.
62
+ */
63
+ async iotaPublicKeyBytes() {
64
+ return this._publicKey.toIotaBytes();
65
+ }
66
+ /**
67
+ * Get the vault key name used by this signer.
68
+ * @returns The key name.
69
+ */
70
+ keyId() {
71
+ return this._keyName;
72
+ }
73
+ }
74
+ //# sourceMappingURL=vaultTransactionSigner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vaultTransactionSigner.js","sourceRoot":"","sources":["../../src/vaultTransactionSigner.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAkB,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAInE;;;GAGG;AACH,MAAM,OAAO,sBAAsB;IAClC;;;OAGG;IACc,eAAe,CAAkB;IAElD;;;OAGG;IACc,QAAQ,CAAS;IAElC;;;OAGG;IACc,UAAU,CAAmB;IAE9C;;;;;OAKG;IACH,YAAY,cAA+B,EAAE,OAAe,EAAE,SAAqB;QAClF,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,IAAI,gBAAgB,CAAC,SAAS,CAAC,CAAC;IACnD,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,IAAI,CAAC,SAAqB;QACtC,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;QAClE,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC5E,OAAO,qBAAqB,CAAC;YAC5B,SAAS,EAAE,YAAY;YACvB,eAAe,EAAE,SAAS;YAC1B,SAAS,EAAE,IAAI,CAAC,UAAU;SAC1B,CAAC,CAAC;IACJ,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,SAAS;QACrB,OAAO,IAAI,CAAC,UAAU,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,kBAAkB;QAC9B,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;IACtC,CAAC;IAED;;;OAGG;IACI,KAAK;QACX,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;CACD","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { Signer, toSerializedSignature, type PublicKey } from \"@iota/iota-sdk/cryptography\";\nimport { Ed25519PublicKey } from \"@iota/iota-sdk/keypairs/ed25519\";\nimport type { IVaultConnector } from \"@twin.org/vault-models\";\nimport type { ITransactionSigner } from \"./models/ITransactionSigner.js\";\n\n/**\n * A transaction signer that delegates all signing operations to the vault connector,\n * ensuring the private key is never exposed to application code.\n */\nexport class VaultTransactionSigner implements ITransactionSigner {\n\t/**\n\t * The vault connector used to perform signing.\n\t * @internal\n\t */\n\tprivate readonly _vaultConnector: IVaultConnector;\n\n\t/**\n\t * The vault key name to use when signing.\n\t * @internal\n\t */\n\tprivate readonly _keyName: string;\n\n\t/**\n\t * The public key for this signer.\n\t * @internal\n\t */\n\tprivate readonly _publicKey: Ed25519PublicKey;\n\n\t/**\n\t * Create a new VaultTransactionSigner.\n\t * @param vaultConnector The vault connector used to perform signing operations.\n\t * @param keyName The name of the key in the vault to use for signing.\n\t * @param publicKey The public key bytes corresponding to the vault key.\n\t */\n\tconstructor(vaultConnector: IVaultConnector, keyName: string, publicKey: Uint8Array) {\n\t\tthis._vaultConnector = vaultConnector;\n\t\tthis._keyName = keyName;\n\t\tthis._publicKey = new Ed25519PublicKey(publicKey);\n\t}\n\n\t/**\n\t * Sign the BCS-encoded transaction data.\n\t * Applies the TransactionData intent, hashes the result, signs via the vault,\n\t * and returns a serialized IOTA signature string.\n\t * @param txDataBcs The raw transaction bytes to sign.\n\t * @returns The serialized signature string.\n\t */\n\tpublic async sign(txDataBcs: Uint8Array): Promise<string> {\n\t\tconst digest = Signer.signingDigest(txDataBcs, \"TransactionData\");\n\t\tconst rawSignature = await this._vaultConnector.sign(this._keyName, digest);\n\t\treturn toSerializedSignature({\n\t\t\tsignature: rawSignature,\n\t\t\tsignatureScheme: \"ED25519\",\n\t\t\tpublicKey: this._publicKey\n\t\t});\n\t}\n\n\t/**\n\t * Get the public key for this signer.\n\t * @returns The Ed25519 public key.\n\t */\n\tpublic async publicKey(): Promise<PublicKey> {\n\t\treturn this._publicKey;\n\t}\n\n\t/**\n\t * Get the IOTA-formatted public key bytes (scheme flag byte followed by the raw key bytes).\n\t * @returns The IOTA public key bytes.\n\t */\n\tpublic async iotaPublicKeyBytes(): Promise<Uint8Array> {\n\t\treturn this._publicKey.toIotaBytes();\n\t}\n\n\t/**\n\t * Get the vault key name used by this signer.\n\t * @returns The key name.\n\t */\n\tpublic keyId(): string {\n\t\treturn this._keyName;\n\t}\n}\n"]}
@@ -9,13 +9,17 @@ export * from "./models/IGasStationExecuteResponse.js";
9
9
  export * from "./models/IGasStationReserveGasResponse.js";
10
10
  export * from "./models/IGasStationReserveGasResult.js";
11
11
  export * from "./models/IIotaClient.js";
12
- export * from "./models/IIotaControllerCapInfo.js";
13
- export * from "./models/IIotaTransaction.js";
14
- export * from "./models/IIotaTransactionBlockResponse.js";
15
12
  export * from "./models/IIotaConfig.js";
13
+ export * from "./models/IIotaControllerCapInfo.js";
16
14
  export * from "./models/IIotaDryRun.js";
17
15
  export * from "./models/IIotaResponseOptions.js";
16
+ export * from "./models/IIotaTransaction.js";
17
+ export * from "./models/IIotaTransactionBlockResponse.js";
18
+ export * from "./models/ITransactionSigner.js";
18
19
  export * from "./models/IMigrationStateFields.js";
19
20
  export * from "./models/ISmartContractDeployments.js";
20
21
  export * from "./models/ISmartContractObject.js";
21
22
  export * from "./models/networkTypes.js";
23
+ export * from "./vaultJwtSigner.js";
24
+ export * from "./vaultSigner.js";
25
+ export * from "./vaultTransactionSigner.js";
@@ -8,6 +8,7 @@ import type { IIotaDryRun } from "./models/IIotaDryRun.js";
8
8
  import type { IIotaResponseOptions } from "./models/IIotaResponseOptions.js";
9
9
  import type { IIotaTransaction } from "./models/IIotaTransaction.js";
10
10
  import type { IIotaTransactionBlockResponse } from "./models/IIotaTransactionBlockResponse.js";
11
+ import { VaultTransactionSigner } from "./vaultTransactionSigner.js";
11
12
  /**
12
13
  * Class for performing operations on IOTA.
13
14
  */
@@ -79,19 +80,15 @@ export declare class Iota {
79
80
  */
80
81
  static getAddresses(vaultConnector: IVaultConnector, config: Pick<IIotaConfig, "coinType" | "vaultMnemonicId" | "vaultSeedId">, identity: string, accountIndex: number, startAddressIndex: number, count: number, isInternal?: boolean): Promise<string[]>;
81
82
  /**
82
- * Get a key pair for the specified index.
83
+ * Get a vault-backed transaction signer for the given identity and key indices.
83
84
  * @param vaultConnector The vault connector.
84
85
  * @param config The configuration.
85
86
  * @param identity The identity of the user to access the vault keys.
86
- * @param accountIndex The account index to get the key pair for.
87
- * @param addressIndex The address index to get the key pair for.
88
- * @param isInternal Whether the address is internal.
89
- * @returns The key pair containing private key and public key.
87
+ * @param accountIndex The account index.
88
+ * @param addressIndex The address index within the account.
89
+ * @returns A VaultTransactionSigner for the specified key.
90
90
  */
91
- static getKeyPair(vaultConnector: IVaultConnector, config: IIotaConfig, identity: string, accountIndex: number, addressIndex: number, isInternal?: boolean): Promise<{
92
- privateKey: Uint8Array;
93
- publicKey: Uint8Array;
94
- }>;
91
+ static getTransactionSigner(vaultConnector: IVaultConnector, config: IIotaConfig, identity: string, accountIndex: number, addressIndex: number): Promise<VaultTransactionSigner>;
95
92
  /**
96
93
  * Create a new transaction instance.
97
94
  * @returns A new transaction instance.
@@ -124,24 +121,6 @@ export declare class Iota {
124
121
  * @returns The transaction response.
125
122
  */
126
123
  static prepareAndPostTransaction(config: IIotaConfig, vaultConnector: IVaultConnector, logging: ILoggingComponent | undefined, identity: string, client: IIotaClient, owner: string, transaction: IIotaTransaction, options?: IIotaResponseOptions): Promise<IIotaTransactionBlockResponse>;
127
- /**
128
- * Find the address in the seed.
129
- * @param vaultConnector The vault connector to use.
130
- * @param config The configuration to use.
131
- * @param identity The identity of the user to access the vault keys.
132
- * @param address The address to find.
133
- * @param accountIndex The account index to search.
134
- * @param isInternal Whether to search internal addresses.
135
- * @param startScanIndex The address index to start scanning from.
136
- * @param maxScanRange The maximum range to scan.
137
- * @returns The address key pair.
138
- * @throws Error if the address is not found.
139
- */
140
- static findAddress(vaultConnector: IVaultConnector, config: IIotaConfig, identity: string, address: string, accountIndex: number, isInternal?: boolean, startScanIndex?: number, maxScanRange?: number): Promise<{
141
- address: string;
142
- privateKey: Uint8Array;
143
- publicKey: Uint8Array;
144
- }>;
145
124
  /**
146
125
  * Extract error from SDK payload.
147
126
  * Errors from the IOTA SDK are usually not JSON strings but objects.
@@ -163,7 +142,7 @@ export declare class Iota {
163
142
  * @param txb The transaction to dry run.
164
143
  * @param sender The sender address.
165
144
  * @param operation The operation to log.
166
- * @returns void.
145
+ * @returns The dry run result including status, costs, events, and object changes.
167
146
  */
168
147
  static dryRunTransaction(client: IIotaClient, logging: ILoggingComponent | undefined, txb: IIotaTransaction, sender: string, operation: string): Promise<IIotaDryRun>;
169
148
  /**
@@ -261,4 +240,10 @@ export declare class Iota {
261
240
  * @returns The balance of the given address.
262
241
  */
263
242
  static getBalance(config: IIotaConfig, address: string): Promise<bigint>;
243
+ /**
244
+ * Create a transaction instance from the given bytes.
245
+ * @param bytes The transaction bytes to create the transaction from.
246
+ * @returns The transaction instance created from the given bytes.
247
+ */
248
+ static transactionFromBytes(bytes: Uint8Array): IIotaTransaction;
264
249
  }
@@ -1,8 +1,7 @@
1
1
  import type { IIotaClient } from "./models/IIotaClient.js";
2
2
  import type { IIotaControllerCapInfo } from "./models/IIotaControllerCapInfo.js";
3
3
  /**
4
- * Utility class for resolving IOTA Identity on-chain objects required by
5
- * the NFT mint_with_identity() Move contract function.
4
+ * Utility class for resolving IOTA Identity on-chain objects and controller tokens.
6
5
  */
7
6
  export declare class IotaIdentityUtils {
8
7
  /**
@@ -10,8 +9,7 @@ export declare class IotaIdentityUtils {
10
9
  */
11
10
  static readonly CLASS_NAME: string;
12
11
  /**
13
- * Resolve the on-chain object IDs for an identity and its controller token.
14
- * Returns the IDs needed to call mint_with_identity() on the NFT Move contract.
12
+ * Resolves the on-chain object IDs for an identity and its controller token.
15
13
  * @param identityId The DID of the identity (e.g. "did:iota:testnet:0x...").
16
14
  * @param controllerAddress The on-chain address of the controller wallet.
17
15
  * @param client The IOTA client instance.
@@ -5,7 +5,6 @@ import type { IIotaConfig } from "./models/IIotaConfig.js";
5
5
  import type { ISmartContractDeployments } from "./models/ISmartContractDeployments.js";
6
6
  /**
7
7
  * Utility class providing common smart contract operations for IOTA-based contracts.
8
- * This class uses composition pattern to provide shared functionality without inheritance complexity.
9
8
  */
10
9
  export declare class IotaSmartContractUtils {
11
10
  /**
@@ -3,11 +3,11 @@
3
3
  */
4
4
  export interface IAdminCapFields {
5
5
  /**
6
- * The ID of the AdminCap object.
6
+ * The UID wrapper of the AdminCap object.
7
7
  */
8
8
  id: {
9
9
  /**
10
- * The ID of the AdminCap object.
10
+ * The hex string ID of the AdminCap object.
11
11
  */
12
12
  id: string;
13
13
  };
@@ -4,12 +4,10 @@
4
4
  export interface IGasStationExecuteResponse {
5
5
  /**
6
6
  * The transaction effects from the IOTA network.
7
- * This contains the full IOTA transaction effects object.
8
7
  */
9
8
  effects: {
10
9
  /**
11
- * Additional effects data from the IOTA network.
12
- * This includes messageVersion, status, executedEpoch, gasUsed, etc.
10
+ * Additional fields from the IOTA network effects object.
13
11
  */
14
12
  [key: string]: unknown;
15
13
  /**
@@ -1,16 +1,13 @@
1
1
  /**
2
- * On-chain object IDs needed to call mint_with_identity() on the NFT Move contract.
2
+ * On-chain object IDs for an identity and its associated controller token.
3
3
  */
4
4
  export interface IIotaControllerCapInfo {
5
5
  /**
6
- * The on-chain Object ID of the Identity Move object (hex string, e.g. "0x...").
7
- * Used as the Identity argument in mint_with_identity().
6
+ * The on-chain object ID of the Identity Move object (hex string, e.g. "0x...").
8
7
  */
9
8
  identityObjectId: string;
10
9
  /**
11
- * The on-chain Object ID of the ControllerToken Move object (hex string, e.g. "0x...").
12
- * Proves that the controller address controls identityObjectId.
13
- * Used as the ControllerCap argument in mint_with_identity().
10
+ * The on-chain object ID of the ControllerToken Move object (hex string, e.g. "0x...").
14
11
  */
15
12
  controllerCapObjectId: string;
16
13
  }
@@ -1,6 +1,6 @@
1
1
  import type { IotaTransactionBlockResponseOptions } from "@iota/iota-sdk/client";
2
2
  /**
3
- * Configuration for IOTA.
3
+ * Options for controlling transaction execution and response behaviour.
4
4
  */
5
5
  export interface IIotaResponseOptions extends IotaTransactionBlockResponseOptions {
6
6
  /**
@@ -3,11 +3,11 @@
3
3
  */
4
4
  export interface IMigrationStateFields {
5
5
  /**
6
- * The ID of the MigrationState object.
6
+ * The UID wrapper of the MigrationState object.
7
7
  */
8
8
  id: {
9
9
  /**
10
- * The ID of the MigrationState object.
10
+ * The hex string ID of the MigrationState object.
11
11
  */
12
12
  id: string;
13
13
  };
@@ -3,11 +3,11 @@
3
3
  */
4
4
  export interface ISmartContractObject {
5
5
  /**
6
- * The ID of the smart contract object.
6
+ * The UID wrapper of the smart contract object.
7
7
  */
8
8
  id: {
9
9
  /**
10
- * The ID of the smart contract object.
10
+ * The hex string ID of the smart contract object.
11
11
  */
12
12
  id: string;
13
13
  };
@@ -0,0 +1,27 @@
1
+ import type { PublicKey } from "@iota/iota-sdk/cryptography";
2
+ /**
3
+ * Interface for a transaction signer backed by a secure key store.
4
+ */
5
+ export interface ITransactionSigner {
6
+ /**
7
+ * Sign the BCS-encoded transaction data and return a serialized IOTA signature string.
8
+ * @param txDataBcs The raw transaction bytes to sign.
9
+ * @returns The serialized signature string (scheme flag + signature + public key, base64-encoded).
10
+ */
11
+ sign(txDataBcs: Uint8Array): Promise<string>;
12
+ /**
13
+ * Get the public key for this signer.
14
+ * @returns The public key.
15
+ */
16
+ publicKey(): Promise<PublicKey>;
17
+ /**
18
+ * Get the IOTA-formatted public key bytes (scheme flag byte followed by the raw key bytes).
19
+ * @returns The IOTA public key bytes.
20
+ */
21
+ iotaPublicKeyBytes(): Promise<Uint8Array>;
22
+ /**
23
+ * Get the key identifier for this signer.
24
+ * @returns The key identifier.
25
+ */
26
+ keyId(): string;
27
+ }
@@ -0,0 +1,50 @@
1
+ import type { Jwk, JwkStorage, JwsAlgorithm } from "@iota/identity-wasm/node/index.js";
2
+ import type { IVaultConnector } from "@twin.org/vault-models";
3
+ /**
4
+ * JwkStorage implementation that delegates the sign operation to the vault connector,
5
+ * keeping the private key inside the vault at all times.
6
+ */
7
+ export declare class VaultJwkStorage implements JwkStorage {
8
+ /**
9
+ * Runtime name for the class.
10
+ */
11
+ static readonly CLASS_NAME: string;
12
+ /**
13
+ * Create a new VaultJwkStorage.
14
+ * @param vaultConnector The vault connector used to perform signing operations.
15
+ * @param keyName The name of the key in the vault to use for signing.
16
+ */
17
+ constructor(vaultConnector: IVaultConnector, keyName: string);
18
+ /**
19
+ * Sign data by delegating to the vault connector.
20
+ * @param keyId The key identifier (unused; the vault key name is used directly).
21
+ * @param data The data to sign.
22
+ * @param publicKey The public key JWK (unused; the vault connector handles key lookup).
23
+ * @returns The raw signature bytes.
24
+ */
25
+ sign(keyId: string, data: Uint8Array, publicKey: Jwk): Promise<Uint8Array>;
26
+ /**
27
+ * Accept a JWK entry and return the vault key name as the stable key identifier.
28
+ * @param jwk The JWK to register.
29
+ * @returns The key identifier.
30
+ */
31
+ insert(jwk: Jwk): Promise<string>;
32
+ /**
33
+ * Check whether the given key identifier is managed by this storage.
34
+ * @param keyId The key identifier to check.
35
+ * @returns True if the key exists in this storage.
36
+ */
37
+ exists(keyId: string): Promise<boolean>;
38
+ /**
39
+ * Key generation is not supported; keys are managed entirely by the vault.
40
+ * @param keyType The key type requested.
41
+ * @param algorithm The JWS algorithm requested.
42
+ * @returns Never returns.
43
+ */
44
+ generate(keyType: string, algorithm: JwsAlgorithm): Promise<never>;
45
+ /**
46
+ * Deletion is a no-op; keys are managed by the vault.
47
+ * @param keyId The key identifier to delete.
48
+ */
49
+ delete(keyId: string): Promise<void>;
50
+ }