diff --git a/src/exports/core/getAccounts.ts b/src/exports/core/getAccounts.ts index b17a30e..11fdf1f 100644 --- a/src/exports/core/getAccounts.ts +++ b/src/exports/core/getAccounts.ts @@ -4,13 +4,38 @@ import { AccountCallBuilder } from '@stellar/stellar-sdk/lib/horizon/account_cal import { callBuilder } from './callBuilder'; import { checkConfigCreated, CallBuilderOptions } from '../utils'; -export type GetAccountsOptions = CallBuilderOptions & { - forSigner?: string; +type GetAccountsOptionsA = { + forSigner: string; forAsset?: Asset; sponsor?: string; forLiquidityPool?: string; }; +type GetAccountsOptionsB = { + forSigner?: string; + forAsset: Asset; + sponsor?: string; + forLiquidityPool?: string; +}; + +type GetAccountsOptionsC ={ + forSigner?: string; + forAsset?: Asset; + sponsor: string; + forLiquidityPool?: string; +}; + +type GetAccountsOptionsD = { + forSigner?: string; + forAsset?: Asset; + sponsor?: string; + forLiquidityPool: string; +}; + +export type GetAccountsOptions = CallBuilderOptions & ( + GetAccountsOptionsA | GetAccountsOptionsB | GetAccountsOptionsC | GetAccountsOptionsD +) + export type GetAccountsResult = { builder: AccountCallBuilder; response: Horizon.ServerApi.CollectionPage; diff --git a/src/exports/index.ts b/src/exports/index.ts index 0e079f6..e4944fd 100644 --- a/src/exports/index.ts +++ b/src/exports/index.ts @@ -1,6 +1,7 @@ import { getState as getStoreState } from '../store'; export * from './core'; +export { Asset } from '@stellar/stellar-sdk' export { blux } from './blux'; export { getState,