@trinaryex/sdk 3.5.0 → 3.7.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/dist/queries.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BalancesAtHubParams, CollectionHub, DiscoveryFilters, DiscoveryResult, FillsPage, FillsParams, HistoryPageParams, HubItemMarket, HubItemsPage, ItemSearchPage, HubLocation, HubVaultInfo, InventoryBalances, OpenOrdersPage, Orderbook, PoolMetadata, Sweepable, TradesPage, TradesParams } from './types';
|
|
1
|
+
import { AssemblyEnriched, AssemblyOwner, BalanceManagerOwner, BalancesAtHubParams, CollectionHub, DiscoveryFilters, DiscoveryResult, FillsPage, FillsParams, HistoryPageParams, HubEnriched, HubItemMarket, HubItemsPage, ItemSearchPage, HubLocation, HubLocationFilters, HubLocationPage, HubVaultInfo, InventoryBalances, LocationPageParams, NearbyHub, NearbyHubsParams, NearbyHubsBySystemParams, OpenOrdersPage, Orderbook, PoolMetadata, SolarSystemName, Sweepable, TradesPage, TradesParams } from './types';
|
|
2
2
|
export declare class IndexerClient {
|
|
3
3
|
private readonly baseUrl;
|
|
4
4
|
private readonly apiKey;
|
|
@@ -19,9 +19,18 @@ export declare class IndexerClient {
|
|
|
19
19
|
poolMetadata(poolId: string): Promise<PoolMetadata>;
|
|
20
20
|
hubVault(hubId: string): Promise<HubVaultInfo>;
|
|
21
21
|
hubLocation(hubId: string): Promise<HubLocation | null>;
|
|
22
|
+
hubLocations(filters?: HubLocationFilters): Promise<HubLocationPage>;
|
|
23
|
+
itemLocations(assetId: string, params?: LocationPageParams): Promise<HubLocationPage>;
|
|
24
|
+
nearbyHubs(params: NearbyHubsParams): Promise<NearbyHub[]>;
|
|
25
|
+
nearbyHubsBySystem(params: NearbyHubsBySystemParams): Promise<NearbyHub[]>;
|
|
26
|
+
hubsEnriched(hubIds: string[]): Promise<HubEnriched[]>;
|
|
22
27
|
hubItems(hubId: string): Promise<HubItemsPage>;
|
|
23
28
|
searchItems(query: string, limit?: number): Promise<ItemSearchPage>;
|
|
24
29
|
collectionHub(collectionId: string): Promise<CollectionHub>;
|
|
30
|
+
assemblyOwners(assemblyIds: string[]): Promise<AssemblyOwner[]>;
|
|
31
|
+
assembliesEnriched(assemblyIds: string[]): Promise<AssemblyEnriched[]>;
|
|
32
|
+
balanceManagerOwners(balanceManagerIds: string[]): Promise<BalanceManagerOwner[]>;
|
|
33
|
+
solarSystemNames(solarSystemIds: number[]): Promise<SolarSystemName[]>;
|
|
25
34
|
inventoryBalances(params: BalancesAtHubParams & {
|
|
26
35
|
balanceManagerId?: string;
|
|
27
36
|
}): Promise<InventoryBalances>;
|
package/dist/schemas.d.ts
CHANGED
|
@@ -499,6 +499,7 @@ export declare const HubVaultSchema: z.ZodPipe<z.ZodObject<{
|
|
|
499
499
|
vault_config_id: string;
|
|
500
500
|
}>>;
|
|
501
501
|
export declare const HubLocationSchema: z.ZodPipe<z.ZodObject<{
|
|
502
|
+
solar_system_name: z.ZodNullable<z.ZodString>;
|
|
502
503
|
hub_id: z.ZodString;
|
|
503
504
|
assembly_item_id: z.ZodString;
|
|
504
505
|
assembly_tenant: z.ZodString;
|
|
@@ -513,8 +514,8 @@ export declare const HubLocationSchema: z.ZodPipe<z.ZodObject<{
|
|
|
513
514
|
tx_digest: z.ZodString;
|
|
514
515
|
is_public: z.ZodBoolean;
|
|
515
516
|
region_id: z.ZodNullable<z.ZodNumber>;
|
|
516
|
-
solar_system_name: z.ZodNullable<z.ZodString>;
|
|
517
517
|
}, z.core.$strip>, z.ZodTransform<{
|
|
518
|
+
solarSystemName: string | null;
|
|
518
519
|
hubId: string;
|
|
519
520
|
assemblyItemId: string;
|
|
520
521
|
assemblyTenant: string;
|
|
@@ -529,8 +530,8 @@ export declare const HubLocationSchema: z.ZodPipe<z.ZodObject<{
|
|
|
529
530
|
txDigest: string;
|
|
530
531
|
isPublic: boolean;
|
|
531
532
|
regionId: number | null;
|
|
532
|
-
solarSystemName: string | null;
|
|
533
533
|
}, {
|
|
534
|
+
solar_system_name: string | null;
|
|
534
535
|
hub_id: string;
|
|
535
536
|
assembly_item_id: string;
|
|
536
537
|
assembly_tenant: string;
|
|
@@ -545,7 +546,200 @@ export declare const HubLocationSchema: z.ZodPipe<z.ZodObject<{
|
|
|
545
546
|
tx_digest: string;
|
|
546
547
|
is_public: boolean;
|
|
547
548
|
region_id: number | null;
|
|
549
|
+
}>>;
|
|
550
|
+
export declare const HubLocationPageSchema: z.ZodPipe<z.ZodObject<{
|
|
551
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
552
|
+
solar_system_name: z.ZodNullable<z.ZodString>;
|
|
553
|
+
hub_id: z.ZodString;
|
|
554
|
+
assembly_item_id: z.ZodString;
|
|
555
|
+
assembly_tenant: z.ZodString;
|
|
556
|
+
type_id: z.ZodString;
|
|
557
|
+
owner_cap_id: z.ZodString;
|
|
558
|
+
owner: z.ZodNullable<z.ZodString>;
|
|
559
|
+
solar_system: z.ZodString;
|
|
560
|
+
x: z.ZodString;
|
|
561
|
+
y: z.ZodString;
|
|
562
|
+
z: z.ZodString;
|
|
563
|
+
updated_at: z.ZodNumber;
|
|
564
|
+
tx_digest: z.ZodString;
|
|
565
|
+
is_public: z.ZodBoolean;
|
|
566
|
+
region_id: z.ZodNullable<z.ZodNumber>;
|
|
567
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
568
|
+
solarSystemName: string | null;
|
|
569
|
+
hubId: string;
|
|
570
|
+
assemblyItemId: string;
|
|
571
|
+
assemblyTenant: string;
|
|
572
|
+
typeId: string;
|
|
573
|
+
ownerCapId: string;
|
|
574
|
+
owner: string | null;
|
|
575
|
+
solarSystemId: string;
|
|
576
|
+
x: string;
|
|
577
|
+
y: string;
|
|
578
|
+
z: string;
|
|
579
|
+
updatedAt: number;
|
|
580
|
+
txDigest: string;
|
|
581
|
+
isPublic: boolean;
|
|
582
|
+
regionId: number | null;
|
|
583
|
+
}, {
|
|
584
|
+
solar_system_name: string | null;
|
|
585
|
+
hub_id: string;
|
|
586
|
+
assembly_item_id: string;
|
|
587
|
+
assembly_tenant: string;
|
|
588
|
+
type_id: string;
|
|
589
|
+
owner_cap_id: string;
|
|
590
|
+
owner: string | null;
|
|
591
|
+
solar_system: string;
|
|
592
|
+
x: string;
|
|
593
|
+
y: string;
|
|
594
|
+
z: string;
|
|
595
|
+
updated_at: number;
|
|
596
|
+
tx_digest: string;
|
|
597
|
+
is_public: boolean;
|
|
598
|
+
region_id: number | null;
|
|
599
|
+
}>>>;
|
|
600
|
+
next_cursor: z.ZodNullable<z.ZodString>;
|
|
601
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
602
|
+
locations: {
|
|
603
|
+
solarSystemName: string | null;
|
|
604
|
+
hubId: string;
|
|
605
|
+
assemblyItemId: string;
|
|
606
|
+
assemblyTenant: string;
|
|
607
|
+
typeId: string;
|
|
608
|
+
ownerCapId: string;
|
|
609
|
+
owner: string | null;
|
|
610
|
+
solarSystemId: string;
|
|
611
|
+
x: string;
|
|
612
|
+
y: string;
|
|
613
|
+
z: string;
|
|
614
|
+
updatedAt: number;
|
|
615
|
+
txDigest: string;
|
|
616
|
+
isPublic: boolean;
|
|
617
|
+
regionId: number | null;
|
|
618
|
+
}[];
|
|
619
|
+
nextCursor: string | null;
|
|
620
|
+
}, {
|
|
621
|
+
data: {
|
|
622
|
+
solarSystemName: string | null;
|
|
623
|
+
hubId: string;
|
|
624
|
+
assemblyItemId: string;
|
|
625
|
+
assemblyTenant: string;
|
|
626
|
+
typeId: string;
|
|
627
|
+
ownerCapId: string;
|
|
628
|
+
owner: string | null;
|
|
629
|
+
solarSystemId: string;
|
|
630
|
+
x: string;
|
|
631
|
+
y: string;
|
|
632
|
+
z: string;
|
|
633
|
+
updatedAt: number;
|
|
634
|
+
txDigest: string;
|
|
635
|
+
isPublic: boolean;
|
|
636
|
+
regionId: number | null;
|
|
637
|
+
}[];
|
|
638
|
+
next_cursor: string | null;
|
|
639
|
+
}>>;
|
|
640
|
+
export declare const NearbyHubSchema: z.ZodPipe<z.ZodObject<{
|
|
641
|
+
solar_system_name: z.ZodNullable<z.ZodString>;
|
|
642
|
+
distance_ly: z.ZodString;
|
|
643
|
+
hub_id: z.ZodString;
|
|
644
|
+
assembly_item_id: z.ZodString;
|
|
645
|
+
assembly_tenant: z.ZodString;
|
|
646
|
+
type_id: z.ZodString;
|
|
647
|
+
owner_cap_id: z.ZodString;
|
|
648
|
+
owner: z.ZodNullable<z.ZodString>;
|
|
649
|
+
solar_system: z.ZodString;
|
|
650
|
+
x: z.ZodString;
|
|
651
|
+
y: z.ZodString;
|
|
652
|
+
z: z.ZodString;
|
|
653
|
+
updated_at: z.ZodNumber;
|
|
654
|
+
tx_digest: z.ZodString;
|
|
655
|
+
is_public: z.ZodBoolean;
|
|
656
|
+
region_id: z.ZodNullable<z.ZodNumber>;
|
|
657
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
658
|
+
solarSystemName: string | null;
|
|
659
|
+
distanceLy: string;
|
|
660
|
+
hubId: string;
|
|
661
|
+
assemblyItemId: string;
|
|
662
|
+
assemblyTenant: string;
|
|
663
|
+
typeId: string;
|
|
664
|
+
ownerCapId: string;
|
|
665
|
+
owner: string | null;
|
|
666
|
+
solarSystemId: string;
|
|
667
|
+
x: string;
|
|
668
|
+
y: string;
|
|
669
|
+
z: string;
|
|
670
|
+
updatedAt: number;
|
|
671
|
+
txDigest: string;
|
|
672
|
+
isPublic: boolean;
|
|
673
|
+
regionId: number | null;
|
|
674
|
+
}, {
|
|
548
675
|
solar_system_name: string | null;
|
|
676
|
+
distance_ly: string;
|
|
677
|
+
hub_id: string;
|
|
678
|
+
assembly_item_id: string;
|
|
679
|
+
assembly_tenant: string;
|
|
680
|
+
type_id: string;
|
|
681
|
+
owner_cap_id: string;
|
|
682
|
+
owner: string | null;
|
|
683
|
+
solar_system: string;
|
|
684
|
+
x: string;
|
|
685
|
+
y: string;
|
|
686
|
+
z: string;
|
|
687
|
+
updated_at: number;
|
|
688
|
+
tx_digest: string;
|
|
689
|
+
is_public: boolean;
|
|
690
|
+
region_id: number | null;
|
|
691
|
+
}>>;
|
|
692
|
+
export declare const HubEnrichedSchema: z.ZodPipe<z.ZodObject<{
|
|
693
|
+
pool_count: z.ZodNumber;
|
|
694
|
+
last_activity_at: z.ZodNullable<z.ZodNumber>;
|
|
695
|
+
hub_id: z.ZodString;
|
|
696
|
+
assembly_item_id: z.ZodString;
|
|
697
|
+
assembly_tenant: z.ZodString;
|
|
698
|
+
type_id: z.ZodString;
|
|
699
|
+
owner_cap_id: z.ZodString;
|
|
700
|
+
owner: z.ZodNullable<z.ZodString>;
|
|
701
|
+
solar_system: z.ZodString;
|
|
702
|
+
x: z.ZodString;
|
|
703
|
+
y: z.ZodString;
|
|
704
|
+
z: z.ZodString;
|
|
705
|
+
updated_at: z.ZodNumber;
|
|
706
|
+
tx_digest: z.ZodString;
|
|
707
|
+
is_public: z.ZodBoolean;
|
|
708
|
+
region_id: z.ZodNullable<z.ZodNumber>;
|
|
709
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
710
|
+
poolCount: number;
|
|
711
|
+
lastActivityAt: number | null;
|
|
712
|
+
hubId: string;
|
|
713
|
+
assemblyItemId: string;
|
|
714
|
+
assemblyTenant: string;
|
|
715
|
+
typeId: string;
|
|
716
|
+
ownerCapId: string;
|
|
717
|
+
owner: string | null;
|
|
718
|
+
solarSystemId: string;
|
|
719
|
+
x: string;
|
|
720
|
+
y: string;
|
|
721
|
+
z: string;
|
|
722
|
+
updatedAt: number;
|
|
723
|
+
txDigest: string;
|
|
724
|
+
isPublic: boolean;
|
|
725
|
+
regionId: number | null;
|
|
726
|
+
}, {
|
|
727
|
+
pool_count: number;
|
|
728
|
+
last_activity_at: number | null;
|
|
729
|
+
hub_id: string;
|
|
730
|
+
assembly_item_id: string;
|
|
731
|
+
assembly_tenant: string;
|
|
732
|
+
type_id: string;
|
|
733
|
+
owner_cap_id: string;
|
|
734
|
+
owner: string | null;
|
|
735
|
+
solar_system: string;
|
|
736
|
+
x: string;
|
|
737
|
+
y: string;
|
|
738
|
+
z: string;
|
|
739
|
+
updated_at: number;
|
|
740
|
+
tx_digest: string;
|
|
741
|
+
is_public: boolean;
|
|
742
|
+
region_id: number | null;
|
|
549
743
|
}>>;
|
|
550
744
|
export declare const HubItemSchema: z.ZodPipe<z.ZodObject<{
|
|
551
745
|
asset_id: z.ZodString;
|
|
@@ -600,6 +794,61 @@ export declare const CollectionHubSchema: z.ZodPipe<z.ZodObject<{
|
|
|
600
794
|
hub_id: string;
|
|
601
795
|
collection_id: string;
|
|
602
796
|
}>>;
|
|
797
|
+
export declare const AssemblyOwnerSchema: z.ZodPipe<z.ZodObject<{
|
|
798
|
+
assembly_id: z.ZodString;
|
|
799
|
+
owner: z.ZodNullable<z.ZodString>;
|
|
800
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
801
|
+
assemblyId: string;
|
|
802
|
+
owner: string | null;
|
|
803
|
+
}, {
|
|
804
|
+
assembly_id: string;
|
|
805
|
+
owner: string | null;
|
|
806
|
+
}>>;
|
|
807
|
+
export declare const AssemblyEnrichedSchema: z.ZodPipe<z.ZodObject<{
|
|
808
|
+
assembly_id: z.ZodString;
|
|
809
|
+
owner: z.ZodNullable<z.ZodString>;
|
|
810
|
+
owner_character_name: z.ZodNullable<z.ZodString>;
|
|
811
|
+
owner_character_id: z.ZodNullable<z.ZodString>;
|
|
812
|
+
assembly_name: z.ZodNullable<z.ZodString>;
|
|
813
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
814
|
+
assemblyId: string;
|
|
815
|
+
owner: string | null;
|
|
816
|
+
ownerCharacterName: string | null;
|
|
817
|
+
ownerCharacterId: string | null;
|
|
818
|
+
assemblyName: string | null;
|
|
819
|
+
}, {
|
|
820
|
+
assembly_id: string;
|
|
821
|
+
owner: string | null;
|
|
822
|
+
owner_character_name: string | null;
|
|
823
|
+
owner_character_id: string | null;
|
|
824
|
+
assembly_name: string | null;
|
|
825
|
+
}>>;
|
|
826
|
+
export declare const BalanceManagerOwnerSchema: z.ZodPipe<z.ZodObject<{
|
|
827
|
+
balance_manager_id: z.ZodString;
|
|
828
|
+
owner: z.ZodNullable<z.ZodString>;
|
|
829
|
+
owner_name: z.ZodNullable<z.ZodString>;
|
|
830
|
+
root_ou_id: z.ZodNullable<z.ZodString>;
|
|
831
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
832
|
+
balanceManagerId: string;
|
|
833
|
+
owner: string | null;
|
|
834
|
+
ownerName: string | null;
|
|
835
|
+
rootOuId: string | null;
|
|
836
|
+
}, {
|
|
837
|
+
balance_manager_id: string;
|
|
838
|
+
owner: string | null;
|
|
839
|
+
owner_name: string | null;
|
|
840
|
+
root_ou_id: string | null;
|
|
841
|
+
}>>;
|
|
842
|
+
export declare const SolarSystemNameSchema: z.ZodPipe<z.ZodObject<{
|
|
843
|
+
solar_system_id: z.ZodNumber;
|
|
844
|
+
solar_system_name: z.ZodNullable<z.ZodString>;
|
|
845
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
846
|
+
solarSystemId: number;
|
|
847
|
+
solarSystemName: string | null;
|
|
848
|
+
}, {
|
|
849
|
+
solar_system_id: number;
|
|
850
|
+
solar_system_name: string | null;
|
|
851
|
+
}>>;
|
|
603
852
|
export declare const ItemRecipeComponentSchema: z.ZodPipe<z.ZodObject<{
|
|
604
853
|
asset_id: z.ZodString;
|
|
605
854
|
quantity: z.ZodNumber;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Transaction } from '@mysten/sui/transactions';
|
|
2
2
|
import { ClientWithCoreApi } from '@mysten/sui/client';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { AssetBalanceSchema, CollectionHubSchema, DiscoveryOrderSchema, DiscoveryResultSchema, FillSchema, FillsPageSchema, HubItemOrderbookSchema, HubItemSchema, HubItemsPageSchema, HubLocationSchema, ItemRecipeComponentSchema, ItemRecipeSchema, ItemSearchPageSchema, ItemSearchResultSchema, HubVaultSchema, InventoryBalancesSchema, OpenOrderSchema, OpenOrdersPageSchema, OrderbookOrderSchema, PoolMetadataSchema, SweepableItemSchema, SweepablePoolSchema, SweepableSchema, TradeSchema, TradesPageSchema } from './schemas';
|
|
4
|
+
import { AssemblyEnrichedSchema, AssemblyOwnerSchema, AssetBalanceSchema, BalanceManagerOwnerSchema, CollectionHubSchema, DiscoveryOrderSchema, DiscoveryResultSchema, FillSchema, FillsPageSchema, HubItemOrderbookSchema, HubItemSchema, HubEnrichedSchema, HubItemsPageSchema, HubLocationPageSchema, HubLocationSchema, ItemRecipeComponentSchema, ItemRecipeSchema, ItemSearchPageSchema, ItemSearchResultSchema, HubVaultSchema, InventoryBalancesSchema, OpenOrderSchema, OpenOrdersPageSchema, NearbyHubSchema, OrderbookOrderSchema, PoolMetadataSchema, SolarSystemNameSchema, SweepableItemSchema, SweepablePoolSchema, SweepableSchema, TradeSchema, TradesPageSchema } from './schemas';
|
|
5
5
|
export interface ObjectChange {
|
|
6
6
|
type: string;
|
|
7
7
|
objectId?: string;
|
|
@@ -50,6 +50,13 @@ export type OrderbookOrder = z.output<typeof OrderbookOrderSchema>;
|
|
|
50
50
|
export type PoolMetadata = z.output<typeof PoolMetadataSchema>;
|
|
51
51
|
export type HubVaultInfo = z.output<typeof HubVaultSchema>;
|
|
52
52
|
export type HubLocation = z.output<typeof HubLocationSchema>;
|
|
53
|
+
export type HubLocationPage = z.output<typeof HubLocationPageSchema>;
|
|
54
|
+
export type NearbyHub = z.output<typeof NearbyHubSchema>;
|
|
55
|
+
export type HubEnriched = z.output<typeof HubEnrichedSchema>;
|
|
56
|
+
export type AssemblyOwner = z.output<typeof AssemblyOwnerSchema>;
|
|
57
|
+
export type AssemblyEnriched = z.output<typeof AssemblyEnrichedSchema>;
|
|
58
|
+
export type BalanceManagerOwner = z.output<typeof BalanceManagerOwnerSchema>;
|
|
59
|
+
export type SolarSystemName = z.output<typeof SolarSystemNameSchema>;
|
|
53
60
|
export type HubItem = z.output<typeof HubItemSchema>;
|
|
54
61
|
export type HubItemsPage = z.output<typeof HubItemsPageSchema>;
|
|
55
62
|
export type CollectionHub = z.output<typeof CollectionHubSchema>;
|
|
@@ -108,6 +115,27 @@ export interface DiscoveryFilters {
|
|
|
108
115
|
cursor?: string;
|
|
109
116
|
limit?: number;
|
|
110
117
|
}
|
|
118
|
+
export interface HubLocationFilters {
|
|
119
|
+
solarSystemId?: number;
|
|
120
|
+
tenant?: string;
|
|
121
|
+
hasVault?: boolean;
|
|
122
|
+
cursor?: string;
|
|
123
|
+
limit?: number;
|
|
124
|
+
}
|
|
125
|
+
export interface LocationPageParams {
|
|
126
|
+
cursor?: string;
|
|
127
|
+
limit?: number;
|
|
128
|
+
}
|
|
129
|
+
export interface NearbyHubsParams {
|
|
130
|
+
hubId: string;
|
|
131
|
+
rangeLy?: number;
|
|
132
|
+
assetId?: string;
|
|
133
|
+
}
|
|
134
|
+
export interface NearbyHubsBySystemParams {
|
|
135
|
+
solarSystem: string;
|
|
136
|
+
rangeLy?: number;
|
|
137
|
+
assetId?: string;
|
|
138
|
+
}
|
|
111
139
|
export interface BalancesAtHubParams {
|
|
112
140
|
storageUnitId: string;
|
|
113
141
|
address?: string;
|
package/package.json
CHANGED