@zk-email/sdk 3.0.0-nightly.26 → 3.0.0-nightly.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/{ccip-BHTkWhax.mjs → ccip-DR1zwwHR.mjs} +2 -2
- package/dist/{ccip-na93deSu.js → ccip-F0jrNW6H.js} +2 -2
- package/dist/{index-4BbSHOrO.mjs → index-BgoyLnE9.mjs} +9 -4
- package/dist/{index-DWc3c9O2.js → index-C42konjq.js} +4 -4
- package/dist/zk-email-sdk.index.cjs +1 -1
- package/dist/zk-email-sdk.index.mjs +1 -1
- package/package.json +3 -1
|
@@ -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-BgoyLnE9.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-DR1zwwHR.mjs.map
|
|
@@ -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-C42konjq.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-F0jrNW6H.js.map
|
|
@@ -5942,7 +5942,7 @@ async function Oi(Q, A) {
|
|
|
5942
5942
|
throw XC(S.signal);
|
|
5943
5943
|
if (TD(F))
|
|
5944
5944
|
throw F;
|
|
5945
|
-
const p = zH(F), { offchainLookup: AA, offchainLookupSignature: x } = await import("./ccip-
|
|
5945
|
+
const p = zH(F), { offchainLookup: AA, offchainLookupSignature: x } = await import("./ccip-DR1zwwHR.mjs");
|
|
5946
5946
|
if (Q.ccipRead !== !1 && (p == null ? void 0 : p.slice(0, 10)) === x && f)
|
|
5947
5947
|
return {
|
|
5948
5948
|
data: await AA(Q, { data: p, requestOptions: S, to: f })
|
|
@@ -59560,8 +59560,8 @@ class Cu {
|
|
|
59560
59560
|
GA(this, "blueprint");
|
|
59561
59561
|
if (!(A instanceof VQ))
|
|
59562
59562
|
throw new Error("Invalid blueprint: must be an instance of Blueprint class");
|
|
59563
|
-
if (mA.debug("blueprint.props.clientZkFramework!: ", A.props.clientZkFramework), g != null && g.isLocal
|
|
59564
|
-
throw new Error("Local proving is currently only
|
|
59563
|
+
if (mA.debug("blueprint.props.clientZkFramework!: ", A.props.clientZkFramework), g != null && g.isLocal)
|
|
59564
|
+
throw new Error("Local proving is currently disabled; only remote proving is supported");
|
|
59565
59565
|
this.blueprint = A, this.options = {
|
|
59566
59566
|
isLocal: !1,
|
|
59567
59567
|
...g || {}
|
|
@@ -74253,6 +74253,11 @@ const lMA = (Q) => {
|
|
|
74253
74253
|
createBlueprint(g) {
|
|
74254
74254
|
if (!Q && !Q.auth)
|
|
74255
74255
|
throw new Error("You need to specify options.auth to use createBlueprint");
|
|
74256
|
+
const I = [hg.Sp1, hg.Noir];
|
|
74257
|
+
if (g.clientZkFramework && I.includes(g.clientZkFramework))
|
|
74258
|
+
throw new Error("Only ZkFramework.Circom is currently supported for clientZkFramework");
|
|
74259
|
+
if (g.serverZkFramework && I.includes(g.serverZkFramework))
|
|
74260
|
+
throw new Error("Only ZkFramework.Circom is currently supported for serverZkFramework");
|
|
74256
74261
|
return new VQ(g, A, Q.auth);
|
|
74257
74262
|
},
|
|
74258
74263
|
async getBlueprint(g) {
|
|
@@ -74325,4 +74330,4 @@ export {
|
|
|
74325
74330
|
mA as y,
|
|
74326
74331
|
Ek as z
|
|
74327
74332
|
};
|
|
74328
|
-
//# sourceMappingURL=index-
|
|
74333
|
+
//# sourceMappingURL=index-BgoyLnE9.mjs.map
|