aftermath-ts-sdk 1.2.63 → 1.2.64-docs.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/README.md +61 -27
- 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/api/coinApi.d.ts.map +1 -1
- package/dist/packages/coin/api/coinApi.js +28 -20
- 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 +273 -8
- 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
package/README.md
CHANGED
|
@@ -1,57 +1,91 @@
|
|
|
1
|
-
# Aftermath
|
|
1
|
+
# Aftermath SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The Aftermath SDK provides easy access to Aftermath Finance's protocols on the Sui blockchain. Please note that not all of our protocols are on Testnet, but all of them are Mainnet.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
4
6
|
|
|
5
7
|
```bash
|
|
6
8
|
npm i aftermath-ts-sdk
|
|
7
9
|
```
|
|
8
10
|
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
Create an instance of `Aftermath` for ease of use to make calls to our server, or create an instance of `AftermathApi` for finer control of transaction construction.
|
|
12
|
-
|
|
13
|
-
## Aftermath SDK
|
|
11
|
+
## Quick Start (Aftermath SDK)
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
For most integrations, use the Aftermath SDK for simplified access:
|
|
16
14
|
|
|
17
|
-
```
|
|
18
|
-
const afSdk = new Aftermath("MAINNET"); // "MAINNET" | "TESTNET"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
### 2. Create protocol provider
|
|
15
|
+
```typescript
|
|
16
|
+
const afSdk = new Aftermath("MAINNET"); // "MAINNET" | "TESTNET"
|
|
17
|
+
await afSdk.init(); // initialize provider
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
// Access protocols
|
|
24
20
|
const router = afSdk.Router();
|
|
25
21
|
const pools = afSdk.Pools();
|
|
26
22
|
const staking = afSdk.Staking();
|
|
27
23
|
const farms = afSdk.Farms();
|
|
24
|
+
const dca = afSdk.Dca();
|
|
28
25
|
```
|
|
29
26
|
|
|
30
|
-
##
|
|
27
|
+
## Advanced Usage (AftermathApi)
|
|
31
28
|
|
|
32
|
-
|
|
29
|
+
For complex transaction construction, use AftermathApi for direct control:
|
|
33
30
|
|
|
34
|
-
```
|
|
35
|
-
const
|
|
36
|
-
const addresses =
|
|
31
|
+
```typescript
|
|
32
|
+
const afSdk = new Aftermath("MAINNET");
|
|
33
|
+
const addresses = afSdk.getAddresses();
|
|
37
34
|
|
|
38
35
|
const afApi = new AftermathApi(
|
|
39
36
|
new SuiClient({
|
|
40
37
|
transport: new SuiHTTPTransport({
|
|
41
|
-
url:
|
|
38
|
+
url: "https://fullnode.mainnet.sui.io",
|
|
42
39
|
}),
|
|
43
40
|
}),
|
|
44
|
-
addresses
|
|
45
|
-
new IndexerCaller("MAINNET"), // "MAINNET" | "TESTNET" | "DEVNET"
|
|
41
|
+
addresses // Configuration addresses
|
|
46
42
|
);
|
|
47
|
-
```
|
|
48
43
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
```ts
|
|
44
|
+
// Access protocol APIs
|
|
52
45
|
const poolsApi = afApi.Pools();
|
|
53
46
|
const stakingApi = afApi.Staking();
|
|
54
47
|
const farmsApi = afApi.Farms();
|
|
55
48
|
```
|
|
56
49
|
|
|
57
|
-
|
|
50
|
+
## Available Protocols
|
|
51
|
+
|
|
52
|
+
### Pools (AMM)
|
|
53
|
+
|
|
54
|
+
- Automated Market Maker pools for trading
|
|
55
|
+
- Support for stable and uncorrelated assets
|
|
56
|
+
- Up to 8 assets per pool
|
|
57
|
+
- [View Pools Documentation](https://docs.aftermath.finance/developers/aftermath-ts-sdk/products/pools)
|
|
58
|
+
|
|
59
|
+
### Router
|
|
60
|
+
|
|
61
|
+
- Smart order routing across multiple pools
|
|
62
|
+
- Optimal trade execution via split routes
|
|
63
|
+
- [View Router Documentation](https://docs.aftermath.finance/developers/aftermath-ts-sdk/products/router)
|
|
64
|
+
|
|
65
|
+
### Staking
|
|
66
|
+
|
|
67
|
+
- Liquid staking for SUI tokens
|
|
68
|
+
- Earn yield with afSUI
|
|
69
|
+
- [View Staking Documentation](https://docs.aftermath.finance/developers/aftermath-ts-sdk/products/liquid-staking)
|
|
70
|
+
|
|
71
|
+
### Farms
|
|
72
|
+
|
|
73
|
+
- Yield farming opportunities
|
|
74
|
+
- Stake LP tokens and earn rewards
|
|
75
|
+
- [View Farms Documentation](https://docs.aftermath.finance/developers/aftermath-ts-sdk/products/farms)
|
|
76
|
+
|
|
77
|
+
### DCA (Dollar-Cost Averaging)
|
|
78
|
+
|
|
79
|
+
- Automated periodic investments
|
|
80
|
+
- Reduce impact of market volatility
|
|
81
|
+
- [View DCA Documentation](https://docs.aftermath.finance/developers/aftermath-ts-sdk/products/DCA)
|
|
82
|
+
|
|
83
|
+
## Rate Limits
|
|
84
|
+
|
|
85
|
+
Default rate limit: 1000 requests per 10 seconds
|
|
86
|
+
|
|
87
|
+
For higher limits, contact us via:
|
|
88
|
+
|
|
89
|
+
- [Telegram](https://t.me/aftermath_fi)
|
|
90
|
+
- [Discord](https://discord.gg/VFqMUqKHF3)
|
|
91
|
+
- [X/Twitter](https://x.com/AftermathFi)
|
|
@@ -3,8 +3,42 @@ import { CoinType } from "../../packages/coin/coinTypes";
|
|
|
3
3
|
import { Caller } from "../utils/caller";
|
|
4
4
|
import { Transaction } from "@mysten/sui/transactions";
|
|
5
5
|
import { ApiDynamicGasResponse } from "./dynamicGasTypes";
|
|
6
|
+
/**
|
|
7
|
+
* The `DynamicGas` class provides functionality for dynamically determining
|
|
8
|
+
* or attaching a suitable gas payment object to a transaction. This allows
|
|
9
|
+
* for more flexible transaction building when exact gas objects are not
|
|
10
|
+
* predetermined.
|
|
11
|
+
*/
|
|
6
12
|
export declare class DynamicGas extends Caller {
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new `DynamicGas` instance for interacting with dynamic gas endpoints.
|
|
15
|
+
*
|
|
16
|
+
* @param config - Optional caller config, including the Sui network and an access token.
|
|
17
|
+
*/
|
|
7
18
|
constructor(config?: CallerConfig);
|
|
19
|
+
/**
|
|
20
|
+
* Requests the dynamic gas service to set up a transaction with an appropriate gas coin,
|
|
21
|
+
* or sponsor signature if needed, based on the user's wallet and coin type preference.
|
|
22
|
+
*
|
|
23
|
+
* @param inputs - An object containing the `Transaction` to be adjusted, the `walletAddress`, and `gasCoinType`.
|
|
24
|
+
* @returns A promise that resolves to an `ApiDynamicGasResponse`, which includes the new transaction bytes
|
|
25
|
+
* (`txBytes`) and possibly a `sponsoredSignature`.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* const afSdk = new Aftermath("MAINNET");
|
|
30
|
+
* await afSdk.init(); // initialize provider
|
|
31
|
+
*
|
|
32
|
+
* const dynamicGas = afSdk.DynamicGas();
|
|
33
|
+
*
|
|
34
|
+
* const updatedTx = await dynamicGas.getUseDynamicGasForTx({
|
|
35
|
+
* tx: transactionBlock,
|
|
36
|
+
* walletAddress: "0x<user_address>",
|
|
37
|
+
* gasCoinType: "0x2::sui::SUI"
|
|
38
|
+
* });
|
|
39
|
+
* // updatedTx.txBytes and updatedTx.sponsoredSignature can now be used for signing/execution
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
8
42
|
getUseDynamicGasForTx(inputs: {
|
|
9
43
|
tx: Transaction;
|
|
10
44
|
walletAddress: SuiAddress;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamicGas.d.ts","sourceRoot":"","sources":["../../../src/general/dynamicGas/dynamicGas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAO,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAqB,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,qBAAa,UAAW,SAAQ,MAAM;
|
|
1
|
+
{"version":3,"file":"dynamicGas.d.ts","sourceRoot":"","sources":["../../../src/general/dynamicGas/dynamicGas.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAO,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAqB,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE7E;;;;;GAKG;AACH,qBAAa,UAAW,SAAQ,MAAM;IAKrC;;;;OAIG;gBACS,MAAM,CAAC,EAAE,YAAY;IAQjC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACU,qBAAqB,CAAC,MAAM,EAAE;QAC1C,EAAE,EAAE,WAAW,CAAC;QAChB,aAAa,EAAE,UAAU,CAAC;QAC1B,WAAW,EAAE,QAAQ,CAAC;KACtB;CAQD"}
|
|
@@ -11,16 +11,50 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.DynamicGas = void 0;
|
|
13
13
|
const caller_1 = require("../utils/caller");
|
|
14
|
+
/**
|
|
15
|
+
* The `DynamicGas` class provides functionality for dynamically determining
|
|
16
|
+
* or attaching a suitable gas payment object to a transaction. This allows
|
|
17
|
+
* for more flexible transaction building when exact gas objects are not
|
|
18
|
+
* predetermined.
|
|
19
|
+
*/
|
|
14
20
|
class DynamicGas extends caller_1.Caller {
|
|
15
21
|
// =========================================================================
|
|
16
22
|
// Constructor
|
|
17
23
|
// =========================================================================
|
|
24
|
+
/**
|
|
25
|
+
* Creates a new `DynamicGas` instance for interacting with dynamic gas endpoints.
|
|
26
|
+
*
|
|
27
|
+
* @param config - Optional caller config, including the Sui network and an access token.
|
|
28
|
+
*/
|
|
18
29
|
constructor(config) {
|
|
19
30
|
super(config, "dynamic-gas");
|
|
20
31
|
}
|
|
21
32
|
// =========================================================================
|
|
22
33
|
// Tx Setup
|
|
23
34
|
// =========================================================================
|
|
35
|
+
/**
|
|
36
|
+
* Requests the dynamic gas service to set up a transaction with an appropriate gas coin,
|
|
37
|
+
* or sponsor signature if needed, based on the user's wallet and coin type preference.
|
|
38
|
+
*
|
|
39
|
+
* @param inputs - An object containing the `Transaction` to be adjusted, the `walletAddress`, and `gasCoinType`.
|
|
40
|
+
* @returns A promise that resolves to an `ApiDynamicGasResponse`, which includes the new transaction bytes
|
|
41
|
+
* (`txBytes`) and possibly a `sponsoredSignature`.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* const afSdk = new Aftermath("MAINNET");
|
|
46
|
+
* await afSdk.init(); // initialize provider
|
|
47
|
+
*
|
|
48
|
+
* const dynamicGas = afSdk.DynamicGas();
|
|
49
|
+
*
|
|
50
|
+
* const updatedTx = await dynamicGas.getUseDynamicGasForTx({
|
|
51
|
+
* tx: transactionBlock,
|
|
52
|
+
* walletAddress: "0x<user_address>",
|
|
53
|
+
* gasCoinType: "0x2::sui::SUI"
|
|
54
|
+
* });
|
|
55
|
+
* // updatedTx.txBytes and updatedTx.sponsoredSignature can now be used for signing/execution
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
24
58
|
getUseDynamicGasForTx(inputs) {
|
|
25
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
60
|
const { tx, walletAddress, gasCoinType } = inputs;
|
|
@@ -1,12 +1,37 @@
|
|
|
1
1
|
import { CoinType } from "../../types";
|
|
2
2
|
import { SerializedTransaction, SuiAddress } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Represents the body payload sent to the dynamic gas service,
|
|
5
|
+
* which includes the serialized transaction and any user-provided
|
|
6
|
+
* gas configuration (e.g., coin type).
|
|
7
|
+
*/
|
|
3
8
|
export interface ApiDynamicGasBody {
|
|
9
|
+
/**
|
|
10
|
+
* The serialized transaction block in base64 or similar format.
|
|
11
|
+
*/
|
|
4
12
|
serializedTx: SerializedTransaction;
|
|
13
|
+
/**
|
|
14
|
+
* The address of the user for whom the dynamic gas is being set.
|
|
15
|
+
*/
|
|
5
16
|
walletAddress: SuiAddress;
|
|
17
|
+
/**
|
|
18
|
+
* The coin type to be used for gas payment (e.g., "0x2::sui::SUI").
|
|
19
|
+
*/
|
|
6
20
|
gasCoinType: CoinType;
|
|
7
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Represents the response from the dynamic gas service, typically returning
|
|
24
|
+
* updated transaction bytes and possibly a sponsored signature if the
|
|
25
|
+
* transaction gas is being partially or fully sponsored.
|
|
26
|
+
*/
|
|
8
27
|
export interface ApiDynamicGasResponse {
|
|
28
|
+
/**
|
|
29
|
+
* The modified transaction bytes that incorporate a gas coin or sponsor information.
|
|
30
|
+
*/
|
|
9
31
|
txBytes: SerializedTransaction;
|
|
32
|
+
/**
|
|
33
|
+
* A signature used to sponsor or verify the updated transaction, if applicable.
|
|
34
|
+
*/
|
|
10
35
|
sponsoredSignature: string;
|
|
11
36
|
}
|
|
12
37
|
//# sourceMappingURL=dynamicGasTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamicGasTypes.d.ts","sourceRoot":"","sources":["../../../src/general/dynamicGas/dynamicGasTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"dynamicGasTypes.d.ts","sourceRoot":"","sources":["../../../src/general/dynamicGas/dynamicGasTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE7D;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,YAAY,EAAE,qBAAqB,CAAC;IACpC;;OAEG;IACH,aAAa,EAAE,UAAU,CAAC;IAC1B;;OAEG;IACH,WAAW,EAAE,QAAQ,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,OAAO,EAAE,qBAAqB,CAAC;IAC/B;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -1,17 +1,90 @@
|
|
|
1
1
|
import { CoinPriceInfo, CoinType, CoinsToPrice, CoinsToPriceInfo } from "../../packages/coin/coinTypes";
|
|
2
2
|
import { Caller } from "../utils/caller";
|
|
3
3
|
import { CallerConfig } from "../types";
|
|
4
|
+
/**
|
|
5
|
+
* The `Prices` class provides methods for fetching price information for various
|
|
6
|
+
* coins on the Sui network, including single-coin or multi-coin queries.
|
|
7
|
+
*/
|
|
4
8
|
export declare class Prices extends Caller {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new `Prices` instance for retrieving coin price data from
|
|
11
|
+
* Aftermath's backend or other data sources.
|
|
12
|
+
*
|
|
13
|
+
* @param config - Optional configuration, including network and access token.
|
|
14
|
+
*/
|
|
5
15
|
constructor(config?: CallerConfig);
|
|
16
|
+
/**
|
|
17
|
+
* Retrieves detailed price information (including current price and 24h change)
|
|
18
|
+
* for a single coin.
|
|
19
|
+
*
|
|
20
|
+
* @param inputs - Contains the `coin` type (e.g., "0x2::sui::SUI").
|
|
21
|
+
* @returns A promise resolving to a `CoinPriceInfo` object.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
*
|
|
26
|
+
* const afSdk = new Aftermath("MAINNET");
|
|
27
|
+
* await afSdk.init(); // initialize provider
|
|
28
|
+
*
|
|
29
|
+
* const prices = afSdk.Prices();
|
|
30
|
+
*
|
|
31
|
+
* const suiPriceInfo = await prices.getCoinPriceInfo({
|
|
32
|
+
* coin: "0x2::sui::SUI"
|
|
33
|
+
* });
|
|
34
|
+
* console.log(suiPriceInfo.price, suiPriceInfo.priceChange24HoursPercentage);
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
6
37
|
getCoinPriceInfo(inputs: {
|
|
7
38
|
coin: CoinType;
|
|
8
39
|
}): Promise<CoinPriceInfo>;
|
|
40
|
+
/**
|
|
41
|
+
* Retrieves detailed price information for multiple coins simultaneously,
|
|
42
|
+
* returning a record keyed by `CoinType`.
|
|
43
|
+
*
|
|
44
|
+
* @param inputs - An object containing an array of `coins`.
|
|
45
|
+
* @returns A promise resolving to a `CoinsToPriceInfo` mapping each coin type to its price info.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```typescript
|
|
49
|
+
* const prices = new Prices();
|
|
50
|
+
* const info = await prices.getCoinsToPriceInfo({
|
|
51
|
+
* coins: ["0x2::sui::SUI", "0x<some_other_coin>"]
|
|
52
|
+
* });
|
|
53
|
+
* console.log(info);
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
9
56
|
getCoinsToPriceInfo(inputs: {
|
|
10
57
|
coins: CoinType[];
|
|
11
58
|
}): Promise<CoinsToPriceInfo>;
|
|
59
|
+
/**
|
|
60
|
+
* Fetches only the current price in USD for a single coin.
|
|
61
|
+
*
|
|
62
|
+
* @param inputs - Contains the `coin` type.
|
|
63
|
+
* @returns A promise resolving to a `number` representing the price in USD.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```typescript
|
|
67
|
+
* const prices = new Prices();
|
|
68
|
+
* const suiPrice = await prices.getCoinPrice({ coin: "0x2::sui::SUI" });
|
|
69
|
+
* console.log("SUI price in USD:", suiPrice);
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
12
72
|
getCoinPrice(inputs: {
|
|
13
73
|
coin: CoinType;
|
|
14
74
|
}): Promise<number>;
|
|
75
|
+
/**
|
|
76
|
+
* Fetches current prices in USD for multiple coins, returning a record keyed by `CoinType`.
|
|
77
|
+
*
|
|
78
|
+
* @param inputs - Contains an array of `coins`.
|
|
79
|
+
* @returns A promise resolving to a `CoinsToPrice` object mapping coin types to their prices in USD.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```typescript
|
|
83
|
+
* const prices = new Prices();
|
|
84
|
+
* const multiPrices = await prices.getCoinsToPrice({ coins: ["0x2::sui::SUI", "0x<other>"] });
|
|
85
|
+
* console.log(multiPrices["0x2::sui::SUI"]); // e.g. 1.23
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
15
88
|
getCoinsToPrice(inputs: {
|
|
16
89
|
coins: CoinType[];
|
|
17
90
|
}): Promise<CoinsToPrice>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prices.d.ts","sourceRoot":"","sources":["../../../src/general/prices/prices.ts"],"names":[],"mappings":"AACA,OAAO,EACN,aAAa,EAGb,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAO,MAAM,UAAU,CAAC;AAE7C,qBAAa,MAAO,SAAQ,MAAM;
|
|
1
|
+
{"version":3,"file":"prices.d.ts","sourceRoot":"","sources":["../../../src/general/prices/prices.ts"],"names":[],"mappings":"AACA,OAAO,EACN,aAAa,EAGb,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAO,MAAM,UAAU,CAAC;AAE7C;;;GAGG;AACH,qBAAa,MAAO,SAAQ,MAAM;IAKjC;;;;;OAKG;gBACS,MAAM,CAAC,EAAE,YAAY;IAQjC;;;;;;;;;;;;;;;;;;;;OAoBG;IACU,gBAAgB,CAAC,MAAM,EAAE;QACrC,IAAI,EAAE,QAAQ,CAAC;KACf,GAAG,OAAO,CAAC,aAAa,CAAC;IAO1B;;;;;;;;;;;;;;;OAeG;IACU,mBAAmB,CAAC,MAAM,EAAE;QACxC,KAAK,EAAE,QAAQ,EAAE,CAAC;KAClB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAI7B;;;;;;;;;;;;OAYG;IACU,YAAY,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAKtE;;;;;;;;;;;;OAYG;IACU,eAAe,CAAC,MAAM,EAAE;QACpC,KAAK,EAAE,QAAQ,EAAE,CAAC;KAClB,GAAG,OAAO,CAAC,YAAY,CAAC;CAazB"}
|
|
@@ -11,16 +11,47 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Prices = void 0;
|
|
13
13
|
const caller_1 = require("../utils/caller");
|
|
14
|
+
/**
|
|
15
|
+
* The `Prices` class provides methods for fetching price information for various
|
|
16
|
+
* coins on the Sui network, including single-coin or multi-coin queries.
|
|
17
|
+
*/
|
|
14
18
|
class Prices extends caller_1.Caller {
|
|
15
19
|
// =========================================================================
|
|
16
20
|
// Constructor
|
|
17
21
|
// =========================================================================
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new `Prices` instance for retrieving coin price data from
|
|
24
|
+
* Aftermath's backend or other data sources.
|
|
25
|
+
*
|
|
26
|
+
* @param config - Optional configuration, including network and access token.
|
|
27
|
+
*/
|
|
18
28
|
constructor(config) {
|
|
19
29
|
super(config, "price-info");
|
|
20
30
|
}
|
|
21
31
|
// =========================================================================
|
|
22
32
|
// Prices
|
|
23
33
|
// =========================================================================
|
|
34
|
+
/**
|
|
35
|
+
* Retrieves detailed price information (including current price and 24h change)
|
|
36
|
+
* for a single coin.
|
|
37
|
+
*
|
|
38
|
+
* @param inputs - Contains the `coin` type (e.g., "0x2::sui::SUI").
|
|
39
|
+
* @returns A promise resolving to a `CoinPriceInfo` object.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
*
|
|
44
|
+
* const afSdk = new Aftermath("MAINNET");
|
|
45
|
+
* await afSdk.init(); // initialize provider
|
|
46
|
+
*
|
|
47
|
+
* const prices = afSdk.Prices();
|
|
48
|
+
*
|
|
49
|
+
* const suiPriceInfo = await prices.getCoinPriceInfo({
|
|
50
|
+
* coin: "0x2::sui::SUI"
|
|
51
|
+
* });
|
|
52
|
+
* console.log(suiPriceInfo.price, suiPriceInfo.priceChange24HoursPercentage);
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
24
55
|
getCoinPriceInfo(inputs) {
|
|
25
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
57
|
const coinsToPriceInfo = yield this.getCoinsToPriceInfo({
|
|
@@ -29,17 +60,59 @@ class Prices extends caller_1.Caller {
|
|
|
29
60
|
return Object.values(coinsToPriceInfo)[0];
|
|
30
61
|
});
|
|
31
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Retrieves detailed price information for multiple coins simultaneously,
|
|
65
|
+
* returning a record keyed by `CoinType`.
|
|
66
|
+
*
|
|
67
|
+
* @param inputs - An object containing an array of `coins`.
|
|
68
|
+
* @returns A promise resolving to a `CoinsToPriceInfo` mapping each coin type to its price info.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```typescript
|
|
72
|
+
* const prices = new Prices();
|
|
73
|
+
* const info = await prices.getCoinsToPriceInfo({
|
|
74
|
+
* coins: ["0x2::sui::SUI", "0x<some_other_coin>"]
|
|
75
|
+
* });
|
|
76
|
+
* console.log(info);
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
32
79
|
getCoinsToPriceInfo(inputs) {
|
|
33
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
81
|
return this.fetchApi("", inputs);
|
|
35
82
|
});
|
|
36
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Fetches only the current price in USD for a single coin.
|
|
86
|
+
*
|
|
87
|
+
* @param inputs - Contains the `coin` type.
|
|
88
|
+
* @returns A promise resolving to a `number` representing the price in USD.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```typescript
|
|
92
|
+
* const prices = new Prices();
|
|
93
|
+
* const suiPrice = await prices.getCoinPrice({ coin: "0x2::sui::SUI" });
|
|
94
|
+
* console.log("SUI price in USD:", suiPrice);
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
37
97
|
getCoinPrice(inputs) {
|
|
38
98
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
99
|
const priceInfo = yield this.getCoinPriceInfo(inputs);
|
|
40
100
|
return priceInfo.price;
|
|
41
101
|
});
|
|
42
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Fetches current prices in USD for multiple coins, returning a record keyed by `CoinType`.
|
|
105
|
+
*
|
|
106
|
+
* @param inputs - Contains an array of `coins`.
|
|
107
|
+
* @returns A promise resolving to a `CoinsToPrice` object mapping coin types to their prices in USD.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```typescript
|
|
111
|
+
* const prices = new Prices();
|
|
112
|
+
* const multiPrices = await prices.getCoinsToPrice({ coins: ["0x2::sui::SUI", "0x<other>"] });
|
|
113
|
+
* console.log(multiPrices["0x2::sui::SUI"]); // e.g. 1.23
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
43
116
|
getCoinsToPrice(inputs) {
|
|
44
117
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
118
|
const coinsToPriceInfo = yield this.getCoinsToPriceInfo(inputs);
|
|
@@ -10,7 +10,6 @@ import { Casting } from "../utils/casting";
|
|
|
10
10
|
import { Caller } from "../utils/caller";
|
|
11
11
|
import { Prices } from "../prices/prices";
|
|
12
12
|
import { Auth, LeveragedStaking, NftAmm, ReferralVault, Router, Sui } from "../../packages";
|
|
13
|
-
import { HistoricalData } from "../historicalData/historicalData";
|
|
14
13
|
import { Perpetuals } from "../../packages/perpetuals";
|
|
15
14
|
import { Oracle } from "../../packages/oracle/oracle";
|
|
16
15
|
import { Farms } from "../../packages/farms/farms";
|
|
@@ -21,10 +20,13 @@ import { Multisig } from "../../packages/multisig/multisig";
|
|
|
21
20
|
import { LimitOrders } from "../../packages/limitOrders/limitOrders";
|
|
22
21
|
import { UserData } from "../../packages/userData/userData";
|
|
23
22
|
/**
|
|
24
|
-
*
|
|
23
|
+
* The `Aftermath` class serves as the primary entry point for interacting with
|
|
24
|
+
* the Aftermath Finance protocols and utilities on the Sui blockchain.
|
|
25
|
+
* It provides various sub-providers (e.g. `Router`, `Staking`, `Farms`)
|
|
26
|
+
* initialized under the specified network environment (MAINNET, TESTNET, etc).
|
|
25
27
|
*
|
|
26
28
|
* @example
|
|
27
|
-
* ```
|
|
29
|
+
* ```typescript
|
|
28
30
|
* // Create provider
|
|
29
31
|
* const aftermath = new Aftermath("MAINNET");
|
|
30
32
|
* // Create package provider
|
|
@@ -40,74 +42,153 @@ export declare class Aftermath extends Caller {
|
|
|
40
42
|
private readonly network?;
|
|
41
43
|
private Provider?;
|
|
42
44
|
/**
|
|
43
|
-
* Creates `Aftermath` provider to call
|
|
45
|
+
* Creates an `Aftermath` provider instance to call the Aftermath Finance APIs
|
|
46
|
+
* and interact with Sui-based protocols.
|
|
44
47
|
*
|
|
45
|
-
* @param network - The Sui network
|
|
46
|
-
* @
|
|
48
|
+
* @param network - The target Sui network ("MAINNET", "TESTNET", "DEVNET", or "LOCAL").
|
|
49
|
+
* @param Provider - Optionally pass a custom `AftermathApi` instance if you already have one.
|
|
47
50
|
*/
|
|
48
51
|
constructor(network?: SuiNetwork | undefined, Provider?: AftermathApi | undefined);
|
|
52
|
+
/**
|
|
53
|
+
* Initializes the Aftermath provider by fetching addresses from the backend
|
|
54
|
+
* and configuring the Sui fullnode client. This method must be called before
|
|
55
|
+
* performing many API operations.
|
|
56
|
+
*
|
|
57
|
+
* @param inputs - Optional object allowing you to override the default `fullnodeUrl`.
|
|
58
|
+
* @example
|
|
59
|
+
* ```typescript
|
|
60
|
+
* const afSdk = new Aftermath("MAINNET");
|
|
61
|
+
* await afSdk.init(); // sets up internal providers
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
49
64
|
init(inputs?: {
|
|
50
65
|
fullnodeUrl: Url;
|
|
51
66
|
}): Promise<void>;
|
|
52
67
|
/**
|
|
53
|
-
* Retrieves the addresses
|
|
54
|
-
*
|
|
68
|
+
* Retrieves the Aftermath-specific on-chain addresses (object IDs, packages, etc.).
|
|
69
|
+
*
|
|
70
|
+
* @returns A `ConfigAddresses` object containing relevant addresses for the protocol.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```typescript
|
|
74
|
+
* const addresses = await aftermath.getAddresses();
|
|
75
|
+
* console.log(addresses); // { routerPackageId: "...", someOtherPackageId: "..." }
|
|
76
|
+
* ```
|
|
55
77
|
*/
|
|
56
78
|
getAddresses(): Promise<ConfigAddresses>;
|
|
79
|
+
/**
|
|
80
|
+
* Returns the base URL used for Aftermath API calls.
|
|
81
|
+
*
|
|
82
|
+
* @returns The base URL for this instance's API.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```typescript
|
|
86
|
+
* const apiBaseUrl = aftermath.getApiBaseUrl();
|
|
87
|
+
* console.log(apiBaseUrl); // "https://api.after..."
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
57
90
|
getApiBaseUrl(): string | undefined;
|
|
58
91
|
/**
|
|
59
|
-
* Returns an instance of the Pools class
|
|
60
|
-
*
|
|
92
|
+
* Returns an instance of the `Pools` class, which handles DEX pool operations
|
|
93
|
+
* within the Aftermath platform (if supported).
|
|
61
94
|
*/
|
|
62
95
|
Pools: () => Pools;
|
|
63
96
|
/**
|
|
64
|
-
*
|
|
65
|
-
* @returns A new instance of the Staking class.
|
|
97
|
+
* Returns an instance of the `Staking` class for Aftermath's staking and unstaking features.
|
|
66
98
|
*/
|
|
67
99
|
Staking: () => Staking;
|
|
100
|
+
/**
|
|
101
|
+
* Returns an instance of `LeveragedStaking` for advanced leveraged staking workflows (if supported).
|
|
102
|
+
*/
|
|
68
103
|
LeveragedStaking: () => LeveragedStaking;
|
|
104
|
+
/**
|
|
105
|
+
* Returns an instance of `SuiFrens`, a specialized package for social or utility services.
|
|
106
|
+
*/
|
|
69
107
|
SuiFrens: () => SuiFrens;
|
|
108
|
+
/**
|
|
109
|
+
* Returns an instance of `Faucet`, allowing test/dev networks to dispense tokens.
|
|
110
|
+
*/
|
|
70
111
|
Faucet: () => Faucet;
|
|
71
112
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
113
|
+
* Returns an instance of the `Router` class, which handles smart order routing
|
|
114
|
+
* across multiple DEX protocols.
|
|
74
115
|
*/
|
|
75
116
|
Router: () => Router;
|
|
117
|
+
/**
|
|
118
|
+
* Returns an instance of `NftAmm`, which supports NFT AMM (automated market maker) features.
|
|
119
|
+
*/
|
|
76
120
|
NftAmm: () => NftAmm;
|
|
121
|
+
/**
|
|
122
|
+
* Returns an instance of `ReferralVault` for referral-based interactions in the protocol.
|
|
123
|
+
*/
|
|
77
124
|
ReferralVault: () => ReferralVault;
|
|
125
|
+
/**
|
|
126
|
+
* Returns an instance of `Perpetuals` for futures or perpetual contract interactions.
|
|
127
|
+
*/
|
|
78
128
|
Perpetuals: () => Perpetuals;
|
|
129
|
+
/**
|
|
130
|
+
* Returns an instance of `Oracle`, which provides price oracles or other data feed services.
|
|
131
|
+
*/
|
|
79
132
|
Oracle: () => Oracle;
|
|
80
133
|
/**
|
|
81
|
-
*
|
|
82
|
-
* @returns A new instance of the Farms class.
|
|
134
|
+
* Returns an instance of `Farms` for yield farming or liquidity mining functionalities.
|
|
83
135
|
*/
|
|
84
136
|
Farms: () => Farms;
|
|
85
137
|
/**
|
|
86
|
-
*
|
|
87
|
-
* @returns A new instance of the DCA class.
|
|
138
|
+
* Returns an instance of the `Dca` class, supporting dollar-cost averaging logic.
|
|
88
139
|
*/
|
|
89
140
|
Dca: () => Dca;
|
|
141
|
+
/**
|
|
142
|
+
* Returns an instance of `Multisig`, enabling multi-signature address creation and management.
|
|
143
|
+
*/
|
|
90
144
|
Multisig: () => Multisig;
|
|
145
|
+
/**
|
|
146
|
+
* Returns an instance of `LimitOrders`, supporting limit order placement on certain DEX protocols.
|
|
147
|
+
*/
|
|
91
148
|
LimitOrders: () => LimitOrders;
|
|
149
|
+
/**
|
|
150
|
+
* Returns an instance of `UserData` for creating and managing user-specific data or key storage.
|
|
151
|
+
*/
|
|
92
152
|
UserData: () => UserData;
|
|
153
|
+
/**
|
|
154
|
+
* Returns an instance of `Sui` for low-level Sui chain information and utilities.
|
|
155
|
+
*/
|
|
93
156
|
Sui: () => Sui;
|
|
157
|
+
/**
|
|
158
|
+
* Returns an instance of `Prices`, which provides coin price data from external or internal feeds.
|
|
159
|
+
*/
|
|
94
160
|
Prices: () => Prices;
|
|
95
161
|
/**
|
|
96
|
-
* Creates a new instance
|
|
97
|
-
*
|
|
98
|
-
*
|
|
162
|
+
* Creates a new `Wallet` instance for a specific user address, enabling you to fetch balances,
|
|
163
|
+
* transaction history, etc.
|
|
164
|
+
*
|
|
165
|
+
* @param address - The Sui address of the wallet (e.g., "0x<32_byte_hex>").
|
|
99
166
|
*/
|
|
100
167
|
Wallet: (address: SuiAddress) => Wallet;
|
|
101
168
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
169
|
+
* Returns an instance of the `Coin` class, which handles coin metadata, decimal conversions,
|
|
170
|
+
* and other coin-related utilities for a specified `CoinType`.
|
|
171
|
+
*
|
|
172
|
+
* @param coinType - Optionally specify a coin type for immediate usage in coin methods.
|
|
105
173
|
*/
|
|
106
174
|
Coin: (coinType?: CoinType) => Coin;
|
|
107
|
-
|
|
175
|
+
/**
|
|
176
|
+
* Returns an instance of `DynamicGas`, enabling dynamic assignment of gas
|
|
177
|
+
* objects or sponsored transactions for user operations.
|
|
178
|
+
*/
|
|
108
179
|
DynamicGas: () => DynamicGas;
|
|
180
|
+
/**
|
|
181
|
+
* Returns an instance of `Auth`, handling user authentication or token-based flows (if applicable).
|
|
182
|
+
*/
|
|
109
183
|
Auth: () => Auth;
|
|
184
|
+
/**
|
|
185
|
+
* Exposes a set of helper functions for general-purpose usage across
|
|
186
|
+
* the Aftermath ecosystem. Includes utilities for math, logging, etc.
|
|
187
|
+
*/
|
|
110
188
|
static helpers: typeof Helpers;
|
|
189
|
+
/**
|
|
190
|
+
* Exposes a set of casting utilities for data type conversions (e.g., BigInt <-> fixed).
|
|
191
|
+
*/
|
|
111
192
|
static casting: typeof Casting;
|
|
112
193
|
}
|
|
113
194
|
//# sourceMappingURL=aftermath.d.ts.map
|