@sodax/types 2.1.0-rc.3 → 2.1.0-rc.4
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 +1 -1
- package/dist/chains/chains.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/sodax-config/sodax-config.d.ts +23 -26
- package/dist/swap/swap.d.ts +6 -0
- package/package.json +1 -1
package/dist/chains/chains.d.ts
CHANGED
|
@@ -2863,7 +2863,7 @@ export declare const spokeChainConfig: {
|
|
|
2863
2863
|
};
|
|
2864
2864
|
readonly nativeToken: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI";
|
|
2865
2865
|
readonly bnUSD: "0xff4de2b2b57dd7611d2812d231a467d007b702a101fd5c7ad3b278257cddb507::bnusd::BNUSD";
|
|
2866
|
-
readonly rpc_url: "https://
|
|
2866
|
+
readonly rpc_url: "https://sui-rpc.publicnode.com";
|
|
2867
2867
|
readonly chain: {
|
|
2868
2868
|
readonly name: "SUI";
|
|
2869
2869
|
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
|
-
rpc_url: 'https://
|
|
640
|
+
rpc_url: 'https://sui-rpc.publicnode.com',
|
|
641
641
|
chain: baseChainInfo[ChainKeys.SUI_MAINNET],
|
|
642
642
|
pollingConfig: {
|
|
643
643
|
pollingIntervalMs: 500,
|
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 = 224; // this value should be incremented (inside release/sdk branch) each time @sodax/types package is updated
|
|
@@ -31,6 +31,12 @@ export type BitcoinSharedChainConfig = TxPollingConfig & {
|
|
|
31
31
|
export type BridgeConfig = Prettify<BridgeDefaultConfig & BridgeOptions>;
|
|
32
32
|
export type BridgeOptions = {
|
|
33
33
|
partnerFee?: PartnerFee;
|
|
34
|
+
/**
|
|
35
|
+
* Route `bridge()` through the backend submit-tx flow. Default `true`.
|
|
36
|
+
* Set `false` for the fully client-side relay. Client-side only — not part of backend SodaxDefaultConfig.
|
|
37
|
+
* Omitted here means the default, not off: read the effective value via `sodax.config.bridgeUseBackendSubmitTx`.
|
|
38
|
+
*/
|
|
39
|
+
useBackendSubmitTx?: boolean;
|
|
34
40
|
};
|
|
35
41
|
export type BridgeDefaultConfig = {};
|
|
36
42
|
export declare const bridgeConfig: {};
|
|
@@ -52,6 +58,20 @@ export type RadfiSigner = (ctx: RadfiSignContext) => Record<string, string> | Pr
|
|
|
52
58
|
export type RadfiOptions = {
|
|
53
59
|
signRequest?: RadfiSigner;
|
|
54
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated in favor of `swaps` property of SodaxOptionalConfig, kept for backward compatibility.
|
|
63
|
+
* Still honoured, but only when `swaps.useBackendSubmitTx` is omitted; the default is now `true`.
|
|
64
|
+
*/
|
|
65
|
+
export type SwapsClientOptions = {
|
|
66
|
+
useBackendSubmitTx?: boolean;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated in favor of `bridge` property of SodaxOptionalConfig, kept for backward compatibility.
|
|
70
|
+
* Still honoured, but only when `bridge.useBackendSubmitTx` is omitted; the default is now `true`.
|
|
71
|
+
*/
|
|
72
|
+
export type BridgeClientOptions = {
|
|
73
|
+
useBackendSubmitTx?: boolean;
|
|
74
|
+
};
|
|
55
75
|
export type SodaxOptionalConfig = {
|
|
56
76
|
logger?: SodaxLoggerOption;
|
|
57
77
|
analytics?: AnalyticsOption;
|
|
@@ -61,7 +81,9 @@ export type SodaxOptionalConfig = {
|
|
|
61
81
|
moneyMarket?: MoneyMarketOptions;
|
|
62
82
|
bridge?: BridgeOptions;
|
|
63
83
|
leverageYield?: LeverageYieldOptions;
|
|
84
|
+
/** @deprecated Use `swaps` instead — still honoured, but only when `swaps.useBackendSubmitTx` is absent. */
|
|
64
85
|
swapsOptions?: SwapsClientOptions;
|
|
86
|
+
/** @deprecated Use `bridge` instead — still honoured, but only when `bridge.useBackendSubmitTx` is absent. */
|
|
65
87
|
bridgeOptions?: BridgeClientOptions;
|
|
66
88
|
};
|
|
67
89
|
/**
|
|
@@ -90,31 +112,6 @@ export type SodaxDefaultConfig = {
|
|
|
90
112
|
solver: SolverConfig;
|
|
91
113
|
relay: RelayConfig;
|
|
92
114
|
};
|
|
93
|
-
/**
|
|
94
|
-
* Client-side swap behavior options. Like {@link SodaxOptionalConfig.logger}, these are runtime toggles
|
|
95
|
-
* resolved once at construction — NOT part of the backend-fetched {@link SodaxDefaultConfig} data.
|
|
96
|
-
*/
|
|
97
|
-
export type SwapsClientOptions = {
|
|
98
|
-
/**
|
|
99
|
-
* Opt-in: route `swap()` through the backend submit-tx 2-step flow (the backend relays +
|
|
100
|
-
* post-executes server-side). On ANY non-success the SDK falls back to the client-side relay so
|
|
101
|
-
* the swap still completes. Default `false` (the current fully client-side flow).
|
|
102
|
-
*/
|
|
103
|
-
useBackendSubmitTx?: boolean;
|
|
104
|
-
};
|
|
105
|
-
/**
|
|
106
|
-
* Client-side bridge behavior options. Like {@link SwapsClientOptions}, these are runtime toggles
|
|
107
|
-
* resolved once at construction — NOT part of the backend-fetched {@link SodaxDefaultConfig} data.
|
|
108
|
-
*/
|
|
109
|
-
export type BridgeClientOptions = {
|
|
110
|
-
/**
|
|
111
|
-
* Opt-in: route `bridge()` through the backend submit-tx flow (the backend relays the spoke
|
|
112
|
-
* deposit server-side). On ANY non-success the SDK falls back to the client-side
|
|
113
|
-
* `relayTxAndWaitPacket` flow so the bridge still completes. Default `false` (the current fully
|
|
114
|
-
* client-side flow).
|
|
115
|
-
*/
|
|
116
|
-
useBackendSubmitTx?: boolean;
|
|
117
|
-
};
|
|
118
115
|
export declare const sodaxConfig: {
|
|
119
116
|
chains: {
|
|
120
117
|
readonly sonic: {
|
|
@@ -2433,7 +2430,7 @@ export declare const sodaxConfig: {
|
|
|
2433
2430
|
};
|
|
2434
2431
|
readonly nativeToken: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI";
|
|
2435
2432
|
readonly bnUSD: "0xff4de2b2b57dd7611d2812d231a467d007b702a101fd5c7ad3b278257cddb507::bnusd::BNUSD";
|
|
2436
|
-
readonly rpc_url: "https://
|
|
2433
|
+
readonly rpc_url: "https://sui-rpc.publicnode.com";
|
|
2437
2434
|
readonly chain: {
|
|
2438
2435
|
readonly name: "SUI";
|
|
2439
2436
|
readonly key: "sui";
|
package/dist/swap/swap.d.ts
CHANGED
|
@@ -1939,6 +1939,12 @@ export declare const stagingSwapSupportedTokens: {
|
|
|
1939
1939
|
};
|
|
1940
1940
|
export type SwapsOptions = {
|
|
1941
1941
|
partnerFee?: PartnerFee;
|
|
1942
|
+
/**
|
|
1943
|
+
* Route `swap()` through the backend submit-tx 2-step flow. Default `true`.
|
|
1944
|
+
* Set `false` for the fully client-side relay. Client-side only — not part of backend SodaxDefaultConfig.
|
|
1945
|
+
* Omitted here means the default, not off: read the effective value via `sodax.config.swapUseBackendSubmitTx`.
|
|
1946
|
+
*/
|
|
1947
|
+
useBackendSubmitTx?: boolean;
|
|
1942
1948
|
};
|
|
1943
1949
|
export type SwapsDefaultConfig = {
|
|
1944
1950
|
supportedTokens: Record<SpokeChainKey, readonly XToken[]>;
|
package/package.json
CHANGED