From cc08a3ad4d6696116aee73759ff27d080caf83d2 Mon Sep 17 00:00:00 2001 From: bucurdavid Date: Thu, 26 Sep 2024 21:46:23 +0300 Subject: [PATCH 1/2] feat: cache duration on access request --- package-lock.json | 4 ++-- src/datanft.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 39d350b..9c1bdc3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@itheum/sdk-mx-data-nft", - "version": "3.6.0-alpha.3", + "version": "3.6.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@itheum/sdk-mx-data-nft", - "version": "3.6.0-alpha.3", + "version": "3.6.1", "license": "GPL-3.0-only", "dependencies": { "@multiversx/sdk-core": "13.2.2", diff --git a/src/datanft.ts b/src/datanft.ts index 49696c0..e9d76f3 100644 --- a/src/datanft.ts +++ b/src/datanft.ts @@ -508,6 +508,7 @@ export class DataNft implements DataNftType { stream?: boolean; nestedIdxToStream?: number; asDeputyOnAppointerAddr?: string; + cacheDurationSeconds?: number; }): Promise { try { // S: run any format specific validation @@ -575,7 +576,9 @@ export class DataNft implements DataNftType { this.nonce )}&chainId=${chainId}&mvxNativeAuthEnable=1&mvxNativeAuthMaxExpirySeconds=${ p.mvxNativeAuthMaxExpirySeconds - }&mvxNativeAuthOrigins=${mvxNativeAuthOriginsToBase64}`; + }&mvxNativeAuthOrigins=${mvxNativeAuthOriginsToBase64}&cacheDurationSeconds=${ + p.cacheDurationSeconds || 0 + }`; type FetchConfig = { [key: string]: any; From 4612ff9a1fad17229a426f1974a7dc8abcd83569 Mon Sep 17 00:00:00 2001 From: bucurdavid Date: Thu, 26 Sep 2024 21:48:01 +0300 Subject: [PATCH 2/2] chore: alpha version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 08466bc..b76b11d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@itheum/sdk-mx-data-nft", - "version": "3.6.1", + "version": "3.7.0-alpha.6", "description": "SDK for Itheum's Data NFT Technology on MultiversX Blockchain", "main": "out/index.js", "types": "out/index.d.js",