@cowprotocol/cow-sdk 6.0.0-RC.77 → 6.0.0-RC.79

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.
@@ -1,12 +1,12 @@
1
- import { Signer } from 'ethers';
2
1
  import { latest as latestAppData } from '@cowprotocol/app-data';
3
- import { JsonRpcProvider } from '@ethersproject/providers';
4
2
  import { BridgeDeposit, BridgeHook, BridgeProvider, BridgeProviderInfo, BridgeQuoteResult, BridgeStatusResult, BridgingDepositParams, BuyTokensParams, QuoteBridgeRequest } from '../../types';
5
3
  import { ChainId, ChainInfo, SupportedChainId } from '../../../chains';
6
4
  import { EvmCall, TokenInfo } from '../../../common';
7
5
  import { BungeeApi, BungeeApiOptions } from './BungeeApi';
8
6
  import { CowShedSdk, CowShedSdkOptions } from '../../../cow-shed';
9
7
  import { BungeeBuildTx, BungeeQuote } from './types';
8
+ import type { JsonRpcProvider } from '@ethersproject/providers';
9
+ import type { Signer } from 'ethers';
10
10
  export declare const BUNGEE_HOOK_DAPP_ID = "cow-sdk://bridging/providers/bungee";
11
11
  export declare const BUNGEE_SUPPORTED_NETWORKS: ChainInfo[];
