@trinaryex/sdk 3.4.0 → 3.6.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.
- package/DESIGN.md +11 -0
- package/README.md +2 -1
- package/dist/ReadOnlyClient.d.ts +20 -1
- package/dist/TriexClient.d.ts +20 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +337 -164
- package/dist/queries.d.ts +10 -1
- package/dist/schemas.d.ts +251 -2
- package/dist/types.d.ts +29 -1
- package/package.json +1 -1
package/DESIGN.md
CHANGED
|
@@ -250,6 +250,17 @@ client.market.resolvePool({ storageUnitId, assetId }): Promise<string> // #9a (
|
|
|
250
250
|
client.market.orderbook({ storageUnitId, assetId }): Promise<Orderbook> // #9 (resting orders, not levels)
|
|
251
251
|
client.market.poolMetadata(poolId): Promise<PoolMetadata> // #10/#11 (decimals + 1e9-scaled fee)
|
|
252
252
|
|
|
253
|
+
// locations — "where is it / who owns it" (Marketplace | Locations)
|
|
254
|
+
client.market.hubLocations(filters?): Promise<HubLocationPage> // every indexed hub, cursor-paged
|
|
255
|
+
client.market.itemLocations(assetId, opts?): Promise<HubLocationPage> // hubs selling one item
|
|
256
|
+
client.market.nearbyHubs({ hubId, rangeLy?, assetId? }): Promise<NearbyHub[]> // ≤3500 ly
|
|
257
|
+
client.market.nearbyHubsBySystem({ solarSystem, rangeLy?, assetId? }): Promise<NearbyHub[]> // private origin
|
|
258
|
+
client.market.hubsEnriched({ hubIds }): Promise<HubEnriched[]> // batch ≤200: + poolCount/lastActivityAt
|
|
259
|
+
client.market.assemblyOwners({ assemblyIds }): Promise<AssemblyOwner[]> // batch ≤200
|
|
260
|
+
client.market.assembliesEnriched({ assemblyIds }): Promise<AssemblyEnriched[]> // batch ≤200: + character/name
|
|
261
|
+
client.market.solarSystemNames({ solarSystemIds }): Promise<SolarSystemName[]> // batch ≤200
|
|
262
|
+
client.account.owners({ balanceManagerIds }): Promise<BalanceManagerOwner[]> // batch ≤200: player:/ou: tagged
|
|
263
|
+
|
|
253
264
|
// order status (#14) — epoch-ms before/after paging
|
|
254
265
|
client.orders.openOrders(params?): Promise<OpenOrdersPage>
|
|
255
266
|
client.orders.fills(params?): Promise<FillsPage>
|
package/README.md
CHANGED
|
@@ -203,9 +203,10 @@ explainMoveAbort(rawError) // "No liquidity available (EEmptyOrderbook)" | null
|
|
|
203
203
|
|
|
204
204
|
| Group | Methods |
|
|
205
205
|
|---|---|
|
|
206
|
-
| `account` | `get` · `ensure` · `depositCurrency` · `depositItems` · `withdrawCurrency` · `withdrawItems` · `sweepable` · `claimSettled` |
|
|
206
|
+
| `account` | `get` · `ensure` · `depositCurrency` · `depositItems` · `withdrawCurrency` · `withdrawItems` · `sweepable` · `claimSettled` · `owners` |
|
|
207
207
|
| `balances` | `atHub` (items: warehouse/marketplace/hangar) · `currency` (CRED wallet + BM, fullnode) |
|
|
208
208
|
| `market` | `discover` · `hub` · `itemsAtHub` · `resolvePool` · `orderbook` · `poolMetadata` |
|
|
209
|
+
| `market` (locations) | `hubLocations` · `itemLocations` · `nearbyHubs` · `nearbyHubsBySystem` · `hubsEnriched` · `assemblyOwners` · `assembliesEnriched` · `solarSystemNames` |
|
|
209
210
|
| `orders` | `limit` · `market` · `cancel` · `cancelAll` · `modify` · `openOrders` · `fills` · `trades` |
|
|
210
211
|
| helpers | `aggregateLevels` · `midPrice` · `spread` · `depth` · `vwap` · `estimateMarketBuyCost` · `iterateDiscovery/Fills/Trades` · `untilIndexed` · `explainMoveAbort` · `toBase` / `fromBase` |
|
|
211
212
|
|
package/dist/ReadOnlyClient.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IndexerClient } from './queries';
|
|
2
|
-
import { BalancesAtHubParams, DiscoveryFilters, DiscoveryResult, FillsPage, FillsParams, HistoryPageParams, HubItemOrderbook, HubItemsPage, ItemSearchPage, InventoryBalances, OpenOrdersPage, PackageIds, PoolMetadata, ReadOnlyClientConfig, Sweepable, TradeHubDetail, TradesPage, TradesParams } from './types';
|
|
2
|
+
import { AssemblyEnriched, AssemblyOwner, BalanceManagerOwner, BalancesAtHubParams, DiscoveryFilters, DiscoveryResult, FillsPage, FillsParams, HistoryPageParams, HubEnriched, HubItemOrderbook, HubItemsPage, HubLocationFilters, HubLocationPage, ItemSearchPage, InventoryBalances, LocationPageParams, NearbyHub, NearbyHubsParams, NearbyHubsBySystemParams, OpenOrdersPage, PackageIds, PoolMetadata, ReadOnlyClientConfig, SolarSystemName, Sweepable, TradeHubDetail, TradesPage, TradesParams } from './types';
|
|
3
3
|
export declare class ReadOnlyClient {
|
|
4
4
|
readonly ids: PackageIds;
|
|
5
5
|
readonly indexer: IndexerClient;
|
|
@@ -19,6 +19,25 @@ export declare class ReadOnlyClient {
|
|
|
19
19
|
assetId: string;
|
|
20
20
|
}): Promise<HubItemOrderbook>;
|
|
21
21
|
poolMetadata(poolId: string): Promise<PoolMetadata>;
|
|
22
|
+
hubLocations(filters?: HubLocationFilters): Promise<HubLocationPage>;
|
|
23
|
+
itemLocations(assetId: string, opts?: LocationPageParams): Promise<HubLocationPage>;
|
|
24
|
+
nearbyHubs(params: NearbyHubsParams): Promise<NearbyHub[]>;
|
|
25
|
+
nearbyHubsBySystem(params: NearbyHubsBySystemParams): Promise<NearbyHub[]>;
|
|
26
|
+
hubsEnriched(params: {
|
|
27
|
+
hubIds: string[];
|
|
28
|
+
}): Promise<HubEnriched[]>;
|
|
29
|
+
assemblyOwners(params: {
|
|
30
|
+
assemblyIds: string[];
|
|
31
|
+
}): Promise<AssemblyOwner[]>;
|
|
32
|
+
assembliesEnriched(params: {
|
|
33
|
+
assemblyIds: string[];
|
|
34
|
+
}): Promise<AssemblyEnriched[]>;
|
|
35
|
+
solarSystemNames(params: {
|
|
36
|
+
solarSystemIds: number[];
|
|
37
|
+
}): Promise<SolarSystemName[]>;
|
|
38
|
+
accountOwners(params: {
|
|
39
|
+
balanceManagerIds: string[];
|
|
40
|
+
}): Promise<BalanceManagerOwner[]>;
|
|
22
41
|
balancesAtHub(params: BalancesAtHubParams & {
|
|
23
42
|
balanceManagerId?: string;
|
|
24
43
|
}): Promise<InventoryBalances>;
|
package/dist/TriexClient.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Transaction, TransactionObjectArgument } from '@mysten/sui/transactions';
|
|
2
2
|
import { ClientWithCoreApi } from '@mysten/sui/client';
|
|
3
3
|
import { IndexerClient } from './queries';
|
|
4
|
-
import { BalancesAtHubParams, CancelAllOrdersParams, CancelOrderParams, ClaimSettledParams, CurrencyBalances, DepositCurrencyParams, DepositItemsParams, DiscoveryFilters, DiscoveryResult, EnsureAccountResult, FillsPage, FillsParams, HistoryPageParams, HubItemOrderbook, HubItemsPage, ItemSearchPage, InventoryBalances, LimitOrderParams, MarketOrderParams, ModifyOrderParams, OpenOrdersPage, PackageIds, PoolMetadata, Sweepable, TradeHubDetail, TradesPage, TradesParams, TradingAccount, TransactionExecutor, TriexClientConfig, TxResult, WithdrawCurrencyParams, WithdrawItemsParams } from './types';
|
|
4
|
+
import { AssemblyEnriched, AssemblyOwner, BalanceManagerOwner, BalancesAtHubParams, CancelAllOrdersParams, CancelOrderParams, ClaimSettledParams, CurrencyBalances, DepositCurrencyParams, DepositItemsParams, DiscoveryFilters, DiscoveryResult, EnsureAccountResult, FillsPage, FillsParams, HistoryPageParams, HubEnriched, HubItemOrderbook, HubItemsPage, HubLocationFilters, HubLocationPage, ItemSearchPage, InventoryBalances, LimitOrderParams, LocationPageParams, MarketOrderParams, ModifyOrderParams, NearbyHub, NearbyHubsParams, NearbyHubsBySystemParams, OpenOrdersPage, PackageIds, PoolMetadata, SolarSystemName, Sweepable, TradeHubDetail, TradesPage, TradesParams, TradingAccount, TransactionExecutor, TriexClientConfig, TxResult, WithdrawCurrencyParams, WithdrawItemsParams } from './types';
|
|
5
5
|
export declare class TriexClient {
|
|
6
6
|
readonly suiClient: ClientWithCoreApi;
|
|
7
7
|
readonly ids: PackageIds;
|
|
@@ -36,6 +36,9 @@ declare class AccountApi {
|
|
|
36
36
|
withdrawCurrency(params?: WithdrawCurrencyParams): Promise<TxResult>;
|
|
37
37
|
withdrawItems(params: WithdrawItemsParams): Promise<TxResult>;
|
|
38
38
|
sweepable(): Promise<Sweepable>;
|
|
39
|
+
owners(params: {
|
|
40
|
+
balanceManagerIds: string[];
|
|
41
|
+
}): Promise<BalanceManagerOwner[]>;
|
|
39
42
|
claimSettled(params?: ClaimSettledParams): Promise<TxResult>;
|
|
40
43
|
}
|
|
41
44
|
declare class BalancesApi {
|
|
@@ -64,6 +67,22 @@ declare class MarketApi {
|
|
|
64
67
|
assetId: string;
|
|
65
68
|
}): Promise<HubItemOrderbook>;
|
|
66
69
|
poolMetadata(poolId: string): Promise<PoolMetadata>;
|
|
70
|
+
hubLocations(filters?: HubLocationFilters): Promise<HubLocationPage>;
|
|
71
|
+
itemLocations(assetId: string, opts?: LocationPageParams): Promise<HubLocationPage>;
|
|
72
|
+
nearbyHubs(params: NearbyHubsParams): Promise<NearbyHub[]>;
|
|
73
|
+
nearbyHubsBySystem(params: NearbyHubsBySystemParams): Promise<NearbyHub[]>;
|
|
74
|
+
hubsEnriched(params: {
|
|
75
|
+
hubIds: string[];
|
|
76
|
+
}): Promise<HubEnriched[]>;
|
|
77
|
+
assemblyOwners(params: {
|
|
78
|
+
assemblyIds: string[];
|
|
79
|
+
}): Promise<AssemblyOwner[]>;
|
|
80
|
+
assembliesEnriched(params: {
|
|
81
|
+
assemblyIds: string[];
|
|
82
|
+
}): Promise<AssemblyEnriched[]>;
|
|
83
|
+
solarSystemNames(params: {
|
|
84
|
+
solarSystemIds: number[];
|
|
85
|
+
}): Promise<SolarSystemName[]>;
|
|
67
86
|
}
|
|
68
87
|
declare class OrdersApi {
|
|
69
88
|
private readonly c;
|
package/dist/index.d.ts
CHANGED
|
@@ -15,5 +15,5 @@ export type { BookLevel } from './book';
|
|
|
15
15
|
export { iterateDiscovery, iterateFills, iterateTrades } from './paging';
|
|
16
16
|
export type { IterateOptions } from './paging';
|
|
17
17
|
export { untilIndexed } from './wait';
|
|
18
|
-
export type { TriexNetwork, PackageIds, TriexClientConfig, ReadOnlyClientConfig, TransactionExecutor, ObjectChange, TxResult, OrderSide, TradingAccount, CurrencyBalances, AssetBalance, InventoryBalances, TradeHubDetail, HubVaultInfo, HubLocation, HubItem, HubItemsPage, ItemRecipe, ItemRecipeComponent, ItemSearchPage, ItemSearchResult, CollectionHub, Orderbook, HubItemOrderbook, HubItemMarket, OrderbookOrder, PoolMetadata, DiscoveryOrder, DiscoveryResult, DiscoveryFilters, OpenOrder, OpenOrdersPage, Fill, FillsPage, Trade, TradesPage, BalancesAtHubParams, HistoryPageParams, FillsParams, TradesParams, Sweepable, SweepablePool, SweepableItem, EnsureAccountResult, DepositCurrencyParams, DepositItemsParams, WithdrawCurrencyParams, WithdrawItemsParams, LimitOrderParams, MarketOrderParams, CancelOrderParams, CancelAllOrdersParams, ModifyOrderParams, ClaimSettledParams, } from './types';
|
|
18
|
+
export type { TriexNetwork, PackageIds, TriexClientConfig, ReadOnlyClientConfig, TransactionExecutor, ObjectChange, TxResult, OrderSide, TradingAccount, CurrencyBalances, AssetBalance, InventoryBalances, TradeHubDetail, HubVaultInfo, HubLocation, HubLocationPage, HubLocationFilters, LocationPageParams, NearbyHub, NearbyHubsParams, NearbyHubsBySystemParams, HubEnriched, AssemblyOwner, AssemblyEnriched, BalanceManagerOwner, SolarSystemName, HubItem, HubItemsPage, ItemRecipe, ItemRecipeComponent, ItemSearchPage, ItemSearchResult, CollectionHub, Orderbook, HubItemOrderbook, HubItemMarket, OrderbookOrder, PoolMetadata, DiscoveryOrder, DiscoveryResult, DiscoveryFilters, OpenOrder, OpenOrdersPage, Fill, FillsPage, Trade, TradesPage, BalancesAtHubParams, HistoryPageParams, FillsParams, TradesParams, Sweepable, SweepablePool, SweepableItem, EnsureAccountResult, DepositCurrencyParams, DepositItemsParams, WithdrawCurrencyParams, WithdrawItemsParams, LimitOrderParams, MarketOrderParams, CancelOrderParams, CancelAllOrdersParams, ModifyOrderParams, ClaimSettledParams, } from './types';
|
|
19
19
|
export type { OwnedItemReceipt, CharacterInfo, SsuOwnerInfo, ObjectRef, } from './onchain';
|