@sodax/sdk 2.3.0-rc.1 → 2.3.0-rc.3
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/index.cjs +1260 -148
- package/dist/index.d.cts +11 -9
- package/dist/index.d.ts +11 -9
- package/dist/index.mjs +1260 -148
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
|
@@ -8840,7 +8840,8 @@ type ConfigServiceConstructorParams = {
|
|
|
8840
8840
|
radfiSigner?: RadfiSigner;
|
|
8841
8841
|
};
|
|
8842
8842
|
/**
|
|
8843
|
-
*
|
|
8843
|
+
* ConfigService - Holds the SDK config (packaged defaults merged with constructor overrides) and the lookups built
|
|
8844
|
+
* from it. `initialize()` does not fetch backend config yet, so supported chains and tokens are the packaged ones.
|
|
8844
8845
|
*/
|
|
8845
8846
|
declare class ConfigService {
|
|
8846
8847
|
private sodax;
|
|
@@ -13577,8 +13578,8 @@ declare const SPEED_TIER_THRESHOLDS: {
|
|
|
13577
13578
|
* (sodaAsset)?". It is queried with `XToken.vault`, not `XToken.hubAsset`: the reserve set is
|
|
13578
13579
|
* built from `moneyMarketHubVaults` addresses, so a hub asset only matches for the Sonic vault
|
|
13579
13580
|
* shares themselves, where `hubAsset === vault`. In the service this is wired to
|
|
13580
|
-
* `config.isMoneyMarketReserveAsset
|
|
13581
|
-
* unit-testable without a ConfigService.
|
|
13581
|
+
* `config.isMoneyMarketReserveAsset`, excluding RWA vaults (collateral-only reserves). The predicate
|
|
13582
|
+
* is injected so this function stays pure and unit-testable without a ConfigService.
|
|
13582
13583
|
*
|
|
13583
13584
|
* The fast 15s base applies when either token is sodaAsset-related; otherwise the base is 35s.
|
|
13584
13585
|
*/
|
|
@@ -14368,8 +14369,9 @@ declare class SwapService {
|
|
|
14368
14369
|
* Offline, rule-based estimate of how fast a `srcToken`→`dstToken` swap will settle.
|
|
14369
14370
|
*
|
|
14370
14371
|
* Derived purely from SDK config (no network / on-chain / backend call): tokens whose vault is a
|
|
14371
|
-
* money-market-reserve sodaAsset settle faster, and an Ethereum leg adds a fixed penalty.
|
|
14372
|
-
*
|
|
14372
|
+
* money-market-reserve sodaAsset settle faster, and an Ethereum leg adds a fixed penalty. RWA vaults
|
|
14373
|
+
* (tokenized stocks) are collateral-only reserves sourced through their own markets, so they never
|
|
14374
|
+
* count as sodaAssets. See {@link estimateSwapSpeedTier} for the rules.
|
|
14373
14375
|
*
|
|
14374
14376
|
* @param params `{ srcToken, dstToken }` spoke token pair to estimate
|
|
14375
14377
|
* @returns the estimated `tier` bucket and `estimatedSeconds`
|
|
@@ -18084,6 +18086,8 @@ declare class MoneyMarketService {
|
|
|
18084
18086
|
* @returns ABI-encoded multicall data ready to be sent to the hub wallet router.
|
|
18085
18087
|
*/
|
|
18086
18088
|
buildSupplyData(srcChainKey: SpokeChainKey, fromToken: string, amount: bigint, toHubAddress: Address): Hex;
|
|
18089
|
+
/** The pool reserve a borrow of `vault` draws on: bnUSD is borrowed from its debt reserve, then wrapped into the vault. */
|
|
18090
|
+
private getBorrowReserve;
|
|
18087
18091
|
/**
|
|
18088
18092
|
* Encode the hub-side calldata for a borrow operation.
|
|
18089
18093
|
*
|
|
@@ -20376,10 +20380,8 @@ declare class Sodax {
|
|
|
20376
20380
|
readonly spoke: SpokeService;
|
|
20377
20381
|
constructor(options?: SodaxOptions);
|
|
20378
20382
|
/**
|
|
20379
|
-
*
|
|
20380
|
-
*
|
|
20381
|
-
* NOTE: Default configuration will be used if initialization fails.
|
|
20382
|
-
* @param sodax - The Sodax instance to initialize.
|
|
20383
|
+
* Currently returns success without fetching backend config: chains and tokens stay those packaged with
|
|
20384
|
+
* this release, plus constructor overrides. For tokens listed later, use the `sodax.api.*` clients or upgrade.
|
|
20383
20385
|
*/
|
|
20384
20386
|
initialize(): Promise<Result<void>>;
|
|
20385
20387
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -8840,7 +8840,8 @@ type ConfigServiceConstructorParams = {
|
|
|
8840
8840
|
radfiSigner?: RadfiSigner;
|
|
8841
8841
|
};
|
|
8842
8842
|
/**
|
|
8843
|
-
*
|
|
8843
|
+
* ConfigService - Holds the SDK config (packaged defaults merged with constructor overrides) and the lookups built
|
|
8844
|
+
* from it. `initialize()` does not fetch backend config yet, so supported chains and tokens are the packaged ones.
|
|
8844
8845
|
*/
|
|
8845
8846
|
declare class ConfigService {
|
|
8846
8847
|
private sodax;
|
|
@@ -13577,8 +13578,8 @@ declare const SPEED_TIER_THRESHOLDS: {
|
|
|
13577
13578
|
* (sodaAsset)?". It is queried with `XToken.vault`, not `XToken.hubAsset`: the reserve set is
|
|
13578
13579
|
* built from `moneyMarketHubVaults` addresses, so a hub asset only matches for the Sonic vault
|
|
13579
13580
|
* shares themselves, where `hubAsset === vault`. In the service this is wired to
|
|
13580
|
-
* `config.isMoneyMarketReserveAsset
|
|
13581
|
-
* unit-testable without a ConfigService.
|
|
13581
|
+
* `config.isMoneyMarketReserveAsset`, excluding RWA vaults (collateral-only reserves). The predicate
|
|
13582
|
+
* is injected so this function stays pure and unit-testable without a ConfigService.
|
|
13582
13583
|
*
|
|
13583
13584
|
* The fast 15s base applies when either token is sodaAsset-related; otherwise the base is 35s.
|
|
13584
13585
|
*/
|
|
@@ -14368,8 +14369,9 @@ declare class SwapService {
|
|
|
14368
14369
|
* Offline, rule-based estimate of how fast a `srcToken`→`dstToken` swap will settle.
|
|
14369
14370
|
*
|
|
14370
14371
|
* Derived purely from SDK config (no network / on-chain / backend call): tokens whose vault is a
|
|
14371
|
-
* money-market-reserve sodaAsset settle faster, and an Ethereum leg adds a fixed penalty.
|
|
14372
|
-
*
|
|
14372
|
+
* money-market-reserve sodaAsset settle faster, and an Ethereum leg adds a fixed penalty. RWA vaults
|
|
14373
|
+
* (tokenized stocks) are collateral-only reserves sourced through their own markets, so they never
|
|
14374
|
+
* count as sodaAssets. See {@link estimateSwapSpeedTier} for the rules.
|
|
14373
14375
|
*
|
|
14374
14376
|
* @param params `{ srcToken, dstToken }` spoke token pair to estimate
|
|
14375
14377
|
* @returns the estimated `tier` bucket and `estimatedSeconds`
|
|
@@ -18084,6 +18086,8 @@ declare class MoneyMarketService {
|
|
|
18084
18086
|
* @returns ABI-encoded multicall data ready to be sent to the hub wallet router.
|
|
18085
18087
|
*/
|
|
18086
18088
|
buildSupplyData(srcChainKey: SpokeChainKey, fromToken: string, amount: bigint, toHubAddress: Address): Hex;
|
|
18089
|
+
/** The pool reserve a borrow of `vault` draws on: bnUSD is borrowed from its debt reserve, then wrapped into the vault. */
|
|
18090
|
+
private getBorrowReserve;
|
|
18087
18091
|
/**
|
|
18088
18092
|
* Encode the hub-side calldata for a borrow operation.
|
|
18089
18093
|
*
|
|
@@ -20376,10 +20380,8 @@ declare class Sodax {
|
|
|
20376
20380
|
readonly spoke: SpokeService;
|
|
20377
20381
|
constructor(options?: SodaxOptions);
|
|
20378
20382
|
/**
|
|
20379
|
-
*
|
|
20380
|
-
*
|
|
20381
|
-
* NOTE: Default configuration will be used if initialization fails.
|
|
20382
|
-
* @param sodax - The Sodax instance to initialize.
|
|
20383
|
+
* Currently returns success without fetching backend config: chains and tokens stay those packaged with
|
|
20384
|
+
* this release, plus constructor overrides. For tokens listed later, use the `sodax.api.*` clients or upgrade.
|
|
20383
20385
|
*/
|
|
20384
20386
|
initialize(): Promise<Result<void>>;
|
|
20385
20387
|
}
|