@cowprotocol/cow-sdk 6.2.0-RC.3 → 6.2.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/dist/bridging/BridgingSdk/BridgingSdk.d.ts +3 -3
- package/dist/bridging/BridgingSdk/mock/bridgeRequestMocks.d.ts +1 -2
- package/dist/bridging/providers/across/AcrossBridgeProvider.d.ts +2 -2
- package/dist/bridging/providers/bungee/BungeeBridgeProvider.d.ts +2 -2
- package/dist/bridging/providers/bungee/types.d.ts +2 -3
- package/dist/bridging/providers/mock/MockBridgeProvider.d.ts +2 -2
- package/dist/bridging/types.d.ts +1 -5
- package/dist/index-7b4950ee.js +29 -0
- package/dist/index-7b4950ee.js.map +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +1 -1
- package/dist/index.module.js +2 -2
- package/dist/index.module.js.map +1 -1
- package/dist/package.json +1 -2
- package/dist/{utils-56a4c309.js → utils-0027f121.js} +1 -1
- package/dist/{utils-56a4c309.js.map → utils-0027f121.js.map} +1 -1
- package/dist/{utils-8fe9ea79.js → utils-23bf76fc.js} +1 -1
- package/dist/{utils-8fe9ea79.js.map → utils-23bf76fc.js.map} +1 -1
- package/dist/{utils-001ddce4.js → utils-fc43cd05.js} +2 -2
- package/dist/{utils-001ddce4.js.map → utils-fc43cd05.js.map} +1 -1
- package/package.json +1 -2
- package/dist/index-0c920742.js +0 -29
- package/dist/index-0c920742.js.map +0 -1
- package/dist/test/getWallet.d.ts +0 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SwapAdvancedSettings, TradingSdk } from '../../trading';
|
|
2
|
-
import { BridgeProvider, BridgeQuoteResult, BridgeStatusResult, BuyTokensParams, CrossChainOrder, CrossChainQuoteAndPost,
|
|
3
|
-
import { CowEnv } from '../../common';
|
|
2
|
+
import { BridgeProvider, BridgeQuoteResult, BridgeStatusResult, BuyTokensParams, CrossChainOrder, CrossChainQuoteAndPost, QuoteBridgeRequest } from '../types';
|
|
3
|
+
import { CowEnv, TokenInfo } from '../../common';
|
|
4
4
|
import { ChainInfo, SupportedChainId } from '../../chains';
|
|
5
5
|
import { OrderBookApi } from '../../order-book';
|
|
6
6
|
export interface BridgingSdkOptions {
|
|
@@ -64,7 +64,7 @@ export declare class BridgingSdk {
|
|
|
64
64
|
|
|
65
65
|
* @param params
|
|
66
66
|
*/
|
|
67
|
-
getBuyTokens(params: BuyTokensParams): Promise<
|
|
67
|
+
getBuyTokens(params: BuyTokensParams): Promise<TokenInfo[]>;
|
|
68
68
|
/**
|
|
69
69
|
* Get quote details, including a callback function to post the order on-chain.
|
|
70
70
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BridgeCallDetails, BridgeQuoteResult,
|
|
1
|
+
import { BridgeCallDetails, BridgeQuoteResult, QuoteBridgeRequest } from '../../types';
|
|
2
2
|
import { OrderQuoteResponse, QuoteAmountsAndCosts } from '../../../order-book';
|
|
3
3
|
import { AppDataInfo, OrderTypedData, TradeParameters } from '../../../trading';
|
|
4
4
|
import { UnsignedOrder } from '../../../order-signing';
|
|
@@ -18,4 +18,3 @@ export declare const appDataInfo: AppDataInfo;
|
|
|
18
18
|
export declare const tradeParameters: TradeParameters;
|
|
19
19
|
export declare const orderToSign: UnsignedOrder;
|
|
20
20
|
export declare const orderTypedData: OrderTypedData;
|
|
21
|
-
export declare const buyTokensParams: BuyTokensParams;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Signer } from 'ethers';
|
|
2
2
|
import { latest as latestAppData } from '@cowprotocol/app-data';
|
|
3
|
-
import { BridgeDeposit, BridgeHook, BridgeProvider, BridgeProviderInfo, BridgeQuoteResult, BridgeStatusResult, BridgingDepositParams, BuyTokensParams,
|
|
3
|
+
import { BridgeDeposit, BridgeHook, BridgeProvider, BridgeProviderInfo, BridgeQuoteResult, BridgeStatusResult, BridgingDepositParams, BuyTokensParams, QuoteBridgeRequest } from '../../types';
|
|
4
4
|
import { ChainId, ChainInfo, SupportedChainId } from '../../../chains';
|
|
5
5
|
import { EvmCall, TokenInfo } from '../../../common';
|
|
6
6
|
import { AcrossApi, AcrossApiOptions } from './AcrossApi';
|
|
@@ -25,7 +25,7 @@ export declare class AcrossBridgeProvider implements BridgeProvider<AcrossQuoteR
|
|
|
25
25
|
constructor(options: AcrossBridgeProviderOptions);
|
|
26
26
|
info: BridgeProviderInfo;
|
|
27
27
|
getNetworks(): Promise<ChainInfo[]>;
|
|
28
|
-
getBuyTokens(params: BuyTokensParams): Promise<
|
|
28
|
+
getBuyTokens(params: BuyTokensParams): Promise<TokenInfo[]>;
|
|
29
29
|
getIntermediateTokens(request: QuoteBridgeRequest): Promise<TokenInfo[]>;
|
|
30
30
|
getQuote(request: QuoteBridgeRequest): Promise<AcrossQuoteResult>;
|
|
31
31
|
getUnsignedBridgeCall(request: QuoteBridgeRequest, quote: AcrossQuoteResult): Promise<EvmCall>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { latest as latestAppData } from '@cowprotocol/app-data';
|
|
2
|
-
import { BridgeDeposit, BridgeHook, BridgeProvider, BridgeProviderInfo, BridgeQuoteResult, BridgeStatusResult, BridgingDepositParams, BuyTokensParams,
|
|
2
|
+
import { BridgeDeposit, BridgeHook, BridgeProvider, BridgeProviderInfo, BridgeQuoteResult, BridgeStatusResult, BridgingDepositParams, BuyTokensParams, QuoteBridgeRequest } from '../../types';
|
|
3
3
|
import { ChainId, ChainInfo, SupportedChainId } from '../../../chains';
|
|
4
4
|
import { EvmCall, TokenInfo } from '../../../common';
|
|
5
5
|
import { BungeeApi, BungeeApiOptions } from './BungeeApi';
|
|
@@ -26,7 +26,7 @@ export declare class BungeeBridgeProvider implements BridgeProvider<BungeeQuoteR
|
|
|
26
26
|
constructor(options: BungeeBridgeProviderOptions);
|
|
27
27
|
info: BridgeProviderInfo;
|
|
28
28
|
getNetworks(): Promise<ChainInfo[]>;
|
|
29
|
-
getBuyTokens(params: BuyTokensParams): Promise<
|
|
29
|
+
getBuyTokens(params: BuyTokensParams): Promise<TokenInfo[]>;
|
|
30
30
|
getIntermediateTokens(request: QuoteBridgeRequest): Promise<TokenInfo[]>;
|
|
31
31
|
getQuote(request: QuoteBridgeRequest): Promise<BungeeQuoteResult>;
|
|
32
32
|
getUnsignedBridgeCall(request: QuoteBridgeRequest, quote: BungeeQuoteResult): Promise<EvmCall>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type SupportedBridge = 'across' | 'cctp'
|
|
1
|
+
export type SupportedBridge = 'across' | 'cctp';
|
|
2
2
|
export interface BungeeQuoteAPIRequest {
|
|
3
3
|
userAddress: string;
|
|
4
4
|
originChainId: string;
|
|
@@ -105,8 +105,7 @@ export interface BungeeQuoteAPIResponse {
|
|
|
105
105
|
}
|
|
106
106
|
export declare enum BungeeBridge {
|
|
107
107
|
'Across' = "across",
|
|
108
|
-
'CircleCCTP' = "cctp"
|
|
109
|
-
'GnosisNative' = "gnosis-native-bridge"
|
|
108
|
+
'CircleCCTP' = "cctp"
|
|
110
109
|
}
|
|
111
110
|
export declare const BungeeBridgeNames: Record<string, BungeeBridge>;
|
|
112
111
|
export interface BungeeQuote {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { latest as latestAppData } from '@cowprotocol/app-data';
|
|
2
|
-
import { BridgeDeposit, BridgeHook, BridgeProvider, BridgeProviderInfo, BridgeQuoteResult, BridgeStatusResult, BridgingDepositParams, BuyTokensParams,
|
|
2
|
+
import { BridgeDeposit, BridgeHook, BridgeProvider, BridgeProviderInfo, BridgeQuoteResult, BridgeStatusResult, BridgingDepositParams, BuyTokensParams, QuoteBridgeRequest } from '../../types';
|
|
3
3
|
import { Signer } from '@ethersproject/abstract-signer';
|
|
4
4
|
import { JsonRpcProvider } from '@ethersproject/providers';
|
|
5
5
|
import { ChainId, ChainInfo, SupportedChainId } from '../../../chains';
|
|
@@ -8,7 +8,7 @@ export declare class MockBridgeProvider implements BridgeProvider<BridgeQuoteRes
|
|
|
8
8
|
info: BridgeProviderInfo;
|
|
9
9
|
getRpcProvider(): JsonRpcProvider;
|
|
10
10
|
getNetworks(): Promise<ChainInfo[]>;
|
|
11
|
-
getBuyTokens(params: BuyTokensParams): Promise<
|
|
11
|
+
getBuyTokens(params: BuyTokensParams): Promise<TokenInfo[]>;
|
|
12
12
|
getIntermediateTokens({ sellTokenChainId }: QuoteBridgeRequest): Promise<TokenInfo[]>;
|
|
13
13
|
getQuote(_request: QuoteBridgeRequest): Promise<BridgeQuoteResult>;
|
|
14
14
|
getGasLimitEstimationForHook(_request: QuoteBridgeRequest): Promise<number>;
|
package/dist/bridging/types.d.ts
CHANGED
|
@@ -109,10 +109,6 @@ export interface BuyTokensParams {
|
|
|
109
109
|
sellChainId?: SupportedChainId;
|
|
110
110
|
sellTokenAddress?: string;
|
|
111
111
|
}
|
|
112
|
-
export interface GetProviderBuyTokens {
|
|
113
|
-
tokens: TokenInfo[];
|
|
114
|
-
isRouteAvailable: boolean;
|
|
115
|
-
}
|
|
116
112
|
/**
|
|
117
113
|
* A bridge deposit. It includes the provideer information, sell amount and the minimum buy amount.
|
|
118
114
|
*
|
|
@@ -134,7 +130,7 @@ export interface BridgeProvider<Q extends BridgeQuoteResult> {
|
|
|
134
130
|
/**
|
|
135
131
|
* Get supported tokens for a chain
|
|
136
132
|
*/
|
|
137
|
-
getBuyTokens(params: BuyTokensParams): Promise<
|
|
133
|
+
getBuyTokens(params: BuyTokensParams): Promise<TokenInfo[]>;
|
|
138
134
|
/**
|
|
139
135
|
* Get intermediate tokens given a quote request.
|
|
140
136
|
*
|