Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cor 33565 #217

Closed
wants to merge 13 commits into from
9 changes: 9 additions & 0 deletions src/fireblocks-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import {
InternalWalletAsset,
MaxSpendableAmountResponse,
MaxBip44IndexUsedResponse,
PaginatedAddressesResponse,
OptionalPaginatedAddresseRequestFilters,
NetworkConnectionResponse,
OffExchangeEntityResponse,
OperationSuccessResponse,
Expand Down Expand Up @@ -1159,6 +1161,13 @@ export class FireblocksSDK {
return await this.apiClient.issueGetRequest(url);
}

/**
* Get addresses for a vault account for asset with paging
*/
public async getPaginatedAddresses(accountId: string, assetId: string, paginatedAddresseRequestFilters?: OptionalPaginatedAddresseRequestFilters): Promise<PaginatedAddressesResponse> {
return await this.apiClient.issueGetRequest(`/v1/vault/accounts/${accountId}/${assetId}/addresses_paginated?${queryString.stringify(paginatedAddresseRequestFilters)}`);
}

/**
* Get all vault assets balance overview
*/
Expand Down
27 changes: 27 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,33 @@ export interface MaxBip44IndexUsedResponse {
maxBip44AddressIndexUsed?: number;
maxBip44ChangeAddressIndexUsed?: number;
}
export interface AddressResponse {
assetId: string;
address: string;
description?: string;
tag: string;
type?: number;
customerRefId?: number;
addressFormat: number;
legacyAddress?: string;
enterpriseAddress?: string;
bip44AddressIndex?: string;
userDefined: boolean;
}

export interface PaginatedAddressesResponse {
addresses: AddressResponse[];
paging?: {
before?: string;
after?: string;
};
}

export interface OptionalPaginatedAddresseRequestFilters {
limit?: number; // for default and max limit values please see: https://docs.fireblocks.com/api/swagger-ui/#/
before?: string;
after?: string;
}

export interface VaultAccountsFilter {
namePrefix?: string;
Expand Down
Loading