@trinaryex/sdk 3.6.0 → 3.8.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/dist/queries.d.ts CHANGED
@@ -1,4 +1,4 @@
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';
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';
2
2
  export declare class IndexerClient {
3
3
  private readonly baseUrl;
4
4
  private readonly apiKey;
@@ -31,6 +31,12 @@ export declare class IndexerClient {
31
31
  assembliesEnriched(assemblyIds: string[]): Promise<AssemblyEnriched[]>;
32
32
  balanceManagerOwners(balanceManagerIds: string[]): Promise<BalanceManagerOwner[]>;
33
33
  solarSystemNames(solarSystemIds: number[]): Promise<SolarSystemName[]>;
34
+ solarSystem(solarSystem: string): Promise<SolarSystem>;
35
+ solarSystems(params: BatchSystemsParams): Promise<BatchSystems>;
36
+ nearbySystems(params: NearbySystemsParams): Promise<NearbySystems>;
37
+ systemsNearCoordinates(params: CoordinateSearchParams): Promise<CoordinateSearch>;
38
+ autocompleteSystems(query: string, limit?: number): Promise<AutocompleteSystems>;
39
+ spatialStats(): Promise<SpatialStats>;
34
40
  inventoryBalances(params: BalancesAtHubParams & {
35
41
  balanceManagerId?: string;
36
42
  }): Promise<InventoryBalances>;
package/dist/schemas.d.ts CHANGED
@@ -849,6 +849,368 @@ export declare const SolarSystemNameSchema: z.ZodPipe<z.ZodObject<{
849
849
  solar_system_id: number;
850
850
  solar_system_name: string | null;
851
851
  }>>;
852
+ export declare const CoordinatesSchema: z.ZodPipe<z.ZodObject<{
853
+ x: z.ZodString;
854
+ y: z.ZodString;
855
+ z: z.ZodString;
856
+ }, z.core.$strip>, z.ZodTransform<{
857
+ x: string;
858
+ y: string;
859
+ z: string;
860
+ }, {
861
+ x: string;
862
+ y: string;
863
+ z: string;
864
+ }>>;
865
+ export declare const SolarSystemSchema: z.ZodPipe<z.ZodObject<{
866
+ solar_system_id: z.ZodNumber;
867
+ solar_system_name: z.ZodString;
868
+ location: z.ZodPipe<z.ZodObject<{
869
+ x: z.ZodString;
870
+ y: z.ZodString;
871
+ z: z.ZodString;
872
+ }, z.core.$strip>, z.ZodTransform<{
873
+ x: string;
874
+ y: string;
875
+ z: string;
876
+ }, {
877
+ x: string;
878
+ y: string;
879
+ z: string;
880
+ }>>;
881
+ constellation_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
882
+ region_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
883
+ }, z.core.$strip>, z.ZodTransform<{
884
+ solarSystemId: number;
885
+ solarSystemName: string;
886
+ location: {
887
+ x: string;
888
+ y: string;
889
+ z: string;
890
+ };
891
+ constellationId: number | null;
892
+ regionId: number | null;
893
+ }, {
894
+ solar_system_id: number;
895
+ solar_system_name: string;
896
+ location: {
897
+ x: string;
898
+ y: string;
899
+ z: string;
900
+ };
901
+ constellation_id?: number | null | undefined;
902
+ region_id?: number | null | undefined;
903
+ }>>;
904
+ export declare const NearbySystemSchema: z.ZodPipe<z.ZodObject<{
905
+ solar_system_id: z.ZodNumber;
906
+ distance_ly: z.ZodString;
907
+ solar_system_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
908
+ location: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
909
+ x: z.ZodString;
910
+ y: z.ZodString;
911
+ z: z.ZodString;
912
+ }, z.core.$strip>, z.ZodTransform<{
913
+ x: string;
914
+ y: string;
915
+ z: string;
916
+ }, {
917
+ x: string;
918
+ y: string;
919
+ z: string;
920
+ }>>>>;
921
+ }, z.core.$strip>, z.ZodTransform<{
922
+ solarSystemId: number;
923
+ distanceLy: string;
924
+ solarSystemName: string | null;
925
+ location: {
926
+ x: string;
927
+ y: string;
928
+ z: string;
929
+ } | null;
930
+ }, {
931
+ solar_system_id: number;
932
+ distance_ly: string;
933
+ solar_system_name?: string | null | undefined;
934
+ location?: {
935
+ x: string;
936
+ y: string;
937
+ z: string;
938
+ } | null | undefined;
939
+ }>>;
940
+ export declare const BatchSystemsSchema: z.ZodPipe<z.ZodObject<{
941
+ count: z.ZodNumber;
942
+ systems: z.ZodArray<z.ZodPipe<z.ZodObject<{
943
+ solar_system_id: z.ZodNumber;
944
+ solar_system_name: z.ZodString;
945
+ location: z.ZodPipe<z.ZodObject<{
946
+ x: z.ZodString;
947
+ y: z.ZodString;
948
+ z: z.ZodString;
949
+ }, z.core.$strip>, z.ZodTransform<{
950
+ x: string;
951
+ y: string;
952
+ z: string;
953
+ }, {
954
+ x: string;
955
+ y: string;
956
+ z: string;
957
+ }>>;
958
+ constellation_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
959
+ region_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
960
+ }, z.core.$strip>, z.ZodTransform<{
961
+ solarSystemId: number;
962
+ solarSystemName: string;
963
+ location: {
964
+ x: string;
965
+ y: string;
966
+ z: string;
967
+ };
968
+ constellationId: number | null;
969
+ regionId: number | null;
970
+ }, {
971
+ solar_system_id: number;
972
+ solar_system_name: string;
973
+ location: {
974
+ x: string;
975
+ y: string;
976
+ z: string;
977
+ };
978
+ constellation_id?: number | null | undefined;
979
+ region_id?: number | null | undefined;
980
+ }>>>;
981
+ }, z.core.$strip>, z.ZodTransform<{
982
+ count: number;
983
+ systems: {
984
+ solarSystemId: number;
985
+ solarSystemName: string;
986
+ location: {
987
+ x: string;
988
+ y: string;
989
+ z: string;
990
+ };
991
+ constellationId: number | null;
992
+ regionId: number | null;
993
+ }[];
994
+ }, {
995
+ count: number;
996
+ systems: {
997
+ solarSystemId: number;
998
+ solarSystemName: string;
999
+ location: {
1000
+ x: string;
1001
+ y: string;
1002
+ z: string;
1003
+ };
1004
+ constellationId: number | null;
1005
+ regionId: number | null;
1006
+ }[];
1007
+ }>>;
1008
+ export declare const NearbySystemsSchema: z.ZodPipe<z.ZodObject<{
1009
+ solar_system_id: z.ZodNumber;
1010
+ solar_system_name: z.ZodString;
1011
+ radius_ly: z.ZodString;
1012
+ count: z.ZodNumber;
1013
+ systems: z.ZodArray<z.ZodPipe<z.ZodObject<{
1014
+ solar_system_id: z.ZodNumber;
1015
+ distance_ly: z.ZodString;
1016
+ solar_system_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1017
+ location: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
1018
+ x: z.ZodString;
1019
+ y: z.ZodString;
1020
+ z: z.ZodString;
1021
+ }, z.core.$strip>, z.ZodTransform<{
1022
+ x: string;
1023
+ y: string;
1024
+ z: string;
1025
+ }, {
1026
+ x: string;
1027
+ y: string;
1028
+ z: string;
1029
+ }>>>>;
1030
+ }, z.core.$strip>, z.ZodTransform<{
1031
+ solarSystemId: number;
1032
+ distanceLy: string;
1033
+ solarSystemName: string | null;
1034
+ location: {
1035
+ x: string;
1036
+ y: string;
1037
+ z: string;
1038
+ } | null;
1039
+ }, {
1040
+ solar_system_id: number;
1041
+ distance_ly: string;
1042
+ solar_system_name?: string | null | undefined;
1043
+ location?: {
1044
+ x: string;
1045
+ y: string;
1046
+ z: string;
1047
+ } | null | undefined;
1048
+ }>>>;
1049
+ }, z.core.$strip>, z.ZodTransform<{
1050
+ originSolarSystemId: number;
1051
+ originSolarSystemName: string;
1052
+ radiusLy: string;
1053
+ count: number;
1054
+ systems: {
1055
+ solarSystemId: number;
1056
+ distanceLy: string;
1057
+ solarSystemName: string | null;
1058
+ location: {
1059
+ x: string;
1060
+ y: string;
1061
+ z: string;
1062
+ } | null;
1063
+ }[];
1064
+ }, {
1065
+ solar_system_id: number;
1066
+ solar_system_name: string;
1067
+ radius_ly: string;
1068
+ count: number;
1069
+ systems: {
1070
+ solarSystemId: number;
1071
+ distanceLy: string;
1072
+ solarSystemName: string | null;
1073
+ location: {
1074
+ x: string;
1075
+ y: string;
1076
+ z: string;
1077
+ } | null;
1078
+ }[];
1079
+ }>>;
1080
+ export declare const CoordinateSearchSchema: z.ZodPipe<z.ZodObject<{
1081
+ location: z.ZodPipe<z.ZodObject<{
1082
+ x: z.ZodString;
1083
+ y: z.ZodString;
1084
+ z: z.ZodString;
1085
+ }, z.core.$strip>, z.ZodTransform<{
1086
+ x: string;
1087
+ y: string;
1088
+ z: string;
1089
+ }, {
1090
+ x: string;
1091
+ y: string;
1092
+ z: string;
1093
+ }>>;
1094
+ radius_ly: z.ZodString;
1095
+ count: z.ZodNumber;
1096
+ systems: z.ZodArray<z.ZodPipe<z.ZodObject<{
1097
+ solar_system_id: z.ZodNumber;
1098
+ distance_ly: z.ZodString;
1099
+ solar_system_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1100
+ location: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
1101
+ x: z.ZodString;
1102
+ y: z.ZodString;
1103
+ z: z.ZodString;
1104
+ }, z.core.$strip>, z.ZodTransform<{
1105
+ x: string;
1106
+ y: string;
1107
+ z: string;
1108
+ }, {
1109
+ x: string;
1110
+ y: string;
1111
+ z: string;
1112
+ }>>>>;
1113
+ }, z.core.$strip>, z.ZodTransform<{
1114
+ solarSystemId: number;
1115
+ distanceLy: string;
1116
+ solarSystemName: string | null;
1117
+ location: {
1118
+ x: string;
1119
+ y: string;
1120
+ z: string;
1121
+ } | null;
1122
+ }, {
1123
+ solar_system_id: number;
1124
+ distance_ly: string;
1125
+ solar_system_name?: string | null | undefined;
1126
+ location?: {
1127
+ x: string;
1128
+ y: string;
1129
+ z: string;
1130
+ } | null | undefined;
1131
+ }>>>;
1132
+ }, z.core.$strip>, z.ZodTransform<{
1133
+ origin: {
1134
+ x: string;
1135
+ y: string;
1136
+ z: string;
1137
+ };
1138
+ radiusLy: string;
1139
+ count: number;
1140
+ systems: {
1141
+ solarSystemId: number;
1142
+ distanceLy: string;
1143
+ solarSystemName: string | null;
1144
+ location: {
1145
+ x: string;
1146
+ y: string;
1147
+ z: string;
1148
+ } | null;
1149
+ }[];
1150
+ }, {
1151
+ location: {
1152
+ x: string;
1153
+ y: string;
1154
+ z: string;
1155
+ };
1156
+ radius_ly: string;
1157
+ count: number;
1158
+ systems: {
1159
+ solarSystemId: number;
1160
+ distanceLy: string;
1161
+ solarSystemName: string | null;
1162
+ location: {
1163
+ x: string;
1164
+ y: string;
1165
+ z: string;
1166
+ } | null;
1167
+ }[];
1168
+ }>>;
1169
+ export declare const SolarSystemSuggestionSchema: z.ZodPipe<z.ZodObject<{
1170
+ solar_system_id: z.ZodNumber;
1171
+ solar_system_name: z.ZodString;
1172
+ }, z.core.$strip>, z.ZodTransform<{
1173
+ solarSystemId: number;
1174
+ solarSystemName: string;
1175
+ }, {
1176
+ solar_system_id: number;
1177
+ solar_system_name: string;
1178
+ }>>;
1179
+ export declare const AutocompleteSystemsSchema: z.ZodPipe<z.ZodObject<{
1180
+ count: z.ZodNumber;
1181
+ systems: z.ZodArray<z.ZodPipe<z.ZodObject<{
1182
+ solar_system_id: z.ZodNumber;
1183
+ solar_system_name: z.ZodString;
1184
+ }, z.core.$strip>, z.ZodTransform<{
1185
+ solarSystemId: number;
1186
+ solarSystemName: string;
1187
+ }, {
1188
+ solar_system_id: number;
1189
+ solar_system_name: string;
1190
+ }>>>;
1191
+ }, z.core.$strip>, z.ZodTransform<{
1192
+ count: number;
1193
+ systems: {
1194
+ solarSystemId: number;
1195
+ solarSystemName: string;
1196
+ }[];
1197
+ }, {
1198
+ count: number;
1199
+ systems: {
1200
+ solarSystemId: number;
1201
+ solarSystemName: string;
1202
+ }[];
1203
+ }>>;
1204
+ export declare const SpatialStatsSchema: z.ZodPipe<z.ZodObject<{
1205
+ total_systems: z.ZodNumber;
1206
+ status: z.ZodString;
1207
+ }, z.core.$strip>, z.ZodTransform<{
1208
+ totalSystems: number;
1209
+ status: string;
1210
+ }, {
1211
+ total_systems: number;
1212
+ status: string;
1213
+ }>>;
852
1214
  export declare const ItemRecipeComponentSchema: z.ZodPipe<z.ZodObject<{
853
1215
  asset_id: z.ZodString;
854
1216
  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 { 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';
4
+ import { AssemblyEnrichedSchema, AssemblyOwnerSchema, AssetBalanceSchema, AutocompleteSystemsSchema, BalanceManagerOwnerSchema, BatchSystemsSchema, CoordinateSearchSchema, CoordinatesSchema, CollectionHubSchema, DiscoveryOrderSchema, DiscoveryResultSchema, FillSchema, FillsPageSchema, HubItemOrderbookSchema, HubItemSchema, HubEnrichedSchema, HubItemsPageSchema, HubLocationPageSchema, HubLocationSchema, ItemRecipeComponentSchema, ItemRecipeSchema, ItemSearchPageSchema, ItemSearchResultSchema, HubVaultSchema, InventoryBalancesSchema, OpenOrderSchema, OpenOrdersPageSchema, NearbyHubSchema, NearbySystemSchema, NearbySystemsSchema, OrderbookOrderSchema, PoolMetadataSchema, SolarSystemNameSchema, SolarSystemSchema, SolarSystemSuggestionSchema, SpatialStatsSchema, SweepableItemSchema, SweepablePoolSchema, SweepableSchema, TradeSchema, TradesPageSchema } from './schemas';
5
5
  export interface ObjectChange {
6
6
  type: string;
7
7
  objectId?: string;
@@ -57,6 +57,15 @@ export type AssemblyOwner = z.output<typeof AssemblyOwnerSchema>;
57
57
  export type AssemblyEnriched = z.output<typeof AssemblyEnrichedSchema>;
58
58
  export type BalanceManagerOwner = z.output<typeof BalanceManagerOwnerSchema>;
59
59
  export type SolarSystemName = z.output<typeof SolarSystemNameSchema>;
60
+ export type Coordinates = z.output<typeof CoordinatesSchema>;
61
+ export type SolarSystem = z.output<typeof SolarSystemSchema>;
62
+ export type NearbySystem = z.output<typeof NearbySystemSchema>;
63
+ export type BatchSystems = z.output<typeof BatchSystemsSchema>;
64
+ export type NearbySystems = z.output<typeof NearbySystemsSchema>;
65
+ export type CoordinateSearch = z.output<typeof CoordinateSearchSchema>;
66
+ export type SolarSystemSuggestion = z.output<typeof SolarSystemSuggestionSchema>;
67
+ export type AutocompleteSystems = z.output<typeof AutocompleteSystemsSchema>;
68
+ export type SpatialStats = z.output<typeof SpatialStatsSchema>;
60
69
  export type HubItem = z.output<typeof HubItemSchema>;
61
70
  export type HubItemsPage = z.output<typeof HubItemsPageSchema>;
62
71
  export type CollectionHub = z.output<typeof CollectionHubSchema>;
@@ -115,6 +124,25 @@ export interface DiscoveryFilters {
115
124
  cursor?: string;
116
125
  limit?: number;
117
126
  }
127
+ export type BatchSystemsParams = {
128
+ solarSystemIds: number[];
129
+ solarSystemNames?: never;
130
+ } | {
131
+ solarSystemNames: string[];
132
+ solarSystemIds?: never;
133
+ };
134
+ export interface NearbySystemsParams {
135
+ solarSystem: string;
136
+ radiusLy: number;
137
+ limit?: number;
138
+ }
139
+ export interface CoordinateSearchParams {
140
+ x: string;
141
+ y: string;
142
+ z: string;
143
+ radiusLy: number;
144
+ limit?: number;
145
+ }
118
146
  export interface HubLocationFilters {
119
147
  solarSystemId?: number;
120
148
  tenant?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trinaryex/sdk",
3
- "version": "3.6.0",
3
+ "version": "3.8.0",
4
4
  "description": "Trading SDK for Trinary Exchange — market data, order books, and on-chain trading (Sui) for bots, analytics tools, and CLIs.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",