@sodax/types 2.1.0-rc.6 → 2.1.0-rc.7
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/chains/chains.d.ts +12 -5
- package/dist/chains/chains.js +1 -1
- package/dist/chains/tokens.d.ts +6 -6
- package/dist/chains/tokens.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/sodax-config/sodax-config.d.ts +6 -6
- package/dist/sui/core.d.ts +37 -0
- package/dist/sui/core.js +25 -0
- package/dist/sui/index.d.ts +2 -0
- package/dist/sui/index.js +2 -0
- package/dist/sui/sui.d.ts +15 -1
- package/dist/sui/transport.d.ts +26 -0
- package/dist/sui/transport.js +1 -0
- package/dist/swap/swap.d.ts +5 -5
- package/package.json +3 -2
package/dist/chains/chains.d.ts
CHANGED
|
@@ -511,7 +511,14 @@ export type SuiSpokeChainConfig = BaseSpokeChainConfig<'SUI'> & {
|
|
|
511
511
|
xTokenManager: string;
|
|
512
512
|
rateLimit: string;
|
|
513
513
|
};
|
|
514
|
-
|
|
514
|
+
/** gRPC-web endpoint. Mysten's public fullnodes stopped serving JSON-RPC in July 2026; `sui-node` drops it in October 2026. */
|
|
515
|
+
grpc_url: string;
|
|
516
|
+
/**
|
|
517
|
+
* @deprecated Renamed to `grpc_url`. Still honored so existing overrides keep working, and wins
|
|
518
|
+
* over `grpc_url` when set. A `sui-node` serves gRPC-web on the same origin as JSON-RPC, so a
|
|
519
|
+
* self-hosted or full-service endpoint needs no change; a JSON-RPC-only provider does.
|
|
520
|
+
*/
|
|
521
|
+
rpc_url?: string;
|
|
515
522
|
};
|
|
516
523
|
export type NearSpokeChainConfig = BaseSpokeChainConfig<'NEAR'> & {
|
|
517
524
|
addresses: {
|
|
@@ -1734,7 +1741,7 @@ export declare const spokeChainConfig: {
|
|
|
1734
1741
|
readonly symbol: "AERO";
|
|
1735
1742
|
readonly name: "Aerodrome Finance";
|
|
1736
1743
|
readonly decimals: 18;
|
|
1737
|
-
readonly address: "
|
|
1744
|
+
readonly address: "0x940181a94A35A4569E4529A3CDfB74e38FD98631";
|
|
1738
1745
|
readonly chainKey: "0x2105.base";
|
|
1739
1746
|
readonly hubAsset: "0x348e086ab6f424dfc575a325c28624ed23973173";
|
|
1740
1747
|
readonly vault: "0x348e086ab6f424dfc575a325c28624ed23973173";
|
|
@@ -2127,7 +2134,7 @@ export declare const spokeChainConfig: {
|
|
|
2127
2134
|
readonly symbol: "WBTC";
|
|
2128
2135
|
readonly name: "Wrapped BTC";
|
|
2129
2136
|
readonly decimals: 8;
|
|
2130
|
-
readonly address: "
|
|
2137
|
+
readonly address: "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6";
|
|
2131
2138
|
readonly chainKey: "0x89.polygon";
|
|
2132
2139
|
readonly hubAsset: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3";
|
|
2133
2140
|
readonly vault: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3";
|
|
@@ -2145,7 +2152,7 @@ export declare const spokeChainConfig: {
|
|
|
2145
2152
|
readonly symbol: "LINK";
|
|
2146
2153
|
readonly name: "ChainLink Token";
|
|
2147
2154
|
readonly decimals: 18;
|
|
2148
|
-
readonly address: "
|
|
2155
|
+
readonly address: "0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39";
|
|
2149
2156
|
readonly chainKey: "0x89.polygon";
|
|
2150
2157
|
readonly hubAsset: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f";
|
|
2151
2158
|
readonly vault: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f";
|
|
@@ -2863,7 +2870,7 @@ export declare const spokeChainConfig: {
|
|
|
2863
2870
|
};
|
|
2864
2871
|
readonly nativeToken: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI";
|
|
2865
2872
|
readonly bnUSD: "0xff4de2b2b57dd7611d2812d231a467d007b702a101fd5c7ad3b278257cddb507::bnusd::BNUSD";
|
|
2866
|
-
readonly
|
|
2873
|
+
readonly grpc_url: "https://fullnode.mainnet.sui.io";
|
|
2867
2874
|
readonly chain: {
|
|
2868
2875
|
readonly name: "SUI";
|
|
2869
2876
|
readonly key: "sui";
|
package/dist/chains/chains.js
CHANGED
|
@@ -637,7 +637,7 @@ export const spokeChainConfig = {
|
|
|
637
637
|
supportedTokens: suiSupportedTokens,
|
|
638
638
|
nativeToken: '0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI',
|
|
639
639
|
bnUSD: '0xff4de2b2b57dd7611d2812d231a467d007b702a101fd5c7ad3b278257cddb507::bnusd::BNUSD',
|
|
640
|
-
|
|
640
|
+
grpc_url: 'https://fullnode.mainnet.sui.io',
|
|
641
641
|
chain: baseChainInfo[ChainKeys.SUI_MAINNET],
|
|
642
642
|
pollingConfig: {
|
|
643
643
|
pollingIntervalMs: 500,
|
package/dist/chains/tokens.d.ts
CHANGED
|
@@ -1375,7 +1375,7 @@ export declare const baseSupportedTokens: {
|
|
|
1375
1375
|
readonly symbol: "AERO";
|
|
1376
1376
|
readonly name: "Aerodrome Finance";
|
|
1377
1377
|
readonly decimals: 18;
|
|
1378
|
-
readonly address: "
|
|
1378
|
+
readonly address: "0x940181a94A35A4569E4529A3CDfB74e38FD98631";
|
|
1379
1379
|
readonly chainKey: "0x2105.base";
|
|
1380
1380
|
readonly hubAsset: "0x348e086ab6f424dfc575a325c28624ed23973173";
|
|
1381
1381
|
readonly vault: "0x348e086ab6f424dfc575a325c28624ed23973173";
|
|
@@ -1687,7 +1687,7 @@ export declare const polygonSupportedTokens: {
|
|
|
1687
1687
|
readonly symbol: "WBTC";
|
|
1688
1688
|
readonly name: "Wrapped BTC";
|
|
1689
1689
|
readonly decimals: 8;
|
|
1690
|
-
readonly address: "
|
|
1690
|
+
readonly address: "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6";
|
|
1691
1691
|
readonly chainKey: "0x89.polygon";
|
|
1692
1692
|
readonly hubAsset: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3";
|
|
1693
1693
|
readonly vault: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3";
|
|
@@ -1705,7 +1705,7 @@ export declare const polygonSupportedTokens: {
|
|
|
1705
1705
|
readonly symbol: "LINK";
|
|
1706
1706
|
readonly name: "ChainLink Token";
|
|
1707
1707
|
readonly decimals: 18;
|
|
1708
|
-
readonly address: "
|
|
1708
|
+
readonly address: "0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39";
|
|
1709
1709
|
readonly chainKey: "0x89.polygon";
|
|
1710
1710
|
readonly hubAsset: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f";
|
|
1711
1711
|
readonly vault: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f";
|
|
@@ -3726,7 +3726,7 @@ export declare const supportedTokensByChain: {
|
|
|
3726
3726
|
readonly symbol: "AERO";
|
|
3727
3727
|
readonly name: "Aerodrome Finance";
|
|
3728
3728
|
readonly decimals: 18;
|
|
3729
|
-
readonly address: "
|
|
3729
|
+
readonly address: "0x940181a94A35A4569E4529A3CDfB74e38FD98631";
|
|
3730
3730
|
readonly chainKey: "0x2105.base";
|
|
3731
3731
|
readonly hubAsset: "0x348e086ab6f424dfc575a325c28624ed23973173";
|
|
3732
3732
|
readonly vault: "0x348e086ab6f424dfc575a325c28624ed23973173";
|
|
@@ -4038,7 +4038,7 @@ export declare const supportedTokensByChain: {
|
|
|
4038
4038
|
readonly symbol: "WBTC";
|
|
4039
4039
|
readonly name: "Wrapped BTC";
|
|
4040
4040
|
readonly decimals: 8;
|
|
4041
|
-
readonly address: "
|
|
4041
|
+
readonly address: "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6";
|
|
4042
4042
|
readonly chainKey: "0x89.polygon";
|
|
4043
4043
|
readonly hubAsset: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3";
|
|
4044
4044
|
readonly vault: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3";
|
|
@@ -4056,7 +4056,7 @@ export declare const supportedTokensByChain: {
|
|
|
4056
4056
|
readonly symbol: "LINK";
|
|
4057
4057
|
readonly name: "ChainLink Token";
|
|
4058
4058
|
readonly decimals: 18;
|
|
4059
|
-
readonly address: "
|
|
4059
|
+
readonly address: "0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39";
|
|
4060
4060
|
readonly chainKey: "0x89.polygon";
|
|
4061
4061
|
readonly hubAsset: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f";
|
|
4062
4062
|
readonly vault: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f";
|
package/dist/chains/tokens.js
CHANGED
|
@@ -1098,7 +1098,7 @@ export const baseSupportedTokens = {
|
|
|
1098
1098
|
symbol: 'AERO',
|
|
1099
1099
|
name: 'Aerodrome Finance',
|
|
1100
1100
|
decimals: 18,
|
|
1101
|
-
address: '
|
|
1101
|
+
address: '0x940181a94A35A4569E4529A3CDfB74e38FD98631',
|
|
1102
1102
|
chainKey: ChainKeys.BASE_MAINNET,
|
|
1103
1103
|
hubAsset: '0x348e086ab6f424dfc575a325c28624ed23973173',
|
|
1104
1104
|
vault: '0x348e086ab6f424dfc575a325c28624ed23973173',
|
|
@@ -1410,7 +1410,7 @@ export const polygonSupportedTokens = {
|
|
|
1410
1410
|
symbol: 'WBTC',
|
|
1411
1411
|
name: 'Wrapped BTC',
|
|
1412
1412
|
decimals: 8,
|
|
1413
|
-
address: '
|
|
1413
|
+
address: '0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6',
|
|
1414
1414
|
chainKey: ChainKeys.POLYGON_MAINNET,
|
|
1415
1415
|
hubAsset: '0xf3182ae79be69d9e0cad5da8273d4300a7d585d3',
|
|
1416
1416
|
vault: '0xf3182ae79be69d9e0cad5da8273d4300a7d585d3',
|
|
@@ -1428,7 +1428,7 @@ export const polygonSupportedTokens = {
|
|
|
1428
1428
|
symbol: 'LINK',
|
|
1429
1429
|
name: 'ChainLink Token',
|
|
1430
1430
|
decimals: 18,
|
|
1431
|
-
address: '
|
|
1431
|
+
address: '0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39',
|
|
1432
1432
|
chainKey: ChainKeys.POLYGON_MAINNET,
|
|
1433
1433
|
hubAsset: '0x30d1be6ae96e9832674f1fcf429c5176bd891e1f',
|
|
1434
1434
|
vault: '0x30d1be6ae96e9832674f1fcf429c5176bd891e1f',
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -19,4 +19,4 @@ export * from './sui/index.js';
|
|
|
19
19
|
export * from './swap/index.js';
|
|
20
20
|
export * from './utils/index.js';
|
|
21
21
|
export * from './wallet/index.js';
|
|
22
|
-
export const CONFIG_VERSION =
|
|
22
|
+
export const CONFIG_VERSION = 227; // this value should be incremented (inside release/sdk branch) each time @sodax/types package is updated
|
|
@@ -1301,7 +1301,7 @@ export declare const sodaxConfig: {
|
|
|
1301
1301
|
readonly symbol: "AERO";
|
|
1302
1302
|
readonly name: "Aerodrome Finance";
|
|
1303
1303
|
readonly decimals: 18;
|
|
1304
|
-
readonly address: "
|
|
1304
|
+
readonly address: "0x940181a94A35A4569E4529A3CDfB74e38FD98631";
|
|
1305
1305
|
readonly chainKey: "0x2105.base";
|
|
1306
1306
|
readonly hubAsset: "0x348e086ab6f424dfc575a325c28624ed23973173";
|
|
1307
1307
|
readonly vault: "0x348e086ab6f424dfc575a325c28624ed23973173";
|
|
@@ -1694,7 +1694,7 @@ export declare const sodaxConfig: {
|
|
|
1694
1694
|
readonly symbol: "WBTC";
|
|
1695
1695
|
readonly name: "Wrapped BTC";
|
|
1696
1696
|
readonly decimals: 8;
|
|
1697
|
-
readonly address: "
|
|
1697
|
+
readonly address: "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6";
|
|
1698
1698
|
readonly chainKey: "0x89.polygon";
|
|
1699
1699
|
readonly hubAsset: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3";
|
|
1700
1700
|
readonly vault: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3";
|
|
@@ -1712,7 +1712,7 @@ export declare const sodaxConfig: {
|
|
|
1712
1712
|
readonly symbol: "LINK";
|
|
1713
1713
|
readonly name: "ChainLink Token";
|
|
1714
1714
|
readonly decimals: 18;
|
|
1715
|
-
readonly address: "
|
|
1715
|
+
readonly address: "0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39";
|
|
1716
1716
|
readonly chainKey: "0x89.polygon";
|
|
1717
1717
|
readonly hubAsset: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f";
|
|
1718
1718
|
readonly vault: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f";
|
|
@@ -2430,7 +2430,7 @@ export declare const sodaxConfig: {
|
|
|
2430
2430
|
};
|
|
2431
2431
|
readonly nativeToken: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI";
|
|
2432
2432
|
readonly bnUSD: "0xff4de2b2b57dd7611d2812d231a467d007b702a101fd5c7ad3b278257cddb507::bnusd::BNUSD";
|
|
2433
|
-
readonly
|
|
2433
|
+
readonly grpc_url: "https://fullnode.mainnet.sui.io";
|
|
2434
2434
|
readonly chain: {
|
|
2435
2435
|
readonly name: "SUI";
|
|
2436
2436
|
readonly key: "sui";
|
|
@@ -3733,7 +3733,7 @@ export declare const sodaxConfig: {
|
|
|
3733
3733
|
readonly symbol: "WBTC";
|
|
3734
3734
|
readonly name: "Wrapped BTC";
|
|
3735
3735
|
readonly decimals: 8;
|
|
3736
|
-
readonly address: "
|
|
3736
|
+
readonly address: "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6";
|
|
3737
3737
|
readonly chainKey: "0x89.polygon";
|
|
3738
3738
|
readonly hubAsset: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3";
|
|
3739
3739
|
readonly vault: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3";
|
|
@@ -3749,7 +3749,7 @@ export declare const sodaxConfig: {
|
|
|
3749
3749
|
readonly symbol: "LINK";
|
|
3750
3750
|
readonly name: "ChainLink Token";
|
|
3751
3751
|
readonly decimals: 18;
|
|
3752
|
-
readonly address: "
|
|
3752
|
+
readonly address: "0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39";
|
|
3753
3753
|
readonly chainKey: "0x89.polygon";
|
|
3754
3754
|
readonly hubAsset: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f";
|
|
3755
3755
|
readonly vault: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { SuiExecutionResult, SuiExecutionStatus, SuiPaginatedCoins } from './sui.js';
|
|
2
|
+
/**
|
|
3
|
+
* Structural mirrors of the `client.core` responses in `@mysten/sui` 2.x, kept local so
|
|
4
|
+
* `@sodax/types` stays dependency-free. Bump them in lockstep with the workspace catalog.
|
|
5
|
+
*/
|
|
6
|
+
export type SuiCoreCoin = {
|
|
7
|
+
objectId: string;
|
|
8
|
+
version: string;
|
|
9
|
+
digest: string;
|
|
10
|
+
balance: string;
|
|
11
|
+
};
|
|
12
|
+
export type SuiCoreListCoinsResponse = {
|
|
13
|
+
objects: SuiCoreCoin[];
|
|
14
|
+
hasNextPage: boolean;
|
|
15
|
+
cursor: string | null;
|
|
16
|
+
};
|
|
17
|
+
export type SuiCoreExecutionStatus = {
|
|
18
|
+
success: true;
|
|
19
|
+
error: null;
|
|
20
|
+
} | {
|
|
21
|
+
success: false;
|
|
22
|
+
error: {
|
|
23
|
+
message: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type SuiCoreCommandResult = {
|
|
27
|
+
returnValues: {
|
|
28
|
+
bcs: Uint8Array;
|
|
29
|
+
}[];
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* `listCoins` reports `type` as the full `0x2::coin::Coin<T>` tag, so `coinType` echoes the
|
|
33
|
+
* filter the caller queried with rather than unwrapping it.
|
|
34
|
+
*/
|
|
35
|
+
export declare function toSuiPaginatedCoins(response: SuiCoreListCoinsResponse, coinType: string): SuiPaginatedCoins;
|
|
36
|
+
export declare function toSuiExecutionResult(command: SuiCoreCommandResult): SuiExecutionResult;
|
|
37
|
+
export declare function toSuiExecutionStatus(status: SuiCoreExecutionStatus): SuiExecutionStatus;
|
package/dist/sui/core.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `listCoins` reports `type` as the full `0x2::coin::Coin<T>` tag, so `coinType` echoes the
|
|
3
|
+
* filter the caller queried with rather than unwrapping it.
|
|
4
|
+
*/
|
|
5
|
+
export function toSuiPaginatedCoins(response, coinType) {
|
|
6
|
+
return {
|
|
7
|
+
data: response.objects.map(coin => ({
|
|
8
|
+
balance: coin.balance,
|
|
9
|
+
coinObjectId: coin.objectId,
|
|
10
|
+
coinType,
|
|
11
|
+
digest: coin.digest,
|
|
12
|
+
version: coin.version,
|
|
13
|
+
})),
|
|
14
|
+
hasNextPage: response.hasNextPage,
|
|
15
|
+
nextCursor: response.cursor,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export function toSuiExecutionResult(command) {
|
|
19
|
+
return {
|
|
20
|
+
returnValues: command.returnValues.map(value => [Array.from(value.bcs), '']),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export function toSuiExecutionStatus(status) {
|
|
24
|
+
return status.success ? { status: 'success' } : { status: 'failure', error: status.error.message };
|
|
25
|
+
}
|
package/dist/sui/index.d.ts
CHANGED
package/dist/sui/index.js
CHANGED
package/dist/sui/sui.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export type SuiArgument = 'GasCoin' | {
|
|
|
20
20
|
};
|
|
21
21
|
export interface SuiExecutionResult {
|
|
22
22
|
mutableReferenceOutputs?: [SuiArgument, number[], string][];
|
|
23
|
+
/** `[bcsBytes, moveTypeTag]`. The type tag is always `''`: Sui's core client returns bytes only. */
|
|
23
24
|
returnValues?: [number[], string][];
|
|
24
25
|
}
|
|
25
26
|
export interface SuiCoinStruct {
|
|
@@ -27,7 +28,8 @@ export interface SuiCoinStruct {
|
|
|
27
28
|
coinObjectId: string;
|
|
28
29
|
coinType: string;
|
|
29
30
|
digest: string;
|
|
30
|
-
|
|
31
|
+
/** Absent over gRPC — Sui's `Coin` message does not carry it. */
|
|
32
|
+
previousTransaction?: string;
|
|
31
33
|
version: string;
|
|
32
34
|
}
|
|
33
35
|
export interface SuiPaginatedCoins {
|
|
@@ -93,13 +95,25 @@ export type SuiTransactionEffects = {
|
|
|
93
95
|
transactionDigest: string;
|
|
94
96
|
gasObject: SuiOwnedObjectRef;
|
|
95
97
|
dependencies?: string[];
|
|
98
|
+
/**
|
|
99
|
+
* Object-change buckets. All absent over gRPC: the effects message carries one flat
|
|
100
|
+
* `changedObjects` list keyed by `inputState` / `outputState` / `idOperation`, and the
|
|
101
|
+
* transport does not re-derive the buckets from it.
|
|
102
|
+
*/
|
|
96
103
|
created?: SuiOwnedObjectRef[];
|
|
104
|
+
/** Absent over gRPC — see `created`. */
|
|
97
105
|
mutated?: SuiOwnedObjectRef[];
|
|
106
|
+
/** Absent over gRPC — see `created`. */
|
|
98
107
|
deleted?: SuiObjectRef[];
|
|
108
|
+
/** Absent over gRPC — see `created`. */
|
|
99
109
|
wrapped?: SuiObjectRef[];
|
|
110
|
+
/** Absent over gRPC — see `created`. */
|
|
100
111
|
unwrapped?: SuiOwnedObjectRef[];
|
|
112
|
+
/** Absent over gRPC — see `created`. */
|
|
101
113
|
unwrappedThenDeleted?: SuiObjectRef[];
|
|
114
|
+
/** Absent over gRPC — see `created`. */
|
|
102
115
|
sharedObjects?: SuiObjectRef[];
|
|
116
|
+
/** Absent over gRPC — see `created`. */
|
|
103
117
|
modifiedAtVersions?: SuiTransactionEffectsModifiedAtVersions[];
|
|
104
118
|
eventsDigest?: string | null;
|
|
105
119
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { SuiGasEstimate } from '../common/common.js';
|
|
2
|
+
import type { SuiExecutionResult, SuiPaginatedCoins, SuiRawTransactionReceipt, SuiTransaction } from './sui.js';
|
|
3
|
+
export type SuiWaitForTransactionParams = {
|
|
4
|
+
digest: string;
|
|
5
|
+
timeoutMs: number;
|
|
6
|
+
pollingIntervalMs: number;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Sui reads in `@sodax/types` vocabulary, implemented by `SuiGrpcTransport` in `@sodax/sdk`. It
|
|
10
|
+
* speaks `SuiTransaction` rather than a `@mysten/sui` `Transaction` so this package stays
|
|
11
|
+
* dependency-free and the SDK's published `.d.ts` — which has no node10 resolution fallback —
|
|
12
|
+
* never names the vendor client.
|
|
13
|
+
*/
|
|
14
|
+
export interface SuiTransport {
|
|
15
|
+
readonly endpoint: string;
|
|
16
|
+
getCoins(owner: string, coinType: string, limit?: number): Promise<SuiPaginatedCoins>;
|
|
17
|
+
/**
|
|
18
|
+
* The sender is applied to the transaction the node simulates, which may be a rebuilt copy of the
|
|
19
|
+
* one passed in — do not rely on your instance coming back mutated.
|
|
20
|
+
*/
|
|
21
|
+
simulate(tx: SuiTransaction, sender: string): Promise<SuiExecutionResult>;
|
|
22
|
+
/** Same sender rule as {@link SuiTransport.simulate}. */
|
|
23
|
+
estimateGas(tx: SuiTransaction, sender: string): Promise<SuiGasEstimate>;
|
|
24
|
+
fetchLatestPackageId(objectId: string): Promise<string>;
|
|
25
|
+
waitForTransaction(params: SuiWaitForTransactionParams): Promise<SuiRawTransactionReceipt>;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/swap/swap.d.ts
CHANGED
|
@@ -653,7 +653,7 @@ export declare const swapSupportedTokens: {
|
|
|
653
653
|
readonly symbol: "WBTC";
|
|
654
654
|
readonly name: "Wrapped BTC";
|
|
655
655
|
readonly decimals: 8;
|
|
656
|
-
readonly address: "
|
|
656
|
+
readonly address: "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6";
|
|
657
657
|
readonly chainKey: "0x89.polygon";
|
|
658
658
|
readonly hubAsset: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3";
|
|
659
659
|
readonly vault: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3";
|
|
@@ -669,7 +669,7 @@ export declare const swapSupportedTokens: {
|
|
|
669
669
|
readonly symbol: "LINK";
|
|
670
670
|
readonly name: "ChainLink Token";
|
|
671
671
|
readonly decimals: 18;
|
|
672
|
-
readonly address: "
|
|
672
|
+
readonly address: "0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39";
|
|
673
673
|
readonly chainKey: "0x89.polygon";
|
|
674
674
|
readonly hubAsset: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f";
|
|
675
675
|
readonly vault: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f";
|
|
@@ -1834,7 +1834,7 @@ export declare const stagingSwapSupportedTokens: {
|
|
|
1834
1834
|
readonly symbol: "AERO";
|
|
1835
1835
|
readonly name: "Aerodrome Finance";
|
|
1836
1836
|
readonly decimals: 18;
|
|
1837
|
-
readonly address: "
|
|
1837
|
+
readonly address: "0x940181a94A35A4569E4529A3CDfB74e38FD98631";
|
|
1838
1838
|
readonly chainKey: "0x2105.base";
|
|
1839
1839
|
readonly hubAsset: "0x348e086ab6f424dfc575a325c28624ed23973173";
|
|
1840
1840
|
readonly vault: "0x348e086ab6f424dfc575a325c28624ed23973173";
|
|
@@ -2603,7 +2603,7 @@ export declare const swapsConfig: {
|
|
|
2603
2603
|
readonly symbol: "WBTC";
|
|
2604
2604
|
readonly name: "Wrapped BTC";
|
|
2605
2605
|
readonly decimals: 8;
|
|
2606
|
-
readonly address: "
|
|
2606
|
+
readonly address: "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6";
|
|
2607
2607
|
readonly chainKey: "0x89.polygon";
|
|
2608
2608
|
readonly hubAsset: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3";
|
|
2609
2609
|
readonly vault: "0xf3182ae79be69d9e0cad5da8273d4300a7d585d3";
|
|
@@ -2619,7 +2619,7 @@ export declare const swapsConfig: {
|
|
|
2619
2619
|
readonly symbol: "LINK";
|
|
2620
2620
|
readonly name: "ChainLink Token";
|
|
2621
2621
|
readonly decimals: 18;
|
|
2622
|
-
readonly address: "
|
|
2622
|
+
readonly address: "0x53E0bca35eC356BD5ddDFebbD1Fc0fD03FaBad39";
|
|
2623
2623
|
readonly chainKey: "0x89.polygon";
|
|
2624
2624
|
readonly hubAsset: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f";
|
|
2625
2625
|
readonly vault: "0x30d1be6ae96e9832674f1fcf429c5176bd891e1f";
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "2.1.0-rc.
|
|
7
|
+
"version": "2.1.0-rc.7",
|
|
8
8
|
"description": "Sodax Common Types",
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"homepage": "https://github.com/icon-project/sodax-sdks/tree/main/packages/types",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"url": "https://github.com/icon-project/sodax-sdks"
|
|
17
17
|
},
|
|
18
18
|
"engines": {
|
|
19
|
-
"node": ">=
|
|
19
|
+
"node": ">=22.12.0"
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
22
|
"dist",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"knip": "5.30.5",
|
|
51
51
|
"madge": "8.0.0",
|
|
52
52
|
"typescript": "5.5.4",
|
|
53
|
+
"viem": "2.29.2",
|
|
53
54
|
"vitest": "3.2.6"
|
|
54
55
|
},
|
|
55
56
|
"keywords": [
|