@twin.org/nft-rest-client 0.0.3-next.8 → 0.0.3-next.9

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.
@@ -4,7 +4,7 @@ import { BaseRestClient } from "@twin.org/api-core";
4
4
  import { Guards, Urn } from "@twin.org/core";
5
5
  import { HeaderTypes } from "@twin.org/web";
6
6
  /**
7
- * Client for performing NFT through to REST endpoints.
7
+ * Client for performing NFT operations via REST endpoints.
8
8
  */
9
9
  export class NftRestClient extends BaseRestClient {
10
10
  /**
@@ -20,7 +20,7 @@ export class NftRestClient extends BaseRestClient {
20
20
  }
21
21
  /**
22
22
  * Returns the class name of the component.
23
- * @returns The class name of the component.
23
+ * @returns The class name.
24
24
  */
25
25
  className() {
26
26
  return NftRestClient.CLASS_NAME;
@@ -62,7 +62,7 @@ export class NftRestClient extends BaseRestClient {
62
62
  /**
63
63
  * Burn an NFT.
64
64
  * @param id The id of the NFT to burn in urn format.
65
- * @returns Nothing.
65
+ * @returns A promise that resolves when the NFT has been permanently destroyed.
66
66
  */
67
67
  async burn(id) {
68
68
  Urn.guard(NftRestClient.CLASS_NAME, "id", id);
@@ -77,7 +77,7 @@ export class NftRestClient extends BaseRestClient {
77
77
  * @param id The id of the NFT to transfer in urn format.
78
78
  * @param recipientAddress The recipient address for the NFT.
79
79
  * @param metadata Optional mutable data to include during the transfer.
80
- * @returns Nothing.
80
+ * @returns A promise that resolves when the NFT ownership has been transferred.
81
81
  */
82
82
  async transfer(id, recipientAddress, metadata) {
83
83
  Guards.stringValue(NftRestClient.CLASS_NAME, "id", id);
@@ -93,10 +93,10 @@ export class NftRestClient extends BaseRestClient {
93
93
  });
94
94
  }
95
95
  /**
96
- * Update the data of the NFT.
96
+ * Update the mutable data of the NFT.
97
97
  * @param id The id of the NFT to update in urn format.
98
98
  * @param metadata The mutable data to update.
99
- * @returns Nothing.
99
+ * @returns A promise that resolves when the NFT metadata has been updated.
100
100
  */
101
101
  async update(id, metadata) {
102
102
  Guards.stringValue(NftRestClient.CLASS_NAME, "id", id);
@@ -1 +1 @@
1
- {"version":3,"file":"nftRestClient.js","sourceRoot":"","sources":["../../src/nftRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAW7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,cAAc;IAChD;;OAEG;IACI,MAAM,CAAU,UAAU,mBAAmC;IAEpE;;;OAGG;IACH,YAAY,MAA6B;QACxC,KAAK,kBAA0B,MAAM,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACI,SAAS;QACf,OAAO,aAAa,CAAC,UAAU,CAAC;IACjC,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,IAAI,CAChB,GAAW,EACX,iBAAqB,EACrB,QAAY,EACZ,SAAkB;QAElB,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,SAAe,GAAG,CAAC,CAAC;QAE/D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAoC,GAAG,EAAE,MAAM,EAAE;YACjF,IAAI,EAAE;gBACL,GAAG;gBACH,iBAAiB;gBACjB,QAAQ;gBACR,SAAS;aACT;SACD,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,OAAO,CACnB,EAAU;QAQV,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAE7D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAA0C,MAAM,EAAE,KAAK,EAAE;YACzF,UAAU,EAAE;gBACX,EAAE;aACF;SACD,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,IAMf,CAAC;IACH,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,IAAI,CAAC,EAAU;QAC3B,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAEpD,MAAM,IAAI,CAAC,KAAK,CAAyB,MAAM,EAAE,QAAQ,EAAE;YAC1D,UAAU,EAAE;gBACX,EAAE;aACF;SACD,CAAC,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,QAAQ,CACpB,EAAU,EACV,gBAAwB,EACxB,QAAY;QAEZ,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAC7D,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,sBAA4B,gBAAgB,CAAC,CAAC;QAEzF,MAAM,IAAI,CAAC,KAAK,CAA6B,eAAe,EAAE,MAAM,EAAE;YACrE,UAAU,EAAE;gBACX,EAAE;aACF;YACD,IAAI,EAAE;gBACL,gBAAgB;gBAChB,QAAQ;aACR;SACD,CAAC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,MAAM,CAAc,EAAU,EAAE,QAAW;QACvD,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAC7D,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,cAAoB,QAAQ,CAAC,CAAC;QAEpE,MAAM,IAAI,CAAC,KAAK,CAA2B,MAAM,EAAE,KAAK,EAAE;YACzD,UAAU,EAAE;gBACX,EAAE;aACF;YACD,IAAI,EAAE;gBACL,QAAQ;aACR;SACD,CAAC,CAAC;IACJ,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { BaseRestClient } from \"@twin.org/api-core\";\nimport type { IBaseRestClientConfig, ICreatedResponse } from \"@twin.org/api-models\";\nimport { Guards, Urn } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type {\n\tINftBurnRequest,\n\tINftComponent,\n\tINftMintRequest,\n\tINftResolveRequest,\n\tINftResolveResponse,\n\tINftTransferRequest,\n\tINftUpdateRequest\n} from \"@twin.org/nft-models\";\nimport { HeaderTypes } from \"@twin.org/web\";\n\n/**\n * Client for performing NFT through to REST endpoints.\n */\nexport class NftRestClient extends BaseRestClient implements INftComponent {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<NftRestClient>();\n\n\t/**\n\t * Create a new instance of NftRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(nameof<NftRestClient>(), config, \"nft\");\n\t}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The class name of the component.\n\t */\n\tpublic className(): string {\n\t\treturn NftRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Mint an NFT.\n\t * @param tag The tag for the NFT.\n\t * @param immutableMetadata The immutable metadata for the NFT.\n\t * @param metadata The metadata for the NFT.\n\t * @param namespace The namespace of the connector to use for the NFT, defaults to component configured namespace.\n\t * @returns The id of the created NFT in urn format.\n\t */\n\tpublic async mint<T = unknown, U = unknown>(\n\t\ttag: string,\n\t\timmutableMetadata?: T,\n\t\tmetadata?: U,\n\t\tnamespace?: string\n\t): Promise<string> {\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(tag), tag);\n\n\t\tconst response = await this.fetch<INftMintRequest, ICreatedResponse>(\"/\", \"POST\", {\n\t\t\tbody: {\n\t\t\t\ttag,\n\t\t\t\timmutableMetadata,\n\t\t\t\tmetadata,\n\t\t\t\tnamespace\n\t\t\t}\n\t\t});\n\n\t\treturn response.headers[HeaderTypes.Location];\n\t}\n\n\t/**\n\t * Resolve an NFT.\n\t * @param id The id of the NFT to resolve.\n\t * @returns The data for the NFT.\n\t */\n\tpublic async resolve<T = unknown, U = unknown>(\n\t\tid: string\n\t): Promise<{\n\t\tissuer: string;\n\t\tissuerIdentityId: string;\n\t\ttag: string;\n\t\timmutableMetadata?: T;\n\t\tmetadata?: U;\n\t}> {\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tconst response = await this.fetch<INftResolveRequest, INftResolveResponse>(\"/:id\", \"GET\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t}\n\t\t});\n\n\t\treturn response.body as {\n\t\t\tissuer: string;\n\t\t\tissuerIdentityId: string;\n\t\t\ttag: string;\n\t\t\timmutableMetadata?: T;\n\t\t\tmetadata?: U;\n\t\t};\n\t}\n\n\t/**\n\t * Burn an NFT.\n\t * @param id The id of the NFT to burn in urn format.\n\t * @returns Nothing.\n\t */\n\tpublic async burn(id: string): Promise<void> {\n\t\tUrn.guard(NftRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tawait this.fetch<INftBurnRequest, never>(\"/:id\", \"DELETE\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Transfer an NFT.\n\t * @param id The id of the NFT to transfer in urn format.\n\t * @param recipientAddress The recipient address for the NFT.\n\t * @param metadata Optional mutable data to include during the transfer.\n\t * @returns Nothing.\n\t */\n\tpublic async transfer<T = unknown>(\n\t\tid: string,\n\t\trecipientAddress: string,\n\t\tmetadata?: T\n\t): Promise<void> {\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(id), id);\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(recipientAddress), recipientAddress);\n\n\t\tawait this.fetch<INftTransferRequest, never>(\"/:id/transfer\", \"POST\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t},\n\t\t\tbody: {\n\t\t\t\trecipientAddress,\n\t\t\t\tmetadata\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Update the data of the NFT.\n\t * @param id The id of the NFT to update in urn format.\n\t * @param metadata The mutable data to update.\n\t * @returns Nothing.\n\t */\n\tpublic async update<U = unknown>(id: string, metadata: U): Promise<void> {\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(id), id);\n\t\tGuards.object(NftRestClient.CLASS_NAME, nameof(metadata), metadata);\n\n\t\tawait this.fetch<INftUpdateRequest, never>(\"/:id\", \"PUT\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t},\n\t\t\tbody: {\n\t\t\t\tmetadata\n\t\t\t}\n\t\t});\n\t}\n}\n"]}
1
+ {"version":3,"file":"nftRestClient.js","sourceRoot":"","sources":["../../src/nftRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAW7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,cAAc;IAChD;;OAEG;IACI,MAAM,CAAU,UAAU,mBAAmC;IAEpE;;;OAGG;IACH,YAAY,MAA6B;QACxC,KAAK,kBAA0B,MAAM,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACI,SAAS;QACf,OAAO,aAAa,CAAC,UAAU,CAAC;IACjC,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,IAAI,CAChB,GAAW,EACX,iBAAqB,EACrB,QAAY,EACZ,SAAkB;QAElB,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,SAAe,GAAG,CAAC,CAAC;QAE/D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAoC,GAAG,EAAE,MAAM,EAAE;YACjF,IAAI,EAAE;gBACL,GAAG;gBACH,iBAAiB;gBACjB,QAAQ;gBACR,SAAS;aACT;SACD,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,OAAO,CACnB,EAAU;QAQV,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAE7D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAA0C,MAAM,EAAE,KAAK,EAAE;YACzF,UAAU,EAAE;gBACX,EAAE;aACF;SACD,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,IAMf,CAAC;IACH,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,IAAI,CAAC,EAAU;QAC3B,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAEpD,MAAM,IAAI,CAAC,KAAK,CAAyB,MAAM,EAAE,QAAQ,EAAE;YAC1D,UAAU,EAAE;gBACX,EAAE;aACF;SACD,CAAC,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,QAAQ,CACpB,EAAU,EACV,gBAAwB,EACxB,QAAY;QAEZ,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAC7D,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,sBAA4B,gBAAgB,CAAC,CAAC;QAEzF,MAAM,IAAI,CAAC,KAAK,CAA6B,eAAe,EAAE,MAAM,EAAE;YACrE,UAAU,EAAE;gBACX,EAAE;aACF;YACD,IAAI,EAAE;gBACL,gBAAgB;gBAChB,QAAQ;aACR;SACD,CAAC,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,MAAM,CAAc,EAAU,EAAE,QAAW;QACvD,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,QAAc,EAAE,CAAC,CAAC;QAC7D,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,cAAoB,QAAQ,CAAC,CAAC;QAEpE,MAAM,IAAI,CAAC,KAAK,CAA2B,MAAM,EAAE,KAAK,EAAE;YACzD,UAAU,EAAE;gBACX,EAAE;aACF;YACD,IAAI,EAAE;gBACL,QAAQ;aACR;SACD,CAAC,CAAC;IACJ,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { BaseRestClient } from \"@twin.org/api-core\";\nimport type { IBaseRestClientConfig, ICreatedResponse } from \"@twin.org/api-models\";\nimport { Guards, Urn } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type {\n\tINftBurnRequest,\n\tINftComponent,\n\tINftMintRequest,\n\tINftResolveRequest,\n\tINftResolveResponse,\n\tINftTransferRequest,\n\tINftUpdateRequest\n} from \"@twin.org/nft-models\";\nimport { HeaderTypes } from \"@twin.org/web\";\n\n/**\n * Client for performing NFT operations via REST endpoints.\n */\nexport class NftRestClient extends BaseRestClient implements INftComponent {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<NftRestClient>();\n\n\t/**\n\t * Create a new instance of NftRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(nameof<NftRestClient>(), config, \"nft\");\n\t}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The class name.\n\t */\n\tpublic className(): string {\n\t\treturn NftRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Mint an NFT.\n\t * @param tag The tag for the NFT.\n\t * @param immutableMetadata The immutable metadata for the NFT.\n\t * @param metadata The metadata for the NFT.\n\t * @param namespace The namespace of the connector to use for the NFT, defaults to component configured namespace.\n\t * @returns The id of the created NFT in urn format.\n\t */\n\tpublic async mint<T = unknown, U = unknown>(\n\t\ttag: string,\n\t\timmutableMetadata?: T,\n\t\tmetadata?: U,\n\t\tnamespace?: string\n\t): Promise<string> {\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(tag), tag);\n\n\t\tconst response = await this.fetch<INftMintRequest, ICreatedResponse>(\"/\", \"POST\", {\n\t\t\tbody: {\n\t\t\t\ttag,\n\t\t\t\timmutableMetadata,\n\t\t\t\tmetadata,\n\t\t\t\tnamespace\n\t\t\t}\n\t\t});\n\n\t\treturn response.headers[HeaderTypes.Location];\n\t}\n\n\t/**\n\t * Resolve an NFT.\n\t * @param id The id of the NFT to resolve.\n\t * @returns The data for the NFT.\n\t */\n\tpublic async resolve<T = unknown, U = unknown>(\n\t\tid: string\n\t): Promise<{\n\t\tissuer: string;\n\t\tissuerIdentityId: string;\n\t\ttag: string;\n\t\timmutableMetadata?: T;\n\t\tmetadata?: U;\n\t}> {\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tconst response = await this.fetch<INftResolveRequest, INftResolveResponse>(\"/:id\", \"GET\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t}\n\t\t});\n\n\t\treturn response.body as {\n\t\t\tissuer: string;\n\t\t\tissuerIdentityId: string;\n\t\t\ttag: string;\n\t\t\timmutableMetadata?: T;\n\t\t\tmetadata?: U;\n\t\t};\n\t}\n\n\t/**\n\t * Burn an NFT.\n\t * @param id The id of the NFT to burn in urn format.\n\t * @returns A promise that resolves when the NFT has been permanently destroyed.\n\t */\n\tpublic async burn(id: string): Promise<void> {\n\t\tUrn.guard(NftRestClient.CLASS_NAME, nameof(id), id);\n\n\t\tawait this.fetch<INftBurnRequest, never>(\"/:id\", \"DELETE\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Transfer an NFT.\n\t * @param id The id of the NFT to transfer in urn format.\n\t * @param recipientAddress The recipient address for the NFT.\n\t * @param metadata Optional mutable data to include during the transfer.\n\t * @returns A promise that resolves when the NFT ownership has been transferred.\n\t */\n\tpublic async transfer<T = unknown>(\n\t\tid: string,\n\t\trecipientAddress: string,\n\t\tmetadata?: T\n\t): Promise<void> {\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(id), id);\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(recipientAddress), recipientAddress);\n\n\t\tawait this.fetch<INftTransferRequest, never>(\"/:id/transfer\", \"POST\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t},\n\t\t\tbody: {\n\t\t\t\trecipientAddress,\n\t\t\t\tmetadata\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Update the mutable data of the NFT.\n\t * @param id The id of the NFT to update in urn format.\n\t * @param metadata The mutable data to update.\n\t * @returns A promise that resolves when the NFT metadata has been updated.\n\t */\n\tpublic async update<U = unknown>(id: string, metadata: U): Promise<void> {\n\t\tGuards.stringValue(NftRestClient.CLASS_NAME, nameof(id), id);\n\t\tGuards.object(NftRestClient.CLASS_NAME, nameof(metadata), metadata);\n\n\t\tawait this.fetch<INftUpdateRequest, never>(\"/:id\", \"PUT\", {\n\t\t\tpathParams: {\n\t\t\t\tid\n\t\t\t},\n\t\t\tbody: {\n\t\t\t\tmetadata\n\t\t\t}\n\t\t});\n\t}\n}\n"]}
@@ -2,7 +2,7 @@ import { BaseRestClient } from "@twin.org/api-core";
2
2
  import type { IBaseRestClientConfig } from "@twin.org/api-models";
3
3
  import type { INftComponent } from "@twin.org/nft-models";
4
4
  /**
5
- * Client for performing NFT through to REST endpoints.
5
+ * Client for performing NFT operations via REST endpoints.
6
6
  */
7
7
  export declare class NftRestClient extends BaseRestClient implements INftComponent {
8
8
  /**
@@ -16,7 +16,7 @@ export declare class NftRestClient extends BaseRestClient implements INftCompone
16
16
  constructor(config: IBaseRestClientConfig);
17
17
  /**
18
18
  * Returns the class name of the component.
19
- * @returns The class name of the component.
19
+ * @returns The class name.
20
20
  */
21
21
  className(): string;
22
22
  /**
@@ -43,7 +43,7 @@ export declare class NftRestClient extends BaseRestClient implements INftCompone
43
43
  /**
44
44
  * Burn an NFT.
45
45
  * @param id The id of the NFT to burn in urn format.
46
- * @returns Nothing.
46
+ * @returns A promise that resolves when the NFT has been permanently destroyed.
47
47
  */
48
48
  burn(id: string): Promise<void>;
49
49
  /**
@@ -51,14 +51,14 @@ export declare class NftRestClient extends BaseRestClient implements INftCompone
51
51
  * @param id The id of the NFT to transfer in urn format.
52
52
  * @param recipientAddress The recipient address for the NFT.
53
53
  * @param metadata Optional mutable data to include during the transfer.
54
- * @returns Nothing.
54
+ * @returns A promise that resolves when the NFT ownership has been transferred.
55
55
  */
56
56
  transfer<T = unknown>(id: string, recipientAddress: string, metadata?: T): Promise<void>;
57
57
  /**
58
- * Update the data of the NFT.
58
+ * Update the mutable data of the NFT.
59
59
  * @param id The id of the NFT to update in urn format.
60
60
  * @param metadata The mutable data to update.
61
- * @returns Nothing.
61
+ * @returns A promise that resolves when the NFT metadata has been updated.
62
62
  */
63
63
  update<U = unknown>(id: string, metadata: U): Promise<void>;
64
64
  }
package/docs/changelog.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.3-next.9](https://github.com/iotaledger/twin-nft/compare/nft-rest-client-v0.0.3-next.8...nft-rest-client-v0.0.3-next.9) (2026-06-17)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * **nft-rest-client:** Synchronize repo versions
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/nft-models bumped from 0.0.3-next.8 to 0.0.3-next.9
16
+
3
17
  ## [0.0.3-next.8](https://github.com/iotaledger/twin-nft/compare/nft-rest-client-v0.0.3-next.7...nft-rest-client-v0.0.3-next.8) (2026-06-11)
4
18
 
5
19
 
@@ -1,6 +1,6 @@
1
1
  # Class: NftRestClient
2
2
 
3
- Client for performing NFT through to REST endpoints.
3
+ Client for performing NFT operations via REST endpoints.
4
4
 
5
5
  ## Extends
6
6
 
@@ -54,7 +54,7 @@ Returns the class name of the component.
54
54
 
55
55
  `string`
56
56
 
57
- The class name of the component.
57
+ The class name.
58
58
 
59
59
  #### Implementation of
60
60
 
@@ -170,7 +170,7 @@ The id of the NFT to burn in urn format.
170
170
 
171
171
  `Promise`\<`void`\>
172
172
 
173
- Nothing.
173
+ A promise that resolves when the NFT has been permanently destroyed.
174
174
 
175
175
  #### Implementation of
176
176
 
@@ -214,7 +214,7 @@ Optional mutable data to include during the transfer.
214
214
 
215
215
  `Promise`\<`void`\>
216
216
 
217
- Nothing.
217
+ A promise that resolves when the NFT ownership has been transferred.
218
218
 
219
219
  #### Implementation of
220
220
 
@@ -226,7 +226,7 @@ Nothing.
226
226
 
227
227
  > **update**\<`U`\>(`id`, `metadata`): `Promise`\<`void`\>
228
228
 
229
- Update the data of the NFT.
229
+ Update the mutable data of the NFT.
230
230
 
231
231
  #### Type Parameters
232
232
 
@@ -252,7 +252,7 @@ The mutable data to update.
252
252
 
253
253
  `Promise`\<`void`\>
254
254
 
255
- Nothing.
255
+ A promise that resolves when the NFT metadata has been updated.
256
256
 
257
257
  #### Implementation of
258
258
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/nft-rest-client",
3
- "version": "0.0.3-next.8",
3
+ "version": "0.0.3-next.9",
4
4
  "description": "HTTP client for calling NFT service endpoints from applications.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,7 +19,7 @@
19
19
  "@twin.org/core": "next",
20
20
  "@twin.org/entity": "next",
21
21
  "@twin.org/nameof": "next",
22
- "@twin.org/nft-models": "0.0.3-next.8",
22
+ "@twin.org/nft-models": "0.0.3-next.9",
23
23
  "@twin.org/web": "next"
24
24
  },
25
25
  "main": "./dist/es/index.js",