aftermath-ts-sdk 1.2.64 → 1.2.65
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/general/dynamicGas/dynamicGas.d.ts +34 -0
- package/dist/general/dynamicGas/dynamicGas.d.ts.map +1 -1
- package/dist/general/dynamicGas/dynamicGas.js +34 -0
- package/dist/general/dynamicGas/dynamicGasTypes.d.ts +25 -0
- package/dist/general/dynamicGas/dynamicGasTypes.d.ts.map +1 -1
- package/dist/general/prices/prices.d.ts +73 -0
- package/dist/general/prices/prices.d.ts.map +1 -1
- package/dist/general/prices/prices.js +73 -0
- package/dist/general/providers/aftermath.d.ts +106 -25
- package/dist/general/providers/aftermath.d.ts.map +1 -1
- package/dist/general/providers/aftermath.js +108 -27
- package/dist/general/providers/aftermathApi.d.ts +127 -8
- package/dist/general/providers/aftermathApi.d.ts.map +1 -1
- package/dist/general/providers/aftermathApi.js +132 -12
- package/dist/general/types/castingTypes.d.ts +0 -7
- package/dist/general/types/castingTypes.d.ts.map +1 -1
- package/dist/general/types/castingTypes.js +6 -0
- package/dist/general/types/generalTypes.d.ts +228 -7
- package/dist/general/types/generalTypes.d.ts.map +1 -1
- package/dist/general/types/suiTypes.d.ts +0 -16
- package/dist/general/types/suiTypes.d.ts.map +1 -1
- package/dist/general/types/suiTypes.js +3 -25
- package/dist/general/utils/casting.d.ts +159 -3
- package/dist/general/utils/casting.d.ts.map +1 -1
- package/dist/general/utils/casting.js +162 -16
- package/dist/general/utils/fixedUtils.d.ts +89 -2
- package/dist/general/utils/fixedUtils.d.ts.map +1 -1
- package/dist/general/utils/fixedUtils.js +81 -4
- package/dist/general/utils/helpers.d.ts +320 -9
- package/dist/general/utils/helpers.d.ts.map +1 -1
- package/dist/general/utils/helpers.js +350 -89
- package/dist/general/utils/iFixedUtils.d.ts +64 -0
- package/dist/general/utils/iFixedUtils.d.ts.map +1 -1
- package/dist/general/utils/iFixedUtils.js +64 -0
- package/dist/general/wallet/wallet.d.ts +75 -0
- package/dist/general/wallet/wallet.d.ts.map +1 -1
- package/dist/general/wallet/wallet.js +75 -5
- package/dist/packages/auth/auth.d.ts +113 -0
- package/dist/packages/auth/auth.d.ts.map +1 -1
- package/dist/packages/auth/auth.js +129 -15
- package/dist/packages/auth/authTypes.d.ts +66 -0
- package/dist/packages/auth/authTypes.d.ts.map +1 -1
- package/dist/packages/coin/coin.d.ts +250 -0
- package/dist/packages/coin/coin.d.ts.map +1 -1
- package/dist/packages/coin/coin.js +238 -14
- package/dist/packages/coin/coinTypes.d.ts +93 -0
- package/dist/packages/coin/coinTypes.d.ts.map +1 -1
- package/dist/packages/dca/dca.d.ts +124 -35
- package/dist/packages/dca/dca.d.ts.map +1 -1
- package/dist/packages/dca/dca.js +127 -37
- package/dist/packages/dca/dcaTypes.d.ts +213 -28
- package/dist/packages/dca/dcaTypes.d.ts.map +1 -1
- package/dist/packages/farms/farms.d.ts +184 -1
- package/dist/packages/farms/farms.d.ts.map +1 -1
- package/dist/packages/farms/farms.js +185 -11
- package/dist/packages/farms/farmsStakedPosition.d.ts +140 -6
- package/dist/packages/farms/farmsStakedPosition.d.ts.map +1 -1
- package/dist/packages/farms/farmsStakedPosition.js +189 -144
- package/dist/packages/farms/farmsStakingPool.d.ts +161 -1
- package/dist/packages/farms/farmsStakingPool.d.ts.map +1 -1
- package/dist/packages/farms/farmsStakingPool.js +176 -70
- package/dist/packages/farms/farmsTypes.d.ts +283 -2
- package/dist/packages/farms/farmsTypes.d.ts.map +1 -1
- package/dist/packages/farms/farmsTypes.js +18 -0
- package/dist/packages/limitOrders/limitOrders.d.ts +108 -21
- package/dist/packages/limitOrders/limitOrders.d.ts.map +1 -1
- package/dist/packages/limitOrders/limitOrders.js +110 -22
- package/dist/packages/limitOrders/limitOrdersTypes.d.ts +142 -0
- package/dist/packages/limitOrders/limitOrdersTypes.d.ts.map +1 -1
- package/dist/packages/multisig/multisig.d.ts +33 -4
- package/dist/packages/multisig/multisig.d.ts.map +1 -1
- package/dist/packages/multisig/multisig.js +33 -4
- package/dist/packages/multisig/multisigTypes.d.ts +17 -0
- package/dist/packages/multisig/multisigTypes.d.ts.map +1 -1
- package/dist/packages/perpetuals/api/perpetualsApi.d.ts.map +1 -1
- package/dist/packages/pools/pool.d.ts +327 -85
- package/dist/packages/pools/pool.d.ts.map +1 -1
- package/dist/packages/pools/pool.js +333 -91
- package/dist/packages/pools/pools.d.ts +299 -37
- package/dist/packages/pools/pools.d.ts.map +1 -1
- package/dist/packages/pools/pools.js +306 -52
- package/dist/packages/pools/poolsTypes.d.ts +267 -2
- package/dist/packages/pools/poolsTypes.d.ts.map +1 -1
- package/dist/packages/referralVault/referralVault.d.ts +37 -0
- package/dist/packages/referralVault/referralVault.d.ts.map +1 -1
- package/dist/packages/referralVault/referralVault.js +37 -0
- package/dist/packages/router/router.d.ts +213 -17
- package/dist/packages/router/router.d.ts.map +1 -1
- package/dist/packages/router/router.js +214 -18
- package/dist/packages/router/routerTypes.d.ts +198 -14
- package/dist/packages/router/routerTypes.d.ts.map +1 -1
- package/dist/packages/staking/staking.d.ts +301 -43
- package/dist/packages/staking/staking.d.ts.map +1 -1
- package/dist/packages/staking/staking.js +308 -51
- package/dist/packages/staking/stakingTypes.d.ts +426 -6
- package/dist/packages/staking/stakingTypes.d.ts.map +1 -1
- package/dist/packages/staking/stakingTypes.js +19 -0
- package/dist/packages/sui/sui.d.ts +39 -0
- package/dist/packages/sui/sui.d.ts.map +1 -1
- package/dist/packages/sui/sui.js +39 -0
- package/dist/packages/userData/userData.d.ts +66 -12
- package/dist/packages/userData/userData.d.ts.map +1 -1
- package/dist/packages/userData/userData.js +66 -12
- package/dist/packages/userData/userDataTypes.d.ts +19 -0
- package/dist/packages/userData/userDataTypes.d.ts.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -1
- package/package.json +1 -1
- package/dist/general/historicalData/historicalData.d.ts +0 -15
- package/dist/general/historicalData/historicalData.d.ts.map +0 -1
- package/dist/general/historicalData/historicalData.js +0 -45
- package/dist/general/historicalData/historicalDataTypes.d.ts +0 -10
- package/dist/general/historicalData/historicalDataTypes.d.ts.map +0 -1
- package/dist/general/historicalData/historicalDataTypes.js +0 -2
|
@@ -27,18 +27,40 @@ const multisigApi_1 = require("../../packages/multisig/api/multisigApi");
|
|
|
27
27
|
const userDataApi_1 = require("../../packages/userData/api/userDataApi");
|
|
28
28
|
const limitOrdersApi_1 = require("../../packages/limitOrders/api/limitOrdersApi");
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
30
|
+
* The `AftermathApi` class is a low-level factory and reference point for
|
|
31
|
+
* interacting directly with underlying API modules (e.g., PoolsApi, StakingApi).
|
|
32
|
+
* It encapsulates a configured `SuiClient` and the known `addresses` for the
|
|
33
|
+
* Aftermath protocol, allowing flexible or advanced usage scenarios.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import { AftermathApi } from "aftermath-ts-sdk";
|
|
38
|
+
* import { SuiClient, SuiHTTPTransport } from "@mysten/sui/client";
|
|
39
|
+
*
|
|
40
|
+
* const addresses = { ... }; // from aftermath.getAddresses()
|
|
41
|
+
* const suiClient = new SuiClient({
|
|
42
|
+
* transport: new SuiHTTPTransport({
|
|
43
|
+
* url: "https://fullnode.mainnet.sui.io",
|
|
44
|
+
* }),
|
|
45
|
+
* });
|
|
46
|
+
*
|
|
47
|
+
* const afApi = new AftermathApi(suiClient, addresses);
|
|
48
|
+
* // access protocol APIs
|
|
49
|
+
* const poolsApi = afApi.Pools();
|
|
50
|
+
* ```
|
|
32
51
|
*/
|
|
33
52
|
class AftermathApi {
|
|
34
53
|
// =========================================================================
|
|
35
54
|
// Constructor
|
|
36
55
|
// =========================================================================
|
|
37
56
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
57
|
+
* Constructs a new instance of the `AftermathApi`, binding the given Sui client
|
|
58
|
+
* to the known `addresses`. Optionally, a `providerV0` can be passed for
|
|
59
|
+
* legacy transaction building or older Sui libraries.
|
|
60
|
+
*
|
|
61
|
+
* @param provider - The `SuiClient` for on-chain queries and transactions.
|
|
62
|
+
* @param addresses - The config addresses (object IDs, package IDs, etc.) for the Aftermath protocol.
|
|
63
|
+
* @param providerV0 - An optional legacy `SuiClient` from `@mysten/sui.js/client`.
|
|
42
64
|
*/
|
|
43
65
|
constructor(provider, addresses, providerV0) {
|
|
44
66
|
this.provider = provider;
|
|
@@ -50,50 +72,135 @@ class AftermathApi {
|
|
|
50
72
|
// =========================================================================
|
|
51
73
|
// General
|
|
52
74
|
// =========================================================================
|
|
75
|
+
/**
|
|
76
|
+
* Creates a new `DynamicFieldsApiHelpers` instance for complex object field queries.
|
|
77
|
+
*/
|
|
53
78
|
this.DynamicFields = () => new dynamicFieldsApiHelpers_1.DynamicFieldsApiHelpers(this);
|
|
79
|
+
/**
|
|
80
|
+
* Creates a new `EventsApiHelpers` instance for querying Sui events.
|
|
81
|
+
*/
|
|
54
82
|
this.Events = () => new eventsApiHelpers_1.EventsApiHelpers(this);
|
|
83
|
+
/**
|
|
84
|
+
* Creates a new `InspectionsApiHelpers` instance for reading Summaries or inspection data.
|
|
85
|
+
*/
|
|
55
86
|
this.Inspections = () => new inspectionsApiHelpers_1.InspectionsApiHelpers(this);
|
|
87
|
+
/**
|
|
88
|
+
* Creates a new `ObjectsApiHelpers` instance for object retrieval/manipulation.
|
|
89
|
+
*/
|
|
56
90
|
this.Objects = () => new objectsApiHelpers_1.ObjectsApiHelpers(this);
|
|
91
|
+
/**
|
|
92
|
+
* Creates a new `TransactionsApiHelpers` instance for querying or parsing transaction data.
|
|
93
|
+
*/
|
|
57
94
|
this.Transactions = () => new transactionsApiHelpers_1.TransactionsApiHelpers(this);
|
|
58
95
|
// =========================================================================
|
|
59
96
|
// Utils
|
|
60
97
|
// =========================================================================
|
|
98
|
+
/**
|
|
99
|
+
* Creates a new `WalletApi` instance for direct wallet-based operations (fetching balances, etc.).
|
|
100
|
+
*/
|
|
61
101
|
this.Wallet = () => new walletApi_1.WalletApi(this);
|
|
102
|
+
/**
|
|
103
|
+
* Creates a new `NftsApi` instance for retrieving and interacting with NFT data.
|
|
104
|
+
*/
|
|
62
105
|
this.Nfts = () => new nftsApi_1.NftsApi(this);
|
|
63
106
|
// =========================================================================
|
|
64
107
|
// General Packages
|
|
65
108
|
// =========================================================================
|
|
109
|
+
/**
|
|
110
|
+
* Creates a new `CoinApi` instance for detailed coin operations.
|
|
111
|
+
*/
|
|
66
112
|
this.Coin = () => new coinApi_1.CoinApi(this);
|
|
113
|
+
/**
|
|
114
|
+
* Creates a new `SuiApi` instance for lower-level Sui chain interactions.
|
|
115
|
+
*/
|
|
67
116
|
this.Sui = () => new suiApi_1.SuiApi(this);
|
|
68
117
|
// =========================================================================
|
|
69
118
|
// Aftermath Packages
|
|
70
119
|
// =========================================================================
|
|
120
|
+
/**
|
|
121
|
+
* Creates a new `PoolsApi` instance for pool-related interactions (AMM pools, liquidity, etc.).
|
|
122
|
+
*/
|
|
71
123
|
this.Pools = () => new poolsApi_1.PoolsApi(this);
|
|
124
|
+
/**
|
|
125
|
+
* Creates a new `FaucetApi` instance for dispensing tokens on supported dev/test networks.
|
|
126
|
+
*/
|
|
72
127
|
this.Faucet = () => new faucetApi_1.FaucetApi(this);
|
|
128
|
+
/**
|
|
129
|
+
* Creates a new `SuiFrensApi` instance for special social or token gating utilities on Sui.
|
|
130
|
+
*/
|
|
73
131
|
this.SuiFrens = () => new suiFrensApi_1.SuiFrensApi(this);
|
|
132
|
+
/**
|
|
133
|
+
* Creates a new `StakingApi` instance for advanced or direct staking operations on Sui.
|
|
134
|
+
*/
|
|
74
135
|
this.Staking = () => new stakingApi_1.StakingApi(this);
|
|
136
|
+
/**
|
|
137
|
+
* Creates a new `NftAmmApi` instance for NFT AMM logic (buy, sell, liquidity).
|
|
138
|
+
*/
|
|
75
139
|
this.NftAmm = () => new nftAmmApi_1.NftAmmApi(this);
|
|
140
|
+
/**
|
|
141
|
+
* Creates a new `ReferralVaultApi` instance for referral-based logic in Aftermath.
|
|
142
|
+
*/
|
|
76
143
|
this.ReferralVault = () => new referralVaultApi_1.ReferralVaultApi(this);
|
|
144
|
+
/**
|
|
145
|
+
* Creates a new `PerpetualsApi` instance for futures or perpetual derivatives on Sui.
|
|
146
|
+
*/
|
|
77
147
|
this.Perpetuals = () => new perpetualsApi_1.PerpetualsApi(this);
|
|
148
|
+
/**
|
|
149
|
+
* Creates a new `OracleApi` instance for price or data feed oracles.
|
|
150
|
+
*/
|
|
78
151
|
this.Oracle = () => new oracleApi_1.OracleApi(this);
|
|
152
|
+
/**
|
|
153
|
+
* Creates a new `FarmsApi` instance for yield farming or liquidity mining interactions.
|
|
154
|
+
*/
|
|
79
155
|
this.Farms = () => new farmsApi_1.FarmsApi(this);
|
|
156
|
+
/**
|
|
157
|
+
* Creates a new `DcaApi` instance for dollar-cost averaging logic.
|
|
158
|
+
*/
|
|
80
159
|
this.Dca = () => new dcaApi_1.DcaApi(this);
|
|
160
|
+
/**
|
|
161
|
+
* Creates a new `MultisigApi` instance for multi-signature address creation and management.
|
|
162
|
+
*/
|
|
81
163
|
this.Multisig = () => new multisigApi_1.MultisigApi(this);
|
|
164
|
+
/**
|
|
165
|
+
* Creates a new `LimitOrdersApi` instance for placing limit orders on supported DEX protocols.
|
|
166
|
+
*/
|
|
82
167
|
this.LimitOrders = () => new limitOrdersApi_1.LimitOrdersApi(this);
|
|
168
|
+
/**
|
|
169
|
+
* Creates a new `UserDataApi` instance for managing user-specific data storage or sign-on logic.
|
|
170
|
+
*/
|
|
83
171
|
this.UserData = () => new userDataApi_1.UserDataApi(this);
|
|
84
172
|
/**
|
|
85
|
-
* Creates a new instance
|
|
86
|
-
* @returns A new instance of the RouterApi class.
|
|
173
|
+
* Creates a new `RouterApi` instance for best-price trade routing across multiple DEX liquidity sources.
|
|
87
174
|
*/
|
|
88
175
|
this.Router = () => new routerApi_1.RouterApi(this);
|
|
89
|
-
|
|
90
|
-
|
|
176
|
+
/**
|
|
177
|
+
* Creates a new `LeveragedStakingApi` instance for leveraged staking operations,
|
|
178
|
+
* optionally using `ScallopProviders` if needed.
|
|
179
|
+
*
|
|
180
|
+
* @param ScallopProviders - An optional object containing references to Scallop's Sui modules or providers.
|
|
181
|
+
*/
|
|
182
|
+
this.LeveragedStaking = (ScallopProviders) => new leveragedStakingApi_1.LeveragedStakingApi(this, ScallopProviders);
|
|
91
183
|
// =========================================================================
|
|
92
184
|
// Helpers
|
|
93
185
|
// =========================================================================
|
|
186
|
+
/**
|
|
187
|
+
* Attempts to decode a Move error message into a structured error code,
|
|
188
|
+
* package ID, module name, and descriptive error string.
|
|
189
|
+
*
|
|
190
|
+
* @param inputs - An object containing the raw `errorMessage`.
|
|
191
|
+
* @returns An object with `errorCode`, `packageId`, `module`, and `error` if translation is successful, or `undefined`.
|
|
192
|
+
*
|
|
193
|
+
* @example
|
|
194
|
+
* ```typescript
|
|
195
|
+
* const errorDecoded = afApi.translateMoveErrorMessage({ errorMessage: "MoveAbort at ..." });
|
|
196
|
+
* if (errorDecoded) {
|
|
197
|
+
* console.log(errorDecoded.errorCode, errorDecoded.error);
|
|
198
|
+
* }
|
|
199
|
+
* ```
|
|
200
|
+
*/
|
|
94
201
|
this.translateMoveErrorMessage = (inputs) => {
|
|
95
202
|
const { errorMessage } = inputs;
|
|
96
|
-
//
|
|
203
|
+
// Candidate packageApis that define `moveErrors` we can search against
|
|
97
204
|
const packageApis = [
|
|
98
205
|
// @ts-ignore
|
|
99
206
|
this.Pools,
|
|
@@ -117,7 +224,9 @@ class AftermathApi {
|
|
|
117
224
|
continue;
|
|
118
225
|
return translation;
|
|
119
226
|
}
|
|
120
|
-
catch (e) {
|
|
227
|
+
catch (e) {
|
|
228
|
+
// If any package lacks `moveErrors`, we skip it
|
|
229
|
+
}
|
|
121
230
|
}
|
|
122
231
|
return undefined;
|
|
123
232
|
};
|
|
@@ -127,22 +236,33 @@ exports.AftermathApi = AftermathApi;
|
|
|
127
236
|
// =========================================================================
|
|
128
237
|
// Helpers
|
|
129
238
|
// =========================================================================
|
|
239
|
+
/**
|
|
240
|
+
* Static helper references for quick usage without instantiating the class.
|
|
241
|
+
*/
|
|
130
242
|
AftermathApi.helpers = {
|
|
131
243
|
// =========================================================================
|
|
132
244
|
// General
|
|
133
245
|
// =========================================================================
|
|
246
|
+
/** Helpers for accessing or iterating over dynamic fields in Sui objects. */
|
|
134
247
|
dynamicFields: dynamicFieldsApiHelpers_1.DynamicFieldsApiHelpers,
|
|
248
|
+
/** Helpers for working with Sui events and pagination. */
|
|
135
249
|
events: eventsApiHelpers_1.EventsApiHelpers,
|
|
250
|
+
/** Helpers for reading on-chain data in an "inspection" manner (designed for Summaries). */
|
|
136
251
|
inspections: inspectionsApiHelpers_1.InspectionsApiHelpers,
|
|
252
|
+
/** Helpers for retrieving and parsing Sui objects by ID or type. */
|
|
137
253
|
objects: objectsApiHelpers_1.ObjectsApiHelpers,
|
|
254
|
+
/** Helpers for reading transaction data (by digest, query, etc.). */
|
|
138
255
|
transactions: transactionsApiHelpers_1.TransactionsApiHelpers,
|
|
139
256
|
// =========================================================================
|
|
140
257
|
// Utils
|
|
141
258
|
// =========================================================================
|
|
259
|
+
/** Helper for wallet-based operations, separate from the main `Wallet` classes. */
|
|
142
260
|
wallet: walletApi_1.WalletApi,
|
|
143
261
|
// =========================================================================
|
|
144
262
|
// General Packages
|
|
145
263
|
// =========================================================================
|
|
264
|
+
/** Low-level direct coin operations, separate from the higher-level `Coin` class. */
|
|
146
265
|
coin: coinApi_1.CoinApi,
|
|
266
|
+
/** Low-level Sui chain data ops, separate from the higher-level `Sui` class. */
|
|
147
267
|
sui: suiApi_1.SuiApi,
|
|
148
268
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AnyObjectType, BigIntAsString, ModuleName, ObjectId, SuiAddress, TransactionDigest } from "./generalTypes";
|
|
2
2
|
export type BcsTypeName = string | [string, ...(BcsTypeName | string)[]];
|
|
3
|
-
export type SuiAddressWithout0x = string;
|
|
4
3
|
export interface EventOnChain<Fields> {
|
|
5
4
|
id: {
|
|
6
5
|
txDigest: TransactionDigest;
|
|
@@ -49,10 +48,4 @@ export interface SupplyOnChain {
|
|
|
49
48
|
value: BigIntAsString;
|
|
50
49
|
};
|
|
51
50
|
}
|
|
52
|
-
export interface TypeNameOnChain {
|
|
53
|
-
type: AnyObjectType;
|
|
54
|
-
fields: {
|
|
55
|
-
name: AnyObjectType;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
51
|
//# sourceMappingURL=castingTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"castingTypes.d.ts","sourceRoot":"","sources":["../../../src/general/types/castingTypes.ts"],"names":[],"mappings":"AACA,OAAO,EACN,aAAa,EACb,cAAc,EACd,UAAU,EACV,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,MAAM,gBAAgB,CAAC;AAMxB,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,WAAW,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"castingTypes.d.ts","sourceRoot":"","sources":["../../../src/general/types/castingTypes.ts"],"names":[],"mappings":"AACA,OAAO,EACN,aAAa,EACb,cAAc,EACd,UAAU,EACV,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,MAAM,gBAAgB,CAAC;AAMxB,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,WAAW,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;AAYzE,MAAM,WAAW,YAAY,CAAC,MAAM;IACnC,EAAE,EAAE;QACH,QAAQ,EAAE,iBAAiB,CAAC;QAC5B,QAAQ,EAAE,cAAc,CAAC;KACzB,CAAC;IACF,SAAS,EAAE,QAAQ,CAAC;IACpB,iBAAiB,EAAE,UAAU,CAAC;IAC9B,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED,MAAM,WAAW,mBAAmB,CAAC,MAAM;IAC1C,EAAE,EAAE;QACH,QAAQ,EAAE,iBAAiB,CAAC;QAC5B,QAAQ,EAAE,cAAc,CAAC;KACzB,CAAC;IACF,SAAS,EAAE,QAAQ,CAAC;IACpB,iBAAiB,EAAE,UAAU,CAAC;IAC9B,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;KACb,CAAC;IACF,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED,MAAM,MAAM,mBAAmB,CAAC,MAAM,IAAI;IACzC,IAAI,EAAE,aAAa,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,iBAAiB,CAAC;CAC7B,GAAG,MAAM,CAAC;AAEX,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE;QACP,EAAE,EAAE;YACH,EAAE,EAAE,QAAQ,CAAC;SACb,CAAC;QACF,IAAI,EAAE,cAAc,CAAC;KACrB,CAAC;CACF;AAED,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE;QACP,KAAK,EAAE,cAAc,CAAC;KACtB,CAAC;CACF"}
|
|
@@ -1,120 +1,341 @@
|
|
|
1
1
|
import { DynamicFieldInfo, EventId, SuiTransactionBlockResponse } from "@mysten/sui/client";
|
|
2
2
|
import { SuiNetwork } from "./suiTypes";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a token or currency balance in the system, defined as a bigint.
|
|
5
|
+
*/
|
|
3
6
|
export type Balance = bigint;
|
|
7
|
+
/**
|
|
8
|
+
* Represents a fixed-point integer using a bigint. May be used for calculations requiring
|
|
9
|
+
* precision (e.g., decimal-like math).
|
|
10
|
+
*/
|
|
4
11
|
export type IFixed = bigint;
|
|
12
|
+
/**
|
|
13
|
+
* Represents a gas budget for transactions. Typically a raw `number`.
|
|
14
|
+
*/
|
|
5
15
|
export type GasBudget = number;
|
|
16
|
+
/**
|
|
17
|
+
* Represents a timestamp in milliseconds or seconds. Typically a raw `number`.
|
|
18
|
+
*/
|
|
6
19
|
export type Timestamp = number;
|
|
20
|
+
/**
|
|
21
|
+
* A single byte, typically expressed as a `number` from 0 to 255.
|
|
22
|
+
*/
|
|
7
23
|
export type Byte = number;
|
|
24
|
+
/**
|
|
25
|
+
* Defines the allowable slippage in a trading scenario, expressed as an unscaled percentage (e.g., 0.01 = 1%).
|
|
26
|
+
*/
|
|
8
27
|
export type Slippage = number;
|
|
9
28
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* @remarks 0.54 = 54%
|
|
29
|
+
* Represents an unscaled percentage (e.g., 0.01 = 1%).
|
|
13
30
|
*/
|
|
14
31
|
export type Percentage = number;
|
|
32
|
+
/**
|
|
33
|
+
* Annual percentage rate (APR), expressed as a `number` (e.g., 0.01 = 1%).
|
|
34
|
+
*/
|
|
15
35
|
export type Apr = number;
|
|
36
|
+
/**
|
|
37
|
+
* Annual percentage yield (APY), expressed as a `number` (e.g., 0.01 = 1%).
|
|
38
|
+
*/
|
|
16
39
|
export type Apy = number;
|
|
40
|
+
/**
|
|
41
|
+
* Represents the version of an on-chain object, expressed as a `number`.
|
|
42
|
+
*/
|
|
17
43
|
export type ObjectVersion = number;
|
|
44
|
+
/**
|
|
45
|
+
* Represents an error code from a Move smart contract, typically a `number`.
|
|
46
|
+
*/
|
|
18
47
|
export type MoveErrorCode = number;
|
|
48
|
+
/**
|
|
49
|
+
* Represents a serialized transaction in a base64 or similar format.
|
|
50
|
+
*/
|
|
19
51
|
export type SerializedTransaction = string;
|
|
52
|
+
/**
|
|
53
|
+
* Represents raw transaction bytes in a base64 or similar format.
|
|
54
|
+
*/
|
|
20
55
|
export type TxBytes = string;
|
|
56
|
+
/**
|
|
57
|
+
* Represents a BigInt in string form, typically used for JSON serialization.
|
|
58
|
+
*/
|
|
21
59
|
export type BigIntAsString = string;
|
|
60
|
+
/**
|
|
61
|
+
* Represents a numeric value in string form, typically used for JSON serialization.
|
|
62
|
+
*/
|
|
22
63
|
export type NumberAsString = string;
|
|
64
|
+
/**
|
|
65
|
+
* Represents an IFixed value in string form, typically used for JSON serialization.
|
|
66
|
+
*/
|
|
23
67
|
export type IFixedAsString = string;
|
|
68
|
+
/**
|
|
69
|
+
* A key type used in certain contexts, typically a string (e.g., "ed25519", "secp256k1").
|
|
70
|
+
*/
|
|
24
71
|
export type KeyType = string;
|
|
72
|
+
/**
|
|
73
|
+
* Represents any string identifying an object type, such as "0x2::sui::SUI".
|
|
74
|
+
*/
|
|
25
75
|
export type AnyObjectType = string;
|
|
76
|
+
/**
|
|
77
|
+
* Represents the name of a Move module, e.g. "Router" or "Coin".
|
|
78
|
+
*/
|
|
26
79
|
export type ModuleName = string;
|
|
80
|
+
/**
|
|
81
|
+
* Represents the name of a Move function, e.g. "swap" or "mint".
|
|
82
|
+
*/
|
|
27
83
|
export type FunctionName = string;
|
|
84
|
+
/**
|
|
85
|
+
* Represents the ID of a published Move package on the Sui network, e.g. "0x<package_id>".
|
|
86
|
+
*/
|
|
28
87
|
export type PackageId = string;
|
|
88
|
+
/**
|
|
89
|
+
* Represents a color in a string format (e.g., "#FFFFFF" or "blue").
|
|
90
|
+
*/
|
|
29
91
|
export type Color = string;
|
|
92
|
+
/**
|
|
93
|
+
* Represents a URL in string format (e.g., "https://example.com").
|
|
94
|
+
*/
|
|
30
95
|
export type Url = string;
|
|
96
|
+
/**
|
|
97
|
+
* Represents a local resource URL (e.g., "file://path/to/resource").
|
|
98
|
+
*/
|
|
31
99
|
export type LocalUrl = string;
|
|
100
|
+
/**
|
|
101
|
+
* Represents a file path (e.g., "/usr/local/bin").
|
|
102
|
+
*/
|
|
32
103
|
export type FilePath = string;
|
|
104
|
+
/**
|
|
105
|
+
* Represents an on-chain object ID (e.g., "0x<32-byte_hex>").
|
|
106
|
+
*/
|
|
33
107
|
export type ObjectId = string;
|
|
108
|
+
/**
|
|
109
|
+
* Represents a Sui wallet address (e.g., "0x<address>").
|
|
110
|
+
*/
|
|
34
111
|
export type SuiAddress = string;
|
|
112
|
+
/**
|
|
113
|
+
* Represents a TransactionDigest from a Sui transaction, typically a hex-encoded string.
|
|
114
|
+
*/
|
|
35
115
|
export type TransactionDigest = string;
|
|
116
|
+
/**
|
|
117
|
+
* Represents a single byte in string form, usually hex-encoded (e.g., "0xFF").
|
|
118
|
+
*/
|
|
36
119
|
export type StringByte = string;
|
|
120
|
+
/**
|
|
121
|
+
* Represents an object's digest, typically a hex-encoded string.
|
|
122
|
+
*/
|
|
37
123
|
export type ObjectDigest = string;
|
|
124
|
+
/**
|
|
125
|
+
* Represents an IFixed type as an array of bytes.
|
|
126
|
+
*/
|
|
38
127
|
export type IFixedAsBytes = Byte[];
|
|
128
|
+
/**
|
|
129
|
+
* Represents an IFixed type in string form, each byte also in string form.
|
|
130
|
+
*/
|
|
39
131
|
export type IFixedAsStringBytes = string[];
|
|
132
|
+
/**
|
|
133
|
+
* Represents an ID as an array of bytes in string form.
|
|
134
|
+
*/
|
|
40
135
|
export type IdAsStringBytes = string[];
|
|
41
136
|
/**
|
|
42
|
-
*
|
|
137
|
+
* Holds information about third-party fees in transactions, including the recipient
|
|
138
|
+
* and the fee percentage to be collected.
|
|
43
139
|
*/
|
|
44
140
|
export interface ExternalFee {
|
|
45
141
|
/**
|
|
46
|
-
* Address of recipient for collected fees
|
|
142
|
+
* Address of the recipient for collected fees.
|
|
47
143
|
*/
|
|
48
144
|
recipient: SuiAddress;
|
|
49
145
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
146
|
+
* Percentage of the fee to be collected.
|
|
52
147
|
* @remarks 0.54 = 54%
|
|
53
148
|
*/
|
|
54
149
|
feePercentage: Percentage;
|
|
55
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* A function signature for signing arbitrary messages. Typically used in
|
|
153
|
+
* cryptographic contexts.
|
|
154
|
+
*/
|
|
56
155
|
export type SignMessageCallback = (args: {
|
|
57
156
|
message: Uint8Array;
|
|
58
157
|
}) => Promise<{
|
|
59
158
|
signature: string;
|
|
60
159
|
}>;
|
|
160
|
+
/**
|
|
161
|
+
* Generic shape for events with optional paging cursor data.
|
|
162
|
+
*/
|
|
61
163
|
export interface IndexerEventsWithCursor<EventType> {
|
|
164
|
+
/**
|
|
165
|
+
* An array of events of type `EventType`.
|
|
166
|
+
*/
|
|
62
167
|
events: EventType[];
|
|
168
|
+
/**
|
|
169
|
+
* The next cursor position. If undefined, no more events are available.
|
|
170
|
+
*/
|
|
63
171
|
nextCursor: number | undefined;
|
|
64
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* A generic shape for events with a Sui-based cursor structure.
|
|
175
|
+
*/
|
|
65
176
|
export interface EventsWithCursor<EventType> {
|
|
177
|
+
/**
|
|
178
|
+
* An array of events of type `EventType`.
|
|
179
|
+
*/
|
|
66
180
|
events: EventType[];
|
|
181
|
+
/**
|
|
182
|
+
* The next cursor position. If null, no more events are available.
|
|
183
|
+
*/
|
|
67
184
|
nextCursor: EventId | null;
|
|
68
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Represents a Sui event, typically including type, timestamp, and transaction digest.
|
|
188
|
+
*/
|
|
69
189
|
export interface Event {
|
|
190
|
+
/**
|
|
191
|
+
* A string identifying the Move event type.
|
|
192
|
+
*/
|
|
70
193
|
type: AnyObjectType;
|
|
194
|
+
/**
|
|
195
|
+
* Timestamp of the event, if available.
|
|
196
|
+
*/
|
|
71
197
|
timestamp: Timestamp | undefined;
|
|
198
|
+
/**
|
|
199
|
+
* The transaction digest associated with the event.
|
|
200
|
+
*/
|
|
72
201
|
txnDigest: TransactionDigest;
|
|
73
202
|
}
|
|
203
|
+
/**
|
|
204
|
+
* Common inputs for event retrieval, including an optional cursor and limit.
|
|
205
|
+
*/
|
|
74
206
|
export interface EventsInputs {
|
|
207
|
+
/**
|
|
208
|
+
* Cursor for pagination, often an EventId or numeric index.
|
|
209
|
+
*/
|
|
75
210
|
cursor?: EventId;
|
|
211
|
+
/**
|
|
212
|
+
* Limit for pagination, specifying the maximum number of events.
|
|
213
|
+
*/
|
|
76
214
|
limit?: number;
|
|
77
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* Inputs for retrieving user events, extending from general event inputs
|
|
218
|
+
* and including the user's wallet address.
|
|
219
|
+
*/
|
|
78
220
|
export type UserEventsInputs = EventsInputs & {
|
|
79
221
|
walletAddress: SuiAddress;
|
|
80
222
|
};
|
|
223
|
+
/**
|
|
224
|
+
* Represents a Sui object, including its ID and type.
|
|
225
|
+
*/
|
|
81
226
|
export interface Object {
|
|
227
|
+
/**
|
|
228
|
+
* The on-chain object ID.
|
|
229
|
+
*/
|
|
82
230
|
objectId: ObjectId;
|
|
231
|
+
/**
|
|
232
|
+
* The Move type of the object.
|
|
233
|
+
*/
|
|
83
234
|
objectType: AnyObjectType;
|
|
84
235
|
}
|
|
236
|
+
/**
|
|
237
|
+
* Holds the dynamic fields and an optional next cursor for pagination.
|
|
238
|
+
*/
|
|
85
239
|
export interface DynamicFieldsWithCursor {
|
|
240
|
+
/**
|
|
241
|
+
* An array of dynamic field information objects.
|
|
242
|
+
*/
|
|
86
243
|
dynamicFields: DynamicFieldInfo[];
|
|
244
|
+
/**
|
|
245
|
+
* The next cursor for pagination. If null, no more fields are available.
|
|
246
|
+
*/
|
|
87
247
|
nextCursor: ObjectId | null;
|
|
88
248
|
}
|
|
249
|
+
/**
|
|
250
|
+
* Holds the dynamic field objects and an optional next cursor for pagination.
|
|
251
|
+
*/
|
|
89
252
|
export interface DynamicFieldObjectsWithCursor<ObjectType> {
|
|
253
|
+
/**
|
|
254
|
+
* An array of objects derived from dynamic fields.
|
|
255
|
+
*/
|
|
90
256
|
dynamicFieldObjects: ObjectType[];
|
|
257
|
+
/**
|
|
258
|
+
* The next cursor for pagination. If null, no more fields are available.
|
|
259
|
+
*/
|
|
91
260
|
nextCursor: ObjectId | null;
|
|
92
261
|
}
|
|
262
|
+
/**
|
|
263
|
+
* Inputs for fetching dynamic fields, including optional cursor and limit for pagination.
|
|
264
|
+
*/
|
|
93
265
|
export interface DynamicFieldsInputs {
|
|
94
266
|
cursor?: ObjectId;
|
|
95
267
|
limit?: number;
|
|
96
268
|
}
|
|
269
|
+
/**
|
|
270
|
+
* A collection of transactions with a cursor for pagination.
|
|
271
|
+
*/
|
|
97
272
|
export interface TransactionsWithCursor {
|
|
273
|
+
/**
|
|
274
|
+
* An array of Sui transactions.
|
|
275
|
+
*/
|
|
98
276
|
transactions: SuiTransactionBlockResponse[];
|
|
277
|
+
/**
|
|
278
|
+
* The next cursor for pagination. If null, no more transactions are available.
|
|
279
|
+
*/
|
|
99
280
|
nextCursor: TransactionDigest | null;
|
|
100
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* Generic shape for API data requests that include pagination parameters.
|
|
284
|
+
*/
|
|
101
285
|
export interface ApiDataWithCursorBody<CursorType> {
|
|
286
|
+
/**
|
|
287
|
+
* Cursor for pagination.
|
|
288
|
+
*/
|
|
102
289
|
cursor?: CursorType;
|
|
290
|
+
/**
|
|
291
|
+
* Limit for pagination.
|
|
292
|
+
*/
|
|
103
293
|
limit?: number;
|
|
104
294
|
}
|
|
295
|
+
/**
|
|
296
|
+
* Specifies the shape for API calls involving events.
|
|
297
|
+
*/
|
|
105
298
|
export type ApiEventsBody = ApiDataWithCursorBody<EventId>;
|
|
299
|
+
/**
|
|
300
|
+
* Specifies the shape for API calls involving dynamic fields.
|
|
301
|
+
*/
|
|
106
302
|
export type ApiDynamicFieldsBody = ApiDataWithCursorBody<ObjectId>;
|
|
303
|
+
/**
|
|
304
|
+
* Specifies the shape for API calls involving transactions.
|
|
305
|
+
*/
|
|
107
306
|
export type ApiTransactionsBody = ApiDataWithCursorBody<TransactionDigest>;
|
|
307
|
+
/**
|
|
308
|
+
* Body payload for indexer-based event queries, using a numeric cursor.
|
|
309
|
+
*/
|
|
108
310
|
export type ApiIndexerEventsBody = ApiDataWithCursorBody<number>;
|
|
311
|
+
/**
|
|
312
|
+
* Body payload for indexer-based user events, extending from `ApiIndexerEventsBody`.
|
|
313
|
+
*/
|
|
109
314
|
export type ApiIndexerUserEventsBody = ApiIndexerEventsBody & {
|
|
315
|
+
/**
|
|
316
|
+
* The wallet address of the user.
|
|
317
|
+
*/
|
|
110
318
|
walletAddress: SuiAddress;
|
|
111
319
|
};
|
|
320
|
+
/**
|
|
321
|
+
* Represents query parameters for retrieving data with skip/limit pagination in an indexer.
|
|
322
|
+
*/
|
|
112
323
|
export interface IndexerDataWithCursorQueryParams {
|
|
113
324
|
skip: number;
|
|
114
325
|
limit: number;
|
|
115
326
|
}
|
|
327
|
+
/**
|
|
328
|
+
* Configuration for constructing a `Caller`. Includes network specification
|
|
329
|
+
* and optional access token for authentication.
|
|
330
|
+
*/
|
|
116
331
|
export interface CallerConfig {
|
|
332
|
+
/**
|
|
333
|
+
* The target Sui network (e.g., "MAINNET", "TESTNET").
|
|
334
|
+
*/
|
|
117
335
|
network?: SuiNetwork;
|
|
336
|
+
/**
|
|
337
|
+
* Access token used for authenticated requests, if required.
|
|
338
|
+
*/
|
|
118
339
|
accessToken?: string;
|
|
119
340
|
}
|
|
120
341
|
//# sourceMappingURL=generalTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generalTypes.d.ts","sourceRoot":"","sources":["../../../src/general/types/generalTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,gBAAgB,EAChB,OAAO,EACP,2BAA2B,EAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY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AM,WAAW,sBAAsB;IACtC;;OAEG;IACH,YAAY,EAAE,2BAA2B,EAAE,CAAC;IAC5C;;OAEG;IACH,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB,CAAC,UAAU;IAChD;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,qBAAqB,CAAC,OAAO,CAAC,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,qBAAqB,CAAC,iBAAiB,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,GAAG;IAC7D;;OAEG;IACH,aAAa,EAAE,UAAU,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import { Balance, ObjectId } from "./generalTypes";
|
|
2
1
|
export type SuiNetwork = "DEVNET" | "TESTNET" | "LOCAL" | "MAINNET" | (string & {});
|
|
3
|
-
export interface ObjectTable<K, V> {
|
|
4
|
-
objectId: ObjectId;
|
|
5
|
-
size: number;
|
|
6
|
-
}
|
|
7
|
-
export interface Table<K, V> {
|
|
8
|
-
objectId: ObjectId;
|
|
9
|
-
size: number;
|
|
10
|
-
}
|
|
11
|
-
export interface SuiBalance {
|
|
12
|
-
objectId: ObjectId;
|
|
13
|
-
value: Balance;
|
|
14
|
-
}
|
|
15
|
-
export interface EpochTimeLock {
|
|
16
|
-
epoch: EpochTimeStamp;
|
|
17
|
-
}
|
|
18
2
|
//# sourceMappingURL=suiTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suiTypes.d.ts","sourceRoot":"","sources":["../../../src/general/types/suiTypes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"suiTypes.d.ts","sourceRoot":"","sources":["../../../src/general/types/suiTypes.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GACnB,QAAQ,GACR,SAAS,GACT,OAAO,GACP,SAAS,GACT,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC"}
|