@sodax/types 2.0.0-rc.9 → 2.1.0-rc.1
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/backend/backendApiV1.d.ts +28 -0
- package/dist/backend/backendApiV2.d.ts +678 -0
- package/dist/backend/backendApiV2.js +38 -0
- package/dist/backend/index.d.ts +3 -1
- package/dist/backend/index.js +3 -1
- package/dist/backend/sponsoringApi.d.ts +62 -0
- package/dist/backend/sponsoringApi.js +12 -0
- package/dist/bitcoin/bitcoin.d.ts +18 -0
- package/dist/bitcoin/bitcoin.js +13 -0
- package/dist/chains/chain-keys.d.ts +3 -2
- package/dist/chains/chain-keys.js +1 -0
- package/dist/chains/chains.d.ts +435 -16
- package/dist/chains/chains.js +76 -4
- package/dist/chains/tokens.d.ts +592 -12
- package/dist/chains/tokens.js +285 -5
- package/dist/common/common.d.ts +15 -7
- package/dist/common/constants.d.ts +35 -1
- package/dist/common/constants.js +6 -0
- package/dist/dex/dex.d.ts +4 -1
- package/dist/hooks/hooks.d.ts +42 -0
- package/dist/hooks/hooks.js +44 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/injective/injective.d.ts +4 -0
- package/dist/leverageYield/index.d.ts +1 -0
- package/dist/leverageYield/index.js +1 -0
- package/dist/leverageYield/leverageYield.d.ts +152 -0
- package/dist/leverageYield/leverageYield.js +51 -0
- package/dist/moneyMarket/moneyMarket.d.ts +248 -6
- package/dist/moneyMarket/moneyMarket.js +13 -0
- package/dist/near/near-api-js.d.ts +453 -453
- package/dist/near/near.d.ts +5 -1
- package/dist/shared/analytics.d.ts +119 -0
- package/dist/shared/analytics.js +1 -0
- package/dist/shared/features.d.ts +9 -0
- package/dist/shared/features.js +1 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.js +3 -0
- package/dist/shared/logger.d.ts +27 -0
- package/dist/shared/logger.js +1 -0
- package/dist/shared/shared.d.ts +21 -0
- package/dist/sodax-config/sodax-config.d.ts +769 -73
- package/dist/sodax-config/sodax-config.js +3 -4
- package/dist/solana/solana.d.ts +2 -0
- package/dist/stacks/stacks.d.ts +2 -0
- package/dist/stellar/stellar.d.ts +11 -1
- package/dist/sui/sui.d.ts +3 -2
- package/dist/swap/swap.d.ts +478 -90
- package/dist/swap/swap.js +79 -12
- package/dist/utils/utils.js +1 -1
- package/dist/wallet/wallet.d.ts +2 -2
- package/package.json +3 -3
- package/dist/backend/backendApi.d.ts +0 -74
- /package/dist/backend/{backendApi.js → backendApiV1.js} +0 -0
|
@@ -2,18 +2,17 @@ import { apiConfig, solverConfig, relayConfig, } from '../common/constants.js';
|
|
|
2
2
|
import { moneyMarketConfig } from '../moneyMarket/moneyMarket.js';
|
|
3
3
|
import { dexConfig } from '../dex/dex.js';
|
|
4
4
|
import { swapsConfig } from '../swap/swap.js';
|
|
5
|
+
import { leverageYieldConfig, } from '../leverageYield/leverageYield.js';
|
|
5
6
|
import { spokeChainConfig, hubConfig, } from '../chains/chains.js';
|
|
6
|
-
export const bridgeConfig = {
|
|
7
|
-
partnerFee: undefined,
|
|
8
|
-
};
|
|
7
|
+
export const bridgeConfig = {};
|
|
9
8
|
// default sodax config object which can always be overriden through Sodax instance (i.e. new Sodax(...config))
|
|
10
9
|
export const sodaxConfig = {
|
|
11
|
-
fee: undefined,
|
|
12
10
|
chains: spokeChainConfig,
|
|
13
11
|
swaps: swapsConfig,
|
|
14
12
|
moneyMarket: moneyMarketConfig,
|
|
15
13
|
bridge: bridgeConfig,
|
|
16
14
|
dex: dexConfig,
|
|
15
|
+
leverageYield: leverageYieldConfig,
|
|
17
16
|
hub: hubConfig,
|
|
18
17
|
api: apiConfig,
|
|
19
18
|
solver: solverConfig,
|
package/dist/solana/solana.d.ts
CHANGED
|
@@ -100,6 +100,8 @@ export interface ISolanaWalletProvider extends ICoreWallet {
|
|
|
100
100
|
readonly chainType: 'SOLANA';
|
|
101
101
|
getWalletAddress: () => Promise<string>;
|
|
102
102
|
sendTransaction: (rawTransaction: Uint8Array | Array<number>) => Promise<TransactionSignature>;
|
|
103
|
+
/** Deserialize, sign, and broadcast an unsigned `SolanaRawTransaction` (e.g. from the Swaps API). */
|
|
104
|
+
signAndSendTransaction?: (params: SolanaRawTransaction) => Promise<TransactionSignature>;
|
|
103
105
|
waitForConfirmation: (signature: TransactionSignature, commitment: Commitment) => Promise<SolanaRpcResponseAndContext<SolanaSignatureResult>>;
|
|
104
106
|
buildV0Txn: (instructions: SolanaRawTransactionInstruction[]) => Promise<SolanaSerializedTransaction>;
|
|
105
107
|
getWalletBase58PublicKey: () => SolanaBase58PublicKey;
|
package/dist/stacks/stacks.d.ts
CHANGED
|
@@ -207,4 +207,6 @@ export interface IStacksWalletProvider extends ICoreWallet {
|
|
|
207
207
|
getPublicKey: () => Promise<string>;
|
|
208
208
|
getBalance: (address: string) => Promise<bigint>;
|
|
209
209
|
sendTransaction: (txParams: StacksTransactionParams) => Promise<string>;
|
|
210
|
+
/** Sign and broadcast an unsigned `StacksRawTransaction` (e.g. from the Swaps API). Returns the tx id. */
|
|
211
|
+
signAndSendTransaction?: (params: StacksRawTransaction) => Promise<string>;
|
|
210
212
|
}
|
|
@@ -90,7 +90,17 @@ export type StellarRawTransaction = {
|
|
|
90
90
|
export type StellarReturnType<Raw extends boolean> = Raw extends true ? StellarRawTransaction : Raw extends false ? string : StellarRawTransaction | string;
|
|
91
91
|
export interface IStellarWalletProvider extends ICoreWallet {
|
|
92
92
|
readonly chainType: 'STELLAR';
|
|
93
|
-
|
|
93
|
+
/**
|
|
94
|
+
* Sign without broadcasting. Pass `options.address` when a specific
|
|
95
|
+
* account must sign; browser wallets otherwise use their active account.
|
|
96
|
+
*/
|
|
97
|
+
signTransaction: (tx: XDR, options?: {
|
|
98
|
+
address?: string;
|
|
99
|
+
}) => Promise<XDR>;
|
|
94
100
|
waitForTransactionReceipt: (txHash: string) => Promise<StellarRawTransactionReceipt>;
|
|
101
|
+
/** Broadcast an already-signed XDR transaction via the Soroban RPC server. Returns the tx hash. */
|
|
102
|
+
sendTransaction?: (signedTx: XDR) => Promise<string>;
|
|
103
|
+
/** Sign and broadcast an unsigned `StellarRawTransaction` (e.g. from the Swaps API). Returns the tx hash. */
|
|
104
|
+
signAndSendTransaction?: (params: StellarRawTransaction) => Promise<string>;
|
|
95
105
|
}
|
|
96
106
|
export {};
|
package/dist/sui/sui.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Hex } from '../shared/shared.js';
|
|
2
2
|
import type { ICoreWallet } from '../wallet/wallet.js';
|
|
3
3
|
export type SuiReturnType<Raw extends boolean> = Raw extends true ? SuiRawTransaction : Raw extends false ? string : SuiRawTransaction | string;
|
|
4
4
|
export type SuiRawTransaction = {
|
|
5
5
|
from: Hex;
|
|
6
6
|
to: string;
|
|
7
7
|
value: bigint;
|
|
8
|
-
|
|
8
|
+
/** The @mysten/sui Transaction JSON from `Transaction#serialize()`; reconstruct with `Transaction.from()`. */
|
|
9
|
+
data: string;
|
|
9
10
|
};
|
|
10
11
|
export type SuiTransaction = {
|
|
11
12
|
toJSON: () => Promise<string>;
|