diff --git a/CHANGELOG.md b/CHANGELOG.md index ca8e3cca..01b039b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [2.4.0-alpha.14](https://github.com/ar-io/ar-io-sdk/compare/v2.4.0-alpha.13...v2.4.0-alpha.14) (2024-11-11) + + +### Bug Fixes + +* **io:** include address in delegate type for gateway ([46ef1a7](https://github.com/ar-io/ar-io-sdk/commit/46ef1a7e12c6a1f54478dfe9ca0050dfa06d209f)) + # [2.4.0-alpha.13](https://github.com/ar-io/ar-io-sdk/compare/v2.4.0-alpha.12...v2.4.0-alpha.13) (2024-11-11) diff --git a/package.json b/package.json index 73f69090..628cc4f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ar.io/sdk", - "version": "2.4.0-alpha.13", + "version": "2.4.0-alpha.14", "repository": { "type": "git", "url": "git+https://github.com/ar-io/ar-io-sdk.git" diff --git a/src/common/io.ts b/src/common/io.ts index 4ceee6cc..43ea087d 100644 --- a/src/common/io.ts +++ b/src/common/io.ts @@ -45,7 +45,7 @@ import { AoEpochData, AoEpochSettings, AoGateway, - AoGatewayDelegate, + AoGatewayDelegateWithAddress, AoIORead, AoIOWrite, AoRegistrationFees, @@ -272,11 +272,7 @@ export class IOReadable implements AoIORead { async getGatewayDelegates({ address, ...pageParams - }: { - address: WalletAddress; - } & PaginationParams): Promise< - PaginationResult - > { + }): Promise> { const allTags = [ { name: 'Action', value: 'Paginated-Delegates' }, { name: 'Address', value: address }, @@ -286,7 +282,7 @@ export class IOReadable implements AoIORead { { name: 'Sort-Order', value: pageParams?.sortOrder }, ]; - return this.process.read>({ + return this.process.read>({ tags: pruneTags(allTags), }); } diff --git a/src/types/io.ts b/src/types/io.ts index b2912cf3..823971ad 100644 --- a/src/types/io.ts +++ b/src/types/io.ts @@ -241,6 +241,10 @@ export type AoGatewayDelegate = { vaults: Record; }; +export type AoGatewayDelegateWithAddress = AoGatewayDelegate & { + address: WalletAddress; +}; + export type AoGatewaySettings = { allowDelegatedStaking: boolean | 'allowlist'; delegateRewardShareRatio: number; @@ -316,15 +320,16 @@ export interface AoIORead { address: WalletAddress; }): Promise; // TODO: these could be moved to a separate Gateways class that implements gateway specific interactions - getGatewayDelegates( - params: { - address: WalletAddress; - } & PaginationParams, - ): Promise>; + getGatewayDelegates({ + address, + ...pageParams + }: { + address: WalletAddress; + } & PaginationParams): Promise< + PaginationResult + >; getGatewayDelegateAllowList( - params?: PaginationParams & { - address: WalletAddress; - }, + params?: PaginationParams, ): Promise>; // END OF GATEWAY SPECIFIC INTERACTIONS getGateways( diff --git a/src/version.ts b/src/version.ts index 16d28fb9..4a9f2e7e 100644 --- a/src/version.ts +++ b/src/version.ts @@ -16,4 +16,4 @@ // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH -export const version = '2.4.0-alpha.13'; +export const version = '2.4.0-alpha.14'; diff --git a/tests/e2e/esm/index.test.js b/tests/e2e/esm/index.test.js index 542b4d52..a6a71f86 100644 --- a/tests/e2e/esm/index.test.js +++ b/tests/e2e/esm/index.test.js @@ -237,6 +237,7 @@ describe('e2e esm tests', async () => { assert(Array.isArray(delegate.vaults)); assert(typeof delegate.delegatedStake === 'number'); assert(typeof delegate.startTimestamp === 'number'); + assert(typeof delegate.address === 'string'); }); });