0xtrails 0.1.9 → 0.1.10
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/{ccip-CkYVNTQS.js → ccip-u8KSCij5.js} +17 -17
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/constants.d.ts +7 -5
- package/dist/constants.d.ts.map +1 -1
- package/dist/{index-BV6FAE7l.js → index-DpwCZuxY.js} +47295 -26266
- package/dist/index.js +53 -54
- package/dist/logger.d.ts +1 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/queryParams.d.ts.map +1 -1
- package/dist/relayer.d.ts +2 -0
- package/dist/relayer.d.ts.map +1 -1
- package/dist/sequenceWallet.d.ts +4 -1
- package/dist/sequenceWallet.d.ts.map +1 -1
- package/dist/wallets.d.ts +1 -0
- package/dist/wallets.d.ts.map +1 -1
- package/dist/widget/components/ConnectWallet.d.ts +0 -1
- package/dist/widget/components/ConnectWallet.d.ts.map +1 -1
- package/dist/widget/components/DebugScreensDropdown.d.ts.map +1 -1
- package/dist/widget/index.d.ts +1 -1
- package/dist/widget/index.d.ts.map +1 -1
- package/dist/widget/index.js +3 -4
- package/dist/widget/widget.d.ts +1 -1
- package/dist/widget/widget.d.ts.map +1 -1
- package/package.json +6 -3
- package/src/config.ts +75 -10
- package/src/constants.ts +9 -7
- package/src/logger.ts +12 -5
- package/src/queryParams.ts +7 -2
- package/src/relayer.ts +77 -136
- package/src/wallets.ts +16 -2
- package/src/widget/components/ConnectWallet.tsx +0 -1
- package/src/widget/components/DebugScreensDropdown.tsx +2 -3
- package/src/widget/index.tsx +0 -1
- package/src/widget/widget.tsx +9 -26
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { X as b, Y as O, Z as x, _ as $, $ as q, a0 as F, a1 as E, a2 as D, a3 as w, a4 as G, a5 as R, a6 as I, a7 as T, a8 as y, a9 as L, aa as M, ab as m, ac as C, ad as H, ae as v, af as U, ag as j, ah as A, ai as B } from "./index-DpwCZuxY.js";
|
|
2
2
|
function _(a) {
|
|
3
3
|
const { abi: r, data: e } = a, s = b(e, 0, 4), t = r.find((n) => n.type === "function" && s === O(x(n)));
|
|
4
4
|
if (!t)
|
|
@@ -77,7 +77,7 @@ class W extends y {
|
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
class
|
|
80
|
+
class X extends y {
|
|
81
81
|
constructor({ result: r, url: e }) {
|
|
82
82
|
super("Offchain gateway response is malformed. Response data must be a hex value.", {
|
|
83
83
|
metaMessages: [
|
|
@@ -88,7 +88,7 @@ class Y extends y {
|
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
class
|
|
91
|
+
class Y extends y {
|
|
92
92
|
constructor({ sender: r, to: e }) {
|
|
93
93
|
super("Reverted sender address does not match target contract address (`to`).", {
|
|
94
94
|
metaMessages: [
|
|
@@ -106,7 +106,7 @@ async function P(a) {
|
|
|
106
106
|
try {
|
|
107
107
|
n[c] = o.urls.includes(N) ? await P({ data: o.data, ccipRequest: e }) : await e(o), t[c] = !1;
|
|
108
108
|
} catch (d) {
|
|
109
|
-
t[c] = !0, n[c] =
|
|
109
|
+
t[c] = !0, n[c] = Z(d);
|
|
110
110
|
}
|
|
111
111
|
})), J({
|
|
112
112
|
abi: m,
|
|
@@ -114,7 +114,7 @@ async function P(a) {
|
|
|
114
114
|
result: [t, n]
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function Z(a) {
|
|
118
118
|
return a.name === "HttpRequestError" && a.status ? k({
|
|
119
119
|
abi: m,
|
|
120
120
|
errorName: "HttpError",
|
|
@@ -125,7 +125,7 @@ function z(a) {
|
|
|
125
125
|
args: ["shortMessage" in a ? a.shortMessage : a.message]
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
const
|
|
128
|
+
const V = "0x556f1830", z = {
|
|
129
129
|
name: "OffchainLookup",
|
|
130
130
|
type: "error",
|
|
131
131
|
inputs: [
|
|
@@ -154,18 +154,18 @@ const X = "0x556f1830", K = {
|
|
|
154
154
|
async function tt(a, { blockNumber: r, blockTag: e, data: s, to: t }) {
|
|
155
155
|
const { args: n } = H({
|
|
156
156
|
data: s,
|
|
157
|
-
abi: [
|
|
158
|
-
}), [o, c, d, i, u] = n, { ccipRead: f } = a, g = f && typeof f?.request == "function" ? f.request :
|
|
157
|
+
abi: [z]
|
|
158
|
+
}), [o, c, d, i, u] = n, { ccipRead: f } = a, g = f && typeof f?.request == "function" ? f.request : K;
|
|
159
159
|
try {
|
|
160
|
-
if (!
|
|
161
|
-
throw new
|
|
160
|
+
if (!v(t, o))
|
|
161
|
+
throw new Y({ sender: o, to: t });
|
|
162
162
|
const l = c.includes(N) ? await P({
|
|
163
163
|
data: d,
|
|
164
164
|
ccipRequest: g
|
|
165
|
-
}) : await g({ data: d, sender: o, urls: c }), { data: S } = await
|
|
165
|
+
}) : await g({ data: d, sender: o, urls: c }), { data: S } = await U(a, {
|
|
166
166
|
blockNumber: r,
|
|
167
167
|
blockTag: e,
|
|
168
|
-
data:
|
|
168
|
+
data: j([
|
|
169
169
|
i,
|
|
170
170
|
w([{ type: "bytes" }, { type: "bytes" }], [l, u])
|
|
171
171
|
]),
|
|
@@ -183,7 +183,7 @@ async function tt(a, { blockNumber: r, blockTag: e, data: s, to: t }) {
|
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
async function
|
|
186
|
+
async function K({ data: a, sender: r, urls: e }) {
|
|
187
187
|
let s = new Error("An unknown error occurred.");
|
|
188
188
|
for (let t = 0; t < e.length; t++) {
|
|
189
189
|
const n = e[t], o = n.includes("{data}") ? "GET" : "POST", c = o === "POST" ? { data: a, sender: r } : void 0, d = o === "POST" ? { "Content-Type": "application/json" } : {};
|
|
@@ -205,7 +205,7 @@ async function Q({ data: a, sender: r, urls: e }) {
|
|
|
205
205
|
continue;
|
|
206
206
|
}
|
|
207
207
|
if (!B(u)) {
|
|
208
|
-
s = new
|
|
208
|
+
s = new X({
|
|
209
209
|
result: u,
|
|
210
210
|
url: n
|
|
211
211
|
});
|
|
@@ -223,8 +223,8 @@ async function Q({ data: a, sender: r, urls: e }) {
|
|
|
223
223
|
throw s;
|
|
224
224
|
}
|
|
225
225
|
export {
|
|
226
|
-
|
|
226
|
+
K as ccipRequest,
|
|
227
227
|
tt as offchainLookup,
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
z as offchainLookupAbiItem,
|
|
229
|
+
V as offchainLookupSignature
|
|
230
230
|
};
|
package/dist/config.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export declare function declareSequenceEnv(): "prod" | "local" | "dev";
|
|
2
|
+
export declare function declareSequenceIndexerUrl(): "https://indexer.sequence.app" | "https://dev-indexer.sequence.app";
|
|
3
|
+
export declare function declareSequenceApiUrl(): string;
|
|
4
|
+
export declare function declareSequenceProjectAccessKey(): "AQAAAAAAAKhGHJc3N5V2AWqfJ1v9xZ2u0nA" | "AQAAAAAAAAaq1E41OU0QxifQgrVBMgfqg7k";
|
|
1
5
|
export declare function getSequenceProjectAccessKey(): string;
|
|
2
6
|
export declare function setSequenceProjectAccessKey(sequenceProjectAccessKey: string): void;
|
|
3
7
|
export declare function setSequenceUseV3Relayers(sequenceUseV3Relayers: boolean): void;
|
|
@@ -12,10 +16,13 @@ export declare function setWalletConnectProjectId(walletConnectProjectId: string
|
|
|
12
16
|
export declare function getWalletConnectProjectId(): string;
|
|
13
17
|
export declare function setSlippageTolerance(slippageTolerance: string): void;
|
|
14
18
|
export declare function getSlippageTolerance(): string;
|
|
19
|
+
export declare function setDebug(debug: boolean): void;
|
|
20
|
+
export declare function getDebug(): boolean;
|
|
15
21
|
export declare function getAccountIntentTransactionHistory(): boolean;
|
|
16
22
|
export declare function getSameChainSwapDifferentIntentAddresses(): boolean;
|
|
17
23
|
export declare const FeatureFlags: {
|
|
18
24
|
accountIntentTransactionHistory: boolean;
|
|
19
25
|
sameChainSwapDifferentIntentAddresses: boolean;
|
|
20
26
|
};
|
|
27
|
+
export declare function getEnvVar(name: string): string | undefined;
|
|
21
28
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAiCA,wBAAgB,kBAAkB,6BAmBjC;AAED,wBAAgB,yBAAyB,wEAKxC;AAED,wBAAgB,qBAAqB,WAQpC;AAED,wBAAgB,+BAA+B,kFAK9C;AAED,wBAAgB,2BAA2B,WAE1C;AAED,wBAAgB,2BAA2B,CAAC,wBAAwB,EAAE,MAAM,QAE3E;AAED,wBAAgB,wBAAwB,CAAC,qBAAqB,EAAE,OAAO,QAEtE;AAED,wBAAgB,wBAAwB,YAEvC;AAED,wBAAgB,qBAAqB,CAAC,kBAAkB,EAAE,MAAM,QAE/D;AAED,wBAAgB,qBAAqB,WAEpC;AAED,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,MAAM,QAEvD;AAED,wBAAgB,iBAAiB,WAEhC;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,QAEjD;AAED,wBAAgB,cAAc,WAE7B;AAED,wBAAgB,yBAAyB,CAAC,sBAAsB,EAAE,MAAM,QAEvE;AAED,wBAAgB,yBAAyB,WAExC;AAED,wBAAgB,oBAAoB,CAAC,iBAAiB,EAAE,MAAM,QAE7D;AAED,wBAAgB,oBAAoB,WAEnC;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,QAEtC;AAED,wBAAgB,QAAQ,YAEvB;AAED,wBAAgB,kCAAkC,YAEjD;AAED,wBAAgB,wCAAwC,YAEvD;AAED,eAAO,MAAM,YAAY;;;CAGxB,CAAA;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,sBAKrC"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -5,12 +5,14 @@ export declare const ATTESATION_SIGNER_ADDRESS = "0xf39Fd6e51aad88F6F4ce6aB88272
|
|
|
5
5
|
export declare const TRAILS_LIFI_SAPIENT_SIGNER_ADDRESS = "0xd7571bd1e3af468c3a49966c9a92a2e907cdfa52";
|
|
6
6
|
export declare const TRAILS_RELAY_SAPIENT_SIGNER_ADDRESS = "0x9a013e7d186611af36a918ef23d81886e8c256f8";
|
|
7
7
|
export declare const TRAILS_CCTP_SAPIENT_SIGNER_ADDRESS = "0xc1A9B197eBb31Fc2B613C59dAC3f3E5698A429D0";
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
8
|
+
export declare const DEFAULT_SEQUENCE_ENV = "prod";
|
|
9
|
+
export declare const PROD_SEQUENCE_INDEXER_URL = "https://indexer.sequence.app";
|
|
10
|
+
export declare const PROD_SEQUENCE_API_URL = "https://api.sequence.app";
|
|
11
|
+
export declare const DEV_SEQUENCE_INDEXER_URL = "https://dev-indexer.sequence.app";
|
|
12
|
+
export declare const DEV_SEQUENCE_API_URL = "https://dev-api.sequence.app";
|
|
11
13
|
export declare const intentEntrypoints: Record<number, `0x${string}`>;
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
+
export declare const PROD_SEQUENCE_PROJECT_ACCESS_KEY = "AQAAAAAAAKhGHJc3N5V2AWqfJ1v9xZ2u0nA";
|
|
15
|
+
export declare const DEV_SEQUENCE_PROJECT_ACCESS_KEY = "AQAAAAAAAAaq1E41OU0QxifQgrVBMgfqg7k";
|
|
14
16
|
export declare const DATABEAT_SERVER = "https://databeat.sequence.app";
|
|
15
17
|
export declare const DATABEAT_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHAiOiJzZXEtdHJhaWxzIiwiZXhwIjoyMDI4MTIwOTg4fQ.KZIjEziul_nZ4kjEXudvfqeWmVekc5ftXKx_EqDrmZU";
|
|
16
18
|
export declare const DEFAULT_WALLETCONNECT_PROJECT_ID = "10c5ac56159da00924d110c07c3f6e3a";
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAE3E,eAAO,MAAM,8BAA8B,EAAE,WAAW,CAAC,OAMxD,CAAA;AAED,eAAO,MAAM,+BAA+B,+CACE,CAAA;AAE9C,eAAO,MAAM,yBAAyB,+CACQ,CAAA;AAE9C,eAAO,MAAM,kCAAkC,+CACD,CAAA;AAC9C,eAAO,MAAM,mCAAmC,+CACF,CAAA;AAC9C,eAAO,MAAM,kCAAkC,+CACD,CAAA;AAE9C,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAE3E,eAAO,MAAM,8BAA8B,EAAE,WAAW,CAAC,OAMxD,CAAA;AAED,eAAO,MAAM,+BAA+B,+CACE,CAAA;AAE9C,eAAO,MAAM,yBAAyB,+CACQ,CAAA;AAE9C,eAAO,MAAM,kCAAkC,+CACD,CAAA;AAC9C,eAAO,MAAM,mCAAmC,+CACF,CAAA;AAC9C,eAAO,MAAM,kCAAkC,+CACD,CAAA;AAE9C,eAAO,MAAM,oBAAoB,SAAS,CAAA;AAE1C,eAAO,MAAM,yBAAyB,iCAAiC,CAAA;AACvE,eAAO,MAAM,qBAAqB,6BAA6B,CAAA;AAC/D,eAAO,MAAM,wBAAwB,qCAAqC,CAAA;AAC1E,eAAO,MAAM,oBAAoB,iCAAiC,CAAA;AAElE,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,MAAM,EAAE,CAM3D,CAAA;AAGD,eAAO,MAAM,gCAAgC,wCACN,CAAA;AACvC,eAAO,MAAM,+BAA+B,wCACL,CAAA;AAEvC,eAAO,MAAM,eAAe,kCAAkC,CAAA;AAC9D,eAAO,MAAM,YAAY,wIAC8G,CAAA;AAEvI,eAAO,MAAM,gCAAgC,qCACT,CAAA;AAEpC,eAAO,MAAM,QAAQ,0BAA0B,CAAA;AAE/C,eAAO,MAAM,0BAA0B,SAAS,CAAA;AAEhD,eAAO,MAAM,2BAA2B,SAAS,CAAA"}
|