@twin.org/dlt-iota 0.0.3-next.6 → 0.0.3-next.7

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.
@@ -1,8 +1,9 @@
1
1
  // Copyright 2024 IOTA Stiftung.
2
2
  // SPDX-License-Identifier: Apache-2.0.
3
- import { IdentityClient, IdentityClientReadOnly, OnChainIdentity } from "@iota/identity-wasm/node/index.js";
4
- import { Ed25519PublicKey } from "@iota/iota-sdk/keypairs/ed25519";
5
- import { GeneralError, Guards, Is, NotFoundError } from "@twin.org/core";
3
+ import { IdentityClient, IdentityClientReadOnly, Jwk, JwkMemStore, KeyIdMemStore, OnChainIdentity, Storage, StorageSigner } from "@iota/identity-wasm/node/index.js";
4
+ import { decodeIotaPrivateKey } from "@iota/iota-sdk/cryptography";
5
+ import { Ed25519Keypair } from "@iota/iota-sdk/keypairs/ed25519";
6
+ import { Base64Url, GeneralError, Guards, Is, NotFoundError } from "@twin.org/core";
6
7
  import { Iota } from "./iota.js";
7
8
  /**
8
9
  * Utility class for resolving IOTA Identity on-chain objects required by
@@ -26,30 +27,36 @@ export class IotaIdentityUtils {
26
27
  static async getControllerCapInfo(identityId, controllerAddress, client) {
27
28
  Guards.stringValue(IotaIdentityUtils.CLASS_NAME, "identityId", identityId);
28
29
  Guards.stringValue(IotaIdentityUtils.CLASS_NAME, "controllerAddress", controllerAddress);
29
- // Extract the Object ID from the DID — last colon-delimited segment, prefixed with 0x.
30
- // IOTA DIDs have the format did:iota:<network>:<hex> where <hex> has no 0x prefix.
30
+ Guards.object(IotaIdentityUtils.CLASS_NAME, "client", client);
31
+ // Extract the Object ID from the DID last colon-delimited segment.
32
+ // On-chain DIDs include the 0x prefix in the segment; the check avoids double-prefixing.
31
33
  const idParts = identityId.split(":");
32
- const identityObjectId = `0x${idParts[idParts.length - 1]}`;
34
+ const lastSegment = idParts[idParts.length - 1];
35
+ const identityObjectId = lastSegment.startsWith("0x") ? lastSegment : `0x${lastSegment}`;
33
36
  let onChain;
34
37
  let controllerToken;
35
38
  try {
36
- // Both are IotaClient@1.11.0 but TypeScript resolves them from different module
37
- // entry points (dist/esm vs dist/cjs). The protected `transport` field causes a
38
- // class-compatibility failure even though the runtime types are identical.
39
- // Casting through the function's own parameter type keeps this refactor-safe.
39
+ // IIotaClient and the IotaClient expected by identity-wasm resolve from different
40
+ // module entry points (dist/esm vs dist/cjs). The protected `transport` field causes
41
+ // a structural incompatibility even though the runtime types are identical.
40
42
  const identityClientReadOnly = await IdentityClientReadOnly.create(client);
41
- // getControllerTokenForAddress requires IdentityClient even though the operation is
42
- // read-only — the signer is never called, only the embedded CoreClientReadOnly is
43
- // used. TransactionSigner is a structural interface, so a minimal object literal
44
- // that satisfies its shape avoids importing the heavyweight JWK store machinery.
45
- const noOpSigner = {
46
- sign: async (_txData) => {
47
- throw new GeneralError(IotaIdentityUtils.CLASS_NAME, "unexpectedSignerCall", undefined);
48
- },
49
- publicKey: async () => new Ed25519PublicKey(new Uint8Array(32)),
50
- iotaPublicKeyBytes: async () => new Uint8Array(32),
51
- keyId: () => ""
52
- };
43
+ // getControllerTokenForAddress requires IdentityClient even though the operation
44
+ // is read-only — the signer is never called, only the embedded read-only client.
45
+ // StorageSigner is used (rather than a plain object satisfying TransactionSigner
46
+ // structurally) because IdentityClient.create() validates iotaPublicKeyBytes()
47
+ // through an internal WASM code path that only accepts bytes from the library's
48
+ // own signer implementations. Plain JS objects fail with "Unsupported curve"
49
+ // even for valid Ed25519 keys because they take a different callback path.
50
+ const noOpKeypair = new Ed25519Keypair();
51
+ const rawPublic = noOpKeypair.getPublicKey().toRawBytes();
52
+ const { secretKey: rawPrivate } = decodeIotaPrivateKey(noOpKeypair.getSecretKey());
53
+ const noOpSigner = new StorageSigner(new Storage(new JwkMemStore(), new KeyIdMemStore()), "", new Jwk({
54
+ kty: "OKP" /* JwkType.Okp */,
55
+ crv: "Ed25519",
56
+ alg: "EdDSA" /* JwsAlgorithm.EdDSA */,
57
+ x: Base64Url.encode(rawPublic),
58
+ d: Base64Url.encode(rawPrivate)
59
+ }));
53
60
  const identityClient = await IdentityClient.create(identityClientReadOnly, noOpSigner);
54
61
  onChain = await OnChainIdentity.getById(identityObjectId, identityClient);