12
12
  export interface BungeeBridgeProviderOptions {
@@ -32,12 +32,11 @@ export declare class BungeeBridgeProvider implements BridgeProvider<BungeeQuoteR
32
32
  getUnsignedBridgeCall(request: QuoteBridgeRequest, quote: BungeeQuoteResult): Promise<EvmCall>;
33
33
  getGasLimitEstimationForHook(request: QuoteBridgeRequest): Promise<number>;
34
34
  getSignedHook(chainId: SupportedChainId, unsignedCall: EvmCall, signer: Signer, bridgeHookNonce: string, deadline: bigint, hookGasLimit: number): Promise<BridgeHook>;
35
- getBridgingParams(_chainId: ChainId, orderId: string, txHash: string): Promise<{
35
+ getBridgingParams(_chainId: ChainId, orderId: string, _txHash: string): Promise<{
36
36
  params: BridgingDepositParams;
37
37
  status: BridgeStatusResult;
38
38
  } | null>;
39
39
  decodeBridgeHook(_hook: latestAppData.CoWHook): Promise<BridgeDeposit>;
40
- getBridgingId(_orderUid: string, _settlementTx: string, _logIndex: number): Promise<string>;
41
40
  getExplorerUrl(bridgingId: string): string;
42
41
  getStatus(_bridgingId: string): Promise<BridgeStatusResult>;
43
42
  getCancelBridgingTx(_bridgingId: string): Promise<EvmCall>;
@@ -1,9 +1,9 @@
1
1
  import { latest as latestAppData } from '@cowprotocol/app-data';
2
2
  import { BridgeDeposit, BridgeHook, BridgeProvider, BridgeProviderInfo, BridgeQuoteResult, BridgeStatusResult, BridgingDepositParams, BuyTokensParams, QuoteBridgeRequest } from '../../types';
3
- import { EvmCall, TokenInfo } from '../../../common';
4
- import { ChainId, ChainInfo, SupportedChainId } from '../../../chains';
5
3
  import { Signer } from '@ethersproject/abstract-signer';
6
4
  import { JsonRpcProvider } from '@ethersproject/providers';
5
+ import { ChainId, ChainInfo, SupportedChainId } from '../../../chains';
6
+ import { EvmCall, TokenInfo } from '../../../common';
7
7
  export declare class MockBridgeProvider implements BridgeProvider<BridgeQuoteResult> {
8
8
  info: BridgeProviderInfo;
9
9
  getRpcProvider(): JsonRpcProvider;
@@ -2,9 +2,17 @@ import { SupportedChainId } from '../../chains/types';
2
2
  export declare const ETH_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
3
3
  export declare const EXTENSIBLE_FALLBACK_HANDLER = "0x2f55e8b20D0B9FEFA187AA7d00B6Cbe563605bF5";
4
4
  export declare const COMPOSABLE_COW = "0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74";
5
- export declare const COW_SHED_FACTORY = "0x312f92fe5f1710408B20D52A374fa29e099cFA86";
6
- export declare const COW_SHED_IMPLEMENTATION = "0xa2704cf562ad418bf0453f4b662ebf6a2489ed88";
7
- export declare const COW_SHED_VERSION = "1.0.1";
5
+ export declare const COW_SHED_1_0_0_VERSION = "1.0.0";
6
+ export declare const COW_SHED_LATEST_VERSION = "1.0.1";
7
+ export type CoWShedVersion = typeof COW_SHED_1_0_0_VERSION | typeof COW_SHED_LATEST_VERSION;
8
+ export declare const COW_SHED_FACTORY: {
9
+ readonly "1.0.0": "0x00E989b87700514118Fa55326CD1cCE82faebEF6";
10
+ readonly "1.0.1": "0x312f92fe5f1710408B20D52A374fa29e099cFA86";
11
+ };
12
+ export declare const COW_SHED_IMPLEMENTATION: {
13
+ readonly "1.0.0": "0x2CFFA8cf11B90C9F437567b86352169dF4009F73";
14
+ readonly "1.0.1": "0xa2704cf562ad418bf0453f4b662ebf6a2489ed88";
15
+ };
8
16
  /**
9
17
  * An object containing the addresses of the CoW Protocol settlement contracts for each supported chain.
10
18
  */
@@ -1,4 +1,4 @@
1
- import { EvmCall, SignerLike } from '../common';
1
+ import { CoWShedVersion, EvmCall, SignerLike } from '../common';
2
2
  import { SupportedChainId } from '../chains';
3
3
  import { CowShedHooks } from './contracts/CoWShedHooks';
4
4
  import { EcdsaSigningScheme } from '@cowprotocol/contracts';
@@ -57,9 +57,9 @@ export interface CowShedSdkOptions {
57
57
  }
58
58
  export declare class CowShedSdk {
59
59
  private options;
60
- readonly version = "1.0.1";
60
+ readonly version: CoWShedVersion;
61
61
  protected hooksCache: Map<SupportedChainId, CowShedHooks>;
62
- constructor(options?: CowShedSdkOptions);
62
+ constructor(options?: CowShedSdkOptions, version?: CoWShedVersion);
63
63
  getCowShedAccount(chainId: SupportedChainId, ownerAddress: string): string;
64
64
  /**
65
65
  * Encodes multiple calls into a single pre-authorized call to the cow-shed factory.
@@ -1,6 +1,7 @@
1
1
  import { EcdsaSigningScheme } from '@cowprotocol/contracts';
2
2
  import { SupportedChainId } from '../../chains';
3
3
  import type { Signer, TypedDataDomain } from '@ethersproject/abstract-signer';
4
+ import { CoWShedVersion } from '../../common';
4
5
  import { ICoWShedCall, ICoWShedOptions } from '../types';
5
6
  export declare const COW_SHED_PROXY_INIT_CODE = "0x60a03461009557601f61033d38819003918201601f19168301916001600160401b0383118484101761009957808492604094855283398101031261009557610052602061004b836100ad565b92016100ad565b6080527f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5560405161027b90816100c28239608051818181608b01526101750152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036100955756fe60806040526004361015610018575b3661019757610197565b5f3560e01c8063025b22bc146100375763f851a4400361000e57610116565b346101125760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101125760043573ffffffffffffffffffffffffffffffffffffffff81169081810361011257337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff160361010d577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a2005b61023d565b5f80fd5b34610112575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011257602061014e61016c565b73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b33300361010d577f000000000000000000000000000000000000000000000000000000000000000090565b60ff7f68df44b1011761f481358c0f49a711192727fb02c377d697bcb0ea8ff8393ac0541615806101f0575b1561023d577ff92ee8a9000000000000000000000000000000000000000000000000000000005f5260045ffd5b507f400ada75000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000005f351614156101c3565b5f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15610277573d5ff35b3d5ffd";
6
7
  export declare const COW_SHED_712_TYPES: {
@@ -16,8 +17,8 @@ export declare const COW_SHED_712_TYPES: {
16
17
  export declare class CowShedHooks {
17
18
  private chainId;
18
19
  private customOptions?;
19
- readonly version = "1.0.1";
20
- constructor(chainId: SupportedChainId, customOptions?: ICoWShedOptions | undefined);
20
+ readonly version: CoWShedVersion;
21
+ constructor(chainId: SupportedChainId, customOptions?: ICoWShedOptions | undefined, version?: CoWShedVersion);
21
22
  proxyOf(user: string): string;
22
23
  encodeExecuteHooksForFactory(calls: ICoWShedCall[], nonce: string, deadline: bigint, user: string, signature: string): string;
23
24
  signCalls(calls: ICoWShedCall[], nonce: string, deadline: bigint, signer: Signer, signingScheme: EcdsaSigningScheme): Promise<string>;