@across-protocol/sdk 3.1.27 → 3.1.28
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/cjs/clients/BundleDataClient/BundleDataClient.d.ts +60 -0
- package/dist/cjs/clients/BundleDataClient/BundleDataClient.js +929 -0
- package/dist/cjs/clients/BundleDataClient/BundleDataClient.js.map +1 -0
- package/dist/cjs/clients/BundleDataClient/index.d.ts +2 -0
- package/dist/cjs/clients/BundleDataClient/index.js +6 -0
- package/dist/cjs/clients/BundleDataClient/index.js.map +1 -0
- package/dist/cjs/clients/BundleDataClient/utils/DataworkerUtils.d.ts +15 -0
- package/dist/cjs/clients/BundleDataClient/utils/DataworkerUtils.js +131 -0
- package/dist/cjs/clients/BundleDataClient/utils/DataworkerUtils.js.map +1 -0
- package/dist/cjs/clients/BundleDataClient/utils/FillUtils.d.ts +6 -0
- package/dist/cjs/clients/BundleDataClient/utils/FillUtils.js +19 -0
- package/dist/cjs/clients/BundleDataClient/utils/FillUtils.js.map +1 -0
- package/dist/cjs/clients/BundleDataClient/utils/MerkleTreeUtils.d.ts +3 -0
- package/dist/cjs/clients/BundleDataClient/utils/MerkleTreeUtils.js +23 -0
- package/dist/cjs/clients/BundleDataClient/utils/MerkleTreeUtils.js.map +1 -0
- package/dist/cjs/clients/BundleDataClient/utils/PoolRebalanceUtils.d.ts +24 -0
- package/dist/cjs/clients/BundleDataClient/utils/PoolRebalanceUtils.js +129 -0
- package/dist/cjs/clients/BundleDataClient/utils/PoolRebalanceUtils.js.map +1 -0
- package/dist/cjs/clients/BundleDataClient/utils/SuperstructUtils.d.ts +302 -0
- package/dist/cjs/clients/BundleDataClient/utils/SuperstructUtils.js +77 -0
- package/dist/cjs/clients/BundleDataClient/utils/SuperstructUtils.js.map +1 -0
- package/dist/cjs/clients/BundleDataClient/utils/index.d.ts +6 -0
- package/dist/cjs/clients/BundleDataClient/utils/index.js +10 -0
- package/dist/cjs/clients/BundleDataClient/utils/index.js.map +1 -0
- package/dist/cjs/clients/BundleDataClient/utils/shims.d.ts +8 -0
- package/dist/cjs/clients/BundleDataClient/utils/shims.js +3 -0
- package/dist/cjs/clients/BundleDataClient/utils/shims.js.map +1 -0
- package/dist/cjs/clients/index.d.ts +1 -0
- package/dist/cjs/clients/index.js +2 -1
- package/dist/cjs/clients/index.js.map +1 -1
- package/dist/cjs/interfaces/BundleData.d.ts +63 -0
- package/dist/cjs/interfaces/BundleData.js +3 -0
- package/dist/cjs/interfaces/BundleData.js.map +1 -0
- package/dist/cjs/interfaces/index.d.ts +1 -0
- package/dist/cjs/interfaces/index.js +1 -0
- package/dist/cjs/interfaces/index.js.map +1 -1
- package/dist/cjs/providers/alchemy.js +5 -5
- package/dist/cjs/providers/alchemy.js.map +1 -1
- package/dist/cjs/providers/drpc.d.ts +2 -0
- package/dist/cjs/providers/drpc.js +21 -0
- package/dist/cjs/providers/drpc.js.map +1 -0
- package/dist/cjs/providers/infura.js +5 -5
- package/dist/cjs/providers/infura.js.map +1 -1
- package/dist/cjs/providers/types.d.ts +1 -1
- package/dist/cjs/providers/utils.js +3 -1
- package/dist/cjs/providers/utils.js.map +1 -1
- package/dist/cjs/utils/AddressUtils.d.ts +1 -0
- package/dist/cjs/utils/AddressUtils.js +15 -1
- package/dist/cjs/utils/AddressUtils.js.map +1 -1
- package/dist/cjs/utils/ContractUtils.d.ts +1 -0
- package/dist/cjs/utils/ContractUtils.js +12 -0
- package/dist/cjs/utils/ContractUtils.js.map +1 -0
- package/dist/cjs/utils/Multicall.d.ts +3 -2
- package/dist/cjs/utils/Multicall.js +40 -41
- package/dist/cjs/utils/Multicall.js.map +1 -1
- package/dist/cjs/utils/ObjectUtils.d.ts +18 -0
- package/dist/cjs/utils/ObjectUtils.js +27 -1
- package/dist/cjs/utils/ObjectUtils.js.map +1 -1
- package/dist/cjs/utils/abi/contracts/index.d.ts +1 -0
- package/dist/cjs/utils/abi/contracts/index.js +9 -0
- package/dist/cjs/utils/abi/contracts/index.js.map +1 -0
- package/dist/cjs/utils/abi/typechain/Multicall3.d.ts +289 -0
- package/dist/cjs/utils/abi/typechain/Multicall3.js +3 -0
- package/dist/cjs/utils/abi/typechain/Multicall3.js.map +1 -0
- package/dist/cjs/utils/abi/typechain/common.d.ts +21 -0
- package/dist/cjs/utils/abi/typechain/common.js +3 -0
- package/dist/cjs/utils/abi/typechain/common.js.map +1 -0
- package/dist/cjs/utils/abi/typechain/factories/Multicall3__factory.d.ts +339 -0
- package/dist/cjs/utils/abi/typechain/factories/Multicall3__factory.js +458 -0
- package/dist/cjs/utils/abi/typechain/factories/Multicall3__factory.js.map +1 -0
- package/dist/cjs/utils/abi/typechain/factories/index.d.ts +1 -0
- package/dist/cjs/utils/abi/typechain/factories/index.js +6 -0
- package/dist/cjs/utils/abi/typechain/factories/index.js.map +1 -0
- package/dist/cjs/utils/abi/typechain/index.d.ts +3 -0
- package/dist/cjs/utils/abi/typechain/index.js +8 -0
- package/dist/cjs/utils/abi/typechain/index.js.map +1 -0
- package/dist/esm/clients/BundleDataClient/BundleDataClient.d.ts +60 -0
- package/dist/esm/clients/BundleDataClient/BundleDataClient.js +1097 -0
- package/dist/esm/clients/BundleDataClient/BundleDataClient.js.map +1 -0
- package/dist/esm/clients/BundleDataClient/index.d.ts +2 -0
- package/dist/esm/clients/BundleDataClient/index.js +3 -0
- package/dist/esm/clients/BundleDataClient/index.js.map +1 -0
- package/dist/esm/clients/BundleDataClient/utils/DataworkerUtils.d.ts +15 -0
- package/dist/esm/clients/BundleDataClient/utils/DataworkerUtils.js +182 -0
- package/dist/esm/clients/BundleDataClient/utils/DataworkerUtils.js.map +1 -0
- package/dist/esm/clients/BundleDataClient/utils/FillUtils.d.ts +6 -0
- package/dist/esm/clients/BundleDataClient/utils/FillUtils.js +20 -0
- package/dist/esm/clients/BundleDataClient/utils/FillUtils.js.map +1 -0
- package/dist/esm/clients/BundleDataClient/utils/MerkleTreeUtils.d.ts +3 -0
- package/dist/esm/clients/BundleDataClient/utils/MerkleTreeUtils.js +20 -0
- package/dist/esm/clients/BundleDataClient/utils/MerkleTreeUtils.js.map +1 -0
- package/dist/esm/clients/BundleDataClient/utils/PoolRebalanceUtils.d.ts +24 -0
- package/dist/esm/clients/BundleDataClient/utils/PoolRebalanceUtils.js +157 -0
- package/dist/esm/clients/BundleDataClient/utils/PoolRebalanceUtils.js.map +1 -0
- package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.d.ts +302 -0
- package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.js +79 -0
- package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.js.map +1 -0
- package/dist/esm/clients/BundleDataClient/utils/index.d.ts +6 -0
- package/dist/esm/clients/BundleDataClient/utils/index.js +7 -0
- package/dist/esm/clients/BundleDataClient/utils/index.js.map +1 -0
- package/dist/esm/clients/BundleDataClient/utils/shims.d.ts +8 -0
- package/dist/esm/clients/BundleDataClient/utils/shims.js +2 -0
- package/dist/esm/clients/BundleDataClient/utils/shims.js.map +1 -0
- package/dist/esm/clients/index.d.ts +1 -0
- package/dist/esm/clients/index.js +2 -0
- package/dist/esm/clients/index.js.map +1 -1
- package/dist/esm/interfaces/BundleData.d.ts +63 -0
- package/dist/esm/interfaces/BundleData.js +2 -0
- package/dist/esm/interfaces/BundleData.js.map +1 -0
- package/dist/esm/interfaces/index.d.ts +1 -0
- package/dist/esm/interfaces/index.js +1 -0
- package/dist/esm/interfaces/index.js.map +1 -1
- package/dist/esm/providers/alchemy.js +6 -6
- package/dist/esm/providers/alchemy.js.map +1 -1
- package/dist/esm/providers/drpc.d.ts +2 -0
- package/dist/esm/providers/drpc.js +18 -0
- package/dist/esm/providers/drpc.js.map +1 -0
- package/dist/esm/providers/infura.js +6 -6
- package/dist/esm/providers/infura.js.map +1 -1
- package/dist/esm/providers/types.d.ts +1 -1
- package/dist/esm/providers/utils.js +3 -1
- package/dist/esm/providers/utils.js.map +1 -1
- package/dist/esm/utils/AddressUtils.d.ts +1 -0
- package/dist/esm/utils/AddressUtils.js +16 -1
- package/dist/esm/utils/AddressUtils.js.map +1 -1
- package/dist/esm/utils/ContractUtils.d.ts +1 -0
- package/dist/esm/utils/ContractUtils.js +8 -0
- package/dist/esm/utils/ContractUtils.js.map +1 -0
- package/dist/esm/utils/Multicall.d.ts +3 -2
- package/dist/esm/utils/Multicall.js +39 -42
- package/dist/esm/utils/Multicall.js.map +1 -1
- package/dist/esm/utils/ObjectUtils.d.ts +18 -0
- package/dist/esm/utils/ObjectUtils.js +24 -0
- package/dist/esm/utils/ObjectUtils.js.map +1 -1
- package/dist/esm/utils/abi/contracts/index.d.ts +1 -0
- package/dist/esm/utils/abi/contracts/index.js +2 -0
- package/dist/esm/utils/abi/contracts/index.js.map +1 -0
- package/dist/esm/utils/abi/typechain/Multicall3.d.ts +292 -0
- package/dist/esm/utils/abi/typechain/Multicall3.js +2 -0
- package/dist/esm/utils/abi/typechain/Multicall3.js.map +1 -0
- package/dist/esm/utils/abi/typechain/common.d.ts +21 -0
- package/dist/esm/utils/abi/typechain/common.js +2 -0
- package/dist/esm/utils/abi/typechain/common.js.map +1 -0
- package/dist/esm/utils/abi/typechain/factories/Multicall3__factory.d.ts +339 -0
- package/dist/esm/utils/abi/typechain/factories/Multicall3__factory.js +458 -0
- package/dist/esm/utils/abi/typechain/factories/Multicall3__factory.js.map +1 -0
- package/dist/esm/utils/abi/typechain/factories/index.d.ts +1 -0
- package/dist/esm/utils/abi/typechain/factories/index.js +5 -0
- package/dist/esm/utils/abi/typechain/factories/index.js.map +1 -0
- package/dist/esm/utils/abi/typechain/index.d.ts +3 -0
- package/dist/esm/utils/abi/typechain/index.js +4 -0
- package/dist/esm/utils/abi/typechain/index.js.map +1 -0
- package/dist/types/clients/BundleDataClient/BundleDataClient.d.ts +61 -0
- package/dist/types/clients/BundleDataClient/BundleDataClient.d.ts.map +1 -0
- package/dist/types/clients/BundleDataClient/index.d.ts +3 -0
- package/dist/types/clients/BundleDataClient/index.d.ts.map +1 -0
- package/dist/types/clients/BundleDataClient/utils/DataworkerUtils.d.ts +16 -0
- package/dist/types/clients/BundleDataClient/utils/DataworkerUtils.d.ts.map +1 -0
- package/dist/types/clients/BundleDataClient/utils/FillUtils.d.ts +7 -0
- package/dist/types/clients/BundleDataClient/utils/FillUtils.d.ts.map +1 -0
- package/dist/types/clients/BundleDataClient/utils/MerkleTreeUtils.d.ts +4 -0
- package/dist/types/clients/BundleDataClient/utils/MerkleTreeUtils.d.ts.map +1 -0
- package/dist/types/clients/BundleDataClient/utils/PoolRebalanceUtils.d.ts +25 -0
- package/dist/types/clients/BundleDataClient/utils/PoolRebalanceUtils.d.ts.map +1 -0
- package/dist/types/clients/BundleDataClient/utils/SuperstructUtils.d.ts +303 -0
- package/dist/types/clients/BundleDataClient/utils/SuperstructUtils.d.ts.map +1 -0
- package/dist/types/clients/BundleDataClient/utils/index.d.ts +7 -0
- package/dist/types/clients/BundleDataClient/utils/index.d.ts.map +1 -0
- package/dist/types/clients/BundleDataClient/utils/shims.d.ts +9 -0
- package/dist/types/clients/BundleDataClient/utils/shims.d.ts.map +1 -0
- package/dist/types/clients/index.d.ts +1 -0
- package/dist/types/clients/index.d.ts.map +1 -1
- package/dist/types/interfaces/BundleData.d.ts +64 -0
- package/dist/types/interfaces/BundleData.d.ts.map +1 -0
- package/dist/types/interfaces/index.d.ts +1 -0
- package/dist/types/interfaces/index.d.ts.map +1 -1
- package/dist/types/providers/drpc.d.ts +3 -0
- package/dist/types/providers/drpc.d.ts.map +1 -0
- package/dist/types/providers/types.d.ts +1 -1
- package/dist/types/providers/types.d.ts.map +1 -1
- package/dist/types/providers/utils.d.ts.map +1 -1
- package/dist/types/utils/AddressUtils.d.ts +1 -0
- package/dist/types/utils/AddressUtils.d.ts.map +1 -1
- package/dist/types/utils/ContractUtils.d.ts +2 -0
- package/dist/types/utils/ContractUtils.d.ts.map +1 -0
- package/dist/types/utils/Multicall.d.ts +3 -2
- package/dist/types/utils/Multicall.d.ts.map +1 -1
- package/dist/types/utils/ObjectUtils.d.ts +18 -0
- package/dist/types/utils/ObjectUtils.d.ts.map +1 -1
- package/dist/types/utils/abi/contracts/index.d.ts +2 -0
- package/dist/types/utils/abi/contracts/index.d.ts.map +1 -0
- package/dist/types/utils/abi/typechain/Multicall3.d.ts +293 -0
- package/dist/types/utils/abi/typechain/Multicall3.d.ts.map +1 -0
- package/dist/types/utils/abi/typechain/common.d.ts +22 -0
- package/dist/types/utils/abi/typechain/common.d.ts.map +1 -0
- package/dist/types/utils/abi/typechain/factories/Multicall3__factory.d.ts +340 -0
- package/dist/types/utils/abi/typechain/factories/Multicall3__factory.d.ts.map +1 -0
- package/dist/types/utils/abi/typechain/factories/index.d.ts +2 -0
- package/dist/types/utils/abi/typechain/factories/index.d.ts.map +1 -0
- package/dist/types/utils/abi/typechain/index.d.ts +4 -0
- package/dist/types/utils/abi/typechain/index.d.ts.map +1 -0
- package/package.json +6 -8
- package/src/clients/BundleDataClient/BundleDataClient.ts +1311 -0
- package/src/clients/BundleDataClient/index.ts +2 -0
- package/src/clients/BundleDataClient/utils/DataworkerUtils.ts +268 -0
- package/src/clients/BundleDataClient/utils/FillUtils.ts +46 -0
- package/src/clients/BundleDataClient/utils/MerkleTreeUtils.ts +26 -0
- package/src/clients/BundleDataClient/utils/PoolRebalanceUtils.ts +238 -0
- package/src/clients/BundleDataClient/utils/SuperstructUtils.ts +132 -0
- package/src/clients/BundleDataClient/utils/index.ts +6 -0
- package/src/clients/BundleDataClient/utils/shims.ts +10 -0
- package/src/clients/index.ts +1 -0
- package/src/interfaces/BundleData.ts +68 -0
- package/src/interfaces/index.ts +1 -0
- package/src/providers/alchemy.ts +6 -6
- package/src/providers/drpc.ts +19 -0
- package/src/providers/infura.ts +6 -6
- package/src/providers/types.ts +1 -1
- package/src/providers/utils.ts +3 -1
- package/src/utils/AddressUtils.ts +15 -1
- package/src/utils/ContractUtils.ts +8 -0
- package/src/utils/Multicall.ts +38 -30
- package/src/utils/ObjectUtils.ts +23 -0
- package/src/utils/abi/contracts/index.ts +1 -0
- package/src/utils/abi/typechain/Multicall3.ts +433 -0
- package/src/utils/abi/typechain/common.ts +30 -0
- package/src/utils/abi/typechain/factories/Multicall3__factory.ts +458 -0
- package/src/utils/abi/typechain/factories/index.ts +4 -0
- package/src/utils/abi/typechain/index.ts +6 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { BigNumber } from "ethers";
|
|
2
|
+
export declare const BundleDataSS: import("superstruct").Struct<{
|
|
3
|
+
bundleDepositsV3: Record<string, Record<string, {
|
|
4
|
+
depositId: number;
|
|
5
|
+
originChainId: number;
|
|
6
|
+
blockNumber: number;
|
|
7
|
+
transactionIndex: number;
|
|
8
|
+
logIndex: number;
|
|
9
|
+
transactionHash: string;
|
|
10
|
+
message: string;
|
|
11
|
+
inputToken: string;
|
|
12
|
+
inputAmount: BigNumber;
|
|
13
|
+
quoteTimestamp: number;
|
|
14
|
+
destinationChainId: number;
|
|
15
|
+
fromLiteChain: boolean;
|
|
16
|
+
toLiteChain: boolean;
|
|
17
|
+
depositor: string;
|
|
18
|
+
recipient: string;
|
|
19
|
+
outputToken: string;
|
|
20
|
+
outputAmount: BigNumber;
|
|
21
|
+
fillDeadline: number;
|
|
22
|
+
exclusiveRelayer: string;
|
|
23
|
+
exclusivityDeadline: number;
|
|
24
|
+
quoteBlockNumber: number;
|
|
25
|
+
updatedRecipient?: string | undefined;
|
|
26
|
+
updatedMessage?: string | undefined;
|
|
27
|
+
updatedOutputAmount?: BigNumber | undefined;
|
|
28
|
+
speedUpSignature?: string | undefined;
|
|
29
|
+
relayerFeePct?: BigNumber | undefined;
|
|
30
|
+
}[]>>;
|
|
31
|
+
bundleFillsV3: Record<string, Record<string, {
|
|
32
|
+
fills: {
|
|
33
|
+
depositId: number;
|
|
34
|
+
originChainId: number;
|
|
35
|
+
blockNumber: number;
|
|
36
|
+
transactionIndex: number;
|
|
37
|
+
logIndex: number;
|
|
38
|
+
transactionHash: string;
|
|
39
|
+
message: string;
|
|
40
|
+
inputToken: string;
|
|
41
|
+
inputAmount: BigNumber;
|
|
42
|
+
quoteTimestamp: number;
|
|
43
|
+
destinationChainId: number;
|
|
44
|
+
depositor: string;
|
|
45
|
+
recipient: string;
|
|
46
|
+
outputToken: string;
|
|
47
|
+
outputAmount: BigNumber;
|
|
48
|
+
fillDeadline: number;
|
|
49
|
+
exclusiveRelayer: string;
|
|
50
|
+
exclusivityDeadline: number;
|
|
51
|
+
repaymentChainId: number;
|
|
52
|
+
lpFeePct: BigNumber;
|
|
53
|
+
relayer: string;
|
|
54
|
+
relayExecutionInfo: {
|
|
55
|
+
updatedRecipient: string;
|
|
56
|
+
updatedMessage: string;
|
|
57
|
+
updatedOutputAmount: BigNumber;
|
|
58
|
+
fillType: number;
|
|
59
|
+
};
|
|
60
|
+
}[];
|
|
61
|
+
refunds: Record<string, BigNumber>;
|
|
62
|
+
realizedLpFees: BigNumber;
|
|
63
|
+
totalRefundAmount: BigNumber;
|
|
64
|
+
}>>;
|
|
65
|
+
bundleSlowFillsV3: Record<string, Record<string, {
|
|
66
|
+
depositId: number;
|
|
67
|
+
originChainId: number;
|
|
68
|
+
blockNumber: number;
|
|
69
|
+
transactionIndex: number;
|
|
70
|
+
logIndex: number;
|
|
71
|
+
transactionHash: string;
|
|
72
|
+
message: string;
|
|
73
|
+
inputToken: string;
|
|
74
|
+
inputAmount: BigNumber;
|
|
75
|
+
quoteTimestamp: number;
|
|
76
|
+
destinationChainId: number;
|
|
77
|
+
fromLiteChain: boolean;
|
|
78
|
+
toLiteChain: boolean;
|
|
79
|
+
depositor: string;
|
|
80
|
+
recipient: string;
|
|
81
|
+
outputToken: string;
|
|
82
|
+
outputAmount: BigNumber;
|
|
83
|
+
fillDeadline: number;
|
|
84
|
+
exclusiveRelayer: string;
|
|
85
|
+
exclusivityDeadline: number;
|
|
86
|
+
quoteBlockNumber: number;
|
|
87
|
+
lpFeePct: BigNumber;
|
|
88
|
+
updatedRecipient?: string | undefined;
|
|
89
|
+
updatedMessage?: string | undefined;
|
|
90
|
+
updatedOutputAmount?: BigNumber | undefined;
|
|
91
|
+
speedUpSignature?: string | undefined;
|
|
92
|
+
relayerFeePct?: BigNumber | undefined;
|
|
93
|
+
}[]>>;
|
|
94
|
+
expiredDepositsToRefundV3: Record<string, Record<string, {
|
|
95
|
+
depositId: number;
|
|
96
|
+
originChainId: number;
|
|
97
|
+
blockNumber: number;
|
|
98
|
+
transactionIndex: number;
|
|
99
|
+
logIndex: number;
|
|
100
|
+
transactionHash: string;
|
|
101
|
+
message: string;
|
|
102
|
+
inputToken: string;
|
|
103
|
+
inputAmount: BigNumber;
|
|
104
|
+
quoteTimestamp: number;
|
|
105
|
+
destinationChainId: number;
|
|
106
|
+
fromLiteChain: boolean;
|
|
107
|
+
toLiteChain: boolean;
|
|
108
|
+
depositor: string;
|
|
109
|
+
recipient: string;
|
|
110
|
+
outputToken: string;
|
|
111
|
+
outputAmount: BigNumber;
|
|
112
|
+
fillDeadline: number;
|
|
113
|
+
exclusiveRelayer: string;
|
|
114
|
+
exclusivityDeadline: number;
|
|
115
|
+
quoteBlockNumber: number;
|
|
116
|
+
updatedRecipient?: string | undefined;
|
|
117
|
+
updatedMessage?: string | undefined;
|
|
118
|
+
updatedOutputAmount?: BigNumber | undefined;
|
|
119
|
+
speedUpSignature?: string | undefined;
|
|
120
|
+
relayerFeePct?: BigNumber | undefined;
|
|
121
|
+
}[]>>;
|
|
122
|
+
unexecutableSlowFills: Record<string, Record<string, {
|
|
123
|
+
depositId: number;
|
|
124
|
+
originChainId: number;
|
|
125
|
+
blockNumber: number;
|
|
126
|
+
transactionIndex: number;
|
|
127
|
+
logIndex: number;
|
|
128
|
+
transactionHash: string;
|
|
129
|
+
message: string;
|
|
130
|
+
inputToken: string;
|
|
131
|
+
inputAmount: BigNumber;
|
|
132
|
+
quoteTimestamp: number;
|
|
133
|
+
destinationChainId: number;
|
|
134
|
+
fromLiteChain: boolean;
|
|
135
|
+
toLiteChain: boolean;
|
|
136
|
+
depositor: string;
|
|
137
|
+
recipient: string;
|
|
138
|
+
outputToken: string;
|
|
139
|
+
outputAmount: BigNumber;
|
|
140
|
+
fillDeadline: number;
|
|
141
|
+
exclusiveRelayer: string;
|
|
142
|
+
exclusivityDeadline: number;
|
|
143
|
+
quoteBlockNumber: number;
|
|
144
|
+
lpFeePct: BigNumber;
|
|
145
|
+
updatedRecipient?: string | undefined;
|
|
146
|
+
updatedMessage?: string | undefined;
|
|
147
|
+
updatedOutputAmount?: BigNumber | undefined;
|
|
148
|
+
speedUpSignature?: string | undefined;
|
|
149
|
+
relayerFeePct?: BigNumber | undefined;
|
|
150
|
+
}[]>>;
|
|
151
|
+
bundleBlockRanges: number[][];
|
|
152
|
+
}, {
|
|
153
|
+
bundleBlockRanges: import("superstruct").Struct<number[][], import("superstruct").Struct<number[], import("superstruct").Struct<number, null>>>;
|
|
154
|
+
bundleDepositsV3: import("superstruct").Struct<Record<string, Record<string, {
|
|
155
|
+
depositId: number;
|
|
156
|
+
originChainId: number;
|
|
157
|
+
blockNumber: number;
|
|
158
|
+
transactionIndex: number;
|
|
159
|
+
logIndex: number;
|
|
160
|
+
transactionHash: string;
|
|
161
|
+
message: string;
|
|
162
|
+
inputToken: string;
|
|
163
|
+
inputAmount: BigNumber;
|
|
164
|
+
quoteTimestamp: number;
|
|
165
|
+
destinationChainId: number;
|
|
166
|
+
fromLiteChain: boolean;
|
|
167
|
+
toLiteChain: boolean;
|
|
168
|
+
depositor: string;
|
|
169
|
+
recipient: string;
|
|
170
|
+
outputToken: string;
|
|
171
|
+
outputAmount: BigNumber;
|
|
172
|
+
fillDeadline: number;
|
|
173
|
+
exclusiveRelayer: string;
|
|
174
|
+
exclusivityDeadline: number;
|
|
175
|
+
quoteBlockNumber: number;
|
|
176
|
+
updatedRecipient?: string | undefined;
|
|
177
|
+
updatedMessage?: string | undefined;
|
|
178
|
+
updatedOutputAmount?: BigNumber | undefined;
|
|
179
|
+
speedUpSignature?: string | undefined;
|
|
180
|
+
relayerFeePct?: BigNumber | undefined;
|
|
181
|
+
}[]>>, null>;
|
|
182
|
+
expiredDepositsToRefundV3: import("superstruct").Struct<Record<string, Record<string, {
|
|
183
|
+
depositId: number;
|
|
184
|
+
originChainId: number;
|
|
185
|
+
blockNumber: number;
|
|
186
|
+
transactionIndex: number;
|
|
187
|
+
logIndex: number;
|
|
188
|
+
transactionHash: string;
|
|
189
|
+
message: string;
|
|
190
|
+
inputToken: string;
|
|
191
|
+
inputAmount: BigNumber;
|
|
192
|
+
quoteTimestamp: number;
|
|
193
|
+
destinationChainId: number;
|
|
194
|
+
fromLiteChain: boolean;
|
|
195
|
+
toLiteChain: boolean;
|
|
196
|
+
depositor: string;
|
|
197
|
+
recipient: string;
|
|
198
|
+
outputToken: string;
|
|
199
|
+
outputAmount: BigNumber;
|
|
200
|
+
fillDeadline: number;
|
|
201
|
+
exclusiveRelayer: string;
|
|
202
|
+
exclusivityDeadline: number;
|
|
203
|
+
quoteBlockNumber: number;
|
|
204
|
+
updatedRecipient?: string | undefined;
|
|
205
|
+
updatedMessage?: string | undefined;
|
|
206
|
+
updatedOutputAmount?: BigNumber | undefined;
|
|
207
|
+
speedUpSignature?: string | undefined;
|
|
208
|
+
relayerFeePct?: BigNumber | undefined;
|
|
209
|
+
}[]>>, null>;
|
|
210
|
+
unexecutableSlowFills: import("superstruct").Struct<Record<string, Record<string, {
|
|
211
|
+
depositId: number;
|
|
212
|
+
originChainId: number;
|
|
213
|
+
blockNumber: number;
|
|
214
|
+
transactionIndex: number;
|
|
215
|
+
logIndex: number;
|
|
216
|
+
transactionHash: string;
|
|
217
|
+
message: string;
|
|
218
|
+
inputToken: string;
|
|
219
|
+
inputAmount: BigNumber;
|
|
220
|
+
quoteTimestamp: number;
|
|
221
|
+
destinationChainId: number;
|
|
222
|
+
fromLiteChain: boolean;
|
|
223
|
+
toLiteChain: boolean;
|
|
224
|
+
depositor: string;
|
|
225
|
+
recipient: string;
|
|
226
|
+
outputToken: string;
|
|
227
|
+
outputAmount: BigNumber;
|
|
228
|
+
fillDeadline: number;
|
|
229
|
+
exclusiveRelayer: string;
|
|
230
|
+
exclusivityDeadline: number;
|
|
231
|
+
quoteBlockNumber: number;
|
|
232
|
+
lpFeePct: BigNumber;
|
|
233
|
+
updatedRecipient?: string | undefined;
|
|
234
|
+
updatedMessage?: string | undefined;
|
|
235
|
+
updatedOutputAmount?: BigNumber | undefined;
|
|
236
|
+
speedUpSignature?: string | undefined;
|
|
237
|
+
relayerFeePct?: BigNumber | undefined;
|
|
238
|
+
}[]>>, null>;
|
|
239
|
+
bundleSlowFillsV3: import("superstruct").Struct<Record<string, Record<string, {
|
|
240
|
+
depositId: number;
|
|
241
|
+
originChainId: number;
|
|
242
|
+
blockNumber: number;
|
|
243
|
+
transactionIndex: number;
|
|
244
|
+
logIndex: number;
|
|
245
|
+
transactionHash: string;
|
|
246
|
+
message: string;
|
|
247
|
+
inputToken: string;
|
|
248
|
+
inputAmount: BigNumber;
|
|
249
|
+
quoteTimestamp: number;
|
|
250
|
+
destinationChainId: number;
|
|
251
|
+
fromLiteChain: boolean;
|
|
252
|
+
toLiteChain: boolean;
|
|
253
|
+
depositor: string;
|
|
254
|
+
recipient: string;
|
|
255
|
+
outputToken: string;
|
|
256
|
+
outputAmount: BigNumber;
|
|
257
|
+
fillDeadline: number;
|
|
258
|
+
exclusiveRelayer: string;
|
|
259
|
+
exclusivityDeadline: number;
|
|
260
|
+
quoteBlockNumber: number;
|
|
261
|
+
lpFeePct: BigNumber;
|
|
262
|
+
updatedRecipient?: string | undefined;
|
|
263
|
+
updatedMessage?: string | undefined;
|
|
264
|
+
updatedOutputAmount?: BigNumber | undefined;
|
|
265
|
+
speedUpSignature?: string | undefined;
|
|
266
|
+
relayerFeePct?: BigNumber | undefined;
|
|
267
|
+
}[]>>, null>;
|
|
268
|
+
bundleFillsV3: import("superstruct").Struct<Record<string, Record<string, {
|
|
269
|
+
fills: {
|
|
270
|
+
depositId: number;
|
|
271
|
+
originChainId: number;
|
|
272
|
+
blockNumber: number;
|
|
273
|
+
transactionIndex: number;
|
|
274
|
+
logIndex: number;
|
|
275
|
+
transactionHash: string;
|
|
276
|
+
message: string;
|
|
277
|
+
inputToken: string;
|
|
278
|
+
inputAmount: BigNumber;
|
|
279
|
+
quoteTimestamp: number;
|
|
280
|
+
destinationChainId: number;
|
|
281
|
+
depositor: string;
|
|
282
|
+
recipient: string;
|
|
283
|
+
outputToken: string;
|
|
284
|
+
outputAmount: BigNumber;
|
|
285
|
+
fillDeadline: number;
|
|
286
|
+
exclusiveRelayer: string;
|
|
287
|
+
exclusivityDeadline: number;
|
|
288
|
+
repaymentChainId: number;
|
|
289
|
+
lpFeePct: BigNumber;
|
|
290
|
+
relayer: string;
|
|
291
|
+
relayExecutionInfo: {
|
|
292
|
+
updatedRecipient: string;
|
|
293
|
+
updatedMessage: string;
|
|
294
|
+
updatedOutputAmount: BigNumber;
|
|
295
|
+
fillType: number;
|
|
296
|
+
};
|
|
297
|
+
}[];
|
|
298
|
+
refunds: Record<string, BigNumber>;
|
|
299
|
+
realizedLpFees: BigNumber;
|
|
300
|
+
totalRefundAmount: BigNumber;
|
|
301
|
+
}>>, null>;
|
|
302
|
+
}>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BundleDataSS = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var superstruct_1 = require("superstruct");
|
|
6
|
+
var ethers_1 = require("ethers");
|
|
7
|
+
var PositiveIntegerStringSS = (0, superstruct_1.pattern)((0, superstruct_1.string)(), /\d+/);
|
|
8
|
+
var Web3AddressSS = (0, superstruct_1.pattern)((0, superstruct_1.string)(), /^0x[a-fA-F0-9]{40}$/);
|
|
9
|
+
var BigNumberType = (0, superstruct_1.coerce)((0, superstruct_1.instance)(ethers_1.BigNumber), (0, superstruct_1.string)(), function (value) {
|
|
10
|
+
try {
|
|
11
|
+
return ethers_1.BigNumber.from(value);
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
var FillTypeSS = (0, superstruct_1.number)();
|
|
18
|
+
var V3RelayDataSS = {
|
|
19
|
+
inputToken: (0, superstruct_1.string)(),
|
|
20
|
+
inputAmount: BigNumberType,
|
|
21
|
+
outputToken: (0, superstruct_1.string)(),
|
|
22
|
+
outputAmount: BigNumberType,
|
|
23
|
+
fillDeadline: (0, superstruct_1.number)(),
|
|
24
|
+
exclusiveRelayer: (0, superstruct_1.string)(),
|
|
25
|
+
exclusivityDeadline: (0, superstruct_1.number)(),
|
|
26
|
+
originChainId: (0, superstruct_1.number)(),
|
|
27
|
+
depositor: (0, superstruct_1.string)(),
|
|
28
|
+
recipient: (0, superstruct_1.string)(),
|
|
29
|
+
depositId: (0, superstruct_1.number)(),
|
|
30
|
+
message: (0, superstruct_1.string)(),
|
|
31
|
+
};
|
|
32
|
+
var SortableEventSS = {
|
|
33
|
+
blockNumber: (0, superstruct_1.number)(),
|
|
34
|
+
transactionIndex: (0, superstruct_1.number)(),
|
|
35
|
+
logIndex: (0, superstruct_1.number)(),
|
|
36
|
+
transactionHash: (0, superstruct_1.string)(),
|
|
37
|
+
};
|
|
38
|
+
var V3DepositSS = {
|
|
39
|
+
fromLiteChain: (0, superstruct_1.defaulted)((0, superstruct_1.boolean)(), false),
|
|
40
|
+
toLiteChain: (0, superstruct_1.defaulted)((0, superstruct_1.boolean)(), false),
|
|
41
|
+
destinationChainId: (0, superstruct_1.number)(),
|
|
42
|
+
quoteTimestamp: (0, superstruct_1.number)(),
|
|
43
|
+
relayerFeePct: (0, superstruct_1.optional)(BigNumberType),
|
|
44
|
+
speedUpSignature: (0, superstruct_1.optional)((0, superstruct_1.string)()),
|
|
45
|
+
updatedRecipient: (0, superstruct_1.optional)((0, superstruct_1.string)()),
|
|
46
|
+
updatedOutputAmount: (0, superstruct_1.optional)(BigNumberType),
|
|
47
|
+
updatedMessage: (0, superstruct_1.optional)((0, superstruct_1.string)()),
|
|
48
|
+
};
|
|
49
|
+
var _V3DepositWithBlockSS = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ quoteBlockNumber: (0, superstruct_1.number)() }, V3DepositSS), SortableEventSS), V3RelayDataSS);
|
|
50
|
+
var V3DepositWithBlockSS = (0, superstruct_1.object)(_V3DepositWithBlockSS);
|
|
51
|
+
var V3DepositWithBlockLpFeeSS = (0, superstruct_1.object)(tslib_1.__assign(tslib_1.__assign({}, _V3DepositWithBlockSS), { lpFeePct: BigNumberType }));
|
|
52
|
+
var V3RelayExecutionEventInfoSS = (0, superstruct_1.object)({
|
|
53
|
+
updatedOutputAmount: BigNumberType,
|
|
54
|
+
fillType: FillTypeSS,
|
|
55
|
+
updatedRecipient: (0, superstruct_1.string)(),
|
|
56
|
+
updatedMessage: (0, superstruct_1.string)(),
|
|
57
|
+
});
|
|
58
|
+
var V3FillSS = tslib_1.__assign(tslib_1.__assign({}, V3RelayDataSS), { destinationChainId: (0, superstruct_1.number)(), relayer: (0, superstruct_1.string)(), repaymentChainId: (0, superstruct_1.number)(), relayExecutionInfo: V3RelayExecutionEventInfoSS, quoteTimestamp: (0, superstruct_1.number)() });
|
|
59
|
+
var V3FillWithBlockSS = tslib_1.__assign(tslib_1.__assign({}, SortableEventSS), V3FillSS);
|
|
60
|
+
var BundleFillV3SS = (0, superstruct_1.object)(tslib_1.__assign(tslib_1.__assign({}, V3FillWithBlockSS), { lpFeePct: BigNumberType }));
|
|
61
|
+
var nestedV3DepositRecordSS = (0, superstruct_1.record)(PositiveIntegerStringSS, (0, superstruct_1.record)(Web3AddressSS, (0, superstruct_1.array)(V3DepositWithBlockSS)));
|
|
62
|
+
var nestedV3DepositRecordWithLpFeePctSS = (0, superstruct_1.record)(PositiveIntegerStringSS, (0, superstruct_1.record)(Web3AddressSS, (0, superstruct_1.array)(V3DepositWithBlockLpFeeSS)));
|
|
63
|
+
var nestedV3BundleFillsSS = (0, superstruct_1.record)(PositiveIntegerStringSS, (0, superstruct_1.record)(Web3AddressSS, (0, superstruct_1.object)({
|
|
64
|
+
fills: (0, superstruct_1.array)(BundleFillV3SS),
|
|
65
|
+
refunds: (0, superstruct_1.record)((0, superstruct_1.string)(), BigNumberType),
|
|
66
|
+
totalRefundAmount: BigNumberType,
|
|
67
|
+
realizedLpFees: BigNumberType,
|
|
68
|
+
})));
|
|
69
|
+
exports.BundleDataSS = (0, superstruct_1.object)({
|
|
70
|
+
bundleBlockRanges: (0, superstruct_1.array)((0, superstruct_1.array)((0, superstruct_1.number)())),
|
|
71
|
+
bundleDepositsV3: nestedV3DepositRecordSS,
|
|
72
|
+
expiredDepositsToRefundV3: nestedV3DepositRecordSS,
|
|
73
|
+
unexecutableSlowFills: nestedV3DepositRecordWithLpFeePctSS,
|
|
74
|
+
bundleSlowFillsV3: nestedV3DepositRecordWithLpFeePctSS,
|
|
75
|
+
bundleFillsV3: nestedV3BundleFillsSS,
|
|
76
|
+
});
|
|
77
|
+
//# sourceMappingURL=SuperstructUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuperstructUtils.js","sourceRoot":"","sources":["../../../../../src/clients/BundleDataClient/utils/SuperstructUtils.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./shims"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./FillUtils"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./DataworkerUtils"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./PoolRebalanceUtils"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./SuperstructUtils"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./MerkleTreeUtils"), exports);
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/clients/BundleDataClient/utils/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,sDAA4B;AAC5B,4DAAkC;AAClC,+DAAqC;AACrC,6DAAmC;AACnC,4DAAkC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RelayData, Deposit, DepositWithBlock, SpeedUp, Fill, FillWithBlock, SlowFillLeaf } from "../../../interfaces";
|
|
2
|
+
export type V3RelayData = RelayData;
|
|
3
|
+
export type V3Deposit = Deposit;
|
|
4
|
+
export type V3DepositWithBlock = DepositWithBlock;
|
|
5
|
+
export type V3SpeedUp = SpeedUp;
|
|
6
|
+
export type V3Fill = Fill;
|
|
7
|
+
export type V3FillWithBlock = FillWithBlock;
|
|
8
|
+
export type V3SlowFillLeaf = SlowFillLeaf;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shims.js","sourceRoot":"","sources":["../../../../../src/clients/BundleDataClient/utils/shims.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { DEFAULT_CONFIG_STORE_VERSION, GLOBAL_CONFIG_STORE_KEYS, AcrossConfigStoreClient, ConfigStoreUpdate, } from "./AcrossConfigStoreClient";
|
|
2
2
|
export { HubPoolClient, LpFeeRequest } from "./HubPoolClient";
|
|
3
3
|
export { SpokePoolClient, SpokePoolUpdate } from "./SpokePoolClient";
|
|
4
|
+
export * as BundleDataClient from "./BundleDataClient";
|
|
4
5
|
export * as mocks from "./mocks";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mocks = exports.SpokePoolClient = exports.HubPoolClient = exports.AcrossConfigStoreClient = exports.GLOBAL_CONFIG_STORE_KEYS = exports.DEFAULT_CONFIG_STORE_VERSION = void 0;
|
|
3
|
+
exports.mocks = exports.BundleDataClient = exports.SpokePoolClient = exports.HubPoolClient = exports.AcrossConfigStoreClient = exports.GLOBAL_CONFIG_STORE_KEYS = exports.DEFAULT_CONFIG_STORE_VERSION = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var AcrossConfigStoreClient_1 = require("./AcrossConfigStoreClient");
|
|
6
6
|
Object.defineProperty(exports, "DEFAULT_CONFIG_STORE_VERSION", { enumerable: true, get: function () { return AcrossConfigStoreClient_1.DEFAULT_CONFIG_STORE_VERSION; } });
|
|
@@ -10,5 +10,6 @@ var HubPoolClient_1 = require("./HubPoolClient");
|
|
|
10
10
|
Object.defineProperty(exports, "HubPoolClient", { enumerable: true, get: function () { return HubPoolClient_1.HubPoolClient; } });
|
|
11
11
|
var SpokePoolClient_1 = require("./SpokePoolClient");
|
|
12
12
|
Object.defineProperty(exports, "SpokePoolClient", { enumerable: true, get: function () { return SpokePoolClient_1.SpokePoolClient; } });
|
|
13
|
+
exports.BundleDataClient = tslib_1.__importStar(require("./BundleDataClient"));
|
|
13
14
|
exports.mocks = tslib_1.__importStar(require("./mocks"));
|
|
14
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/index.ts"],"names":[],"mappings":";;;;AAAA,qEAKmC;AAJjC,uIAAA,4BAA4B,OAAA;AAC5B,mIAAA,wBAAwB,OAAA;AACxB,kIAAA,uBAAuB,OAAA;AAGzB,iDAA8D;AAArD,8GAAA,aAAa,OAAA;AACtB,qDAAqE;AAA5D,kHAAA,eAAe,OAAA;AACxB,yDAAiC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/clients/index.ts"],"names":[],"mappings":";;;;AAAA,qEAKmC;AAJjC,uIAAA,4BAA4B,OAAA;AAC5B,mIAAA,wBAAwB,OAAA;AACxB,kIAAA,uBAAuB,OAAA;AAGzB,iDAA8D;AAArD,8GAAA,aAAa,OAAA;AACtB,qDAAqE;AAA5D,kHAAA,eAAe,OAAA;AACxB,+EAAuD;AACvD,yDAAiC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { BigNumber, Signer } from "ethers";
|
|
2
|
+
import { DepositWithBlock, FillWithBlock, Refund } from "./SpokePool";
|
|
3
|
+
import { HubPoolClient } from "../clients/HubPoolClient";
|
|
4
|
+
import { AcrossConfigStoreClient } from "../clients";
|
|
5
|
+
import { ArweaveClient } from "../caching";
|
|
6
|
+
export type ExpiredDepositsToRefundV3 = {
|
|
7
|
+
[originChainId: number]: {
|
|
8
|
+
[originToken: string]: DepositWithBlock[];
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export type BundleDepositsV3 = {
|
|
12
|
+
[originChainId: number]: {
|
|
13
|
+
[originToken: string]: DepositWithBlock[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export interface BundleFillV3 extends FillWithBlock {
|
|
17
|
+
lpFeePct: BigNumber;
|
|
18
|
+
}
|
|
19
|
+
export type BundleFillsV3 = {
|
|
20
|
+
[repaymentChainId: number]: {
|
|
21
|
+
[repaymentToken: string]: {
|
|
22
|
+
fills: BundleFillV3[];
|
|
23
|
+
refunds: Refund;
|
|
24
|
+
totalRefundAmount: BigNumber;
|
|
25
|
+
realizedLpFees: BigNumber;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export type BundleExcessSlowFills = {
|
|
30
|
+
[destinationChainId: number]: {
|
|
31
|
+
[destinationToken: string]: (DepositWithBlock & {
|
|
32
|
+
lpFeePct: BigNumber;
|
|
33
|
+
})[];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export type BundleSlowFills = {
|
|
37
|
+
[destinationChainId: number]: {
|
|
38
|
+
[destinationToken: string]: (DepositWithBlock & {
|
|
39
|
+
lpFeePct: BigNumber;
|
|
40
|
+
})[];
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export type LoadDataReturnValue = {
|
|
44
|
+
bundleDepositsV3: BundleDepositsV3;
|
|
45
|
+
expiredDepositsToRefundV3: ExpiredDepositsToRefundV3;
|
|
46
|
+
bundleFillsV3: BundleFillsV3;
|
|
47
|
+
unexecutableSlowFills: BundleExcessSlowFills;
|
|
48
|
+
bundleSlowFillsV3: BundleSlowFills;
|
|
49
|
+
};
|
|
50
|
+
export type BundleData = LoadDataReturnValue & {
|
|
51
|
+
bundleBlockRanges: number[][];
|
|
52
|
+
};
|
|
53
|
+
export interface Clients {
|
|
54
|
+
hubPoolClient: HubPoolClient;
|
|
55
|
+
configStoreClient: AcrossConfigStoreClient;
|
|
56
|
+
hubSigner?: Signer;
|
|
57
|
+
arweaveClient: ArweaveClient;
|
|
58
|
+
}
|
|
59
|
+
export type CombinedRefunds = {
|
|
60
|
+
[repaymentChainId: number]: {
|
|
61
|
+
[repaymentToken: string]: Refund;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BundleData.js","sourceRoot":"","sources":["../../../src/interfaces/BundleData.ts"],"names":[],"mappings":""}
|
|
@@ -9,4 +9,5 @@ tslib_1.__exportStar(require("./Bridge"), exports);
|
|
|
9
9
|
tslib_1.__exportStar(require("./Error"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./TypedData"), exports);
|
|
11
11
|
tslib_1.__exportStar(require("./CachingMechanism"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./BundleData"), exports);
|
|
12
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,wDAA8B;AAC9B,oDAA0B;AAC1B,sDAA4B;AAC5B,mDAAyB;AACzB,kDAAwB;AACxB,sDAA4B;AAC5B,6DAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,wDAA8B;AAC9B,oDAA0B;AAC1B,sDAA4B;AAC5B,mDAAyB;AACzB,kDAAwB;AACxB,sDAA4B;AAC5B,6DAAmC;AACnC,uDAA6B"}
|
|
@@ -14,15 +14,15 @@ var endpoints = (_a = {},
|
|
|
14
14
|
_a);
|
|
15
15
|
function getURL(chainId, apiKey, transport) {
|
|
16
16
|
var _a, _b;
|
|
17
|
-
var
|
|
18
|
-
if (!
|
|
17
|
+
var chain = (_a = endpoints[chainId]) !== null && _a !== void 0 ? _a : (_b = constants_1.PUBLIC_NETWORKS[chainId]) === null || _b === void 0 ? void 0 : _b.name;
|
|
18
|
+
if (!chain) {
|
|
19
19
|
throw new Error("No known Alchemy provider for chainId ".concat(chainId));
|
|
20
20
|
}
|
|
21
21
|
if (MAINNET_CHAIN_IDs.includes(chainId)) {
|
|
22
|
-
|
|
22
|
+
chain = "".concat(chain, "-mainnet");
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
return "".concat(transport, "://").concat(
|
|
24
|
+
chain = chain.toLowerCase().replace(" ", "-");
|
|
25
|
+
return "".concat(transport, "://").concat(chain, ".g.alchemy.com/v2/").concat(apiKey);
|
|
26
26
|
}
|
|
27
27
|
exports.getURL = getURL;
|
|
28
28
|
//# sourceMappingURL=alchemy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alchemy.js","sourceRoot":"","sources":["../../../src/providers/alchemy.ts"],"names":[],"mappings":";;;;AAAA,0CAAmG;AAGnG,IAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,6BAAkB,CAAC,CAAC;AAG5D,IAAM,SAAS;IACb,GAAC,qBAAS,CAAC,QAAQ,IAAG,KAAK;IAC3B,GAAC,qBAAS,CAAC,gBAAgB,IAAG,aAAa;IAC3C,GAAC,qBAAS,CAAC,OAAO,IAAG,KAAK;IAC1B,GAAC,qBAAS,CAAC,OAAO,IAAG,aAAa;IAClC,GAAC,qBAAS,CAAC,QAAQ,IAAG,KAAK;IAC3B,GAAC,qBAAS,CAAC,gBAAgB,IAAG,aAAa;OAC5C,CAAC;AAEF,SAAgB,MAAM,CAAC,OAAe,EAAE,MAAc,EAAE,SAAuB;;IAC7E,IAAI,
|
|
1
|
+
{"version":3,"file":"alchemy.js","sourceRoot":"","sources":["../../../src/providers/alchemy.ts"],"names":[],"mappings":";;;;AAAA,0CAAmG;AAGnG,IAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,6BAAkB,CAAC,CAAC;AAG5D,IAAM,SAAS;IACb,GAAC,qBAAS,CAAC,QAAQ,IAAG,KAAK;IAC3B,GAAC,qBAAS,CAAC,gBAAgB,IAAG,aAAa;IAC3C,GAAC,qBAAS,CAAC,OAAO,IAAG,KAAK;IAC1B,GAAC,qBAAS,CAAC,OAAO,IAAG,aAAa;IAClC,GAAC,qBAAS,CAAC,QAAQ,IAAG,KAAK;IAC3B,GAAC,qBAAS,CAAC,gBAAgB,IAAG,aAAa;OAC5C,CAAC;AAEF,SAAgB,MAAM,CAAC,OAAe,EAAE,MAAc,EAAE,SAAuB;;IAC7E,IAAI,KAAK,GAAG,MAAA,SAAS,CAAC,OAAO,CAAC,mCAAI,MAAA,2BAAe,CAAC,OAAO,CAAC,0CAAE,IAAI,CAAC;IACjE,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,gDAAyC,OAAO,CAAE,CAAC,CAAC;KACrE;IAED,IAAI,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;QACvC,KAAK,GAAG,UAAG,KAAK,aAAU,CAAC;KAC5B;IACD,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAE9C,OAAO,UAAG,SAAS,gBAAM,KAAK,+BAAqB,MAAM,CAAE,CAAC;AAC9D,CAAC;AAZD,wBAYC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getURL = void 0;
|
|
5
|
+
var constants_1 = require("../constants");
|
|
6
|
+
var endpoints = (_a = {},
|
|
7
|
+
_a[constants_1.CHAIN_IDs.ARBITRUM] = "arbitrum",
|
|
8
|
+
_a[constants_1.CHAIN_IDs.MAINNET] = "ethereum",
|
|
9
|
+
_a);
|
|
10
|
+
function getURL(chainId, apiKey, transport) {
|
|
11
|
+
var _a, _b;
|
|
12
|
+
var chain = (_a = endpoints[chainId]) !== null && _a !== void 0 ? _a : (_b = constants_1.PUBLIC_NETWORKS[chainId]) === null || _b === void 0 ? void 0 : _b.name;
|
|
13
|
+
if (!chain) {
|
|
14
|
+
throw new Error("No known DRPC provider for chainId ".concat(chainId));
|
|
15
|
+
}
|
|
16
|
+
chain = chain.toLowerCase().replace(" ", "-");
|
|
17
|
+
var rpcType = transport === "https" ? "rpc" : "ws";
|
|
18
|
+
return "".concat(transport, "://lb.drpc.org/og").concat(rpcType, "?network=").concat(chain, "&dkey=").concat(apiKey);
|
|
19
|
+
}
|
|
20
|
+
exports.getURL = getURL;
|
|
21
|
+
//# sourceMappingURL=drpc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drpc.js","sourceRoot":"","sources":["../../../src/providers/drpc.ts"],"names":[],"mappings":";;;;AAAA,0CAA0D;AAI1D,IAAM,SAAS;IACb,GAAC,qBAAS,CAAC,QAAQ,IAAG,UAAU;IAChC,GAAC,qBAAS,CAAC,OAAO,IAAG,UAAU;OAChC,CAAC;AAEF,SAAgB,MAAM,CAAC,OAAe,EAAE,MAAc,EAAE,SAAuB;;IAC7E,IAAI,KAAK,GAAG,MAAA,SAAS,CAAC,OAAO,CAAC,mCAAI,MAAA,2BAAe,CAAC,OAAO,CAAC,0CAAE,IAAI,CAAC;IACjE,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,6CAAsC,OAAO,CAAE,CAAC,CAAC;KAClE;IACD,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC9C,IAAM,OAAO,GAAG,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAErD,OAAO,UAAG,SAAS,8BAAoB,OAAO,sBAAY,KAAK,mBAAS,MAAM,CAAE,CAAC;AACnF,CAAC;AATD,wBASC"}
|
|
@@ -9,15 +9,15 @@ var endpoints = (_a = {},
|
|
|
9
9
|
_a);
|
|
10
10
|
function getURL(chainId, apiKey, transport) {
|
|
11
11
|
var _a, _b;
|
|
12
|
-
var
|
|
13
|
-
if (!
|
|
12
|
+
var chain = (_a = endpoints[chainId]) !== null && _a !== void 0 ? _a : (_b = constants_1.PUBLIC_NETWORKS[chainId]) === null || _b === void 0 ? void 0 : _b.name;
|
|
13
|
+
if (!chain) {
|
|
14
14
|
throw new Error("No known Infura provider for chainId ".concat(chainId));
|
|
15
15
|
}
|
|
16
16
|
if (chainId !== constants_1.CHAIN_IDs.MAINNET && MAINNET_CHAIN_IDs.includes(chainId)) {
|
|
17
|
-
|
|
17
|
+
chain = "".concat(chain, "-mainnet");
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
return transport === "https" ? "https://".concat(
|
|
19
|
+
chain = chain.toLowerCase().replace(" ", "-");
|
|
20
|
+
return transport === "https" ? "https://".concat(chain, ".infura.io/v3/").concat(apiKey) : "wss://".concat(chain, ".infura.io/ws/v3/").concat(apiKey);
|
|
21
21
|
}
|
|
22
22
|
exports.getURL = getURL;
|
|
23
23
|
//# sourceMappingURL=infura.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infura.js","sourceRoot":"","sources":["../../../src/providers/infura.ts"],"names":[],"mappings":";;;;AAAA,0CAAmG;AAGnG,IAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,6BAAkB,CAAC,CAAC;AAG5D,IAAM,SAAS;IACb,GAAC,qBAAS,CAAC,QAAQ,IAAG,UAAU;OACjC,CAAC;AAEF,SAAgB,MAAM,CAAC,OAAe,EAAE,MAAc,EAAE,SAAuB;;IAC7E,IAAI,
|
|
1
|
+
{"version":3,"file":"infura.js","sourceRoot":"","sources":["../../../src/providers/infura.ts"],"names":[],"mappings":";;;;AAAA,0CAAmG;AAGnG,IAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,6BAAkB,CAAC,CAAC;AAG5D,IAAM,SAAS;IACb,GAAC,qBAAS,CAAC,QAAQ,IAAG,UAAU;OACjC,CAAC;AAEF,SAAgB,MAAM,CAAC,OAAe,EAAE,MAAc,EAAE,SAAuB;;IAC7E,IAAI,KAAK,GAAG,MAAA,SAAS,CAAC,OAAO,CAAC,mCAAI,MAAA,2BAAe,CAAC,OAAO,CAAC,0CAAE,IAAI,CAAC;IACjE,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,+CAAwC,OAAO,CAAE,CAAC,CAAC;KACpE;IAED,IAAI,OAAO,KAAK,qBAAS,CAAC,OAAO,IAAI,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;QACxE,KAAK,GAAG,UAAG,KAAK,aAAU,CAAC;KAC5B;IACD,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAE9C,OAAO,SAAS,KAAK,OAAO,CAAC,CAAC,CAAC,kBAAW,KAAK,2BAAiB,MAAM,CAAE,CAAC,CAAC,CAAC,gBAAS,KAAK,8BAAoB,MAAM,CAAE,CAAC;AACxH,CAAC;AAZD,wBAYC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type RPCProvider = "INFURA" | "
|
|
1
|
+
export type RPCProvider = "ALCHEMY" | "DRPC" | "INFURA" | "INFURA_DIN";
|
|
2
2
|
export type RPCTransport = "https" | "wss";
|