55
62
  if (!Is.undefined(onChain) && !onChain.hasDeletedDid()) {
@@ -1 +1 @@
1
- {"version":3,"file":"iotaIdentityUtils.js","sourceRoot":"","sources":["../../src/iotaIdentityUtils.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EACN,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,MAAM,mCAAmC,CAAC;AAG3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEzE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC;;;GAGG;AACH,MAAM,OAAO,iBAAiB;IAC7B;;OAEG;IACI,MAAM,CAAU,UAAU,uBAAuC;IAExE;;;;;;;;;OASG;IACI,MAAM,CAAC,KAAK,CAAC,oBAAoB,CACvC,UAAkB,EAClB,iBAAyB,EACzB,MAAkB;QAElB,MAAM,CAAC,WAAW,CAAC,iBAAiB,CAAC,UAAU,gBAAsB,UAAU,CAAC,CAAC;QACjF,MAAM,CAAC,WAAW,CAAC,iBAAiB,CAAC,UAAU,uBAA6B,iBAAiB,CAAC,CAAC;QAE/F,uFAAuF;QACvF,mFAAmF;QACnF,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACtC,MAAM,gBAAgB,GAAG,KAAK,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC;QAE5D,IAAI,OAAoC,CAAC;QACzC,IAAI,eAAqF,CAAC;QAE1F,IAAI,CAAC;YACJ,gFAAgF;YAChF,gFAAgF;YAChF,2EAA2E;YAC3E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AAkB,EAAE,UAAU,CAAC,CAAC;QACvF,CAAC;QAED,IAAI,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC;YAC7B,MAAM,IAAI,YAAY,CAAC,iBAAiB,CAAC,UAAU,EAAE,iBAAiB,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;QACzF,CAAC;QAED,IAAI,EAAE,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC;YACnC,MAAM,IAAI,aAAa,CAAC,iBAAiB,CAAC,UAAU,EAAE,yBAAyB,EAAE,UAAU,CAAC,CAAC;QAC9F,CAAC;QAED,OAAO;YACN,gBAAgB;YAChB,qBAAqB,EAAE,eAAe,CAAC,EAAE,EAAE;SAC3C,CAAC;IACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport {\n\tIdentityClient,\n\tIdentityClientReadOnly,\n\tOnChainIdentity\n} from \"@iota/identity-wasm/node/index.js\";\nimport type { IotaClient } from \"@iota/iota-sdk/client\";\nimport type { PublicKey } from \"@iota/iota-sdk/cryptography\";\nimport { Ed25519PublicKey } from \"@iota/iota-sdk/keypairs/ed25519\";\nimport { GeneralError, Guards, Is, NotFoundError } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\nimport { Iota } from \"./iota.js\";\nimport type { IIotaControllerCapInfo } from \"./models/IIotaControllerCapInfo.js\";\n\n/**\n * Utility class for resolving IOTA Identity on-chain objects required by\n * the NFT mint_with_identity() Move contract function.\n */\nexport class IotaIdentityUtils {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<IotaIdentityUtils>();\n\n\t/**\n\t * Resolve the on-chain object IDs for an identity and its controller token.\n\t * Returns the IDs needed to call mint_with_identity() on the NFT Move contract.\n\t * @param identityId The DID of the identity (e.g. \"did:iota:testnet:0x...\").\n\t * @param controllerAddress The on-chain address of the controller wallet.\n\t * @param client The IOTA client instance.\n\t * @returns The identity object ID and controller token object ID.\n\t * @throws NotFoundError if the identity does not exist on-chain.\n\t * @throws GeneralError if the identity has been deleted or the controller token is not found.\n\t */\n\tpublic static async getControllerCapInfo(\n\t\tidentityId: string,\n\t\tcontrollerAddress: string,\n\t\tclient: IotaClient\n\t): Promise<IIotaControllerCapInfo> {\n\t\tGuards.stringValue(IotaIdentityUtils.CLASS_NAME, nameof(identityId), identityId);\n\t\tGuards.stringValue(IotaIdentityUtils.CLASS_NAME, nameof(controllerAddress), controllerAddress);\n\n\t\t// Extract the Object ID from the DID — last colon-delimited segment, prefixed with 0x.\n\t\t// IOTA DIDs have the format did:iota:<network>:<hex> where <hex> has no 0x prefix.\n\t\tconst idParts = identityId.split(\":\");\n\t\tconst identityObjectId = `0x${idParts[idParts.length - 1]}`;\n\n\t\tlet onChain: OnChainIdentity | undefined;\n\t\tlet controllerToken: Awaited<ReturnType<OnChainIdentity[\"getControllerTokenForAddress\"]>>;\n\n\t\ttry {\n\t\t\t// Both are IotaClient@1.11.0 but TypeScript resolves them from different module\n\t\t\t// entry points (dist/esm vs dist/cjs). The protected `transport` field causes a\n\t\t\t// class-compatibility failure even though the runtime types are identical.\n\t\t\t// Casting through the function's own parameter type keeps this refactor-safe.\n\t\t\tconst identityClientReadOnly = await IdentityClientReadOnly.create(\n\t\t\t\tclient as unknown as Parameters<(typeof IdentityClientReadOnly)[\"create\"]>[0]\n\t\t\t);\n\n\t\t\t// getControllerTokenForAddress requires IdentityClient even though the operation is\n\t\t\t// read-only — the signer is never called, only the embedded CoreClientReadOnly is\n\t\t\t// used. TransactionSigner is a structural interface, so a minimal object literal\n\t\t\t// that satisfies its shape avoids importing the heavyweight JWK store machinery.\n\t\t\tconst noOpSigner = {\n\t\t\t\tsign: async (_txData: Uint8Array): Promise<string> => {\n\t\t\t\t\tthrow new GeneralError(IotaIdentityUtils.CLASS_NAME, \"unexpectedSignerCall\", undefined);\n\t\t\t\t},\n\t\t\t\tpublicKey: async (): Promise<PublicKey> => new Ed25519PublicKey(new Uint8Array(32)),\n\t\t\t\tiotaPublicKeyBytes: async (): Promise<Uint8Array> => new Uint8Array(32),\n\t\t\t\tkeyId: (): string => \"\"\n\t\t\t};\n\t\t\tconst identityClient = await IdentityClient.create(identityClientReadOnly, noOpSigner);\n\n\t\t\tonChain = await OnChainIdentity.getById(identityObjectId, identityClient);\n\t\t\tif (!Is.undefined(onChain) && !onChain.hasDeletedDid()) {\n\t\t\t\tcontrollerToken = await onChain.getControllerTokenForAddress(\n\t\t\t\t\tcontrollerAddress,\n\t\t\t\t\tidentityClient\n\t\t\t\t);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthrow new GeneralError(\n\t\t\t\tIotaIdentityUtils.CLASS_NAME,\n\t\t\t\t\"getControllerCapInfoFailed\",\n\t\t\t\tundefined,\n\t\t\t\tIota.extractPayloadError(error)\n\t\t\t);\n\t\t}\n\n\t\tif (Is.undefined(onChain)) {\n\t\t\tthrow new NotFoundError(IotaIdentityUtils.CLASS_NAME, \"identityNotFound\", identityId);\n\t\t}\n\n\t\tif (onChain.hasDeletedDid()) {\n\t\t\tthrow new GeneralError(IotaIdentityUtils.CLASS_NAME, \"identityDeleted\", { identityId });\n\t\t}\n\n\t\tif (Is.undefined(controllerToken)) {\n\t\t\tthrow new NotFoundError(IotaIdentityUtils.CLASS_NAME, \"controllerTokenNotFound\", identityId);\n\t\t}\n\n\t\treturn {\n\t\t\tidentityObjectId,\n\t\t\tcontrollerCapObjectId: controllerToken.id()\n\t\t};\n\t}\n}\n"]}
1
+ {"version":3,"file":"iotaIdentityUtils.js","sourceRoot":"","sources":["../../src/iotaIdentityUtils.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EACN,cAAc,EACd,sBAAsB,EACtB,GAAG,EACH,WAAW,EAGX,aAAa,EACb,eAAe,EACf,OAAO,EACP,aAAa,EACb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACn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E,UAAU,CAAC,CAAC;QACvF,CAAC;QAED,IAAI,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC;YAC7B,MAAM,IAAI,YAAY,CAAC,iBAAiB,CAAC,UAAU,EAAE,iBAAiB,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;QACzF,CAAC;QAED,IAAI,EAAE,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC;YACnC,MAAM,IAAI,aAAa,CAAC,iBAAiB,CAAC,UAAU,EAAE,yBAAyB,EAAE,UAAU,CAAC,CAAC;QAC9F,CAAC;QAED,OAAO;YACN,gBAAgB;YAChB,qBAAqB,EAAE,eAAe,CAAC,EAAE,EAAE;SAC3C,CAAC;IACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport {\n\tIdentityClient,\n\tIdentityClientReadOnly,\n\tJwk,\n\tJwkMemStore,\n\tJwkType,\n\tJwsAlgorithm,\n\tKeyIdMemStore,\n\tOnChainIdentity,\n\tStorage,\n\tStorageSigner\n} from \"@iota/identity-wasm/node/index.js\";\nimport { decodeIotaPrivateKey } from \"@iota/iota-sdk/cryptography\";\nimport { Ed25519Keypair } from \"@iota/iota-sdk/keypairs/ed25519\";\nimport { Base64Url, GeneralError, Guards, Is, NotFoundError } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\nimport { Iota } from \"./iota.js\";\nimport type { IIotaClient } from \"./models/IIotaClient.js\";\nimport type { IIotaControllerCapInfo } from \"./models/IIotaControllerCapInfo.js\";\n\n/**\n * Utility class for resolving IOTA Identity on-chain objects required by\n * the NFT mint_with_identity() Move contract function.\n */\nexport class IotaIdentityUtils {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<IotaIdentityUtils>();\n\n\t/**\n\t * Resolve the on-chain object IDs for an identity and its controller token.\n\t * Returns the IDs needed to call mint_with_identity() on the NFT Move contract.\n\t * @param identityId The DID of the identity (e.g. \"did:iota:testnet:0x...\").\n\t * @param controllerAddress The on-chain address of the controller wallet.\n\t * @param client The IOTA client instance.\n\t * @returns The identity object ID and controller token object ID.\n\t * @throws NotFoundError if the identity does not exist on-chain.\n\t * @throws GeneralError if the identity has been deleted or the controller token is not found.\n\t */\n\tpublic static async getControllerCapInfo(\n\t\tidentityId: string,\n\t\tcontrollerAddress: string,\n\t\tclient: IIotaClient\n\t): Promise<IIotaControllerCapInfo> {\n\t\tGuards.stringValue(IotaIdentityUtils.CLASS_NAME, nameof(identityId), identityId);\n\t\tGuards.stringValue(IotaIdentityUtils.CLASS_NAME, nameof(controllerAddress), controllerAddress);\n\t\tGuards.object(IotaIdentityUtils.CLASS_NAME, nameof(client), client);\n\n\t\t// Extract the Object ID from the DID — last colon-delimited segment.\n\t\t// On-chain DIDs include the 0x prefix in the segment; the check avoids double-prefixing.\n\t\tconst idParts = identityId.split(\":\");\n\t\tconst lastSegment = idParts[idParts.length - 1];\n\t\tconst identityObjectId = lastSegment.startsWith(\"0x\") ? lastSegment : `0x${lastSegment}`;\n\n\t\tlet onChain: OnChainIdentity | undefined;\n\t\tlet controllerToken: Awaited<ReturnType<OnChainIdentity[\"getControllerTokenForAddress\"]>>;\n\n\t\ttry {\n\t\t\t// IIotaClient and the IotaClient expected by identity-wasm resolve from different\n\t\t\t// module entry points (dist/esm vs dist/cjs). The protected `transport` field causes\n\t\t\t// a structural incompatibility even though the runtime types are identical.\n\t\t\tconst identityClientReadOnly = await IdentityClientReadOnly.create(\n\t\t\t\tclient as unknown as Parameters<(typeof IdentityClientReadOnly)[\"create\"]>[0]\n\t\t\t);\n\n\t\t\t// getControllerTokenForAddress requires IdentityClient even though the operation\n\t\t\t// is read-only — the signer is never called, only the embedded read-only client.\n\t\t\t// StorageSigner is used (rather than a plain object satisfying TransactionSigner\n\t\t\t// structurally) because IdentityClient.create() validates iotaPublicKeyBytes()\n\t\t\t// through an internal WASM code path that only accepts bytes from the library's\n\t\t\t// own signer implementations. Plain JS objects fail with \"Unsupported curve\"\n\t\t\t// even for valid Ed25519 keys because they take a different callback path.\n\t\t\tconst noOpKeypair = new Ed25519Keypair();\n\t\t\tconst rawPublic = noOpKeypair.getPublicKey().toRawBytes();\n\t\t\tconst { secretKey: rawPrivate } = decodeIotaPrivateKey(noOpKeypair.getSecretKey());\n\t\t\tconst noOpSigner = new StorageSigner(\n\t\t\t\tnew Storage(new JwkMemStore(), new KeyIdMemStore()),\n\t\t\t\t\"\",\n\t\t\t\tnew Jwk({\n\t\t\t\t\tkty: JwkType.Okp,\n\t\t\t\t\tcrv: \"Ed25519\",\n\t\t\t\t\talg: JwsAlgorithm.EdDSA,\n\t\t\t\t\tx: Base64Url.encode(rawPublic),\n\t\t\t\t\td: Base64Url.encode(rawPrivate)\n\t\t\t\t})\n\t\t\t);\n\t\t\tconst identityClient = await IdentityClient.create(identityClientReadOnly, noOpSigner);\n\n\t\t\tonChain = await OnChainIdentity.getById(identityObjectId, identityClient);\n\t\t\tif (!Is.undefined(onChain) && !onChain.hasDeletedDid()) {\n\t\t\t\tcontrollerToken = await onChain.getControllerTokenForAddress(\n\t\t\t\t\tcontrollerAddress,\n\t\t\t\t\tidentityClient\n\t\t\t\t);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthrow new GeneralError(\n\t\t\t\tIotaIdentityUtils.CLASS_NAME,\n\t\t\t\t\"getControllerCapInfoFailed\",\n\t\t\t\tundefined,\n\t\t\t\tIota.extractPayloadError(error)\n\t\t\t);\n\t\t}\n\n\t\tif (Is.undefined(onChain)) {\n\t\t\tthrow new NotFoundError(IotaIdentityUtils.CLASS_NAME, \"identityNotFound\", identityId);\n\t\t}\n\n\t\tif (onChain.hasDeletedDid()) {\n\t\t\tthrow new GeneralError(IotaIdentityUtils.CLASS_NAME, \"identityDeleted\", { identityId });\n\t\t}\n\n\t\tif (Is.undefined(controllerToken)) {\n\t\t\tthrow new NotFoundError(IotaIdentityUtils.CLASS_NAME, \"controllerTokenNotFound\", identityId);\n\t\t}\n\n\t\treturn {\n\t\t\tidentityObjectId,\n\t\t\tcontrollerCapObjectId: controllerToken.id()\n\t\t};\n\t}\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { IotaClient } from "@iota/iota-sdk/client";
1
+ import type { IIotaClient } from "./models/IIotaClient.js";
2
2
  import type { IIotaControllerCapInfo } from "./models/IIotaControllerCapInfo.js";
3
3
  /**
4
4
  * Utility class for resolving IOTA Identity on-chain objects required by
@@ -19,5 +19,5 @@ export declare class IotaIdentityUtils {
19
19
  * @throws NotFoundError if the identity does not exist on-chain.
20
20
  * @throws GeneralError if the identity has been deleted or the controller token is not found.
21
21
  */
22
- static getControllerCapInfo(identityId: string, controllerAddress: string, client: IotaClient): Promise<IIotaControllerCapInfo>;
22
+ static getControllerCapInfo(identityId: string, controllerAddress: string, client: IIotaClient): Promise<IIotaControllerCapInfo>;
23
23
  }
package/docs/changelog.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.3-next.7](https://github.com/twinfoundation/dlt/compare/dlt-iota-v0.0.3-next.6...dlt-iota-v0.0.3-next.7) (2026-03-13)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * buffer usage required for identity ([#60](https://github.com/twinfoundation/dlt/issues/60)) ([0ba7d16](https://github.com/twinfoundation/dlt/commit/0ba7d165662b0083aa2b4c1325dd8c2e65defa2e))
9
+
3
10
  ## [0.0.3-next.6](https://github.com/twinfoundation/dlt/compare/dlt-iota-v0.0.3-next.5...dlt-iota-v0.0.3-next.6) (2026-03-12)
4
11
 
5
12
 
@@ -14,7 +14,7 @@ Class for performing operations on IOTA.
14
14
 
15
15
  ## Properties
16
16
 
17
- ### DEFAULT\_MNEMONIC\_SECRET\_NAME
17
+ ### DEFAULT\_MNEMONIC\_SECRET\_NAME {#default_mnemonic_secret_name}
18
18
 
19
19
  > `readonly` `static` **DEFAULT\_MNEMONIC\_SECRET\_NAME**: `string` = `"mnemonic"`
20
20
 
@@ -22,7 +22,7 @@ Default name for the mnemonic secret.
22
22
 
23
23
  ***
24
24
 
25
- ### DEFAULT\_SEED\_SECRET\_NAME
25
+ ### DEFAULT\_SEED\_SECRET\_NAME {#default_seed_secret_name}
26
26
 
27
27
  > `readonly` `static` **DEFAULT\_SEED\_SECRET\_NAME**: `string` = `"seed"`
28
28
 
@@ -30,7 +30,7 @@ Default name for the seed secret.
30
30
 
31
31
  ***
32
32
 
33
- ### DEFAULT\_COIN\_TYPE
33
+ ### DEFAULT\_COIN\_TYPE {#default_coin_type}
34
34
 
35
35
  > `readonly` `static` **DEFAULT\_COIN\_TYPE**: `number` = `4218`
36
36
 
@@ -38,7 +38,7 @@ Default coin type.
38
38
 
39
39
  ***
40
40
 
41
- ### DEFAULT\_SCAN\_RANGE
41
+ ### DEFAULT\_SCAN\_RANGE {#default_scan_range}
42
42
 
43
43
  > `readonly` `static` **DEFAULT\_SCAN\_RANGE**: `number` = `1000`
44
44
 
@@ -46,7 +46,7 @@ Default scan range.
46
46
 
47
47
  ***
48
48
 
49
- ### DEFAULT\_INCLUSION\_TIMEOUT
49
+ ### DEFAULT\_INCLUSION\_TIMEOUT {#default_inclusion_timeout}
50
50
 
51
51
  > `readonly` `static` **DEFAULT\_INCLUSION\_TIMEOUT**: `number` = `60`
52
52
 
@@ -54,7 +54,7 @@ Default inclusion timeout.
54
54
 
55
55
  ***
56
56
 
57
- ### CLASS\_NAME
57
+ ### CLASS\_NAME {#class_name}
58
58
 
59
59
  > `readonly` `static` **CLASS\_NAME**: `string`
60
60
 
@@ -62,7 +62,7 @@ Runtime name for the class.
62
62
 
63
63
  ## Methods
64
64
 
65
- ### createClient()
65
+ ### createClient() {#createclient}
66
66
 
67
67
  > `static` **createClient**(`config`): `IotaClient`
68
68
 
@@ -84,7 +84,7 @@ The client instance.
84
84
 
85
85
  ***
86
86
 
87
- ### populateConfig()
87
+ ### populateConfig() {#populateconfig}
88
88
 
89
89
  > `static` **populateConfig**(`config`): `void`
90
90
 
@@ -104,7 +104,7 @@ The configuration to populate.
104
104
 
105
105
  ***
106
106
 
107
- ### getAddresses()
107
+ ### getAddresses() {#getaddresses}
108
108
 
109
109
  > `static` **getAddresses**(`seed`, `coinType`, `accountIndex`, `startAddressIndex`, `count`, `isInternal?`): `string`[]
110
110
 
@@ -156,7 +156,7 @@ The list of addresses.
156
156
 
157
157
  ***
158
158
 
159
- ### getKeyPair()
159
+ ### getKeyPair() {#getkeypair}
160
160
 
161
161
  > `static` **getKeyPair**(`seed`, `coinType`, `accountIndex`, `addressIndex`, `isInternal?`): `object`
162
162
 
@@ -210,7 +210,7 @@ The key pair containing private key and public key.
210
210
 
211
211
  ***
212
212
 
213
- ### createTransaction()
213
+ ### createTransaction() {#createtransaction}
214
214
 
215
215
  > `static` **createTransaction**(): `Transaction`
216
216
 
@@ -224,7 +224,7 @@ A new transaction instance.
224
224
 
225
225
  ***
226
226
 
227
- ### prepareAndPostValueTransaction()
227
+ ### prepareAndPostValueTransaction() {#prepareandpostvaluetransaction}
228
228
 
229
229
  > `static` **prepareAndPostValueTransaction**(`config`, `vaultConnector`, `logging`, `identity`, `client`, `source`, `amount`, `recipient`, `options?`): `Promise`\<`IotaTransactionBlockResponse`\>
230
230
 
@@ -294,7 +294,7 @@ The transaction result.
294
294
 
295
295
  ***
296
296
 
297
- ### prepareAndPostTransaction()
297
+ ### prepareAndPostTransaction() {#prepareandposttransaction}
298
298
 
299
299
  > `static` **prepareAndPostTransaction**(`config`, `vaultConnector`, `logging`, `identity`, `client`, `owner`, `transaction`, `options?`): `Promise`\<`IotaTransactionBlockResponse`\>
300
300
 
@@ -358,7 +358,7 @@ The transaction response.
358
358
 
359
359
  ***
360
360
 
361
- ### getSeed()
361
+ ### getSeed() {#getseed}
362
362
 
363
363
  > `static` **getSeed**(`config`, `vaultConnector`, `identity`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
364
364
 
@@ -392,7 +392,7 @@ The seed.
392
392
 
393
393
  ***
394
394
 
395
- ### findAddress()
395
+ ### findAddress() {#findaddress}
396
396
 
397
397
  > `static` **findAddress**(`maxScanRange`, `coinType`, `seed`, `address`): `object`
398
398
 
@@ -448,7 +448,7 @@ Error if the address is not found.
448
448
 
449
449
  ***
450
450
 
451
- ### extractPayloadError()
451
+ ### extractPayloadError() {#extractpayloaderror}
452
452
 
453
453
  > `static` **extractPayloadError**(`error`): `IError`
454
454
 
@@ -471,7 +471,7 @@ The extracted error.
471
471
 
472
472
  ***
473
473
 
474
- ### buildMnemonicKey()
474
+ ### buildMnemonicKey() {#buildmnemonickey}
475
475
 
476
476
  > `static` **buildMnemonicKey**(`identity`, `vaultMnemonicId?`): `string`
477
477
 
@@ -499,7 +499,7 @@ The mnemonic key.
499
499
 
500
500
  ***
501
501
 
502
- ### buildSeedKey()
502
+ ### buildSeedKey() {#buildseedkey}
503
503
 
504
504
  > `static` **buildSeedKey**(`identity`, `vaultSeedId?`): `string`
505
505
 
@@ -527,7 +527,7 @@ The seed key.
527
527
 
528
528
  ***
529
529
 
530
- ### packageExistsOnNetwork()
530
+ ### packageExistsOnNetwork() {#packageexistsonnetwork}
531
531
 
532
532
  > `static` **packageExistsOnNetwork**(`client`, `packageId`): `Promise`\<`boolean`\>
533
533
 
@@ -555,7 +555,7 @@ True if the package exists, false otherwise.
555
555
 
556
556
  ***
557
557
 
558
- ### dryRunTransaction()
558
+ ### dryRunTransaction() {#dryruntransaction}
559
559
 
560
560
  > `static` **dryRunTransaction**(`client`, `logging`, `txb`, `sender`, `operation`): `Promise`\<[`IIotaDryRun`](../interfaces/IIotaDryRun.md)\>
561
561
 
@@ -601,7 +601,7 @@ void.
601
601
 
602
602
  ***
603
603
 
604
- ### waitForTransactionConfirmation()
604
+ ### waitForTransactionConfirmation() {#waitfortransactionconfirmation}
605
605
 
606
606
  > `static` **waitForTransactionConfirmation**(`client`, `digest`, `config`, `options?`): `Promise`\<`IotaTransactionBlockResponse`\>
607
607
 
@@ -657,7 +657,7 @@ The confirmed transaction response.
657
657
 
658
658
  ***
659
659
 
660
- ### isAbortError()
660
+ ### isAbortError() {#isaborterror}
661
661
 
662
662
  > `static` **isAbortError**(`error`, `code`): `boolean`
663
663
 
@@ -685,7 +685,7 @@ True if the error is an abort error, false otherwise.
685
685
 
686
686
  ***
687
687
 
688
- ### prepareAndPostGasStationTransaction()
688
+ ### prepareAndPostGasStationTransaction() {#prepareandpostgasstationtransaction}
689
689
 
690
690
  > `static` **prepareAndPostGasStationTransaction**(`config`, `vaultConnector`, `identity`, `client`, `owner`, `transaction`, `options?`): `Promise`\<`IotaTransactionBlockResponse`\>
691
691
 
@@ -743,7 +743,7 @@ The transaction response.
743
743
 
744
744
  ***
745
745
 
746
- ### reserveGas()
746
+ ### reserveGas() {#reservegas}
747
747
 
748
748
  > `static` **reserveGas**(`config`, `gasBudget`): `Promise`\<[`IGasReservationResult`](../interfaces/IGasReservationResult.md)\>
749
749
 
@@ -771,7 +771,7 @@ The gas reservation result.
771
771
 
772
772
  ***
773
773
 
774
- ### executeGasStationTransaction()
774
+ ### executeGasStationTransaction() {#executegasstationtransaction}
775
775
 
776
776
  > `static` **executeGasStationTransaction**(`config`, `reservationId`, `transactionBytes`, `userSignature`): `Promise`\<`IotaTransactionBlockResponse`\>
777
777
 
@@ -811,7 +811,7 @@ The transaction response.
811
811
 
812
812
  ***
813
813
 
814
- ### executeAndConfirmGasStationTransaction()
814
+ ### executeAndConfirmGasStationTransaction() {#executeandconfirmgasstationtransaction}
815
815
 
816
816
  > `static` **executeAndConfirmGasStationTransaction**(`config`, `client`, `reservationId`, `transactionBytes`, `userSignature`, `options?`): `Promise`\<`IotaTransactionBlockResponse`\>
817
817
 
@@ -15,7 +15,7 @@ the NFT mint_with_identity() Move contract function.
15
15
 
16
16
  ## Properties
17
17
 
18
- ### CLASS\_NAME
18
+ ### CLASS\_NAME {#class_name}
19
19
 
20
20
  > `readonly` `static` **CLASS\_NAME**: `string`
21
21
 
@@ -23,7 +23,7 @@ Runtime name for the class.
23
23
 
24
24
  ## Methods
25
25
 
26
- ### getControllerCapInfo()
26
+ ### getControllerCapInfo() {#getcontrollercapinfo}
27
27
 
28
28
  > `static` **getControllerCapInfo**(`identityId`, `controllerAddress`, `client`): `Promise`\<[`IIotaControllerCapInfo`](../interfaces/IIotaControllerCapInfo.md)\>
29
29
 
@@ -15,7 +15,7 @@ This class uses composition pattern to provide shared functionality without inhe
15
15
 
16
16
  ## Properties
17
17
 
18
- ### CLASS\_NAME
18
+ ### CLASS\_NAME {#class_name}
19
19
 
20
20
  > `readonly` `static` **CLASS\_NAME**: `string`
21
21
 
@@ -23,7 +23,7 @@ Runtime name for the class.
23
23
 
24
24
  ## Methods
25
25
 
26
- ### migrateSmartContract()
26
+ ### migrateSmartContract() {#migratesmartcontract}
27
27
 
28
28
  > `static` **migrateSmartContract**(`config`, `client`, `vaultConnector`, `walletConnector`, `logging`, `gasBudget`, `identity`, `objectId`, `namespace`, `packageId`, `deploymentConfig`, `walletAddressIndex?`): `Promise`\<`void`\>
29
29
 
@@ -112,7 +112,7 @@ Promise that resolves when migration is complete.
112
112
 
113
113
  ***
114
114
 
115
- ### enableMigration()
115
+ ### enableMigration() {#enablemigration}
116
116
 
117
117
  > `static` **enableMigration**(`config`, `client`, `vaultConnector`, `walletConnector`, `logging`, `gasBudget`, `identity`, `namespace`, `packageId`, `deploymentConfig`, `walletAddressIndex?`): `Promise`\<`void`\>
118
118
 
@@ -194,7 +194,7 @@ Promise that resolves when migration is enabled.
194
194
 
195
195
  ***
196
196
 
197
- ### disableMigration()
197
+ ### disableMigration() {#disablemigration}
198
198
 
199
199
  > `static` **disableMigration**(`config`, `client`, `vaultConnector`, `walletConnector`, `logging`, `gasBudget`, `identity`, `namespace`, `packageId`, `deploymentConfig`, `walletAddressIndex?`): `Promise`\<`void`\>
200
200
 
@@ -276,7 +276,7 @@ Promise that resolves when migration is disabled.
276
276
 
277
277
  ***
278
278
 
279
- ### isMigrationActive()
279
+ ### isMigrationActive() {#ismigrationactive}
280
280
 
281
281
  > `static` **isMigrationActive**(`config`, `client`, `namespace`, `packageId`, `deploymentConfig`, `identity`, `walletConnector`, `walletAddressIndex?`): `Promise`\<`boolean`\>
282
282
 
@@ -340,7 +340,7 @@ True if migration is enabled, false otherwise.
340
340
 
341
341
  ***
342
342
 
343
- ### getCurrentContractVersion()
343
+ ### getCurrentContractVersion() {#getcurrentcontractversion}
344
344
 
345
345
  > `static` **getCurrentContractVersion**(`config`, `client`, `namespace`, `packageId`, `identity`, `walletConnector`, `walletAddressIndex?`): `Promise`\<`number`\>
346
346
 
@@ -398,7 +398,7 @@ The current version number of the contract.
398
398
 
399
399
  ***
400
400
 
401
- ### validateObjectVersion()
401
+ ### validateObjectVersion() {#validateobjectversion}
402
402
 
403
403
  > `static` **validateObjectVersion**\<`T`\>(`config`, `client`, `namespace`, `packageId`, `identity`, `objectId`, `walletConnector`, `versionExtractor`, `walletAddressIndex?`): `Promise`\<`boolean`\>
404
404
 
@@ -4,7 +4,7 @@ Generic interface representing the storage fields of an AdminCap object.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### id
7
+ ### id {#id}
8
8
 
9
9
  > **id**: `object`
10
10
 
@@ -4,7 +4,7 @@ Interface for contract data stored in smart-contract-deployments.json
4
4
 
5
5
  ## Properties
6
6
 
7
- ### packageId
7
+ ### packageId {#packageid}
8
8
 
9
9
  > **packageId**: `string`
10
10
 
@@ -12,7 +12,7 @@ Package ID generated during build
12
12
 
13
13
  ***
14
14
 
15
- ### packageBytecode
15
+ ### packageBytecode {#packagebytecode}
16
16
 
17
17
  > **packageBytecode**: `string` \| `string`[]
18
18
 
@@ -20,7 +20,7 @@ Base64-encoded package bytecode
20
20
 
21
21
  ***
22
22
 
23
- ### deployedPackageId?
23
+ ### deployedPackageId? {#deployedpackageid}
24
24
 
25
25
  > `optional` **deployedPackageId**: `string`
26
26
 
@@ -28,7 +28,7 @@ Package ID from actual deployment
28
28
 
29
29
  ***
30
30
 
31
- ### lastDeployedPackageId?
31
+ ### lastDeployedPackageId? {#lastdeployedpackageid}
32
32
 
33
33
  > `optional` **lastDeployedPackageId**: `string`
34
34
 
@@ -36,7 +36,7 @@ Previous deployed package ID for upgrade chain tracking
36
36
 
37
37
  ***
38
38
 
39
- ### upgradeCapabilityId?
39
+ ### upgradeCapabilityId? {#upgradecapabilityid}
40
40
 
41
41
  > `optional` **upgradeCapabilityId**: `string`
42
42
 
@@ -44,7 +44,7 @@ UpgradeCap object ID for package upgrades
44
44
 
45
45
  ***
46
46
 
47
- ### migrationStateId?
47
+ ### migrationStateId? {#migrationstateid}
48
48
 
49
49
  > `optional` **migrationStateId**: `string`
50
50
 
@@ -4,7 +4,7 @@ Interface for gas reservation result from the gas station (with TypeScript camel
4
4
 
5
5
  ## Properties
6
6
 
7
- ### sponsorAddress
7
+ ### sponsorAddress {#sponsoraddress}
8
8
 
9
9
  > **sponsorAddress**: `string`
10
10
 
@@ -12,7 +12,7 @@ The sponsor's on-chain address.
12
12
 
13
13
  ***
14
14
 
15
- ### reservationId
15
+ ### reservationId {#reservationid}
16
16
 
17
17
  > **reservationId**: `number`
18
18
 
@@ -20,7 +20,7 @@ An ID used to reference this particular gas reservation.
20
20
 
21
21
  ***
22
22
 
23
- ### gasCoins
23
+ ### gasCoins {#gascoins}
24
24
 
25
25
  > **gasCoins**: `object`[]
26
26
 
@@ -4,7 +4,7 @@ Configuration for gas station operations.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### gasStationUrl
7
+ ### gasStationUrl {#gasstationurl}
8
8
 
9
9
  > **gasStationUrl**: `string`
10
10
 
@@ -12,7 +12,7 @@ The gas station service URL.
12
12
 
13
13
  ***
14
14
 
15
- ### gasStationAuthToken
15
+ ### gasStationAuthToken {#gasstationauthtoken}
16
16
 
17
17
  > **gasStationAuthToken**: `string`
18
18
 
@@ -4,7 +4,7 @@ Interface for the gas station execute transaction response.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### effects
7
+ ### effects {#effects}
8
8
 
9
9
  > **effects**: `object`
10
10
 
@@ -26,7 +26,7 @@ The transaction digest.
26
26
 
27
27
  ***
28
28
 
29
- ### error?
29
+ ### error? {#error}
30
30
 
31
31
  > `optional` **error**: `string` \| `null`
32
32
 
@@ -4,7 +4,7 @@ Interface for the gas station reserve gas response.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### result
7
+ ### result {#result}
8
8
 
9
9
  > **result**: [`IGasStationReserveGasResult`](IGasStationReserveGasResult.md)
10
10
 
@@ -12,7 +12,7 @@ The reservation result.
12
12
 
13
13
  ***
14
14
 
15
- ### error?
15
+ ### error? {#error}
16
16
 
17
17
  > `optional` **error**: `string` \| `null`
18
18
 
@@ -5,7 +5,7 @@ This matches the snake_case format returned by the gas station API.
5
5
 
6
6
  ## Properties
7
7
 
8
- ### sponsor\_address
8
+ ### sponsor\_address {#sponsor_address}
9
9
 
10
10
  > **sponsor\_address**: `string`
11
11
 
@@ -13,7 +13,7 @@ The sponsor's on-chain address.
13
13
 
14
14
  ***
15
15
 
16
- ### reservation\_id
16
+ ### reservation\_id {#reservation_id}
17
17
 
18
18
  > **reservation\_id**: `number`
19
19
 
@@ -21,7 +21,7 @@ An ID used to reference this particular gas reservation.
21
21
 
22
22
  ***
23
23
 
24
- ### gas\_coins
24
+ ### gas\_coins {#gas_coins}
25
25
 
26
26
  > **gas\_coins**: `object`[]
27
27
 
@@ -4,7 +4,7 @@ Configuration for IOTA.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### clientOptions
7
+ ### clientOptions {#clientoptions}
8
8
 
9
9
  > **clientOptions**: `NetworkOrTransport`
10
10
 
@@ -12,7 +12,7 @@ The configuration for the client.
12
12
 
13
13
  ***
14
14
 
15
- ### network
15
+ ### network {#network}
16
16
 
17
17
  > **network**: `string`
18
18
 
@@ -20,7 +20,7 @@ The network the operations are being performed on.
20
20
 
21
21
  ***
22
22
 
23
- ### vaultMnemonicId?
23
+ ### vaultMnemonicId? {#vaultmnemonicid}
24
24
 
25
25
  > `optional` **vaultMnemonicId**: `string`
26
26
 
@@ -28,7 +28,7 @@ The id of the entry in the vault containing the mnemonic.
28
28
 
29
29
  ***
30
30
 
31
- ### vaultSeedId?
31
+ ### vaultSeedId? {#vaultseedid}
32
32
 
33
33
  > `optional` **vaultSeedId**: `string`
34
34
 
@@ -36,7 +36,7 @@ The id of the entry in the vault containing the seed.
36
36
 
37
37
  ***
38
38
 
39
- ### coinType?
39
+ ### coinType? {#cointype}
40
40
 
41
41
  > `optional` **coinType**: `number`
42
42
 
@@ -44,7 +44,7 @@ The coin type.
44
44
 
45
45
  ***
46
46
 
47
- ### maxAddressScanRange?
47
+ ### maxAddressScanRange? {#maxaddressscanrange}
48
48
 
49
49
  > `optional` **maxAddressScanRange**: `number`
50
50
 
@@ -52,7 +52,7 @@ The maximum range to scan for addresses.
52
52
 
53
53
  ***
54
54
 
55
- ### inclusionTimeoutSeconds?
55
+ ### inclusionTimeoutSeconds? {#inclusiontimeoutseconds}
56
56
 
57
57
  > `optional` **inclusionTimeoutSeconds**: `number`
58
58
 
@@ -60,7 +60,7 @@ The length of time to wait for the inclusion of a transaction in seconds.
60
60
 
61
61
  ***
62
62
 
63
- ### gasStation?
63
+ ### gasStation? {#gasstation}
64
64
 
65
65
  > `optional` **gasStation**: [`IGasStationConfig`](IGasStationConfig.md)
66
66
 
@@ -69,7 +69,7 @@ If provided, transactions will be processed through the gas station.
69
69
 
70
70
  ***
71
71
 
72
- ### gasBudget?
72
+ ### gasBudget? {#gasbudget}
73
73
 
74
74
  > `optional` **gasBudget**: `number`
75
75
 
@@ -77,7 +77,7 @@ The default gas budget for all transactions (including sponsored and direct).
77
77
 
78
78
  ***
79
79
 
80
- ### enableCostLogging?
80
+ ### enableCostLogging? {#enablecostlogging}
81
81
 
82
82
  > `optional` **enableCostLogging**: `boolean`
83
83
 
@@ -4,7 +4,7 @@ On-chain object IDs needed to call mint_with_identity() on the NFT Move contract
4
4
 
5
5
  ## Properties
6
6
 
7
- ### identityObjectId
7
+ ### identityObjectId {#identityobjectid}
8
8
 
9
9
  > **identityObjectId**: `string`
10
10
 
@@ -13,7 +13,7 @@ Used as the Identity argument in mint_with_identity().
13
13
 
14
14
  ***
15
15
 
16
- ### controllerCapObjectId
16
+ ### controllerCapObjectId {#controllercapobjectid}
17
17
 
18
18
  > **controllerCapObjectId**: `string`
19
19
 
@@ -4,7 +4,7 @@ Interface for the dry run transaction response.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### status
7
+ ### status {#status}
8
8
 
9
9
  > **status**: `string`
10
10
 
@@ -12,7 +12,7 @@ The status of the dry run.
12
12
 
13
13
  ***
14
14
 
15
- ### costs
15
+ ### costs {#costs}
16
16
 
17
17
  > **costs**: `object`
18
18
 
@@ -50,7 +50,7 @@ The non-refundable storage fee.
50
50
 
51
51
  ***
52
52
 
53
- ### events
53
+ ### events {#events}
54
54
 
55
55
  > **events**: `IotaEvent`[]
56
56
 
@@ -58,7 +58,7 @@ The events emitted during the dry run.
58
58
 
59
59
  ***
60
60
 
61
- ### balanceChanges
61
+ ### balanceChanges {#balancechanges}
62
62
 
63
63
  > **balanceChanges**: `BalanceChange`[]
64
64
 
@@ -66,7 +66,7 @@ The balance changes that occurred during the dry run.
66
66
 
67
67
  ***
68
68
 
69
- ### objectChanges
69
+ ### objectChanges {#objectchanges}
70
70
 
71
71
  > **objectChanges**: `IotaObjectChange`[]
72
72
 
@@ -8,7 +8,7 @@ Configuration for IOTA.
8
8
 
9
9
  ## Properties
10
10
 
11
- ### waitForConfirmation?
11
+ ### waitForConfirmation? {#waitforconfirmation}
12
12
 
13
13
  > `optional` **waitForConfirmation**: `boolean`
14
14
 
@@ -16,7 +16,7 @@ Wait for confirmation of the transaction.
16
16
 
17
17
  ***
18
18
 
19
- ### dryRunLabel?
19
+ ### dryRunLabel? {#dryrunlabel}
20
20
 
21
21
  > `optional` **dryRunLabel**: `string`
22
22
 
@@ -4,7 +4,7 @@ Generic interface representing the storage fields of a MigrationState object.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### id
7
+ ### id {#id}
8
8
 
9
9
  > **id**: `object`
10
10
 
@@ -18,7 +18,7 @@ The ID of the MigrationState object.
18
18
 
19
19
  ***
20
20
 
21
- ### enabled
21
+ ### enabled {#enabled}
22
22
 
23
23
  > **enabled**: `boolean`
24
24
 
@@ -4,7 +4,7 @@ Base interface for all smart contract objects with versioning support.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### id
7
+ ### id {#id}
8
8
 
9
9
  > **id**: `object`
10
10
 
@@ -18,7 +18,7 @@ The ID of the smart contract object.
18
18
 
19
19
  ***
20
20
 
21
- ### version
21
+ ### version {#version}
22
22
 
23
23
  > **version**: `string`
24
24
 
@@ -6,19 +6,19 @@ Network types supported for deployment
6
6
 
7
7
  ## Type Declaration
8
8
 
9
- ### Testnet
9
+ ### Testnet {#testnet}
10
10
 
11
11
  > `readonly` **Testnet**: `"testnet"` = `"testnet"`
12
12
 
13
13
  Testnet.
14
14
 
15
- ### Devnet
15
+ ### Devnet {#devnet}
16
16
 
17
17
  > `readonly` **Devnet**: `"devnet"` = `"devnet"`
18
18
 
19
19
  Devnet.
20
20
 
21
- ### Mainnet
21
+ ### Mainnet {#mainnet}
22
22
 
23
23
  > `readonly` **Mainnet**: `"mainnet"` = `"mainnet"`
24
24
 
package/locales/en.json CHANGED
@@ -14,8 +14,7 @@
14
14
  "getControllerCapInfoFailed": "Getting the controller capability info for the identity failed",
15
15
  "identityNotFound": "The identity could not be found \"{notFoundId}\"",
16
16
  "identityDeleted": "The identity \"{identityId}\" has been deleted and cannot be used for minting",
17
- "controllerTokenNotFound": "No controller token found for the identity \"{notFoundId}\" with the provided controller address",
18
- "unexpectedSignerCall": "The no-op signer was unexpectedly called during a read-only identity lookup"
17
+ "controllerTokenNotFound": "No controller token found for the identity \"{notFoundId}\" with the provided controller address"
19
18
  },
20
19
  "iotaSmartContractUtils": {
21
20
  "migrationFailed": "Smart contract migration failed",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/dlt-iota",
3
- "version": "0.0.3-next.6",
3
+ "version": "0.0.3-next.7",
4
4
  "description": "IOTA distributed ledger utilities for clients, transactions, and contract operations.",
5
5
  "repository": {
6
6
  "type": "git",