@ember-finance/sdk 2.19.0 → 2.21.0-ccip.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/src/abis/CcipRouter.json +58 -0
- package/dist/src/abis/index.d.ts +3 -1
- package/dist/src/abis/index.js +4 -1
- package/dist/src/api/v2/models/account-transaction-transaction-data.d.ts +2 -1
- package/dist/src/api/v2/models/account-transaction.d.ts +2 -0
- package/dist/src/api/v2/models/account-transaction.js +3 -1
- package/dist/src/api/v2/models/bridge-transaction.d.ts +50 -0
- package/dist/src/api/v2/models/bridge-transaction.js +14 -0
- package/dist/src/api/v2/models/chain.d.ts +6 -0
- package/dist/src/api/v2/models/evm-ccip-lane.d.ts +73 -0
- package/dist/src/api/v2/models/evm-ccip-lane.js +14 -0
- package/dist/src/api/v2/models/evm-ccip-rate-limits.d.ts +36 -0
- package/dist/src/api/v2/models/evm-ccip-rate-limits.js +14 -0
- package/dist/src/api/v2/models/evm-ccip-token-pool.d.ts +122 -0
- package/dist/src/api/v2/models/evm-ccip-token-pool.js +17 -0
- package/dist/src/api/v2/models/evm-contracts.d.ts +9 -0
- package/dist/src/api/v2/models/evm-oftadapter.d.ts +11 -0
- package/dist/src/api/v2/models/evm-oftadapter.js +4 -1
- package/dist/src/api/v2/models/evm-oftpeer.d.ts +12 -0
- package/dist/src/api/v2/models/index.d.ts +4 -0
- package/dist/src/api/v2/models/index.js +4 -0
- package/dist/src/evm-vaults/interfaces/index.d.ts +39 -0
- package/dist/src/evm-vaults/on-chain-calls/tx-builder.d.ts +15 -1
- package/dist/src/evm-vaults/on-chain-calls/tx-builder.js +36 -0
- package/dist/src/evm-vaults/on-chain-calls/user.d.ts +40 -1
- package/dist/src/evm-vaults/on-chain-calls/user.js +75 -0
- package/dist/src/evm-vaults/on-chain-calls/vault-reader.d.ts +14 -1
- package/dist/src/evm-vaults/on-chain-calls/vault-reader.js +30 -0
- package/dist/src/evm-vaults/utils/ccip.d.ts +23 -0
- package/dist/src/evm-vaults/utils/ccip.js +32 -0
- package/dist/src/evm-vaults/utils/deployment-parser.d.ts +46 -1
- package/dist/src/evm-vaults/utils/deployment-parser.js +74 -0
- package/dist/src/evm-vaults/utils/index.d.ts +1 -0
- package/dist/src/evm-vaults/utils/index.js +1 -0
- package/dist/src/sui-vaults/interfaces/index.d.ts +14 -0
- package/dist/src/sui-vaults/interfaces/index.js +15 -1
- package/dist/src/sui-vaults/on-chain-calls/tx-builder.d.ts +27 -1
- package/dist/src/sui-vaults/on-chain-calls/tx-builder.js +63 -0
- package/dist/src/sui-vaults/on-chain-calls/vault-admin.d.ts +29 -1
- package/dist/src/sui-vaults/on-chain-calls/vault-admin.js +42 -0
- package/package.json +1 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"abi": [
|
|
3
|
+
{
|
|
4
|
+
"type": "function",
|
|
5
|
+
"name": "getFee",
|
|
6
|
+
"stateMutability": "view",
|
|
7
|
+
"inputs": [
|
|
8
|
+
{ "name": "destChainSelector", "type": "uint64" },
|
|
9
|
+
{
|
|
10
|
+
"name": "message",
|
|
11
|
+
"type": "tuple",
|
|
12
|
+
"components": [
|
|
13
|
+
{ "name": "receiver", "type": "bytes" },
|
|
14
|
+
{ "name": "data", "type": "bytes" },
|
|
15
|
+
{
|
|
16
|
+
"name": "tokenAmounts",
|
|
17
|
+
"type": "tuple[]",
|
|
18
|
+
"components": [
|
|
19
|
+
{ "name": "token", "type": "address" },
|
|
20
|
+
{ "name": "amount", "type": "uint256" }
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{ "name": "feeToken", "type": "address" },
|
|
24
|
+
{ "name": "extraArgs", "type": "bytes" }
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"outputs": [{ "name": "fee", "type": "uint256" }]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "function",
|
|
32
|
+
"name": "ccipSend",
|
|
33
|
+
"stateMutability": "payable",
|
|
34
|
+
"inputs": [
|
|
35
|
+
{ "name": "destinationChainSelector", "type": "uint64" },
|
|
36
|
+
{
|
|
37
|
+
"name": "message",
|
|
38
|
+
"type": "tuple",
|
|
39
|
+
"components": [
|
|
40
|
+
{ "name": "receiver", "type": "bytes" },
|
|
41
|
+
{ "name": "data", "type": "bytes" },
|
|
42
|
+
{
|
|
43
|
+
"name": "tokenAmounts",
|
|
44
|
+
"type": "tuple[]",
|
|
45
|
+
"components": [
|
|
46
|
+
{ "name": "token", "type": "address" },
|
|
47
|
+
{ "name": "amount", "type": "uint256" }
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{ "name": "feeToken", "type": "address" },
|
|
51
|
+
{ "name": "extraArgs", "type": "bytes" }
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"outputs": [{ "name": "messageId", "type": "bytes32" }]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
package/dist/src/abis/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import EmberProtocolConfigABI from "./EmberProtocolConfig.json";
|
|
|
3
3
|
import ERC20TokenABI from "./ERC20Token.json";
|
|
4
4
|
import EmberVaultOFTAdapterABI from "./EmberVaultMintBurnOFTAdapter.json";
|
|
5
5
|
import OpenCoverVaultABI from "./OpenCoverVault.json";
|
|
6
|
+
import CcipRouterABI from "./CcipRouter.json";
|
|
6
7
|
import { Interface } from "ethers";
|
|
7
8
|
declare const EmberVault: Interface;
|
|
8
9
|
declare const EmberProtocolConfig: Interface;
|
|
@@ -10,4 +11,5 @@ declare const ERC20Token: Interface;
|
|
|
10
11
|
declare const EmberETHVault: Interface;
|
|
11
12
|
declare const EmberVaultOFTAdapter: Interface;
|
|
12
13
|
declare const OpenCoverVault: Interface;
|
|
13
|
-
|
|
14
|
+
declare const CcipRouter: Interface;
|
|
15
|
+
export { EmberVaultABI, EmberProtocolConfigABI, ERC20TokenABI, EmberVault, EmberProtocolConfig, ERC20Token, EmberETHVault, EmberVaultOFTAdapterABI, EmberVaultOFTAdapter, OpenCoverVaultABI, OpenCoverVault, CcipRouterABI, CcipRouter };
|
package/dist/src/abis/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import ERC20TokenABI from "./ERC20Token.json" with { type: "json" };
|
|
|
4
4
|
import EmberETHVaultABI from "./EmberETHVault.json" with { type: "json" };
|
|
5
5
|
import EmberVaultOFTAdapterABI from "./EmberVaultMintBurnOFTAdapter.json" with { type: "json" };
|
|
6
6
|
import OpenCoverVaultABI from "./OpenCoverVault.json" with { type: "json" };
|
|
7
|
+
import CcipRouterABI from "./CcipRouter.json" with { type: "json" };
|
|
7
8
|
import { Interface } from "ethers";
|
|
8
9
|
const EmberVault = new Interface(EmberVaultABI.abi);
|
|
9
10
|
const EmberProtocolConfig = new Interface(EmberProtocolConfigABI.abi);
|
|
@@ -11,4 +12,6 @@ const ERC20Token = new Interface(ERC20TokenABI.abi);
|
|
|
11
12
|
const EmberETHVault = new Interface(EmberETHVaultABI.abi);
|
|
12
13
|
const EmberVaultOFTAdapter = new Interface(EmberVaultOFTAdapterABI.abi);
|
|
13
14
|
const OpenCoverVault = new Interface(OpenCoverVaultABI.abi);
|
|
14
|
-
|
|
15
|
+
// Chainlink's Router, trimmed to what a bridge send needs: quote, then send.
|
|
16
|
+
const CcipRouter = new Interface(CcipRouterABI.abi);
|
|
17
|
+
export { EmberVaultABI, EmberProtocolConfigABI, ERC20TokenABI, EmberVault, EmberProtocolConfig, ERC20Token, EmberETHVault, EmberVaultOFTAdapterABI, EmberVaultOFTAdapter, OpenCoverVaultABI, OpenCoverVault, CcipRouterABI, CcipRouter };
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { BridgeTransaction } from "./bridge-transaction.js";
|
|
12
13
|
import type { DepositTransaction } from "./deposit-transaction.js";
|
|
13
14
|
import type { EscrowClaimTransaction } from "./escrow-claim-transaction.js";
|
|
14
15
|
import type { HoldbackReleaseTransaction } from "./holdback-release-transaction.js";
|
|
@@ -24,4 +25,4 @@ import type { RedeemRequestTransaction } from "./redeem-request-transaction.js";
|
|
|
24
25
|
* The data of the transaction
|
|
25
26
|
* @export
|
|
26
27
|
*/
|
|
27
|
-
export type AccountTransactionTransactionData = DepositTransaction | EscrowClaimTransaction | HoldbackReleaseTransaction | InstantWithdrawTransaction | InstantWithdrawViaSwapTransaction | ParkingLotDepositTransaction | RedeemRequestCancelledTransaction | RedeemRequestProcessedTransaction | RedeemRequestSkippedTransaction | RedeemRequestTransaction;
|
|
28
|
+
export type AccountTransactionTransactionData = BridgeTransaction | DepositTransaction | EscrowClaimTransaction | HoldbackReleaseTransaction | InstantWithdrawTransaction | InstantWithdrawViaSwapTransaction | ParkingLotDepositTransaction | RedeemRequestCancelledTransaction | RedeemRequestProcessedTransaction | RedeemRequestSkippedTransaction | RedeemRequestTransaction;
|
|
@@ -51,5 +51,7 @@ export declare const AccountTransactionTransactionTypeEnum: {
|
|
|
51
51
|
readonly InstantWithdrawSwapHoldbackRelease: "InstantWithdrawSwapHoldbackRelease";
|
|
52
52
|
readonly HoldbackClaimed: "HoldbackClaimed";
|
|
53
53
|
readonly WithdrawalClaimed: "WithdrawalClaimed";
|
|
54
|
+
readonly BridgeIn: "BridgeIn";
|
|
55
|
+
readonly BridgeOut: "BridgeOut";
|
|
54
56
|
};
|
|
55
57
|
export type AccountTransactionTransactionTypeEnum = (typeof AccountTransactionTransactionTypeEnum)[keyof typeof AccountTransactionTransactionTypeEnum];
|
|
@@ -26,5 +26,7 @@ export const AccountTransactionTransactionTypeEnum = {
|
|
|
26
26
|
InstantWithdrawViaSwap: "InstantWithdrawViaSwap",
|
|
27
27
|
InstantWithdrawSwapHoldbackRelease: "InstantWithdrawSwapHoldbackRelease",
|
|
28
28
|
HoldbackClaimed: "HoldbackClaimed",
|
|
29
|
-
WithdrawalClaimed: "WithdrawalClaimed"
|
|
29
|
+
WithdrawalClaimed: "WithdrawalClaimed",
|
|
30
|
+
BridgeIn: "BridgeIn",
|
|
31
|
+
BridgeOut: "BridgeOut"
|
|
30
32
|
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ember Protocol Vaults API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Asset } from "./asset.js";
|
|
13
|
+
import type { VaultSlice } from "./vault-slice.js";
|
|
14
|
+
/**
|
|
15
|
+
* Vault shares moving between chains. BridgeOut burns them on the origin chain, BridgeIn mints them on the destination; the two are separate transactions on separate chains rather than one record, because each chain reports its own half. Carries no transport discriminator: a vault has exactly one bridge, so which one carried a given transfer is a property of the vault rather than of the transaction. Read it from the vault\'s own bridge config.
|
|
16
|
+
* @export
|
|
17
|
+
* @interface BridgeTransaction
|
|
18
|
+
*/
|
|
19
|
+
export interface BridgeTransaction {
|
|
20
|
+
/**
|
|
21
|
+
* The timestamp of the event
|
|
22
|
+
* @type {number}
|
|
23
|
+
* @memberof BridgeTransaction
|
|
24
|
+
*/
|
|
25
|
+
timestamp?: number;
|
|
26
|
+
/**
|
|
27
|
+
* The amount of shares bridged
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof BridgeTransaction
|
|
30
|
+
*/
|
|
31
|
+
sharesAmount?: string;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {Asset}
|
|
35
|
+
* @memberof BridgeTransaction
|
|
36
|
+
*/
|
|
37
|
+
sharesCoin?: Asset;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {VaultSlice}
|
|
41
|
+
* @memberof BridgeTransaction
|
|
42
|
+
*/
|
|
43
|
+
vault?: VaultSlice;
|
|
44
|
+
/**
|
|
45
|
+
* The transaction hash on this chain
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof BridgeTransaction
|
|
48
|
+
*/
|
|
49
|
+
txDigest?: string;
|
|
50
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Ember Protocol Vaults API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
|
@@ -63,6 +63,12 @@ export interface Chain {
|
|
|
63
63
|
* @memberof Chain
|
|
64
64
|
*/
|
|
65
65
|
lzChainId?: number;
|
|
66
|
+
/**
|
|
67
|
+
* The Chainlink CCIP chain selector. A string because the value is a 64-bit integer. Null for a chain CCIP does not reach.
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof Chain
|
|
70
|
+
*/
|
|
71
|
+
ccipChainSelector?: string;
|
|
66
72
|
/**
|
|
67
73
|
* Whether the chain supports AML checks
|
|
68
74
|
* @type {boolean}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ember Protocol Vaults API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { EvmCcipRateLimits } from "./evm-ccip-rate-limits.js";
|
|
13
|
+
/**
|
|
14
|
+
* One configured destination. remoteNetwork and remoteAddress mean the same as on an OFT peer; the rest has no LayerZero equivalent.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface EvmCcipLane
|
|
17
|
+
*/
|
|
18
|
+
export interface EvmCcipLane {
|
|
19
|
+
/**
|
|
20
|
+
* The remote chain\'s network name, e.g. atlantic. The map key is a CCIP chain selector, so read this instead.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof EvmCcipLane
|
|
23
|
+
*/
|
|
24
|
+
remoteNetwork?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The bridge contract at the far end, as a plain address. Same meaning as remoteAddress on an OFT peer.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof EvmCcipLane
|
|
29
|
+
*/
|
|
30
|
+
remoteAddress?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The remote chain\'s CCIP selector, carried as a string because it is 64-bit
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof EvmCcipLane
|
|
35
|
+
*/
|
|
36
|
+
remoteChainSelector?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The remote CCIP token pool address
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof EvmCcipLane
|
|
41
|
+
*/
|
|
42
|
+
remotePool?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The remote receipt token address
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof EvmCcipLane
|
|
47
|
+
*/
|
|
48
|
+
remoteToken?: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {EvmCcipRateLimits}
|
|
52
|
+
* @memberof EvmCcipLane
|
|
53
|
+
*/
|
|
54
|
+
rateLimits?: EvmCcipRateLimits;
|
|
55
|
+
/**
|
|
56
|
+
* The timestamp when the lane was configured
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof EvmCcipLane
|
|
59
|
+
*/
|
|
60
|
+
configuredAt?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The transaction hash of the lane configuration
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof EvmCcipLane
|
|
65
|
+
*/
|
|
66
|
+
txHash?: string;
|
|
67
|
+
/**
|
|
68
|
+
* The block number of the lane configuration
|
|
69
|
+
* @type {number}
|
|
70
|
+
* @memberof EvmCcipLane
|
|
71
|
+
*/
|
|
72
|
+
blockNumber?: number;
|
|
73
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Ember Protocol Vaults API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ember Protocol Vaults API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Per-lane outbound rate limiting. Has no LayerZero equivalent, so it is deliberately not flattened into a shared shape.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface EvmCcipRateLimits
|
|
16
|
+
*/
|
|
17
|
+
export interface EvmCcipRateLimits {
|
|
18
|
+
/**
|
|
19
|
+
* Whether rate limiting is enforced on this lane
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof EvmCcipRateLimits
|
|
22
|
+
*/
|
|
23
|
+
enabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Token bucket capacity, in receipt token base units
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof EvmCcipRateLimits
|
|
28
|
+
*/
|
|
29
|
+
capacity?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Refill rate, in receipt token base units per second
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof EvmCcipRateLimits
|
|
34
|
+
*/
|
|
35
|
+
rate?: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Ember Protocol Vaults API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ember Protocol Vaults API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { EvmCcipLane } from "./evm-ccip-lane.js";
|
|
13
|
+
/**
|
|
14
|
+
* The CCIP half of a vault\'s bridge, the counterpart to EvmOFTAdapter. A vault has one active transport; different vaults use different ones.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface EvmCcipTokenPool
|
|
17
|
+
*/
|
|
18
|
+
export interface EvmCcipTokenPool {
|
|
19
|
+
/**
|
|
20
|
+
* The CCIP token pool contract address
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof EvmCcipTokenPool
|
|
23
|
+
*/
|
|
24
|
+
address?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The contract name (e.g., EmberTokenPool)
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof EvmCcipTokenPool
|
|
29
|
+
*/
|
|
30
|
+
contractName?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Which bridge this entry describes. Read this rather than inferring the transport from which map the entry was found in.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof EvmCcipTokenPool
|
|
35
|
+
*/
|
|
36
|
+
bridgeTransport?: EvmCcipTokenPoolBridgeTransportEnum;
|
|
37
|
+
/**
|
|
38
|
+
* The pool\'s on-chain typeAndVersion (e.g., EmberBurnMintTokenPool 1.0.0)
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof EvmCcipTokenPool
|
|
41
|
+
*/
|
|
42
|
+
typeAndVersion?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The key of the associated vault
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof EvmCcipTokenPool
|
|
47
|
+
*/
|
|
48
|
+
vaultKey?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The address of the associated vault
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof EvmCcipTokenPool
|
|
53
|
+
*/
|
|
54
|
+
vaultAddress?: string;
|
|
55
|
+
/**
|
|
56
|
+
* The receipt token symbol
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof EvmCcipTokenPool
|
|
59
|
+
*/
|
|
60
|
+
receiptTokenSymbol?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The receipt token decimals
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof EvmCcipTokenPool
|
|
65
|
+
*/
|
|
66
|
+
decimals?: number;
|
|
67
|
+
/**
|
|
68
|
+
* The CCIP Router for this chain
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof EvmCcipTokenPool
|
|
71
|
+
*/
|
|
72
|
+
router?: string;
|
|
73
|
+
/**
|
|
74
|
+
* The CCIP RMN proxy for this chain
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof EvmCcipTokenPool
|
|
77
|
+
*/
|
|
78
|
+
rmnProxy?: string;
|
|
79
|
+
/**
|
|
80
|
+
* The CCIP token admin registry for this chain
|
|
81
|
+
* @type {string}
|
|
82
|
+
* @memberof EvmCcipTokenPool
|
|
83
|
+
*/
|
|
84
|
+
tokenAdminRegistry?: string;
|
|
85
|
+
/**
|
|
86
|
+
* This chain\'s CCIP selector. A 64-bit value, carried as a string because it exceeds what a JSON number holds exactly.
|
|
87
|
+
* @type {string}
|
|
88
|
+
* @memberof EvmCcipTokenPool
|
|
89
|
+
*/
|
|
90
|
+
chainSelector?: string;
|
|
91
|
+
/**
|
|
92
|
+
* The owner address
|
|
93
|
+
* @type {string}
|
|
94
|
+
* @memberof EvmCcipTokenPool
|
|
95
|
+
*/
|
|
96
|
+
owner?: string;
|
|
97
|
+
/**
|
|
98
|
+
* The deployment timestamp
|
|
99
|
+
* @type {string}
|
|
100
|
+
* @memberof EvmCcipTokenPool
|
|
101
|
+
*/
|
|
102
|
+
deployedAt?: string;
|
|
103
|
+
/**
|
|
104
|
+
* The block number at which the pool was deployed
|
|
105
|
+
* @type {number}
|
|
106
|
+
* @memberof EvmCcipTokenPool
|
|
107
|
+
*/
|
|
108
|
+
deploymentBlockNumber?: number;
|
|
109
|
+
/**
|
|
110
|
+
* Map of configured destinations by remote CCIP chain selector
|
|
111
|
+
* @type {{ [key: string]: EvmCcipLane; }}
|
|
112
|
+
* @memberof EvmCcipTokenPool
|
|
113
|
+
*/
|
|
114
|
+
lanes?: {
|
|
115
|
+
[key: string]: EvmCcipLane;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
export declare const EvmCcipTokenPoolBridgeTransportEnum: {
|
|
119
|
+
readonly LayerZero: "LayerZero";
|
|
120
|
+
readonly Ccip: "CCIP";
|
|
121
|
+
};
|
|
122
|
+
export type EvmCcipTokenPoolBridgeTransportEnum = (typeof EvmCcipTokenPoolBridgeTransportEnum)[keyof typeof EvmCcipTokenPoolBridgeTransportEnum];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Ember Protocol Vaults API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export const EvmCcipTokenPoolBridgeTransportEnum = {
|
|
15
|
+
LayerZero: "LayerZero",
|
|
16
|
+
Ccip: "CCIP"
|
|
17
|
+
};
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { EvmAtomicLiquidityLib } from "./evm-atomic-liquidity-lib.js";
|
|
13
13
|
import type { EvmAtomicVault } from "./evm-atomic-vault.js";
|
|
14
|
+
import type { EvmCcipTokenPool } from "./evm-ccip-token-pool.js";
|
|
14
15
|
import type { EvmDepositParkingLot } from "./evm-deposit-parking-lot.js";
|
|
15
16
|
import type { EvmDepositToken } from "./evm-deposit-token.js";
|
|
16
17
|
import type { EvmOFTAdapter } from "./evm-oftadapter.js";
|
|
@@ -80,6 +81,14 @@ export interface EvmContracts {
|
|
|
80
81
|
oftAdapters?: {
|
|
81
82
|
[key: string]: EvmOFTAdapter;
|
|
82
83
|
};
|
|
84
|
+
/**
|
|
85
|
+
* Map of CCIP token pools by name
|
|
86
|
+
* @type {{ [key: string]: EvmCcipTokenPool; }}
|
|
87
|
+
* @memberof EvmContracts
|
|
88
|
+
*/
|
|
89
|
+
ccipTokenPools?: {
|
|
90
|
+
[key: string]: EvmCcipTokenPool;
|
|
91
|
+
};
|
|
83
92
|
/**
|
|
84
93
|
*
|
|
85
94
|
* @type {EvmVaultValidator}
|
|
@@ -82,6 +82,12 @@ export interface EvmOFTAdapter {
|
|
|
82
82
|
* @memberof EvmOFTAdapter
|
|
83
83
|
*/
|
|
84
84
|
deploymentBlockNumber?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Which bridge this entry describes. Read this rather than inferring the transport from which map the entry was found in.
|
|
87
|
+
* @type {string}
|
|
88
|
+
* @memberof EvmOFTAdapter
|
|
89
|
+
*/
|
|
90
|
+
bridgeTransport?: EvmOFTAdapterBridgeTransportEnum;
|
|
85
91
|
/**
|
|
86
92
|
* Map of peers by LayerZero endpoint ID
|
|
87
93
|
* @type {{ [key: string]: EvmOFTPeer; }}
|
|
@@ -91,3 +97,8 @@ export interface EvmOFTAdapter {
|
|
|
91
97
|
[key: string]: EvmOFTPeer;
|
|
92
98
|
};
|
|
93
99
|
}
|
|
100
|
+
export declare const EvmOFTAdapterBridgeTransportEnum: {
|
|
101
|
+
readonly LayerZero: "LayerZero";
|
|
102
|
+
readonly Ccip: "CCIP";
|
|
103
|
+
};
|
|
104
|
+
export type EvmOFTAdapterBridgeTransportEnum = (typeof EvmOFTAdapterBridgeTransportEnum)[keyof typeof EvmOFTAdapterBridgeTransportEnum];
|
|
@@ -15,6 +15,18 @@
|
|
|
15
15
|
* @interface EvmOFTPeer
|
|
16
16
|
*/
|
|
17
17
|
export interface EvmOFTPeer {
|
|
18
|
+
/**
|
|
19
|
+
* The remote chain\'s network name, e.g. atlantic. The map key is a LayerZero endpoint ID, which names nothing outside LayerZero, so read this instead.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof EvmOFTPeer
|
|
22
|
+
*/
|
|
23
|
+
remoteNetwork?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The bridge contract at the far end, as a plain address. Same meaning as remoteAddress on a CCIP lane.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof EvmOFTPeer
|
|
28
|
+
*/
|
|
29
|
+
remoteAddress?: string;
|
|
18
30
|
/**
|
|
19
31
|
* The peer address in bytes32 format
|
|
20
32
|
* @type {string}
|
|
@@ -14,6 +14,7 @@ export * from "./apy-period-average.js";
|
|
|
14
14
|
export * from "./asset.js";
|
|
15
15
|
export * from "./atomic-vault-info.js";
|
|
16
16
|
export * from "./borrowed.js";
|
|
17
|
+
export * from "./bridge-transaction.js";
|
|
17
18
|
export * from "./chain.js";
|
|
18
19
|
export * from "./chain-vault-details.js";
|
|
19
20
|
export * from "./coin-placement.js";
|
|
@@ -25,6 +26,9 @@ export * from "./ember-position.js";
|
|
|
25
26
|
export * from "./escrow-claim-transaction.js";
|
|
26
27
|
export * from "./evm-atomic-liquidity-lib.js";
|
|
27
28
|
export * from "./evm-atomic-vault.js";
|
|
29
|
+
export * from "./evm-ccip-lane.js";
|
|
30
|
+
export * from "./evm-ccip-rate-limits.js";
|
|
31
|
+
export * from "./evm-ccip-token-pool.js";
|
|
28
32
|
export * from "./evm-contracts.js";
|
|
29
33
|
export * from "./evm-deposit-parking-lot.js";
|
|
30
34
|
export * from "./evm-deposit-token.js";
|
|
@@ -14,6 +14,7 @@ export * from "./apy-period-average.js";
|
|
|
14
14
|
export * from "./asset.js";
|
|
15
15
|
export * from "./atomic-vault-info.js";
|
|
16
16
|
export * from "./borrowed.js";
|
|
17
|
+
export * from "./bridge-transaction.js";
|
|
17
18
|
export * from "./chain.js";
|
|
18
19
|
export * from "./chain-vault-details.js";
|
|
19
20
|
export * from "./coin-placement.js";
|
|
@@ -25,6 +26,9 @@ export * from "./ember-position.js";
|
|
|
25
26
|
export * from "./escrow-claim-transaction.js";
|
|
26
27
|
export * from "./evm-atomic-liquidity-lib.js";
|
|
27
28
|
export * from "./evm-atomic-vault.js";
|
|
29
|
+
export * from "./evm-ccip-lane.js";
|
|
30
|
+
export * from "./evm-ccip-rate-limits.js";
|
|
31
|
+
export * from "./evm-ccip-token-pool.js";
|
|
28
32
|
export * from "./evm-contracts.js";
|
|
29
33
|
export * from "./evm-deposit-parking-lot.js";
|
|
30
34
|
export * from "./evm-deposit-token.js";
|
|
@@ -242,6 +242,45 @@ export interface ICoverVaultCallOptions extends IUserCallOptions {
|
|
|
242
242
|
/**
|
|
243
243
|
* Optional parameters for high-level OFT bridge send calls.
|
|
244
244
|
*/
|
|
245
|
+
/**
|
|
246
|
+
* Parameters for a CCIP bridge send.
|
|
247
|
+
*
|
|
248
|
+
* Deliberately shaped like IOFTSendParam so the two transports read the same
|
|
249
|
+
* way, but CCIP names a destination by chain selector rather than endpoint id,
|
|
250
|
+
* and takes the receiver as a plain address — the SDK encodes it.
|
|
251
|
+
*/
|
|
252
|
+
export interface ICcipSendParam {
|
|
253
|
+
/** CCIP chain selector of the destination. A 64-bit value, so a string. */
|
|
254
|
+
destinationChainSelector: string;
|
|
255
|
+
/** Recipient address on the destination chain */
|
|
256
|
+
receiver: string;
|
|
257
|
+
/** Amount to send in local token decimals */
|
|
258
|
+
amount: bigint;
|
|
259
|
+
/** Fee token; omit to pay in the chain's native currency */
|
|
260
|
+
feeToken?: string;
|
|
261
|
+
/** Destination execution gas. 0 for a plain token transfer. */
|
|
262
|
+
destinationGasLimit?: bigint;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* A CCIP fee quote.
|
|
266
|
+
*
|
|
267
|
+
* CCIP charges one fee, unlike LayerZero's native/LZ token split, and does not
|
|
268
|
+
* quote the received amount separately: a burn-and-mint pool mints exactly what
|
|
269
|
+
* was burned, so the amount received is the amount sent.
|
|
270
|
+
*/
|
|
271
|
+
export interface ICcipFeeQuote {
|
|
272
|
+
/** Fee required to send, in feeToken units (wei when paying natively) */
|
|
273
|
+
fee: bigint;
|
|
274
|
+
/** Token the fee is charged in; the zero address means native currency */
|
|
275
|
+
feeToken: string;
|
|
276
|
+
}
|
|
277
|
+
/** Overrides for a CCIP bridge send. */
|
|
278
|
+
export interface ICcipBridgeSendOptions extends IEvmCallOptions {
|
|
279
|
+
/** Fee token; omit to pay in the chain's native currency */
|
|
280
|
+
feeToken?: string;
|
|
281
|
+
/** Destination execution gas. 0 for a plain token transfer. */
|
|
282
|
+
destinationGasLimit?: bigint;
|
|
283
|
+
}
|
|
245
284
|
export interface IBridgeSendOptions extends IEvmCallOptions {
|
|
246
285
|
/** Minimum amount to receive on destination; defaults to amount */
|
|
247
286
|
minAmount?: bigint;
|