@zk-email/sdk 3.0.0-nightly.30 → 3.0.0-nightly.32
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-zrmtvMqS.js → ccip--OHeJFrW.js} +2 -2
- package/dist/{ccip-Df2gmThf.mjs → ccip-BfvgG1oi.mjs} +2 -2
- package/dist/{index-CfWnjU_k.mjs → index-B4t5Vosd.mjs} +3 -2
- package/dist/{index-BZtxy2u4.js → index-x_mCYVWo.js} +52 -52
- package/dist/types/index.d.ts +1 -0
- package/dist/zk-email-sdk.index.cjs +1 -1
- package/dist/zk-email-sdk.index.mjs +13 -12
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-
|
|
2
|
-
//# sourceMappingURL=ccip
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-x_mCYVWo.js");class k extends a.BaseError{constructor({callbackSelector:e,cause:o,data:d,extraData:r,sender:f,urls:h}){var s;super(o.shortMessage||"An error occurred while fetching for an offchain result.",{cause:o,metaMessages:[...o.metaMessages||[],(s=o.metaMessages)!=null&&s.length?"":[],"Offchain Gateway Call:",h&&[" Gateway URL(s):",...h.map(c=>` ${a.getUrl(c)}`)],` Sender: ${f}`,` Data: ${d}`,` Callback selector: ${e}`,` Extra data: ${r}`].flat(),name:"OffchainLookupError"})}}class L extends a.BaseError{constructor({result:e,url:o}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${a.getUrl(o)}`,`Response: ${a.stringify(e)}`],name:"OffchainLookupResponseMalformedError"})}}class R extends a.BaseError{constructor({sender:e,to:o}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${o}`,`OffchainLookup sender address: ${e}`],name:"OffchainLookupSenderMismatchError"})}}const x="0x556f1830",w={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function S(i,{blockNumber:e,blockTag:o,data:d,requestOptions:r,to:f}){var n;const{args:h}=a.decodeErrorResult({data:d,abi:[w]}),[s,c,l,y,u]=h,{ccipRead:g}=i,t=g&&typeof(g==null?void 0:g.request)=="function"?g.request:b;try{if(!a.isAddressEqual(f,s))throw new R({sender:s,to:f});const m=c.includes(a.localBatchGatewayUrl)?await a.localBatchGatewayRequest({data:l,ccipRequest:E=>t({...E,requestOptions:r})}):await t({data:l,requestOptions:r,sender:s,urls:c}),{data:p}=await a.call(i,{blockNumber:e,blockTag:o,data:a.concat([y,a.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[m,u])]),requestOptions:r,to:f});return p}catch(m){throw(n=r==null?void 0:r.signal)!=null&&n.aborted?a.getAbortError(r.signal):a.isAbortError(m)?m:new k({callbackSelector:y,cause:m,data:d,extraData:u,sender:s,urls:c})}}async function b({data:i,requestOptions:e,sender:o,urls:d}){var f,h,s;let r=new Error("An unknown error occurred.");for(let c=0;c<d.length;c++){if((f=e==null?void 0:e.signal)!=null&&f.aborted)throw a.getAbortError(e.signal);const l=d[c],y=l.includes("{data}")?"GET":"POST",u=y==="POST"?{data:i,sender:o}:void 0,g=y==="POST"?{"Content-Type":"application/json"}:{};try{const t=await fetch(l.replace("{sender}",o.toLowerCase()).replace("{data}",i),{body:JSON.stringify(u),headers:g,method:y,...e!=null&&e.signal?{signal:e.signal}:{}});let n;if((h=t.headers.get("Content-Type"))!=null&&h.startsWith("application/json")?n=(await t.json()).data:n=await t.text(),!t.ok){r=new a.HttpRequestError({body:u,details:n!=null&&n.error?a.stringify(n.error):t.statusText,headers:t.headers,status:t.status,url:l});continue}if(!a.isHex(n)){r=new L({result:n,url:l});continue}return n}catch(t){if((s=e==null?void 0:e.signal)!=null&&s.aborted)throw a.getAbortError(e.signal);if(a.isAbortError(t))throw t;r=new a.HttpRequestError({body:u,details:t.message,url:l})}}throw r}exports.ccipRequest=b;exports.offchainLookup=S;exports.offchainLookupAbiItem=w;exports.offchainLookupSignature=x;
|
|
2
|
+
//# sourceMappingURL=ccip--OHeJFrW.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as u, g as p, s as k, d as R, i as M, l as S, a as $, c as A, b as T, e as C, f as w, h as E, H as b, j as G } from "./index-
|
|
1
|
+
import { B as u, g as p, s as k, d as R, i as M, l as S, a as $, c as A, b as T, e as C, f as w, h as E, H as b, j as G } from "./index-B4t5Vosd.mjs";
|
|
2
2
|
class D extends u {
|
|
3
3
|
constructor({ callbackSelector: a, cause: t, data: f, extraData: e, sender: l, urls: i }) {
|
|
4
4
|
var o;
|
|
@@ -156,4 +156,4 @@ export {
|
|
|
156
156
|
P as offchainLookupAbiItem,
|
|
157
157
|
v as offchainLookupSignature
|
|
158
158
|
};
|
|
159
|
-
//# sourceMappingURL=ccip-
|
|
159
|
+
//# sourceMappingURL=ccip-BfvgG1oi.mjs.map
|
|
@@ -5942,7 +5942,7 @@ async function Ui(Q, A) {
|
|
|
5942
5942
|
throw XC(H.signal);
|
|
5943
5943
|
if (rD(x))
|
|
5944
5944
|
throw x;
|
|
5945
|
-
const p = zJ(x), { offchainLookup: AA, offchainLookupSignature: G } = await import("./ccip-
|
|
5945
|
+
const p = zJ(x), { offchainLookup: AA, offchainLookupSignature: G } = await import("./ccip-BfvgG1oi.mjs");
|
|
5946
5946
|
if (Q.ccipRead !== !1 && (p == null ? void 0 : p.slice(0, 10)) === G && F)
|
|
5947
5947
|
return {
|
|
5948
5948
|
data: await AA(Q, { data: p, requestOptions: H, to: F })
|
|
@@ -74282,6 +74282,7 @@ export {
|
|
|
74282
74282
|
ngA as C,
|
|
74283
74283
|
sZ as D,
|
|
74284
74284
|
kgA as E,
|
|
74285
|
+
ff as F,
|
|
74285
74286
|
UEA as G,
|
|
74286
74287
|
zN as H,
|
|
74287
74288
|
TIA as L,
|
|
@@ -74316,4 +74317,4 @@ export {
|
|
|
74316
74317
|
mA as y,
|
|
74317
74318
|
Ek as z
|
|
74318
74319
|
};
|
|
74319
|
-
//# sourceMappingURL=index-
|
|
74320
|
+
//# sourceMappingURL=index-B4t5Vosd.mjs.map
|