@trinaryex/sdk 3.8.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/DESIGN.md +253 -71
  2. package/README.md +218 -16
  3. package/dist/ReadOnlyClient.d.ts +42 -8
  4. package/dist/TriexClient.d.ts +73 -8
  5. package/dist/armature/OrgClient.d.ts +372 -0
  6. package/dist/armature/OrgClientGroups.d.ts +186 -0
  7. package/dist/armature/OrgsApi.d.ts +69 -0
  8. package/dist/armature/actions.d.ts +75 -0
  9. package/dist/armature/create.d.ts +27 -0
  10. package/dist/armature/currency.d.ts +64 -0
  11. package/dist/armature/executors.d.ts +44 -0
  12. package/dist/armature/governance.d.ts +194 -0
  13. package/dist/armature/harness.d.ts +96 -0
  14. package/dist/armature/lifecycle.d.ts +84 -0
  15. package/dist/armature/plan.d.ts +39 -0
  16. package/dist/armature/proposals.d.ts +51 -0
  17. package/dist/armature/queries.d.ts +16 -0
  18. package/dist/armature/schemas.d.ts +559 -0
  19. package/dist/armature/trading.d.ts +114 -0
  20. package/dist/armature/transactions.d.ts +160 -0
  21. package/dist/armature/treasury.d.ts +41 -0
  22. package/dist/armature/tree.d.ts +13 -0
  23. package/dist/armature/types.d.ts +59 -0
  24. package/dist/armature/upgrade.d.ts +27 -0
  25. package/dist/armature/vault.d.ts +94 -0
  26. package/dist/coins/CoinsApi.d.ts +53 -0
  27. package/dist/coins/funding.d.ts +6 -0
  28. package/dist/coins/money.d.ts +36 -0
  29. package/dist/coins/onchain.d.ts +162 -0
  30. package/dist/coins/schemas.d.ts +456 -0
  31. package/dist/coins/transactions.d.ts +82 -0
  32. package/dist/coins/types.d.ts +115 -0
  33. package/dist/errors.d.ts +11 -1
  34. package/dist/funding.d.ts +2 -2
  35. package/dist/http.d.ts +3 -0
  36. package/dist/index.d.ts +63 -8
  37. package/dist/index.js +10587 -959
  38. package/dist/money.d.ts +15 -0
  39. package/dist/moveAbort.d.ts +28 -0
  40. package/dist/moveAbortCatalog.generated.d.ts +9 -0
  41. package/dist/onchain.d.ts +55 -3
  42. package/dist/paging.d.ts +9 -3
  43. package/dist/queries.d.ts +35 -7
  44. package/dist/schemas.d.ts +1911 -50
  45. package/dist/transactions.d.ts +63 -1
  46. package/dist/types.d.ts +116 -7
  47. package/package.json +3 -1
package/dist/money.d.ts CHANGED
@@ -5,7 +5,13 @@ export declare const GTC_EXPIRE = 18446744073709551615n;
5
5
  export declare function toBase(human: string | number, decimals: number): bigint;
6
6
  export declare function fromBase(base: bigint, decimals: number): string;
7
7
  export declare function computeItemQuote(price: bigint, quantity: bigint): bigint;
8
+ export declare function computeQuoteFee(quote: bigint, feeRateScaled: bigint): bigint;
8
9
  export declare function computeBidQuoteDeposit(price: bigint, quantity: bigint, feeRateScaled: bigint): bigint;
10
+ export declare function computeAskProceeds(price: bigint, quantity: bigint, feeRateScaled: bigint): {
11
+ quote: bigint;
12
+ fee: bigint;
13
+ net: bigint;
14
+ };
9
15
  export declare function marketBuyRoundingBuffer(quantity: bigint, feeRateScaled: bigint): bigint;
