diff --git a/types/zetrix-sdk-nodejs/index.d.ts b/types/zetrix-sdk-nodejs/index.d.ts index c79470a9fa7f42..0721bcd9074de0 100644 --- a/types/zetrix-sdk-nodejs/index.d.ts +++ b/types/zetrix-sdk-nodejs/index.d.ts @@ -59,19 +59,19 @@ declare namespace ZtxChainSDK { checkStatus(): Response; - getTransactions(blockNumber: number): Response; + getTransactions(blockNumber: string): Response; - getInfo(blockNumber: number): Response; + getInfo(blockNumber: string): Response; getLatestInfo(): Response; - getValidators(blockNumber: number): Response; + getValidators(blockNumber: string): Response; getLatestValidators(): Response; getLatestReward(): Response; - getFees(blockNumber: number): Response; + getFees(blockNumber: string): Response; getLatestFees(): Response; } @@ -115,6 +115,7 @@ declare namespace ZtxChainSDK { interface Response { result: any; - error: any; + errorCode: any; + errorDesc: any; } } diff --git a/types/zetrix-sdk-nodejs/zetrix-sdk-nodejs-tests.ts b/types/zetrix-sdk-nodejs/zetrix-sdk-nodejs-tests.ts index 90a2c2d2db55d4..06117f8adbc64e 100644 --- a/types/zetrix-sdk-nodejs/zetrix-sdk-nodejs-tests.ts +++ b/types/zetrix-sdk-nodejs/zetrix-sdk-nodejs-tests.ts @@ -33,13 +33,13 @@ const tokenInfo: ZtxChainSDK.Response = token.getInfo({}); const block: ZtxChainSDK.Block = sdk.block; const blockNumber: ZtxChainSDK.Response = block.getNumber(); const blockStatus: ZtxChainSDK.Response = block.checkStatus(); -const blockTransactions: ZtxChainSDK.Response = block.getTransactions(1); -const blockInfo: ZtxChainSDK.Response = block.getInfo(1); +const blockTransactions: ZtxChainSDK.Response = block.getTransactions("1"); +const blockInfo: ZtxChainSDK.Response = block.getInfo("1"); const latestBlockInfo: ZtxChainSDK.Response = block.getLatestInfo(); -const validators: ZtxChainSDK.Response = block.getValidators(1); +const validators: ZtxChainSDK.Response = block.getValidators("1"); const latestValidators: ZtxChainSDK.Response = block.getLatestValidators(); const latestReward: ZtxChainSDK.Response = block.getLatestReward(); -const fees: ZtxChainSDK.Response = block.getFees(1); +const fees: ZtxChainSDK.Response = block.getFees("1"); const latestFees: ZtxChainSDK.Response = block.getLatestFees(); // Test Operation interface