@wormhole-foundation/wormhole-connect 2.5.0-beta.4-development → 2.5.0-beta.5-development
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/main.js +2 -2
- package/lib/{aptos-CaVHtbQw.mjs → aptos-BgFL62mD.mjs} +2 -2
- package/lib/{aptos-DBXJR5Zp.mjs → aptos-BxJJ0lIW.mjs} +5 -5
- package/lib/{aptos-Bn4mtDrj.js → aptos-BycCv92M.js} +2 -2
- package/lib/{aptos-BiehvqOQ.js → aptos-C__ARDSH.js} +1 -1
- package/lib/{base64-DzcYjjLo.mjs → base64-CRnh_2wQ.mjs} +1 -1
- package/lib/{base64-NtaxclTb.js → base64-DAz3K58b.js} +1 -1
- package/lib/{ccip-oIRGwhBZ.js → ccip-6Lj4FsGs.js} +1 -1
- package/lib/{ccip-CbqcC9Jf.mjs → ccip-C079kZ-k.mjs} +1 -1
- package/lib/{chunk-IMTC3J2M-Dbo8PyOE.js → chunk-IMTC3J2M-BEYiuk-_.js} +1 -1
- package/lib/{chunk-IMTC3J2M-BdRzY3I0.mjs → chunk-IMTC3J2M-XFmC8mZe.mjs} +3 -3
- package/lib/{evm-BIl9XgFb.mjs → evm-BRae4pKk.mjs} +6 -6
- package/lib/{evm-C3Uw6CmX.mjs → evm-BzPK-9Li.mjs} +5 -5
- package/lib/{evm-CZjnW0_X.js → evm-D1Nkvjmy.js} +3 -3
- package/lib/{evm-E-3a3xE-.js → evm-DcWMTzMA.js} +2 -2
- package/lib/{index-BYwIgWHu.mjs → index-1Iy9OtpA.mjs} +1 -1
- package/lib/index-6F_BM5ai.js +76 -0
- package/lib/{index-Dx63irv3.mjs → index-8Wi9C4Kq.mjs} +1 -1
- package/lib/{index-CTQ26QIJ.js → index-B0vEO0UE.js} +1 -1
- package/lib/{index-hJROSvkY.js → index-B36OaqMI.js} +1 -1
- package/lib/{index-qHpHmG5B.mjs → index-BFtSd5kz.mjs} +3 -3
- package/lib/{index-C9k4ZLTC.js → index-BO2UcXoT.js} +1 -1
- package/lib/{index-CIhl-0u4.js → index-BRomIlIV.js} +1 -1
- package/lib/{index-C6rJtOiF.mjs → index-BX3zGITe.mjs} +1 -1
- package/lib/{index-Bv0NRARz.js → index-BaJk5Gnh.js} +1 -1
- package/lib/{index-DTeV3Azx.js → index-BfGyGWCL.js} +1 -1
- package/lib/{index-Cvf0MOVH.js → index-BjVxOkbh.js} +1 -1
- package/lib/{index-BF6SnHiF.js → index-Bn1de9Pl.js} +2 -2
- package/lib/{index-DkHuDrw3.mjs → index-BqEByIBc.mjs} +3 -3
- package/lib/{index-D9AHNvz6.js → index-BvQ0eT0_.js} +1 -1
- package/lib/{index-vxmgWNTI.js → index-Bxd7ImqS.js} +1 -1
- package/lib/{index-BTnRME-Z.mjs → index-C2hCml_L.mjs} +1 -1
- package/lib/{index-B3LIY6AQ.js → index-C84UeX5K.js} +1 -1
- package/lib/{index-St4LsWjT.js → index-C8HI8Bnr.js} +1 -1
- package/lib/{index-DUltJDlF.mjs → index-CGjoygP_.mjs} +2 -2
- package/lib/{index-BIp-bGRA.mjs → index-CKadqW6_.mjs} +1 -1
- package/lib/{index-BdbWVhCH.mjs → index-CcFayS0T.mjs} +2 -2
- package/lib/{index-CTgWbCLg.js → index-Cg0vUKrq.js} +1 -1
- package/lib/{index-lFuvneOV.js → index-Chro_jQo.js} +1 -1
- package/lib/{index-DKeNzJJC.mjs → index-Cnq50Whw.mjs} +2 -2
- package/lib/{index-8U74-ETc.mjs → index-D4h_N9Kg.mjs} +2 -2
- package/lib/{index-DuCu_uxU.mjs → index-DAbnHYup.mjs} +2 -2
- package/lib/{index-DbV0iBqc.mjs → index-DGJThb6w.mjs} +4 -4
- package/lib/{index-7qyTCfBj.mjs → index-DOOPL0Fk.mjs} +1 -1
- package/lib/{index-MptJZN6C.mjs → index-DUbHCa4x.mjs} +1 -1
- package/lib/{index-ywshw0RM.mjs → index-DWE3CdEx.mjs} +1 -1
- package/lib/{index-CDdqpjwS.mjs → index-DdglrKtk.mjs} +2 -2
- package/lib/{index-bsU6mRny.js → index-DiiLSjJ1.js} +1 -1
- package/lib/{index-BRkNjVrN.js → index-Dupvtgsd.js} +1 -1
- package/lib/{index-CE8HFEmh.mjs → index-DvoB7pCN.mjs} +1 -1
- package/lib/{index-Bo7Y3gRn.js → index-FrObkYsr.js} +1 -1
- package/lib/{index-D_9dbHJA.mjs → index-JxlE236l.mjs} +2 -2
- package/lib/{index-CjP6kKMq.js → index-KzcYsL8W.js} +1 -1
- package/lib/{index-BciIOEWq.js → index-RbngiFLF.js} +1 -1
- package/lib/{index-TykGc-eA.mjs → index-UknaDc_p.mjs} +13 -13
- package/lib/{index-DXrLGiFi.mjs → index-WmNi0XRF.mjs} +2 -2
- package/lib/{index-BTJVpPOL.mjs → index-WwzTwlp6.mjs} +2 -2
- package/lib/{index-DSXXVkH9.mjs → index-a5x_BDdp.mjs} +1742 -1764
- package/lib/{index-8PWPz6Mx.js → index-dmQ8ZSdW.js} +1 -1
- package/lib/{index-as8GOti9.mjs → index-ffIoBkx4.mjs} +1 -1
- package/lib/{index-cyTEmqN_.js → index-h22hDk5q.js} +1 -1
- package/lib/{index-Ds7b-zg1.js → index-oJOiTuev.js} +1 -1
- package/lib/{index-K_J0LtdN.js → index-oNqZIFp1.js} +1 -1
- package/lib/{index.es-ZzIEfr6y.js → index.es-COuk6SHl.js} +2 -2
- package/lib/{index.es-B8iD4nnb.mjs → index.es-DP-smAiF.mjs} +5 -5
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{signer-cwlv7Vmv.mjs → signer-BB1ZmPgg.mjs} +1 -1
- package/lib/{signer-DoHMc4Co.js → signer-L7HCvqLT.js} +1 -1
- package/lib/solana-CTzSbfHA.mjs +17 -0
- package/lib/solana-CwG-vpmi.js +1 -0
- package/lib/{solana-D8GIBshB.mjs → solana-I8MysgnF.mjs} +4 -4
- package/lib/{solana-CsQJNkba.js → solana-Kj4CX7jG.js} +1 -1
- package/lib/{solanaEmbed.esm-BPMupalR.js → solanaEmbed.esm-BWeUMG3V.js} +1 -1
- package/lib/{solanaEmbed.esm-DKDssg1o.mjs → solanaEmbed.esm-jHHLzr9G.mjs} +2 -2
- package/lib/{sui-Ci3IR4H8.js → sui-BMaSdsWU.js} +1 -1
- package/lib/{sui-Bp3aU_XU.mjs → sui-BjT_FBD-.mjs} +5 -5
- package/lib/{sui-Dlq8Rj_w.js → sui-CHuGzBXE.js} +1 -1
- package/lib/{sui-DFV07n4-.mjs → sui-Dehudox6.mjs} +1 -1
- package/lib/{tokens-BKBAHUaX.mjs → tokens-B0v7GIg6.mjs} +2 -2
- package/lib/{tokens-Dlh3HtCf.js → tokens-DuWysV4f.js} +1 -1
- package/package.json +1 -1
- package/lib/index-BFTqY2It.js +0 -76
- package/lib/solana-DMnw4-hp.mjs +0 -17
- package/lib/solana-DYuaScIf.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var Uf = Object.defineProperty;
|
|
2
2
|
var Cf = (t, e, n) => e in t ? Uf(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var Jn = (t, e, n) => Cf(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { d as Je, bd as zf, be as St, aI as Iu, bf as kf, c as Of, bg as ss, b as kn, aK as Lf, bh as Va, aL as Za, aO as qa, aS as jf, f as Pf, aY as _f } from "./index-
|
|
5
|
-
import { B as Xo, l as $e, f as mn, E as Ke, m as pr, d as Fn, a as as, e as Ye, r as ar, n as Gn, z as ii, b as Mu, c as un, g as on, I as Bf, h as Es, j as Rf, i as oi, k as Ff, p as Nu, q as gr, y as Jo, u as Ai, s as cr, v as xu, w as Wf, L as cs, x as Qf, A as mo, t as is, C as Kf, D as Su, F as Hf, G as Yf, H as Gf, J as Vf, K as Zf, M as qf } from "./chunk-IMTC3J2M-
|
|
4
|
+
import { d as Je, bd as zf, be as St, aI as Iu, bf as kf, c as Of, bg as ss, b as kn, aK as Lf, bh as Va, aL as Za, aO as qa, aS as jf, f as Pf, aY as _f } from "./index-UknaDc_p.mjs";
|
|
5
|
+
import { B as Xo, l as $e, f as mn, E as Ke, m as pr, d as Fn, a as as, e as Ye, r as ar, n as Gn, z as ii, b as Mu, c as un, g as on, I as Bf, h as Es, j as Rf, i as oi, k as Ff, p as Nu, q as gr, y as Jo, u as Ai, s as cr, v as xu, w as Wf, L as cs, x as Qf, A as mo, t as is, C as Kf, D as Su, F as Hf, G as Yf, H as Gf, J as Vf, K as Zf, M as qf } from "./chunk-IMTC3J2M-XFmC8mZe.mjs";
|
|
6
6
|
import { g as Xf } from "./wallets-B2tqS5lZ.mjs";
|
|
7
7
|
function Bs(t, e) {
|
|
8
8
|
if (!!!t)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var w = Object.defineProperty;
|
|
2
2
|
var _ = (i, t, a) => t in i ? w(i, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : i[t] = a;
|
|
3
3
|
var h = (i, t, a) => _(i, typeof t != "symbol" ? t + "" : t, a);
|
|
4
|
-
import { ag as y, ah as b, ai as p, aj as S, ak as C, al as u, h as T, am as d, an as v, ao as f, ap as A, aq as N, aa as I } from "./index-
|
|
5
|
-
import { e as g, s as B, t as k, o as x, z as E } from "./chunk-IMTC3J2M-
|
|
4
|
+
import { ag as y, ah as b, ai as p, aj as S, ak as C, al as u, h as T, am as d, an as v, ao as f, ap as A, aq as N, aa as I } from "./index-UknaDc_p.mjs";
|
|
5
|
+
import { e as g, s as B, t as k, o as x, z as E } from "./chunk-IMTC3J2M-XFmC8mZe.mjs";
|
|
6
6
|
class m extends y {
|
|
7
7
|
}
|
|
8
8
|
const c = class c extends b {
|
|
@@ -144,9 +144,9 @@ const P = {
|
|
|
144
144
|
Platform: l,
|
|
145
145
|
getSigner: F,
|
|
146
146
|
protocols: {
|
|
147
|
-
WormholeCore: () => import("./index-
|
|
148
|
-
TokenBridge: () => import("./index-
|
|
149
|
-
CircleBridge: () => import("./index-
|
|
147
|
+
WormholeCore: () => import("./index-JxlE236l.mjs"),
|
|
148
|
+
TokenBridge: () => import("./index-WmNi0XRF.mjs"),
|
|
149
|
+
CircleBridge: () => import("./index-BqEByIBc.mjs")
|
|
150
150
|
},
|
|
151
151
|
getChain: (i, t, a) => new m(t, new l(i, I(i, p, {
|
|
152
152
|
[t]: a
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var f=Object.defineProperty;var p=(i,t,n)=>t in i?f(i,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[t]=n;var l=(i,t,n)=>p(i,typeof t!="symbol"?t+"":t,n);const a=require("./index-
|
|
2
|
-
${JSON.stringify(e,null,2)}`)})),this._rpc.signAndSubmitTransaction({signer:this._account,transaction:t}).then(n=>this._rpc.waitForTransaction({transactionHash:n.hash}))}}const _={Address:a.AptosAddress,Platform:d,getSigner:m,protocols:{WormholeCore:()=>Promise.resolve().then(()=>require("./index-
|
|
1
|
+
"use strict";var f=Object.defineProperty;var p=(i,t,n)=>t in i?f(i,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[t]=n;var l=(i,t,n)=>p(i,typeof t!="symbol"?t+"":t,n);const a=require("./index-Bn1de9Pl.js"),u=require("./chunk-IMTC3J2M-BEYiuk-_.js");class g extends a.ChainContext{}const h=class h extends a.PlatformContext{constructor(t,n){super(t,n??a.networkPlatformConfigs(t,h._platform))}getRpc(t){if(t in this.config){const n=this.network==="Mainnet"?u.e.MAINNET:u.e.TESTNET,e=new u.s({fullnode:this.config[t].rpc,network:n});return new u.t(e)}throw new Error("No configuration available for chain: "+t)}getChain(t,n){if(t in this.config)return new g(t,this);throw new Error("No configuration available for chain: "+t)}static nativeTokenId(t,n){if(!this.isSupportedChain(n))throw new Error(`invalid chain: ${n}`);return a.Wormhole.tokenId(n,a.APTOS_COIN)}static isNativeTokenId(t,n,e){return!this.isSupportedChain(n)||e.chain!==n?!1:this.nativeTokenId(t,n)==e}static isSupportedChain(t){return a.chainToPlatform(t)===h._platform}static async getDecimals(t,n,e){if(a.isNative(e)||e===a.APTOS_COIN)return a.nativeDecimals(h._platform);const s=e.toString();return(await n.getFungibleAssetMetadataByAssetType({assetType:s})).decimals}static async getBalance(t,n,e,s){var r;const c=a.isNative(s)?a.APTOS_COIN:s.toString();try{return((r=(await n.getCurrentFungibleAssetBalances({options:{where:{owner_address:{_eq:e},asset_type:{_eq:c}}}}))[0])==null?void 0:r.amount)??null}catch(o){if(o.status===404)return null;throw o}}static async getBalances(t,n,e,s){return(await Promise.all(s.map(async r=>{const o=await this.getBalance(t,n,e,r);return{[a.isNative(r)?"native":new a.AptosAddress(r).toString()]:o}}))).reduce((r,o)=>Object.assign(r,o),{})}static async sendWait(t,n,e){const s=[];for(const c of e){const r=await n.transaction.submit.simple(c.transaction),o=await n.waitForTransaction({transactionHash:r.hash});s.push(o.hash)}return s}static async getLatestBlock(t){const n=await t.getLedgerInfo();return Number(n.block_height)}static async getLatestFinalizedBlock(t){const n=await t.getLedgerInfo();return Number(n.block_height)}static chainFromChainId(t){const n=a.platformNativeChainIdToNetworkChain(h._platform,BigInt(t));if(!n)throw new Error(`No matching chainId to determine network and chain: ${t}`);const[e,s]=n;return[e,s]}static async chainFromRpc(t){const n=await t.getLedgerInfo();return this.chainFromChainId(n.chain_id.toString())}};l(h,"_platform",a._platform$2);let d=h;async function m(i,t){const[n,e]=await d.chainFromRpc(i),s=u.o.fromPrivateKey({privateKey:new u.z(a.hex.decode(t))});return new w(e,s,i)}class w{constructor(t,n,e,s){l(this,"_chain");l(this,"_account");l(this,"_rpc");l(this,"_debug");this._chain=t,this._account=n,this._rpc=e,this._debug=s}chain(){return this._chain}address(){return this._account.accountAddress.toString()}async signAndSend(t){const n=[];for(const e of t){const{description:s,transaction:c}=e;this._debug&&console.log(`Signing: ${s} for ${this.address()}`);const r=await this._rpc.transaction.build.simple({sender:this._account.accountAddress,data:c}),{hash:o}=await this._simSignSend(r);n.push(o)}return n}async _simSignSend(t){return await this._rpc.transaction.simulate.simple({signerPublicKey:this._account.publicKey,transaction:t}).then(n=>n.forEach(e=>{if(!e.success)throw new Error(`Transaction failed: ${e.vm_status}
|
|
2
|
+
${JSON.stringify(e,null,2)}`)})),this._rpc.signAndSubmitTransaction({signer:this._account,transaction:t}).then(n=>this._rpc.waitForTransaction({transactionHash:n.hash}))}}const _={Address:a.AptosAddress,Platform:d,getSigner:m,protocols:{WormholeCore:()=>Promise.resolve().then(()=>require("./index-FrObkYsr.js")),TokenBridge:()=>Promise.resolve().then(()=>require("./index-Chro_jQo.js")),CircleBridge:()=>Promise.resolve().then(()=>require("./index-h22hDk5q.js"))},getChain:(i,t,n)=>new g(t,new d(i,a.applyChainsConfigConfigOverrides(i,a._platform$2,{[t]:n})))},y=Object.freeze(Object.defineProperty({__proto__:null,default:_},Symbol.toStringTag,{value:"Module"}));exports.AptosPlatform=d;exports.aptos=y;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Xh=Object.defineProperty;var Jh=(t,e,n)=>e in t?Xh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Qn=(t,e,n)=>Jh(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const me=require("./index-
|
|
1
|
+
"use strict";var Xh=Object.defineProperty;var Jh=(t,e,n)=>e in t?Xh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Qn=(t,e,n)=>Jh(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const me=require("./index-Bn1de9Pl.js"),U=require("./chunk-IMTC3J2M-BEYiuk-_.js"),$h=require("./wallets-5qGJd8Hk.js");function Es(t,e){if(!!!t)throw new Error(e)}function ef(t){return typeof t=="object"&&t!==null}function tf(t,e){if(!!!t)throw new Error("Unexpected invariant triggered.")}const nf=/\r\n|[\n\r]/g;function Xi(t,e){let n=0,r=1;for(const s of t.body.matchAll(nf)){if(typeof s.index=="number"||tf(!1),s.index>=e)break;n=s.index+s[0].length,r+=1}return{line:r,column:e+1-n}}function rf(t){return Xc(t.source,Xi(t.source,t.start))}function Xc(t,e){const n=t.locationOffset.column-1,r="".padStart(n)+t.body,s=e.line-1,o=t.locationOffset.line-1,c=e.line+o,l=e.line===1?n:0,f=e.column+l,p=`${t.name}:${c}:${f}
|
|
2
2
|
`,y=r.split(/\r\n|[\n\r]/g),w=y[s];if(w.length>120){const b=Math.floor(f/80),S=f%80,I=[];for(let k=0;k<w.length;k+=80)I.push(w.slice(k,k+80));return p+Ia([[`${c} |`,I[0]],...I.slice(1,b+1).map(k=>["|",k]),["|","^".padStart(S)],["|",I[b+1]]])}return p+Ia([[`${c-1} |`,y[s-1]],[`${c} |`,w],["|","^".padStart(f)],[`${c+1} |`,y[s+1]]])}function Ia(t){const e=t.filter(([r,s])=>s!==void 0),n=Math.max(...e.map(([r])=>r.length));return e.map(([r,s])=>r.padStart(n)+(s?" "+s:"")).join(`
|
|
3
3
|
`)}function sf(t){const e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}class Do extends Error{constructor(e,...n){var r,s,o;const{nodes:c,source:l,positions:f,path:p,originalError:y,extensions:w}=sf(n);super(e),this.name="GraphQLError",this.path=p??void 0,this.originalError=y??void 0,this.nodes=Ma(Array.isArray(c)?c:c?[c]:void 0);const b=Ma((r=this.nodes)===null||r===void 0?void 0:r.map(I=>I.loc).filter(I=>I!=null));this.source=l??(b==null||(s=b[0])===null||s===void 0?void 0:s.source),this.positions=f??(b==null?void 0:b.map(I=>I.start)),this.locations=f&&l?f.map(I=>Xi(l,I)):b==null?void 0:b.map(I=>Xi(I.source,I.start));const S=ef(y==null?void 0:y.extensions)?y==null?void 0:y.extensions:void 0;this.extensions=(o=w??S)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),y!=null&&y.stack?Object.defineProperty(this,"stack",{value:y.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Do):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(e+=`
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as x } from "./index-
|
|
1
|
+
import { d as x } from "./index-UknaDc_p.mjs";
|
|
2
2
|
const s = typeof x.Buffer == "function", h = typeof TextDecoder == "function" ? new TextDecoder() : void 0, c = typeof TextEncoder == "function" ? new TextEncoder() : void 0, C = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", d = Array.prototype.slice.call(C), l = ((t) => {
|
|
3
3
|
let e = {};
|
|
4
4
|
return t.forEach((o, n) => e[o] = n), e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("./index-
|
|
1
|
+
"use strict";const s=require("./index-Bn1de9Pl.js"),x=typeof s.dist.Buffer=="function",c=typeof TextDecoder=="function"?new TextDecoder:void 0,h=typeof TextEncoder=="function"?new TextEncoder:void 0,C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d=Array.prototype.slice.call(C),u=(t=>{let e={};return t.forEach((o,n)=>e[o]=n),e})(d),m=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,r=String.fromCharCode.bind(String),A=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),_=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),g=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),F=t=>{let e,o,n,f,a="";const l=t.length%3;for(let i=0;i<t.length;){if((o=t.charCodeAt(i++))>255||(n=t.charCodeAt(i++))>255||(f=t.charCodeAt(i++))>255)throw new TypeError("invalid character found");e=o<<16|n<<8|f,a+=d[e>>18&63]+d[e>>12&63]+d[e>>6&63]+d[e&63]}return l?a.slice(0,l-3)+"===".substring(l):a},p=typeof btoa=="function"?t=>btoa(t):x?t=>s.dist.Buffer.from(t,"binary").toString("base64"):F,B=x?t=>s.dist.Buffer.from(t).toString("base64"):t=>{let o=[];for(let n=0,f=t.length;n<f;n+=4096)o.push(r.apply(null,t.subarray(n,n+4096)));return p(o.join(""))},D=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?r(192|e>>>6)+r(128|e&63):r(224|e>>>12&15)+r(128|e>>>6&63)+r(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return r(240|e>>>18&7)+r(128|e>>>12&63)+r(128|e>>>6&63)+r(128|e&63)}},U=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,w=t=>t.replace(U,D),b=x?t=>s.dist.Buffer.from(t,"utf8").toString("base64"):h?t=>B(h.encode(t)):t=>p(w(t)),E=(t,e=!1)=>e?_(b(t)):b(t),S=t=>E(t,!0),T=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,v=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),o=e-65536;return r((o>>>10)+55296)+r((o&1023)+56320);case 3:return r((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return r((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},z=t=>t.replace(T,v),Z=t=>{if(t=t.replace(/\s+/g,""),!m.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,o="",n,f;for(let a=0;a<t.length;)e=u[t.charAt(a++)]<<18|u[t.charAt(a++)]<<12|(n=u[t.charAt(a++)])<<6|(f=u[t.charAt(a++)]),o+=n===64?r(e>>16&255):f===64?r(e>>16&255,e>>8&255):r(e>>16&255,e>>8&255,e&255);return o},y=typeof atob=="function"?t=>atob(g(t)):x?t=>s.dist.Buffer.from(t,"base64").toString("binary"):Z,I=x?t=>A(s.dist.Buffer.from(t,"base64")):t=>A(y(t).split("").map(e=>e.charCodeAt(0))),R=x?t=>s.dist.Buffer.from(t,"base64").toString("utf8"):c?t=>c.decode(I(t)):t=>z(y(t)),P=t=>g(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),j=t=>R(P(t));exports.decode=j;exports.encodeURI=S;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./evm-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./evm-D1Nkvjmy.js");class y extends e.BaseError{constructor({callbackSelector:r,cause:t,data:c,extraData:i,sender:u,urls:a}){var d;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(d=t.metaMessages)!=null&&d.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(f=>` ${e.getUrl(f)}`)],` Sender: ${u}`,` Data: ${c}`,` Callback selector: ${r}`,` Extra data: ${i}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class w extends e.BaseError{constructor({result:r,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${e.getUrl(t)}`,`Response: ${e.stringify(r)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class b extends e.BaseError{constructor({sender:r,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${r}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function g(n,r){if(!e.isAddress(n))throw new e.InvalidAddressError({address:n});if(!e.isAddress(r))throw new e.InvalidAddressError({address:r});return n.toLowerCase()===r.toLowerCase()}const k="0x556f1830",p={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 E(n,{blockNumber:r,blockTag:t,data:c,to:i}){const{args:u}=e.decodeErrorResult({data:c,abi:[p]}),[a,d,f,s,o]=u;try{if(!g(i,a))throw new b({sender:a,to:i});const l=await h({data:f,sender:a,urls:d}),{data:m}=await e.call(n,{blockNumber:r,blockTag:t,data:e.concat([s,e.encodeAbiParameters([{type:"bytes"},{type:"bytes"}],[l,o])]),to:i});return m}catch(l){throw new y({callbackSelector:s,cause:l,data:c,extraData:o,sender:a,urls:d})}}async function h({data:n,sender:r,urls:t}){var i;let c=new Error("An unknown error occurred.");for(let u=0;u<t.length;u++){const a=t[u],d=a.includes("{data}")?"GET":"POST",f=d==="POST"?{data:n,sender:r}:void 0;try{const s=await fetch(a.replace("{sender}",r).replace("{data}",n),{body:JSON.stringify(f),method:d});let o;if((i=s.headers.get("Content-Type"))!=null&&i.startsWith("application/json")?o=(await s.json()).data:o=await s.text(),!s.ok){c=new e.HttpRequestError({body:f,details:o!=null&&o.error?e.stringify(o.error):s.statusText,headers:s.headers,status:s.status,url:a});continue}if(!e.isHex(o)){c=new w({result:o,url:a});continue}return o}catch(s){c=new e.HttpRequestError({body:f,details:s.message,url:a})}}throw c}exports.ccipFetch=h;exports.offchainLookup=E;exports.offchainLookupAbiItem=p;exports.offchainLookupSignature=k;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as l, g as w, a as y, i as p, I as h, d as g, b as k, e as O, f as L, h as m, j as E } from "./evm-
|
|
1
|
+
import { B as l, g as w, a as y, i as p, I as h, d as g, b as k, e as O, f as L, h as m, j as E } from "./evm-BzPK-9Li.mjs";
|
|
2
2
|
class x extends l {
|
|
3
3
|
constructor({ callbackSelector: e, cause: a, data: o, extraData: c, sender: d, urls: r }) {
|
|
4
4
|
var i;
|