10
16
  export declare function estimateMarketBuyCost(asks: ReadonlyArray<{
11
17
  price: bigint;
@@ -16,3 +22,12 @@ export declare function estimateMarketBuyCost(asks: ReadonlyArray<{
16
22
  total: bigint;
17
23
  fillable: bigint;
18
24
  };
25
+ export declare function estimateMarketSellProceeds(bids: ReadonlyArray<{
26
+ price: bigint;
27
+ remainingQuantity: bigint;
28
+ }>, quantity: bigint, feeRateScaled: bigint): {
29
+ quote: bigint;
30
+ fee: bigint;
31
+ net: bigint;
32
+ fillable: bigint;
33
+ };
@@ -0,0 +1,28 @@
1
+ export interface MoveAbortExplanation {
2
+ module: string;
3
+ address: string | null;
4
+ function: string | null;
5
+ code: number | null;
6
+ rawCode: string;
7
+ clever: boolean;
8
+ sourceLine: number | null;
9
+ constant: string | null;
10
+ explanation: string | null;
11
+ source: string | null;
12
+ resolution: 'resolved' | 'unknown-code' | 'external-module';
13
+ }
14
+ export interface AbortCodeBits {
15
+ clever: boolean;
16
+ code: number | null;
17
+ sourceLine: number | null;
18
+ }
19
+ export declare function unpackAbortCode(raw: string | number | bigint): AbortCodeBits;
20
+ interface ParsedAbort {
21
+ module: string;
22
+ rawCode: string;
23
+ address: string | null;
24
+ function: string | null;
25
+ }
26
+ export declare function parseMoveAbort(text: string): ParsedAbort | null;
27
+ export declare function explainMoveAbortDetailed(error: unknown): MoveAbortExplanation | null;
28
+ export {};
@@ -0,0 +1,9 @@
1
+ export type MoveAbortName = 'book::EInvalidAmountIn' | 'book::EEmptyOrderbook' | 'book::EInvalidPriceRange' | 'book::EInvalidTicks' | 'book::ENewQuantityMustBeLessThanOriginal' | 'order::EInvalidNewQuantity' | 'order::EOrderExpired' | 'order::EMakerFeeRateTooWide' | 'order::ECancelRetentionTooWide' | 'order::EOrderBelowMinimumSize' | 'order_info::EOrderInvalidPrice' | 'order_info::EOrderBelowMinimumSize' | 'order_info::EInvalidExpireTimestamp' | 'order_info::EInvalidOrderType' | 'order_info::EPOSTOrderCrossesOrderbook' | 'order_info::EFOKOrderCannotBeFullyFilled' | 'order_info::EMarketOrderCannotBePostOnly' | 'order_info::ESelfMatchingCancelTaker' | 'fee_policy::EClassAlreadyExists' | 'fee_policy::EClassDoesNotExist' | 'fee_policy::EInvalidCancelRetention' | 'fee_policy::ENoDefaultClassForQuote' | 'fee_policy::EClassQuoteMismatch' | 'fee_policy::EDuplicateGenesisClass' | 'fee_policy::EInvalidQuoteUnit' | 'fee_policy::EOperatorShareAboveCeiling' | 'fee_policy::EOperatorShareClassDoesNotExist' | 'fee_policy::ENoAuthorizedAdapter' | 'fee_policy::EUnauthorizedAdapter' | 'fee_policy::EAdapterPinned' | 'big_vector::ESliceTooSmall' | 'big_vector::ESliceTooBig' | 'big_vector::EFanOutTooSmall' | 'big_vector::EFanOutTooBig' | 'big_vector::ENotEmpty' | 'big_vector::ENotFound' | 'big_vector::EExists' | 'big_vector::EBadRemove' | 'big_vector::ENotAdjacent' | 'big_vector::EBadRedistribution' | 'constants::EOrderInfoMismatch' | 'constants::EBookOrderMismatch' | 'constants::EIncorrectPoolId' | 'constants::EFillMismatch' | 'math::EInvalidPrecision' | 'math::EOverflow' | 'multicoin_pool::EInvalidFee' | 'multicoin_pool::EInvalidQuantityIn' | 'multicoin_pool::EInvalidOrderTradingAccount' | 'multicoin_pool::EPackageVersionDisabled' | 'multicoin_pool::EMinimumQuantityOutNotMet' | 'multicoin_pool::EPoolNotRegistered' | 'multicoin_pool::EQuoteNotApproved' | 'multicoin_pool::ENoOperatorBeneficiary' | 'pool::EInvalidFee' | 'pool::ESameBaseAndQuote' | 'pool::EInvalidQuantityIn' | 'pool::EInvalidOrderTradingAccount' | 'pool::EPackageVersionDisabled' | 'pool::EMinimumQuantityOutNotMet' | 'pool::EPoolNotRegistered' | 'pool::EQuoteNotApproved' | 'pool::EInvalidDecimalPair' | 'registry::EPoolAlreadyExists' | 'registry::EPoolDoesNotExist' | 'registry::EPackageVersionNotEnabled' | 'registry::EVersionNotEnabled' | 'registry::EVersionAlreadyEnabled' | 'registry::EMaxTradingAccountsReached' | 'registry::EQuoteNotApproved' | 'registry::EQuoteAlreadyApproved' | 'registry::EMulticoinPoolAlreadyExists' | 'registry::EMulticoinPoolDoesNotExist' | 'registry::EQuoteInsufficientDecimals' | 'fee_schedule::EEmptySchedule' | 'fee_schedule::EFirstTierNotZero' | 'fee_schedule::EThresholdsNotAscending' | 'fee_schedule::ETakerRateNotMonotone' | 'fee_schedule::EMakerRateNotMonotone' | 'fee_schedule::ETooManyTiers' | 'fee_schedule::EInvalidTakerFee' | 'fee_schedule::EInvalidMakerFee' | 'fee_schedule::EVectorLengthMismatch' | 'fee_turnover::EEpochAhead' | 'state::EMaxOpenOrders' | 'trading_account::EInvalidOwner' | 'trading_account::EInvalidTrader' | 'trading_account::EInvalidProof' | 'trading_account::ETradingAccountBalanceTooLow' | 'trading_account::EMaxCapsReached' | 'trading_account::ECapNotInList' | 'trading_account::EMultiCoinBalanceTooLow' | 'coin_vault::EInsufficientFeeReserve' | 'coin_vault::EFeesLocked' | 'coin_vault::ENoBalanceToSettle' | 'coin_vault::EHasOwedBalances' | 'multicoin_vault::EInsufficientBaseBalance' | 'multicoin_vault::EInsufficientQuoteBalance' | 'multicoin_vault::EInsufficientCredBalance' | 'multicoin_vault::EInsufficientFeeReserve' | 'multicoin_vault::EFeesLocked' | 'multicoin_vault::ENoBalanceToSettle' | 'multicoin_vault::EHasOwedBalances' | 'multicoin_vault::EOperatorShareAboveCeiling' | 'board_voting::EOUNotActive' | 'board_voting::ETypeNotEnabled' | 'board_voting::EOUIdMismatch' | 'board_voting::EControllerPaused' | 'board_voting::EProposeThresholdNotMet' | 'board_voting::EFloorNotMet' | 'board_voting::EDelayForbidsAtomicExecution' | 'board_voting::EInsufficientVotingWeight' | 'board_voting::ECooldownRequiresMutableOU' | 'capability_vault::ENotController' | 'capability_vault::ECapIdMismatch' | 'capability_vault::EVaultIdMismatch' | 'capability_vault::EOUIdMismatch' | 'charter::EOuMismatch' | 'composite::ENotComposable' | 'composite::EStepTypeMismatch' | 'composite::EFrameMismatch' | 'composite::EPipelineComplete' | 'composite::EPipelineIncomplete' | 'composite::ECompositeNesting' | 'composite::EOUIdMismatch' | 'composite::EOUNotActive' | 'composite::EFloorNotMet' | 'composite::EEmptyFrame' | 'composite::ECooldownTypeNotComposable' | 'composite::EFrameNotSealed' | 'composite::EFrameAlreadySealed' | 'composite::EFrameContentsMismatch' | 'composite::EFrameNotExhausted' | 'composite::EUseTypedStep' | 'composite::EGrantInComposite' | 'composite::ETargetNotEnabled' | 'composite::EExecutionPaused' | 'composite::EControllerPaused' | 'composite::ETypeNotEnabled' | 'controller::EControlMismatch' | 'controller::EOUNotActive' | 'controller::ENotController' | 'emergency::EOUMismatch' | 'emergency::EProtectedType' | 'emergency::EFrozen' | 'emergency::ENotFrozen' | 'emergency::EMandatoryExemptType' | 'encrypted_entry::ENotMember' | 'encrypted_entry::EEntriesCapReached' | 'encrypted_entry::EOuMismatch' | 'encrypted_entry::EEntryNotStale' | 'encrypted_entry::EOUNotActive' | 'encrypted_entry::EIdTooShort' | 'external_execution::EOUNotActive' | 'external_execution::ETypeNotEnabled' | 'external_execution::EExecutionPaused' | 'external_execution::EControllerPaused' | 'external_execution::ETypeMismatch' | 'external_execution::ECooldownActive' | 'external_execution::EOUIdMismatch' | 'external_execution::EVaultOUMismatch' | 'external_execution::EApprovalFloorNotMet' | 'external_execution::ESubOUBlockedType' | 'external_execution::ECapNotFound' | 'external_execution::ESelfBootstrapDenied' | 'external_execution::EComposableCooldownConflict' | 'external_execution::ECooldownRequiresMutableOU' | 'external_execution::EBypassForbiddenBits' | 'governance::EEmptyBoard' | 'governance::EDuplicateBoardMember' | 'governance::ENotBoardMember' | 'governance::ENoBoardChange' | 'admin_ops::EOuMismatch' | 'admin_ops::ECharterOuMismatch' | 'admin_ops::EUndisableableType' | 'admin_ops::ESubOUBlockedType' | 'admin_ops::EFloorNotMet' | 'admin_ops::EComposableCooldownConflict' | 'admin_ops::ETypeMismatch' | 'admin_ops::ETypeNotEnabled' | 'board_ops::EOuMismatch' | 'freeze_ops::EFreezeOuMismatch' | 'freeze_ops::ECapOuMismatch' | 'lifecycle_ops::EVaultOUMismatch' | 'lifecycle_ops::ESubOUVaultMismatch' | 'lifecycle_ops::EOUMismatch' | 'lifecycle_ops::EAssetLimitExceeded' | 'lifecycle_ops::ETargetTreasuryMismatch' | 'lifecycle_ops::ETargetVaultMismatch' | 'lifecycle_ops::ETargetOUMismatch' | 'lifecycle_ops::ESourceMismatch' | 'lifecycle_ops::EAssetNotListed' | 'lifecycle_ops::EAssetsRemaining' | 'member_ops::EOuMismatch' | 'member_ops::EEmptyBatch' | 'member_ops::EBatchTooLarge' | 'ou::EInvalidName' | 'ou::EOUIdMismatch' | 'ou::ENotMigrating' | 'ou::ETreasuryIdMismatch' | 'ou::EVaultIdMismatch' | 'ou::ECharterIdMismatch' | 'ou::EFreezeIdMismatch' | 'ou::EEntriesNotEmpty' | 'ou::EEntryIdNotFound' | 'ou::EBlockedProposalType' | 'ou::EThresholdBelowMinimum' | 'ou::ETypeNotEnabled' | 'ou::ETypeAlreadyEnabled' | 'ou::EDisplayKeyTaken' | 'ou::EEmptyDisplayKey' | 'ou::EDisplayKeyMismatch' | 'ou::EPermissionChangeNotAllowed' | 'ou::EGrantFloorNotMet' | 'ou::EFixedPermissions' | 'ou::ENotPrivileged' | 'ou::EBypassQuorumTooLow' | 'ou::EEnableQuorumTooLow' | 'ou::EUpdateConfigQuorumTooLow' | 'ou::EUndisableableType' | 'permissions::EUnknownPermission' | 'proposal::EInvalidQuorum' | 'proposal::EInvalidApprovalThreshold' | 'proposal::EInvalidExpiryMs' | 'proposal::ENotActive' | 'proposal::ENotPassed' | 'proposal::EAlreadyVoted' | 'proposal::ENotInSnapshot' | 'proposal::ENotEligible' | 'proposal::EDelayNotElapsed' | 'proposal::ECooldownActive' | 'proposal::ENotExpired' | 'proposal::ETypeNotEnabled' | 'proposal::EExecutionPaused' | 'proposal::EOUNotActive' | 'proposal::ECapOUMismatch' | 'proposal::ENotStandaloneTicket' | 'proposal::EExecutionWindowClosed' | 'proposal::EVotingClosed' | 'proposal::EPermissionDenied' | 'proposal::EBorrowScopeDenied' | 'spend_guard::EExceedsEpochLimit' | 'treasury_vault::EInsufficientBalance' | 'treasury_vault::EOUIdMismatch' | 'treasury_vault::EVaultNotEmpty' | 'configure_mint_allowance::EOuMismatch' | 'configure_mint_allowance::ETooManyOps' | 'configure_mint_allowance::ETooManyMinters' | 'currency_ops::EVaultOUMismatch' | 'currency_ops::ECapNotInVault' | 'currency_ops::ECapTypeMismatch' | 'currency_ops::EAllowanceNotConfigured' | 'currency_ops::EAllowanceDisabled' | 'currency_ops::ENotAllowedMinter' | 'currency_ops::EExceedsAllowance' | 'subou_ops::EVaultOUMismatch' | 'subou_ops::ESubOUVaultMismatch' | 'subou_ops::EEmptyBatch' | 'subou_ops::EBatchTooLarge' | 'treasury_ops::EVaultOUMismatch' | 'treasury_ops::ETargetVaultMismatch' | 'treasury_ops::EExceedsDailyCap' | 'upgrade_ops::EVaultOuMismatch' | 'keyspace::ENotAllowed' | 'keyspace::EAlreadyGranted' | 'keyspace::ENotGranted' | 'keyspace::EAlreadyCurrentEpoch' | 'keyspace::EWrongKeyspace' | 'keyspace::ELastGrantor' | 'keyspace::ELastWriter' | 'keyspace::ELastReader' | 'keyspace::EEmptyGrantPrincipals' | 'ou_receipt_vault::ENotAuthorized' | 'ou_receipt_vault::EInsufficientVaultBalance' | 'ou_receipt_vault::EWrongCollection' | 'ou_receipt_vault::EVaultAlreadyExists' | 'ou_receipt_vault::ELastEditor' | 'ou_receipt_vault::EInvalidArguments' | 'ou_receipt_vault::EZeroAmount' | 'ou_receipt_vault::EEditorWouldLockSelf' | 'ou_receipt_vault::EVaultNonEmpty' | 'ou_receipt_vault::EVaultRegistryMismatch' | 'ou_receipt_vault::EStorageUnitMismatch' | 'ou_receipt_vault::EEmptyEditPrincipals' | 'trading_ops::EWrongTradingAccount' | 'trading_ops::EWrongCustody' | 'trading_ops::EWrongVault' | 'trading_ops::EWrongPool' | 'trading_ops::EWrongOu' | 'trading_ops::EWrongTreasury' | 'trading_ops::EWrongCollection';
2
+ export interface MoveAbortEntry {
3
+ name: string;
4
+ label: string;
5
+ message: string | null;
6
+ clever: boolean;
7
+ source: string;
8
+ }
9
+ export declare const MOVE_ABORT_CATALOG: Record<string, Record<number, MoveAbortEntry>>;
package/dist/onchain.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { ClientWithCoreApi } from '@mysten/sui/client';
2
+ import { TradingAccountCapKind } from './transactions';
2
3
  import { PackageIds } from './types';
3
4
  export declare function serializeBalanceKey(): Uint8Array;
4
5
  export declare function serializeMultiCoinBalanceKey(collectionId: string, assetId: bigint): Uint8Array;
@@ -16,12 +17,11 @@ export interface ObjectRef {
16
17
  }
17
18
  export declare function getObjectRef(suiClient: ClientWithCoreApi, objectId: string): Promise<ObjectRef>;
18
19
  export declare function getWalletCurrencyBalance(suiClient: ClientWithCoreApi, address: string, coinType: string): Promise<bigint>;
19
- export declare function getBalanceManagerCurrencyBalance(suiClient: ClientWithCoreApi, ids: PackageIds, balanceManagerId: string): Promise<bigint>;
20
- export declare function getBalanceManagerItemBalance(suiClient: ClientWithCoreApi, ids: PackageIds, balanceManagerId: string, collectionId: string, assetId: bigint): Promise<{
20
+ export declare function getTradingAccountCurrencyBalance(suiClient: ClientWithCoreApi, ids: PackageIds, tradingAccountId: string): Promise<bigint>;
21
+ export declare function getTradingAccountItemBalance(suiClient: ClientWithCoreApi, ids: PackageIds, tradingAccountId: string, collectionId: string, assetId: bigint): Promise<{
21
22
  hasKey: boolean;
22
23
  balance: bigint;
23
24
  }>;
24
- export declare function getRegistryMulticoinCollectionId(suiClient: ClientWithCoreApi, ids: PackageIds): Promise<string>;
25
25
  export interface OwnedItemReceipt {
26
26
  objectId: string;
27
27
  collectionId: string;
@@ -43,3 +43,55 @@ export interface SsuOwnerInfo {
43
43
  }
44
44
  export declare function fetchSsuOwnerInfo(suiClient: ClientWithCoreApi, ssuObjectId: string, accountAddress: string): Promise<SsuOwnerInfo | null>;
45
45
  export declare function fetchInventorySlotQuantity(suiClient: ClientWithCoreApi, ssuObjectId: string, ownerCapId: string, assetId: string): Promise<bigint>;
46
+ export interface OwnedTradingAccountCap {
47
+ objectId: string;
48
+ kind: TradingAccountCapKind;
49
+ tradingAccountId: string;
50
+ }
51
+ export declare function tradingAccountCapType(ids: PackageIds, kind: TradingAccountCapKind): string;
52
+ export declare function findOwnedTradingAccountCaps(suiClient: ClientWithCoreApi, ids: PackageIds, owner: string): Promise<OwnedTradingAccountCap[]>;
53
+ export declare function getTradingAccountAllowList(suiClient: ClientWithCoreApi, tradingAccountId: string): Promise<string[]>;
54
+ export declare const FeeScheduleBcs: import('@mysten/bcs').BcsStruct<{
55
+ tiers: import('@mysten/bcs').BcsType<{
56
+ min_turnover: string;
57
+ taker_fee: string;
58
+ maker_fee: string;
59
+ }[], Iterable<{
60
+ min_turnover: string | number | bigint;
61
+ taker_fee: string | number | bigint;
62
+ maker_fee: string | number | bigint;
63
+ }> & {
64
+ length: number;
65
+ }, string>;
66
+ }, string>;
67
+ export interface FeeTier {
68
+ minTurnover: bigint;
69
+ takerFeeRate: bigint;
70
+ makerFeeRate: bigint;
71
+ }
72
+ export interface AccountFeeRates {
73
+ tradingAccountId: string;
74
+ tier: number;
75
+ turnover: bigint;
76
+ takerFeeRate: bigint;
77
+ makerFeeRate: bigint;
78
+ }
79
+ export interface TradingFees {
80
+ poolId: string;
81
+ feeClass: number;
82
+ epoch: bigint | null;
83
+ schedule: FeeTier[];
84
+ nextSchedule: FeeTier[];
85
+ nextScheduleEpoch: bigint;
86
+ entryTakerFeeRate: bigint;
87
+ entryMakerFeeRate: bigint;
88
+ cancelRetentionBps: bigint;
89
+ account: AccountFeeRates | null;
90
+ bidEscrowFeeRate: bigint;
91
+ }
92
+ export declare function getPoolTradingFees(suiClient: ClientWithCoreApi, ids: PackageIds, params: {
93
+ poolId: string;
94
+ sender: string;
95
+ tradingAccountId?: string | null;
96
+ quoteType?: string;
97
+ }): Promise<TradingFees>;
package/dist/paging.d.ts CHANGED
@@ -1,8 +1,14 @@
1
+ import { OrgDirectoryEntry, OrgDirectoryParams } from './armature/types';
1
2
  import { IndexerClient } from './queries';
2
- import { DiscoveryFilters, DiscoveryOrder, Fill, FillsParams, Trade, TradesParams } from './types';
3
+ import { DiscoveryFilters, DiscoveryOrder, Fill, FillsParams, HistoryPageParams, HubLocation, HubLocationFilters, LocationPageParams, OpenOrder, RecentTrade, RecentTradesParams, Trade, TradesParams } from './types';
3
4
  export interface IterateOptions {
4
5
  maxItems?: number;
5
6
  }
6
7
  export declare function iterateDiscovery(indexer: IndexerClient, filters?: DiscoveryFilters, options?: IterateOptions): AsyncGenerator<DiscoveryOrder>;
7
- export declare function iterateFills(indexer: IndexerClient, balanceManagerId: string, params?: FillsParams, options?: IterateOptions): AsyncGenerator<Fill>;
8
- export declare function iterateTrades(indexer: IndexerClient, balanceManagerId: string, params?: TradesParams, options?: IterateOptions): AsyncGenerator<Trade>;
8
+ export declare function iterateFills(indexer: IndexerClient, tradingAccountId: string, params?: FillsParams, options?: IterateOptions): AsyncGenerator<Fill>;
9
+ export declare function iterateTrades(indexer: IndexerClient, tradingAccountId: string, params?: TradesParams, options?: IterateOptions): AsyncGenerator<Trade>;
10
+ export declare function iterateOpenOrders(indexer: IndexerClient, tradingAccountId: string, params?: HistoryPageParams, options?: IterateOptions): AsyncGenerator<OpenOrder>;
11
+ export declare function iterateRecentTrades(indexer: IndexerClient, params?: RecentTradesParams, options?: IterateOptions): AsyncGenerator<RecentTrade>;
12
+ export declare function iterateHubLocations(indexer: IndexerClient, filters?: HubLocationFilters, options?: IterateOptions): AsyncGenerator<HubLocation>;
13
+ export declare function iterateItemLocations(indexer: IndexerClient, assetId: string, params?: LocationPageParams, options?: IterateOptions): AsyncGenerator<HubLocation>;
14
+ export declare function iterateOrgDirectory(indexer: IndexerClient, params?: OrgDirectoryParams, options?: IterateOptions): AsyncGenerator<OrgDirectoryEntry>;
package/dist/queries.d.ts CHANGED
@@ -1,7 +1,10 @@
1
- import { AssemblyEnriched, AssemblyOwner, AutocompleteSystems, BalanceManagerOwner, BatchSystems, BatchSystemsParams, CoordinateSearch, CoordinateSearchParams, BalancesAtHubParams, CollectionHub, DiscoveryFilters, DiscoveryResult, FillsPage, FillsParams, HistoryPageParams, HubEnriched, HubItemMarket, HubItemsPage, ItemSearchPage, HubLocation, HubLocationFilters, HubLocationPage, HubVaultInfo, InventoryBalances, LocationPageParams, NearbyHub, NearbyHubsParams, NearbyHubsBySystemParams, NearbySystems, NearbySystemsParams, OpenOrdersPage, Orderbook, PoolMetadata, SolarSystem, SolarSystemName, SpatialStats, Sweepable, TradesPage, TradesParams } from './types';
1
+ import { OrgQueries } from './armature/queries';
2
+ import { CoinInfo } from './coins/types';
3
+ import { AssemblyEnriched, AssemblyOwner, AutocompleteSystems, TradingAccountOwner, BatchSystems, BatchSystemsParams, CoordinateSearch, CoordinateSearchParams, BalancesAtHubParams, CollectionHub, DiscoveryFilters, DiscoveryResult, FillsPage, FillsParams, HistoryPageParams, HubEnriched, HubItemMarket, HubItemsPage, ItemSearchPage, HubLocation, HubLocationFilters, HubLocationPage, HubVaultInfo, InventoryBalances, LocationPageParams, NearbyHub, NearbyHubsParams, NearbyHubsBySystemParams, NearbySystems, NearbySystemsParams, OpenOrdersPage, Orderbook, PoolMetadata, SolarSystem, SolarSystemName, SpatialStats, Sweepable, TradesPage, TradesParams, Character, CharacterLookup, DisplayPrice, DisplayPriceParams, DisplayPricesParams, FillDetail, HubEconomics, ItemInfo, OrderDetail, OrderLookupParams, PlatformStats, PoolFees, RecentTradesPage, RecentTradesParams, Recipe, Route, RouteComparison, RouteParams, RouteShipParams, RoutingStats, Tribe, WorldItem } from './types';
2
4
  export declare class IndexerClient {
3
5
  private readonly baseUrl;
4
6
  private readonly apiKey;
7
+ readonly orgs: OrgQueries;
5
8
  constructor(baseUrl: string, apiKey: string);
6
9
  private get;
7
10
  discovery(filters?: DiscoveryFilters): Promise<DiscoveryResult>;
@@ -29,7 +32,7 @@ export declare class IndexerClient {
29
32
  collectionHub(collectionId: string): Promise<CollectionHub>;
30
33
  assemblyOwners(assemblyIds: string[]): Promise<AssemblyOwner[]>;
31
34
  assembliesEnriched(assemblyIds: string[]): Promise<AssemblyEnriched[]>;
32
- balanceManagerOwners(balanceManagerIds: string[]): Promise<BalanceManagerOwner[]>;
35
+ tradingAccountOwners(tradingAccountIds: string[]): Promise<TradingAccountOwner[]>;
33
36
  solarSystemNames(solarSystemIds: number[]): Promise<SolarSystemName[]>;
34
37
  solarSystem(solarSystem: string): Promise<SolarSystem>;
35
38
  solarSystems(params: BatchSystemsParams): Promise<BatchSystems>;
@@ -37,11 +40,36 @@ export declare class IndexerClient {
37
40
  systemsNearCoordinates(params: CoordinateSearchParams): Promise<CoordinateSearch>;
38
41
  autocompleteSystems(query: string, limit?: number): Promise<AutocompleteSystems>;
39
42
  spatialStats(): Promise<SpatialStats>;
43
+ listCoins(coinTypes?: string[]): Promise<CoinInfo[]>;
40
44
  inventoryBalances(params: BalancesAtHubParams & {
41
- balanceManagerId?: string;
45
+ tradingAccountId?: string;
42
46
  }): Promise<InventoryBalances>;
43
- openOrders(balanceManagerId: string, params?: HistoryPageParams): Promise<OpenOrdersPage>;
44
- fills(balanceManagerId: string, params?: FillsParams): Promise<FillsPage>;
45
- sweepable(balanceManagerId: string): Promise<Sweepable>;
46
- trades(balanceManagerId: string, params?: TradesParams): Promise<TradesPage>;
47
+ openOrders(tradingAccountId: string, params?: HistoryPageParams): Promise<OpenOrdersPage>;
48
+ fills(tradingAccountId: string, params?: FillsParams): Promise<FillsPage>;
49
+ sweepable(tradingAccountId: string): Promise<Sweepable>;
50
+ trades(tradingAccountId: string, params?: TradesParams): Promise<TradesPage>;
51
+ poolOrder(params: OrderLookupParams): Promise<OrderDetail>;
52
+ fill(eventDigest: string): Promise<FillDetail>;
53
+ recentTrades(params?: RecentTradesParams): Promise<RecentTradesPage>;
54
+ displayPrices(params: DisplayPricesParams): Promise<DisplayPrice[]>;
55
+ displayPrice(itemId: string, params?: DisplayPriceParams): Promise<DisplayPrice>;
56
+ hubEconomics(hubIds: string[]): Promise<HubEconomics[]>;
57
+ topPoolsByFees(limit?: number): Promise<PoolFees[]>;
58
+ stats(): Promise<PlatformStats>;
59
+ character(characterId: string, params?: {
60
+ enrich?: boolean;
61
+ }): Promise<Character>;
62
+ charactersByAddress(address: string, params?: {
63
+ enrich?: boolean;
64
+ }): Promise<Character[]>;
65
+ charactersByName(name: string): Promise<Character[]>;
66
+ charactersBatch(addresses: string[]): Promise<CharacterLookup[]>;
67
+ tribe(tribeId: number): Promise<Tribe>;
68
+ worldItems(): Promise<WorldItem[]>;
69
+ worldItem(assetId: string): Promise<ItemInfo>;
70
+ recipes(): Promise<Recipe[]>;
71
+ recipesFor(productAssetId: string): Promise<Recipe[]>;
72
+ route(params: RouteParams): Promise<Route>;
73
+ compareRoutes(params: RouteShipParams): Promise<RouteComparison>;
74
+ routingStats(): Promise<RoutingStats>;
47
75
  }