@dodoex/wallet-web3 0.0.40-4 → 0.0.40

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.
Files changed (125) hide show
  1. package/dist/{DefaultJsonRpcProvider-0d7925ff.js → DefaultJsonRpcProvider-a9b4edef.js} +1 -1
  2. package/dist/__node-resolve_empty-ad78977d.js +1 -0
  3. package/dist/__tslib-e712523b.js +1 -0
  4. package/dist/{blocto-edcf7e9c.js → blocto-c2f03aa6.js} +1 -1
  5. package/dist/{bn-92d59440.js → bn-a80bf6c0.js} +1 -1
  6. package/dist/{browser-ponyfill-d3098539.js → browser-ponyfill-f38c41bc.js} +1 -1
  7. package/dist/cjs/{DefaultJsonRpcProvider-bca8f91d.cjs → DefaultJsonRpcProvider-ca454f8e.cjs} +1 -1
  8. package/dist/cjs/{__node-resolve_empty-265d1c49.cjs → __node-resolve_empty-6d7ad87b.cjs} +1 -1
  9. package/dist/cjs/__tslib-b203abab.cjs +1 -0
  10. package/dist/cjs/{blocto-d87e4c02.cjs → blocto-05a85ecf.cjs} +1 -1
  11. package/dist/cjs/{bn-70ac244c.cjs → bn-b63aca15.cjs} +1 -1
  12. package/dist/cjs/{browser-ponyfill-71fb8794.cjs → browser-ponyfill-b0be11d9.cjs} +1 -1
  13. package/dist/cjs/core/index.d.ts +2 -2
  14. package/dist/cjs/{draggabilly-14f61cef.cjs → draggabilly-f616433b.cjs} +1 -1
  15. package/dist/cjs/ethers-ba816f82.cjs +1 -0
  16. package/dist/cjs/{id-64cfc377.cjs → id-323e4c90.cjs} +1 -1
  17. package/dist/cjs/{index-2ddcd00d.cjs → index-0c0e48bd.cjs} +1 -1
  18. package/dist/cjs/index-41d4ce9e.cjs +6 -0
  19. package/dist/cjs/{index-8a737425.cjs → index-56f21973.cjs} +1 -1
  20. package/dist/cjs/index-578427cc.cjs +9 -0
  21. package/dist/cjs/{index-0ed73dc0.cjs → index-65d19adb.cjs} +1 -1
  22. package/dist/cjs/{index-d16b6756.cjs → index-6902d1ea.cjs} +3 -3
  23. package/dist/cjs/index-8c9af5ed.cjs +1 -0
  24. package/dist/cjs/index-a2ac2501.cjs +1 -0
  25. package/dist/cjs/{index-b92a55b8.cjs → index-ad37aa8e.cjs} +1 -1
  26. package/dist/cjs/index-c40d494c.cjs +1 -0
  27. package/dist/cjs/{index-f63cfc3f.cjs → index-f529a5e1.cjs} +1 -1
  28. package/dist/cjs/index.cjs +1 -1
  29. package/dist/cjs/{index.es-091ee5b4.cjs → index.es-8f036e0f.cjs} +1 -1
  30. package/dist/cjs/{interface-885a5be0.cjs → interface-b28a2cea.cjs} +1 -1
  31. package/dist/cjs/{lib-typedarrays-88b4f6fa.cjs → lib-typedarrays-e979897b.cjs} +1 -1
  32. package/dist/cjs/{portis-838df928.cjs → portis-a05f6805.cjs} +1 -1
  33. package/dist/cjs/{provider-4c7501d6.cjs → provider-deee1712.cjs} +1 -1
  34. package/dist/cjs/providers/connector/index.d.ts +43 -175
  35. package/dist/cjs/providers/connector/injected.d.ts +1 -1
  36. package/dist/cjs/providers/connector/ledgerUSB/index.d.ts +43 -43
  37. package/dist/cjs/providers/connector/ledgerUSB/provider.d.ts +10 -10
  38. package/dist/cjs/providers/connector/types.d.ts +0 -7
  39. package/dist/cjs/providers/connector/uniPass/index.d.ts +43 -43
  40. package/dist/cjs/providers/connector/uniPass/provider.d.ts +10 -10
  41. package/dist/cjs/providers/wallets/index.d.ts +2 -7
  42. package/dist/cjs/providers/wallets/standalone.d.ts +0 -1
  43. package/dist/cjs/providers/wallets/types.d.ts +0 -2
  44. package/dist/cjs/{rainbow-7d2fe1e2.cjs → rainbow-69c0a69b.cjs} +1 -1
  45. package/dist/cjs/{sha224-158bd458.cjs → sha224-9457bb96.cjs} +1 -1
  46. package/dist/cjs/{sha256-6071af96.cjs → sha256-5fb5de86.cjs} +1 -1
  47. package/dist/cjs/state.d.ts +2 -2
  48. package/dist/cjs/{uAuth-921a815b.cjs → uAuth-7fa3d23a.cjs} +1 -1
  49. package/dist/cjs/walletConnect-c603a6a4.cjs +1 -0
  50. package/dist/cjs/{walletLink-7fe3af33.cjs → walletLink-899a33a2.cjs} +1 -1
  51. package/dist/core/index.d.ts +2 -2
  52. package/dist/{draggabilly-2580bf5b.js → draggabilly-8b6b21c5.js} +1 -1
  53. package/dist/ethers-598924c4.js +1 -0
  54. package/dist/{id-3aece8c0.js → id-bce3c131.js} +1 -1
  55. package/dist/{index-b09fd06f.js → index-0288dfdf.js} +1 -1
  56. package/dist/index-13cee3c1.js +1 -0
  57. package/dist/{index-cd6bd2ce.js → index-19bc04f2.js} +1 -1
  58. package/dist/{index-9a4379d7.js → index-57766b84.js} +1 -1
  59. package/dist/{index-767c26b7.js → index-7f873c40.js} +1 -1
  60. package/dist/index-9b7de542.js +9 -0
  61. package/dist/index-a6717e78.js +6 -0
  62. package/dist/index-b80e350c.js +1 -0
  63. package/dist/index-cb9250a0.js +1 -0
  64. package/dist/{index-1a005328.js → index-cf915864.js} +3 -3
  65. package/dist/{index-b5d79167.js → index-cf9d6206.js} +1 -1
  66. package/dist/{index.es-e8743b8d.js → index.es-2b585733.js} +1 -1
  67. package/dist/index.js +1 -1
  68. package/dist/{interface-c94b78af.js → interface-bdaa6e2e.js} +1 -1
  69. package/dist/{lib-typedarrays-a8bb783b.js → lib-typedarrays-b5e70c03.js} +1 -1
  70. package/dist/{portis-2205d07c.js → portis-58d16f24.js} +1 -1
  71. package/dist/{provider-4d3d7268.js → provider-62a23419.js} +1 -1
  72. package/dist/providers/connector/index.d.ts +43 -175
  73. package/dist/providers/connector/injected.d.ts +1 -1
  74. package/dist/providers/connector/ledgerUSB/index.d.ts +43 -43
  75. package/dist/providers/connector/ledgerUSB/provider.d.ts +10 -10
  76. package/dist/providers/connector/types.d.ts +0 -7
  77. package/dist/providers/connector/uniPass/index.d.ts +43 -43
  78. package/dist/providers/connector/uniPass/provider.d.ts +10 -10
  79. package/dist/providers/wallets/index.d.ts +2 -7
  80. package/dist/providers/wallets/standalone.d.ts +0 -1
  81. package/dist/providers/wallets/types.d.ts +0 -2
  82. package/dist/rainbow-898a2c25.js +1 -0
  83. package/dist/{sha224-7c9278b8.js → sha224-1c4b79b3.js} +1 -1
  84. package/dist/{sha256-fe7bb483.js → sha256-c7e66f3f.js} +1 -1
  85. package/dist/state.d.ts +2 -2
  86. package/dist/{uAuth-6044680b.js → uAuth-0812723b.js} +1 -1
  87. package/dist/walletConnect-0b1a9181.js +1 -0
  88. package/dist/{walletLink-26ad7eac.js → walletLink-7080edd7.js} +1 -1
  89. package/package.json +3 -10
  90. package/dist/__node-resolve_empty-261d59ac.js +0 -1
  91. package/dist/__tslib-0e83d985.js +0 -1
  92. package/dist/alchemy-provider-5870b6fa-e395a256.js +0 -1
  93. package/dist/alchemy-websocket-provider-213da986-313bda01.js +0 -1
  94. package/dist/ccip-579ffb0a.js +0 -1
  95. package/dist/cjs/__tslib-23f33cbc.cjs +0 -1
  96. package/dist/cjs/alchemy-provider-5870b6fa-96ba77e7.cjs +0 -1
  97. package/dist/cjs/alchemy-websocket-provider-213da986-6aab7eae.cjs +0 -1
  98. package/dist/cjs/ccip-e892e984.cjs +0 -1
  99. package/dist/cjs/ethers-70b6183e.cjs +0 -1
  100. package/dist/cjs/index-106a55ec.cjs +0 -1
  101. package/dist/cjs/index-18b9efa9.cjs +0 -20
  102. package/dist/cjs/index-2d21ff5b.cjs +0 -1
  103. package/dist/cjs/index-94459054.cjs +0 -9
  104. package/dist/cjs/index-9ce25397.cjs +0 -6
  105. package/dist/cjs/index-a4ac3bd5.cjs +0 -1
  106. package/dist/cjs/index-d0ceb723.cjs +0 -1
  107. package/dist/cjs/index-e373c760.cjs +0 -1
  108. package/dist/cjs/providers/connector/alchemy/index.d.ts +0 -135
  109. package/dist/cjs/providers/connector/alchemy/provider.d.ts +0 -140
  110. package/dist/cjs/providers/connector/alchemy/signer.d.ts +0 -23
  111. package/dist/cjs/walletConnect-70d89c92.cjs +0 -1
  112. package/dist/ethers-833b2300.js +0 -1
  113. package/dist/index-14387775.js +0 -1
  114. package/dist/index-21722c04.js +0 -1
  115. package/dist/index-33f10a1b.js +0 -6
  116. package/dist/index-3dfcceec.js +0 -20
  117. package/dist/index-5b79ce49.js +0 -1
  118. package/dist/index-7decf620.js +0 -9
  119. package/dist/index-9cc0c074.js +0 -1
  120. package/dist/index-e75a363b.js +0 -1
  121. package/dist/providers/connector/alchemy/index.d.ts +0 -135
  122. package/dist/providers/connector/alchemy/provider.d.ts +0 -140
  123. package/dist/providers/connector/alchemy/signer.d.ts +0 -23
  124. package/dist/rainbow-27aaabde.js +0 -1
  125. package/dist/walletConnect-9e745470.js +0 -1
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export{D as ChainId,H as HD_PATH_LIST,O as OpenBlockIframeWallet,W as WalletType,ab as WatchResult,y as allWalletList,w as allWalletObject,ah as approve,a as convertTransactionType,d as convertWeb3Provider,C as default,a7 as getAlchemyConnector,X as getAlchemyPackage,a4 as getBinanceConnector,T as getBinancePackage,Y as getBloctoConnector,N as getBloctoPackage,af as getContract,a2 as getCyberConnector,Q as getCyberPackage,ac as getEstimateGas,ad as getGasPrice,I as getGnosisPackage,ao as getIsAndroid,j as getIsIOS,h as getIsMobile,aa as getIsOpenBlockIframe,B as getIsolatedEnvironmentWallet,G as getLedgerUSBPackage,a5 as getMetamaskConnector,U as getMetamaskPackage,a9 as getOpenBlockIframeConnector,Z as getPortisConnector,K as getPortisPackage,ag as getProviderByChain,P as getRainbowConnectPackage,a1 as getRainbowConnector,a6 as getSocialLoginConnector,V as getSocialLoginPackage,J as getUAuthPackage,a3 as getUniPassConnector,R as getUniPassPackage,a0 as getWalletConnectConnector,M as getWalletConnectPackage,z as getWalletDisabledState,$ as getWalletLinkConnector,L as getWalletLinkPackage,A as getWalletList,ar as getWindow,i as injectedConnect,as as isAddress,aq as isLargeIOS,ap as isSmallIOS,an as isSupportWebHid,aj as personalSign,a8 as registerNetworkWithMetamask,ae as sendTransaction,ak as sign,al as signTransaction,am as signTypedData,x as standaloneList,F as standaloneListObject,u as useWalletStore,ai as watchTx}from"./index-7decf620.js";import"@ethersproject/providers";import"zustand";import"events";import"@ethersproject/address";import"@ethersproject/constants";import"@ethersproject/contracts";import"@ethersproject/properties";import"@ethersproject/transactions";import"@ethersproject/bytes";
1
+ export{D as ChainId,H as HD_PATH_LIST,O as OpenBlockIframeWallet,W as WalletType,a9 as WatchResult,y as allWalletList,w as allWalletObject,af as approve,a as convertTransactionType,d as convertWeb3Provider,C as default,a3 as getBinanceConnector,T as getBinancePackage,X as getBloctoConnector,N as getBloctoPackage,ad as getContract,a1 as getCyberConnector,Q as getCyberPackage,aa as getEstimateGas,ab as getGasPrice,I as getGnosisPackage,am as getIsAndroid,j as getIsIOS,h as getIsMobile,a8 as getIsOpenBlockIframe,B as getIsolatedEnvironmentWallet,G as getLedgerUSBPackage,a4 as getMetamaskConnector,U as getMetamaskPackage,a7 as getOpenBlockIframeConnector,Y as getPortisConnector,K as getPortisPackage,ae as getProviderByChain,P as getRainbowConnectPackage,a0 as getRainbowConnector,a5 as getSocialLoginConnector,V as getSocialLoginPackage,J as getUAuthPackage,a2 as getUniPassConnector,R as getUniPassPackage,$ as getWalletConnectConnector,M as getWalletConnectPackage,z as getWalletDisabledState,Z as getWalletLinkConnector,L as getWalletLinkPackage,A as getWalletList,ap as getWindow,i as injectedConnect,aq as isAddress,ao as isLargeIOS,an as isSmallIOS,al as isSupportWebHid,ah as personalSign,a6 as registerNetworkWithMetamask,ac as sendTransaction,ai as sign,aj as signTransaction,ak as signTypedData,x as standaloneList,F as standaloneListObject,u as useWalletStore,ag as watchTx}from"./index-9b7de542.js";import"@ethersproject/providers";import"zustand";import"events";import"@ethersproject/address";import"@ethersproject/constants";import"@ethersproject/contracts";import"@ethersproject/properties";import"@ethersproject/transactions";import"@ethersproject/bytes";
@@ -1 +1 @@
1
- import{getAddress as t}from"@ethersproject/address";import{hexConcat as e,concat as r,arrayify as n,hexlify as a,hexZeroPad as s,hexDataSlice as o,isHexString as i}from"@ethersproject/bytes";import{L as u,B as c,t as l,a as h,i as m}from"./id-3aece8c0.js";import{k as p}from"./index-7decf620.js";import{defineReadOnly as d,Description as g,getStatic as f}from"@ethersproject/properties";import{MaxUint256 as y,One as b,NegativeOne as w,Zero as E}from"@ethersproject/constants";const v="abi/5.7.0",_=new u(v),A={};let x={calldata:!0,memory:!0,storage:!0},O={calldata:!0,memory:!0};function S(t,e){if("bytes"===t||"string"===t){if(x[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&O[e])return!0;return(x[e]||"payable"===e)&&_.throwArgumentError("invalid modifier","name",e),!1}function j(t,e){for(let r in e)d(t,r,e[r])}const N=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),T=new RegExp(/^(.*)\[([0-9]*)\]$/);class F{constructor(t,e){t!==A&&_.throwError("use fromString",u.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),j(this,e);let r=this.type.match(T);j(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:F.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(t){if(t||(t=N.sighash),N[t]||_.throwArgumentError("invalid format type","format",t),t===N.json){let e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map((e=>JSON.parse(e.format(t))))),JSON.stringify(e)}let e="";return"array"===this.baseType?(e+=this.arrayChildren.format(t),e+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(t!==N.sighash&&(e+=this.type),e+="("+this.components.map((e=>e.format(t))).join(t===N.full?", ":",")+")"):e+=this.type,t!==N.sighash&&(!0===this.indexed&&(e+=" indexed"),t===N.full&&this.name&&(e+=" "+this.name)),e}static from(t,e){return"string"==typeof t?F.fromString(t,e):F.fromObject(t)}static fromObject(t){return F.isParamType(t)?t:new F(A,{name:t.name||null,type:$(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(F.fromObject):null})}static fromString(t,e){return r=function(t,e){let r=t;function n(e){_.throwArgumentError(`unexpected character at position ${e}`,"param",t)}function a(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r}t=t.replace(/\s/g," ");let s={type:"",name:"",state:{allowType:!0}},o=s;for(let r=0;r<t.length;r++){let s=t[r];switch(s){case"(":o.state.allowType&&""===o.type?o.type="tuple":o.state.allowParams||n(r),o.state.allowType=!1,o.type=$(o.type),o.components=[a(o)],o=o.components[0];break;case")":delete o.state,"indexed"===o.name&&(e||n(r),o.indexed=!0,o.name=""),S(o.type,o.name)&&(o.name=""),o.type=$(o.type);let t=o;o=o.parent,o||n(r),delete t.parent,o.state.allowParams=!1,o.state.allowName=!0,o.state.allowArray=!0;break;case",":delete o.state,"indexed"===o.name&&(e||n(r),o.indexed=!0,o.name=""),S(o.type,o.name)&&(o.name=""),o.type=$(o.type);let i=a(o.parent);o.parent.components.push(i),delete o.parent,o=i;break;case" ":o.state.allowType&&""!==o.type&&(o.type=$(o.type),delete o.state.allowType,o.state.allowName=!0,o.state.allowParams=!0),o.state.allowName&&""!==o.name&&("indexed"===o.name?(e||n(r),o.indexed&&n(r),o.indexed=!0,o.name=""):S(o.type,o.name)?o.name="":o.state.allowName=!1);break;case"[":o.state.allowArray||n(r),o.type+=s,o.state.allowArray=!1,o.state.allowName=!1,o.state.readArray=!0;break;case"]":o.state.readArray||n(r),o.type+=s,o.state.readArray=!1,o.state.allowArray=!0,o.state.allowName=!0;break;default:o.state.allowType?(o.type+=s,o.state.allowParams=!0,o.state.allowArray=!0):o.state.allowName?(o.name+=s,delete o.state.allowArray):o.state.readArray?o.type+=s:n(r)}}return o.parent&&_.throwArgumentError("unexpected eof","param",t),delete s.state,"indexed"===o.name?(e||n(r.length-7),o.indexed&&n(r.length-7),o.indexed=!0,o.name=""):S(o.type,o.name)&&(o.name=""),s.type=$(s.type),s}(t,!!e),F.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components});var r}static isParamType(t){return!(null==t||!t._isParamType)}}function V(t,e){return function(t){t=t.trim();let e=[],r="",n=0;for(let a=0;a<t.length;a++){let s=t[a];","===s&&0===n?(e.push(r),r=""):(r+=s,"("===s?n++:")"===s&&(n--,-1===n&&_.throwArgumentError("unbalanced parenthesis","value",t)))}r&&e.push(r);return e}(t).map((t=>F.fromString(t,e)))}class M{constructor(t,e){t!==A&&_.throwError("use a static from method",u.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),j(this,e),this._isFragment=!0,Object.freeze(this)}static from(t){return M.isFragment(t)?t:"string"==typeof t?M.fromString(t):M.fromObject(t)}static fromObject(t){if(M.isFragment(t))return t;switch(t.type){case"function":return L.fromObject(t);case"event":return z.fromObject(t);case"constructor":return k.fromObject(t);case"error":return U.fromObject(t);case"fallback":case"receive":return null}return _.throwArgumentError("invalid fragment object","value",t)}static fromString(t){return"event"===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?z.fromString(t.substring(5).trim()):"function"===t.split(" ")[0]?L.fromString(t.substring(8).trim()):"constructor"===t.split("(")[0].trim()?k.fromString(t.trim()):"error"===t.split(" ")[0]?U.fromString(t.substring(5).trim()):_.throwArgumentError("unsupported fragment","value",t)}static isFragment(t){return!(!t||!t._isFragment)}}class z extends M{format(t){if(t||(t=N.sighash),N[t]||_.throwArgumentError("invalid format type","format",t),t===N.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==N.sighash&&(e+="event "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===N.full?", ":",")+") ",t!==N.sighash&&this.anonymous&&(e+="anonymous "),e.trim()}static from(t){return"string"==typeof t?z.fromString(t):z.fromObject(t)}static fromObject(t){if(z.isEventFragment(t))return t;"event"!==t.type&&_.throwArgumentError("invalid event object","value",t);const e={name:D(t.name),anonymous:t.anonymous,inputs:t.inputs?t.inputs.map(F.fromObject):[],type:"event"};return new z(A,e)}static fromString(t){let e=t.match(J);e||_.throwArgumentError("invalid event string","value",t);let r=!1;return e[3].split(" ").forEach((t=>{switch(t.trim()){case"anonymous":r=!0;break;case"":break;default:_.warn("unknown modifier: "+t)}})),z.fromObject({name:e[1].trim(),anonymous:r,inputs:V(e[2],!0),type:"event"})}static isEventFragment(t){return t&&t._isFragment&&"event"===t.type}}function R(t,e){e.gas=null;let r=t.split("@");return 1!==r.length?(r.length>2&&_.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||_.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=c.from(r[1]),r[0]):t}function C(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach((t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}}))}function P(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return null!=t.stateMutability?(e.stateMutability=t.stateMutability,e.constant="view"===e.stateMutability||"pure"===e.stateMutability,null!=t.constant&&!!t.constant!==e.constant&&_.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable="payable"===e.stateMutability,null!=t.payable&&!!t.payable!==e.payable&&_.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):null!=t.payable?(e.payable=!!t.payable,null!=t.constant||e.payable||"constructor"===t.type||_.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&_.throwArgumentError("cannot have constant payable function","value",t)):null!=t.constant?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):"constructor"!==t.type&&_.throwArgumentError("unable to determine stateMutability","value",t),e}class k extends M{format(t){if(t||(t=N.sighash),N[t]||_.throwArgumentError("invalid format type","format",t),t===N.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});t===N.sighash&&_.throwError("cannot format a constructor for sighash",u.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let e="constructor("+this.inputs.map((e=>e.format(t))).join(t===N.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "),e.trim()}static from(t){return"string"==typeof t?k.fromString(t):k.fromObject(t)}static fromObject(t){if(k.isConstructorFragment(t))return t;"constructor"!==t.type&&_.throwArgumentError("invalid constructor object","value",t);let e=P(t);e.constant&&_.throwArgumentError("constructor cannot be constant","value",t);const r={name:null,type:t.type,inputs:t.inputs?t.inputs.map(F.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?c.from(t.gas):null};return new k(A,r)}static fromString(t){let e={type:"constructor"},r=(t=R(t,e)).match(J);return r&&"constructor"===r[1].trim()||_.throwArgumentError("invalid constructor string","value",t),e.inputs=V(r[2].trim(),!1),C(r[3].trim(),e),k.fromObject(e)}static isConstructorFragment(t){return t&&t._isFragment&&"constructor"===t.type}}class L extends k{format(t){if(t||(t=N.sighash),N[t]||_.throwArgumentError("invalid format type","format",t),t===N.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t)))),outputs:this.outputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==N.sighash&&(e+="function "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===N.full?", ":",")+") ",t!==N.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "):this.constant&&(e+="view "),this.outputs&&this.outputs.length&&(e+="returns ("+this.outputs.map((e=>e.format(t))).join(", ")+") "),null!=this.gas&&(e+="@"+this.gas.toString()+" ")),e.trim()}static from(t){return"string"==typeof t?L.fromString(t):L.fromObject(t)}static fromObject(t){if(L.isFunctionFragment(t))return t;"function"!==t.type&&_.throwArgumentError("invalid function object","value",t);let e=P(t);const r={type:t.type,name:D(t.name),constant:e.constant,inputs:t.inputs?t.inputs.map(F.fromObject):[],outputs:t.outputs?t.outputs.map(F.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?c.from(t.gas):null};return new L(A,r)}static fromString(t){let e={type:"function"},r=(t=R(t,e)).split(" returns ");r.length>2&&_.throwArgumentError("invalid function string","value",t);let n=r[0].match(J);if(n||_.throwArgumentError("invalid function signature","value",t),e.name=n[1].trim(),e.name&&D(e.name),e.inputs=V(n[2],!1),C(n[3].trim(),e),r.length>1){let n=r[1].match(J);""==n[1].trim()&&""==n[3].trim()||_.throwArgumentError("unexpected tokens","value",t),e.outputs=V(n[2],!1)}else e.outputs=[];return L.fromObject(e)}static isFunctionFragment(t){return t&&t._isFragment&&"function"===t.type}}function I(t){const e=t.format();return"Error(string)"!==e&&"Panic(uint256)"!==e||_.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class U extends M{format(t){if(t||(t=N.sighash),N[t]||_.throwArgumentError("invalid format type","format",t),t===N.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==N.sighash&&(e+="error "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===N.full?", ":",")+") ",e.trim()}static from(t){return"string"==typeof t?U.fromString(t):U.fromObject(t)}static fromObject(t){if(U.isErrorFragment(t))return t;"error"!==t.type&&_.throwArgumentError("invalid error object","value",t);const e={type:t.type,name:D(t.name),inputs:t.inputs?t.inputs.map(F.fromObject):[]};return I(new U(A,e))}static fromString(t){let e={type:"error"},r=t.match(J);return r||_.throwArgumentError("invalid error signature","value",t),e.name=r[1].trim(),e.name&&D(e.name),e.inputs=V(r[2],!1),I(U.fromObject(e))}static isErrorFragment(t){return t&&t._isFragment&&"error"===t.type}}function $(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const B=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function D(t){return t&&t.match(B)||_.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const J=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const W=new u(v);function G(t){const e=[],r=function(t,n){if(Array.isArray(n))for(let a in n){const s=t.slice();s.push(a);try{r(s,n[a])}catch(t){e.push({path:s,error:t})}}};return r([],t),e}class Z{constructor(t,e,r,n){this.name=t,this.type=e,this.localName=r,this.dynamic=n}_throwError(t,e){W.throwArgumentError(t,this.localName,e)}}class H{constructor(t){d(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}get data(){return e(this._data)}get length(){return this._dataLength}_writeData(t){return this._data.push(t),this._dataLength+=t.length,t.length}appendWriter(t){return this._writeData(r(t._data))}writeBytes(t){let e=n(t);const a=e.length%this.wordSize;return a&&(e=r([e,this._padding.slice(a)])),this._writeData(e)}_getValue(t){let e=n(c.from(t));return e.length>this.wordSize&&W.throwError("value out-of-bounds",u.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:e.length}),e.length%this.wordSize&&(e=r([this._padding.slice(e.length%this.wordSize),e])),e}writeValue(t){return this._writeData(this._getValue(t))}writeUpdatableValue(){const t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,e=>{this._data[t]=this._getValue(e)}}}class X{constructor(t,e,r,a){d(this,"_data",n(t)),d(this,"wordSize",e||32),d(this,"_coerceFunc",r),d(this,"allowLoose",a),this._offset=0}get data(){return a(this._data)}get consumed(){return this._offset}static coerce(t,e){let r=t.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(e=e.toNumber()),e}coerce(t,e){return this._coerceFunc?this._coerceFunc(t,e):X.coerce(t,e)}_peekBytes(t,e,r){let n=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+e<=this._data.length?n=e:W.throwError("data out-of-bounds",u.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(t){return new X(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(t,e){let r=this._peekBytes(0,t,!!e);return this._offset+=r.length,r.slice(0,t)}readValue(){return c.from(this.readBytes(this.wordSize))}}class q extends Z{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=t(r)}catch(t){this._throwError(t.message,r)}return e.writeValue(r)}decode(e){return t(s(e.readValue().toHexString(),20))}}class K extends Z{constructor(t){super(t.name,t.type,void 0,t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}const Q=new u(v);function Y(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let t={};n=e.map((e=>{const n=e.localName;return n||Q.throwError("cannot encode object for signature with missing names",u.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]&&Q.throwError("cannot encode object for signature with duplicate names",u.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]=!0,r[n]}))}else Q.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&Q.throwArgumentError("types/value length mismatch","tuple",r);let a=new H(t.wordSize),s=new H(t.wordSize),o=[];e.forEach(((t,e)=>{let r=n[e];if(t.dynamic){let e=s.length;t.encode(s,r);let n=a.writeUpdatableValue();o.push((t=>{n(t+e)}))}else t.encode(a,r)})),o.forEach((t=>{t(a.length)}));let i=t.appendWriter(a);return i+=t.appendWriter(s),i}function tt(t,e){let r=[],n=t.subReader(0);e.forEach((e=>{let a=null;if(e.dynamic){let r=t.readValue(),s=n.subReader(r.toNumber());try{a=e.decode(s)}catch(t){if(t.code===u.errors.BUFFER_OVERRUN)throw t;a=t,a.baseType=e.name,a.name=e.localName,a.type=e.type}}else try{a=e.decode(t)}catch(t){if(t.code===u.errors.BUFFER_OVERRUN)throw t;a=t,a.baseType=e.name,a.name=e.localName,a.type=e.type}null!=a&&r.push(a)}));const a=e.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});e.forEach(((t,e)=>{let n=t.localName;if(!n||1!==a[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const s=r[e];s instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw s}}):r[n]=s}));for(let t=0;t<r.length;t++){const e=r[t];e instanceof Error&&Object.defineProperty(r,t,{enumerable:!0,get:()=>{throw e}})}return Object.freeze(r)}class et extends Z{constructor(t,e,r){super("array",t.type+"["+(e>=0?e:"")+"]",r,-1===e||t.dynamic),this.coder=t,this.length=e}defaultValue(){const t=this.coder.defaultValue(),e=[];for(let r=0;r<this.length;r++)e.push(t);return e}encode(t,e){Array.isArray(e)||this._throwError("expected array value",e);let r=this.length;-1===r&&(r=e.length,t.writeValue(e.length)),Q.checkArgumentCount(e.length,r,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let t=0;t<e.length;t++)n.push(this.coder);return Y(t,n,e)}decode(t){let e=this.length;-1===e&&(e=t.readValue().toNumber(),32*e>t._data.length&&Q.throwError("insufficient data length",u.errors.BUFFER_OVERRUN,{length:t._data.length,count:e}));let r=[];for(let t=0;t<e;t++)r.push(new K(this.coder));return t.coerce(this.name,tt(t,r))}}class rt extends Z{constructor(t){super("bool","bool",t,!1)}defaultValue(){return!1}encode(t,e){return t.writeValue(e?1:0)}decode(t){return t.coerce(this.type,!t.readValue().isZero())}}class nt extends Z{constructor(t,e){super(t,t,e,!0)}defaultValue(){return"0x"}encode(t,e){e=n(e);let r=t.writeValue(e.length);return r+=t.writeBytes(e),r}decode(t){return t.readBytes(t.readValue().toNumber(),!0)}}class at extends nt{constructor(t){super("bytes",t)}decode(t){return t.coerce(this.name,a(super.decode(t)))}}class st extends Z{constructor(t,e){let r="bytes"+String(t);super(r,r,e,!1),this.size=t}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(t,e){let r=n(e);return r.length!==this.size&&this._throwError("incorrect data length",e),t.writeBytes(r)}decode(t){return t.coerce(this.name,a(t.readBytes(this.size)))}}class ot extends Z{constructor(t){super("null","",t,!1)}defaultValue(){return null}encode(t,e){return null!=e&&this._throwError("not null",e),t.writeBytes([])}decode(t){return t.readBytes(0),t.coerce(this.name,null)}}class it extends Z{constructor(t,e,r){const n=(e?"int":"uint")+8*t;super(n,n,r,!1),this.size=t,this.signed=e}defaultValue(){return 0}encode(t,e){let r=c.from(e),n=y.mask(8*t.wordSize);if(this.signed){let t=n.mask(8*this.size-1);(r.gt(t)||r.lt(t.add(b).mul(w)))&&this._throwError("value out-of-bounds",e)}else(r.lt(E)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",e);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*t.wordSize)),t.writeValue(r)}decode(t){let e=t.readValue().mask(8*this.size);return this.signed&&(e=e.fromTwos(8*this.size)),t.coerce(this.name,e)}}class ut extends nt{constructor(t){super("string",t)}defaultValue(){return""}encode(t,e){return super.encode(t,l(e))}decode(t){return h(super.decode(t))}}class ct extends Z{constructor(t,e){let r=!1;const n=[];t.forEach((t=>{t.dynamic&&(r=!0),n.push(t.type)}));super("tuple","tuple("+n.join(",")+")",e,r),this.coders=t}defaultValue(){const t=[];this.coders.forEach((e=>{t.push(e.defaultValue())}));const e=this.coders.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});return this.coders.forEach(((r,n)=>{let a=r.localName;a&&1===e[a]&&("length"===a&&(a="_length"),null==t[a]&&(t[a]=t[n]))})),Object.freeze(t)}encode(t,e){return Y(t,this.coders,e)}decode(t){return t.coerce(this.name,tt(t,this.coders))}}const lt=new u(v),ht=new RegExp(/^bytes([0-9]*)$/),mt=new RegExp(/^(u?int)([0-9]*)$/);class pt{constructor(t){d(this,"coerceFunc",t||null)}_getCoder(t){switch(t.baseType){case"address":return new q(t.name);case"bool":return new rt(t.name);case"string":return new ut(t.name);case"bytes":return new at(t.name);case"array":return new et(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new ct((t.components||[]).map((t=>this._getCoder(t))),t.name);case"":return new ot(t.name)}let e=t.type.match(mt);if(e){let r=parseInt(e[2]||"256");return(0===r||r>256||r%8!=0)&&lt.throwArgumentError("invalid "+e[1]+" bit length","param",t),new it(r/8,"int"===e[1],t.name)}if(e=t.type.match(ht),e){let r=parseInt(e[1]);return(0===r||r>32)&&lt.throwArgumentError("invalid bytes length","param",t),new st(r,t.name)}return lt.throwArgumentError("invalid type","type",t.type)}_getWordSize(){return 32}_getReader(t,e){return new X(t,this._getWordSize(),this.coerceFunc,e)}_getWriter(){return new H(this._getWordSize())}getDefaultValue(t){const e=t.map((t=>this._getCoder(F.from(t))));return new ct(e,"_").defaultValue()}encode(t,e){t.length!==e.length&&lt.throwError("types/values length mismatch",u.errors.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});const r=t.map((t=>this._getCoder(F.from(t)))),n=new ct(r,"_"),a=this._getWriter();return n.encode(a,e),a.data}decode(t,e,r){const a=t.map((t=>this._getCoder(F.from(t))));return new ct(a,"_").decode(this._getReader(n(e),r))}}const dt=new pt,gt=new u(v);class ft extends g{}class yt extends g{}class bt extends g{}class wt extends g{static isIndexed(t){return!(!t||!t._isIndexed)}}const Et={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function vt(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class _t{constructor(t){let e=[];e="string"==typeof t?JSON.parse(t):t,d(this,"fragments",e.map((t=>M.from(t))).filter((t=>null!=t))),d(this,"_abiCoder",f(new.target,"getAbiCoder")()),d(this,"functions",{}),d(this,"errors",{}),d(this,"events",{}),d(this,"structs",{}),this.fragments.forEach((t=>{let e=null;switch(t.type){case"constructor":return this.deploy?void gt.warn("duplicate definition - constructor"):void d(this,"deploy",t);case"function":e=this.functions;break;case"event":e=this.events;break;case"error":e=this.errors;break;default:return}let r=t.format();e[r]?gt.warn("duplicate definition - "+r):e[r]=t})),this.deploy||d(this,"deploy",k.from({payable:!1,type:"constructor"})),d(this,"_isInterface",!0)}format(t){t||(t=N.full),t===N.sighash&&gt.throwArgumentError("interface does not support formatting sighash","format",t);const e=this.fragments.map((e=>e.format(t)));return t===N.json?JSON.stringify(e.map((t=>JSON.parse(t)))):e}static getAbiCoder(){return dt}static getAddress(e){return t(e)}static getSighash(t){return o(m(t.format()),0,4)}static getEventTopic(t){return m(t.format())}getFunction(t){if(i(t)){for(const e in this.functions)if(t===this.getSighash(e))return this.functions[e];gt.throwArgumentError("no matching function","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.functions).filter((t=>t.split("(")[0]===e));return 0===r.length?gt.throwArgumentError("no matching function","name",e):r.length>1&&gt.throwArgumentError("multiple matching functions","name",e),this.functions[r[0]]}const e=this.functions[L.fromString(t).format()];return e||gt.throwArgumentError("no matching function","signature",t),e}getEvent(t){if(i(t)){const e=t.toLowerCase();for(const t in this.events)if(e===this.getEventTopic(t))return this.events[t];gt.throwArgumentError("no matching event","topichash",e)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.events).filter((t=>t.split("(")[0]===e));return 0===r.length?gt.throwArgumentError("no matching event","name",e):r.length>1&&gt.throwArgumentError("multiple matching events","name",e),this.events[r[0]]}const e=this.events[z.fromString(t).format()];return e||gt.throwArgumentError("no matching event","signature",t),e}getError(t){if(i(t)){const e=f(this.constructor,"getSighash");for(const r in this.errors){if(t===e(this.errors[r]))return this.errors[r]}gt.throwArgumentError("no matching error","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.errors).filter((t=>t.split("(")[0]===e));return 0===r.length?gt.throwArgumentError("no matching error","name",e):r.length>1&&gt.throwArgumentError("multiple matching errors","name",e),this.errors[r[0]]}const e=this.errors[L.fromString(t).format()];return e||gt.throwArgumentError("no matching error","signature",t),e}getSighash(t){if("string"==typeof t)try{t=this.getFunction(t)}catch(e){try{t=this.getError(t)}catch(t){throw e}}return f(this.constructor,"getSighash")(t)}getEventTopic(t){return"string"==typeof t&&(t=this.getEvent(t)),f(this.constructor,"getEventTopic")(t)}_decodeParams(t,e){return this._abiCoder.decode(t,e)}_encodeParams(t,e){return this._abiCoder.encode(t,e)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,e){"string"==typeof t&&(t=this.getError(t));const r=n(e);return a(r.slice(0,4))!==this.getSighash(t)&&gt.throwArgumentError(`data signature does not match error ${t.name}.`,"data",a(r)),this._decodeParams(t.inputs,r.slice(4))}encodeErrorResult(t,e){return"string"==typeof t&&(t=this.getError(t)),a(r([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionData(t,e){"string"==typeof t&&(t=this.getFunction(t));const r=n(e);return a(r.slice(0,4))!==this.getSighash(t)&&gt.throwArgumentError(`data signature does not match function ${t.name}.`,"data",a(r)),this._decodeParams(t.inputs,r.slice(4))}encodeFunctionData(t,e){return"string"==typeof t&&(t=this.getFunction(t)),a(r([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionResult(t,e){"string"==typeof t&&(t=this.getFunction(t));let r=n(e),s=null,o="",i=null,c=null,l=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(t.outputs,r)}catch(t){}break;case 4:{const t=a(r.slice(0,4)),e=Et[t];if(e)i=this._abiCoder.decode(e.inputs,r.slice(4)),c=e.name,l=e.signature,e.reason&&(s=i[0]),"Error"===c?o=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(i[0])}`:"Panic"===c&&(o=`; VM Exception while processing transaction: reverted with panic code ${i[0]}`);else try{const e=this.getError(t);i=this._abiCoder.decode(e.inputs,r.slice(4)),c=e.name,l=e.format()}catch(t){}break}}return gt.throwError("call revert exception"+o,u.errors.CALL_EXCEPTION,{method:t.format(),data:a(e),errorArgs:i,errorName:c,errorSignature:l,reason:s})}encodeFunctionResult(t,e){return"string"==typeof t&&(t=this.getFunction(t)),a(this._abiCoder.encode(t.outputs,e||[]))}encodeFilterTopics(t,e){"string"==typeof t&&(t=this.getEvent(t)),e.length>t.inputs.length&&gt.throwError("too many arguments for "+t.format(),u.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:e});let r=[];t.anonymous||r.push(this.getEventTopic(t));const n=(t,e)=>"string"===t.type?m(e):"bytes"===t.type?p(a(e)):("bool"===t.type&&"boolean"==typeof e&&(e=e?"0x01":"0x00"),t.type.match(/^u?int/)&&(e=c.from(e).toHexString()),"address"===t.type&&this._abiCoder.encode(["address"],[e]),s(a(e),32));for(e.forEach(((e,a)=>{let s=t.inputs[a];s.indexed?null==e?r.push(null):"array"===s.baseType||"tuple"===s.baseType?gt.throwArgumentError("filtering with tuples or arrays not supported","contract."+s.name,e):Array.isArray(e)?r.push(e.map((t=>n(s,t)))):r.push(n(s,e)):null!=e&&gt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+s.name,e)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(t,e){"string"==typeof t&&(t=this.getEvent(t));const r=[],n=[],a=[];return t.anonymous||r.push(this.getEventTopic(t)),e.length!==t.inputs.length&&gt.throwArgumentError("event arguments/values mismatch","values",e),t.inputs.forEach(((t,s)=>{const o=e[s];if(t.indexed)if("string"===t.type)r.push(m(o));else if("bytes"===t.type)r.push(p(o));else{if("tuple"===t.baseType||"array"===t.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([t.type],[o]))}else n.push(t),a.push(o)})),{data:this._abiCoder.encode(n,a),topics:r}}decodeEventLog(t,e,n){if("string"==typeof t&&(t=this.getEvent(t)),null!=n&&!t.anonymous){let e=this.getEventTopic(t);i(n[0],32)&&n[0].toLowerCase()===e||gt.throwError("fragment/topic mismatch",u.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:e,value:n[0]}),n=n.slice(1)}let a=[],s=[],o=[];t.inputs.forEach(((t,e)=>{t.indexed?"string"===t.type||"bytes"===t.type||"tuple"===t.baseType||"array"===t.baseType?(a.push(F.fromObject({type:"bytes32",name:t.name})),o.push(!0)):(a.push(t),o.push(!1)):(s.push(t),o.push(!1))}));let c=null!=n?this._abiCoder.decode(a,r(n)):null,l=this._abiCoder.decode(s,e,!0),h=[],m=0,p=0;t.inputs.forEach(((t,e)=>{if(t.indexed)if(null==c)h[e]=new wt({_isIndexed:!0,hash:null});else if(o[e])h[e]=new wt({_isIndexed:!0,hash:c[p++]});else try{h[e]=c[p++]}catch(t){h[e]=t}else try{h[e]=l[m++]}catch(t){h[e]=t}if(t.name&&null==h[t.name]){const r=h[e];r instanceof Error?Object.defineProperty(h,t.name,{enumerable:!0,get:()=>{throw vt(`property ${JSON.stringify(t.name)}`,r)}}):h[t.name]=r}}));for(let t=0;t<h.length;t++){const e=h[t];e instanceof Error&&Object.defineProperty(h,t,{enumerable:!0,get:()=>{throw vt(`index ${t}`,e)}})}return Object.freeze(h)}parseTransaction(t){let e=this.getFunction(t.data.substring(0,10).toLowerCase());return e?new yt({args:this._abiCoder.decode(e.inputs,"0x"+t.data.substring(10)),functionFragment:e,name:e.name,signature:e.format(),sighash:this.getSighash(e),value:c.from(t.value||"0")}):null}parseLog(t){let e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new ft({eventFragment:e,name:e.name,signature:e.format(),topic:this.getEventTopic(e),args:this.decodeEventLog(e,t.data,t.topics)})}parseError(t){const e=a(t);let r=this.getError(e.substring(0,10).toLowerCase());return r?new bt({args:this._abiCoder.decode(r.inputs,"0x"+e.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(t){return!(!t||!t._isInterface)}}export{pt as A,k as C,U as E,M as F,_t as I,ft as L,F as P,yt as T,z as a,L as b,N as c,dt as d,G as e,wt as f};
1
+ import{getAddress as t}from"@ethersproject/address";import{hexConcat as e,concat as r,arrayify as n,hexlify as a,hexZeroPad as s,hexDataSlice as o,isHexString as i}from"@ethersproject/bytes";import{L as u,B as c,t as l,a as h,i as m}from"./id-bce3c131.js";import{k as p}from"./index-9b7de542.js";import{defineReadOnly as d,Description as g,getStatic as f}from"@ethersproject/properties";import{MaxUint256 as y,One as b,NegativeOne as w,Zero as E}from"@ethersproject/constants";const v="abi/5.7.0",_=new u(v),A={};let x={calldata:!0,memory:!0,storage:!0},O={calldata:!0,memory:!0};function S(t,e){if("bytes"===t||"string"===t){if(x[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&O[e])return!0;return(x[e]||"payable"===e)&&_.throwArgumentError("invalid modifier","name",e),!1}function j(t,e){for(let r in e)d(t,r,e[r])}const N=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),T=new RegExp(/^(.*)\[([0-9]*)\]$/);class F{constructor(t,e){t!==A&&_.throwError("use fromString",u.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),j(this,e);let r=this.type.match(T);j(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:F.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(t){if(t||(t=N.sighash),N[t]||_.throwArgumentError("invalid format type","format",t),t===N.json){let e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map((e=>JSON.parse(e.format(t))))),JSON.stringify(e)}let e="";return"array"===this.baseType?(e+=this.arrayChildren.format(t),e+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(t!==N.sighash&&(e+=this.type),e+="("+this.components.map((e=>e.format(t))).join(t===N.full?", ":",")+")"):e+=this.type,t!==N.sighash&&(!0===this.indexed&&(e+=" indexed"),t===N.full&&this.name&&(e+=" "+this.name)),e}static from(t,e){return"string"==typeof t?F.fromString(t,e):F.fromObject(t)}static fromObject(t){return F.isParamType(t)?t:new F(A,{name:t.name||null,type:$(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(F.fromObject):null})}static fromString(t,e){return r=function(t,e){let r=t;function n(e){_.throwArgumentError(`unexpected character at position ${e}`,"param",t)}function a(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r}t=t.replace(/\s/g," ");let s={type:"",name:"",state:{allowType:!0}},o=s;for(let r=0;r<t.length;r++){let s=t[r];switch(s){case"(":o.state.allowType&&""===o.type?o.type="tuple":o.state.allowParams||n(r),o.state.allowType=!1,o.type=$(o.type),o.components=[a(o)],o=o.components[0];break;case")":delete o.state,"indexed"===o.name&&(e||n(r),o.indexed=!0,o.name=""),S(o.type,o.name)&&(o.name=""),o.type=$(o.type);let t=o;o=o.parent,o||n(r),delete t.parent,o.state.allowParams=!1,o.state.allowName=!0,o.state.allowArray=!0;break;case",":delete o.state,"indexed"===o.name&&(e||n(r),o.indexed=!0,o.name=""),S(o.type,o.name)&&(o.name=""),o.type=$(o.type);let i=a(o.parent);o.parent.components.push(i),delete o.parent,o=i;break;case" ":o.state.allowType&&""!==o.type&&(o.type=$(o.type),delete o.state.allowType,o.state.allowName=!0,o.state.allowParams=!0),o.state.allowName&&""!==o.name&&("indexed"===o.name?(e||n(r),o.indexed&&n(r),o.indexed=!0,o.name=""):S(o.type,o.name)?o.name="":o.state.allowName=!1);break;case"[":o.state.allowArray||n(r),o.type+=s,o.state.allowArray=!1,o.state.allowName=!1,o.state.readArray=!0;break;case"]":o.state.readArray||n(r),o.type+=s,o.state.readArray=!1,o.state.allowArray=!0,o.state.allowName=!0;break;default:o.state.allowType?(o.type+=s,o.state.allowParams=!0,o.state.allowArray=!0):o.state.allowName?(o.name+=s,delete o.state.allowArray):o.state.readArray?o.type+=s:n(r)}}return o.parent&&_.throwArgumentError("unexpected eof","param",t),delete s.state,"indexed"===o.name?(e||n(r.length-7),o.indexed&&n(r.length-7),o.indexed=!0,o.name=""):S(o.type,o.name)&&(o.name=""),s.type=$(s.type),s}(t,!!e),F.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components});var r}static isParamType(t){return!(null==t||!t._isParamType)}}function V(t,e){return function(t){t=t.trim();let e=[],r="",n=0;for(let a=0;a<t.length;a++){let s=t[a];","===s&&0===n?(e.push(r),r=""):(r+=s,"("===s?n++:")"===s&&(n--,-1===n&&_.throwArgumentError("unbalanced parenthesis","value",t)))}r&&e.push(r);return e}(t).map((t=>F.fromString(t,e)))}class M{constructor(t,e){t!==A&&_.throwError("use a static from method",u.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),j(this,e),this._isFragment=!0,Object.freeze(this)}static from(t){return M.isFragment(t)?t:"string"==typeof t?M.fromString(t):M.fromObject(t)}static fromObject(t){if(M.isFragment(t))return t;switch(t.type){case"function":return L.fromObject(t);case"event":return z.fromObject(t);case"constructor":return k.fromObject(t);case"error":return U.fromObject(t);case"fallback":case"receive":return null}return _.throwArgumentError("invalid fragment object","value",t)}static fromString(t){return"event"===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?z.fromString(t.substring(5).trim()):"function"===t.split(" ")[0]?L.fromString(t.substring(8).trim()):"constructor"===t.split("(")[0].trim()?k.fromString(t.trim()):"error"===t.split(" ")[0]?U.fromString(t.substring(5).trim()):_.throwArgumentError("unsupported fragment","value",t)}static isFragment(t){return!(!t||!t._isFragment)}}class z extends M{format(t){if(t||(t=N.sighash),N[t]||_.throwArgumentError("invalid format type","format",t),t===N.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==N.sighash&&(e+="event "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===N.full?", ":",")+") ",t!==N.sighash&&this.anonymous&&(e+="anonymous "),e.trim()}static from(t){return"string"==typeof t?z.fromString(t):z.fromObject(t)}static fromObject(t){if(z.isEventFragment(t))return t;"event"!==t.type&&_.throwArgumentError("invalid event object","value",t);const e={name:D(t.name),anonymous:t.anonymous,inputs:t.inputs?t.inputs.map(F.fromObject):[],type:"event"};return new z(A,e)}static fromString(t){let e=t.match(J);e||_.throwArgumentError("invalid event string","value",t);let r=!1;return e[3].split(" ").forEach((t=>{switch(t.trim()){case"anonymous":r=!0;break;case"":break;default:_.warn("unknown modifier: "+t)}})),z.fromObject({name:e[1].trim(),anonymous:r,inputs:V(e[2],!0),type:"event"})}static isEventFragment(t){return t&&t._isFragment&&"event"===t.type}}function R(t,e){e.gas=null;let r=t.split("@");return 1!==r.length?(r.length>2&&_.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||_.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=c.from(r[1]),r[0]):t}function C(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach((t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}}))}function P(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return null!=t.stateMutability?(e.stateMutability=t.stateMutability,e.constant="view"===e.stateMutability||"pure"===e.stateMutability,null!=t.constant&&!!t.constant!==e.constant&&_.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable="payable"===e.stateMutability,null!=t.payable&&!!t.payable!==e.payable&&_.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):null!=t.payable?(e.payable=!!t.payable,null!=t.constant||e.payable||"constructor"===t.type||_.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&_.throwArgumentError("cannot have constant payable function","value",t)):null!=t.constant?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):"constructor"!==t.type&&_.throwArgumentError("unable to determine stateMutability","value",t),e}class k extends M{format(t){if(t||(t=N.sighash),N[t]||_.throwArgumentError("invalid format type","format",t),t===N.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});t===N.sighash&&_.throwError("cannot format a constructor for sighash",u.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let e="constructor("+this.inputs.map((e=>e.format(t))).join(t===N.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "),e.trim()}static from(t){return"string"==typeof t?k.fromString(t):k.fromObject(t)}static fromObject(t){if(k.isConstructorFragment(t))return t;"constructor"!==t.type&&_.throwArgumentError("invalid constructor object","value",t);let e=P(t);e.constant&&_.throwArgumentError("constructor cannot be constant","value",t);const r={name:null,type:t.type,inputs:t.inputs?t.inputs.map(F.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?c.from(t.gas):null};return new k(A,r)}static fromString(t){let e={type:"constructor"},r=(t=R(t,e)).match(J);return r&&"constructor"===r[1].trim()||_.throwArgumentError("invalid constructor string","value",t),e.inputs=V(r[2].trim(),!1),C(r[3].trim(),e),k.fromObject(e)}static isConstructorFragment(t){return t&&t._isFragment&&"constructor"===t.type}}class L extends k{format(t){if(t||(t=N.sighash),N[t]||_.throwArgumentError("invalid format type","format",t),t===N.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t)))),outputs:this.outputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==N.sighash&&(e+="function "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===N.full?", ":",")+") ",t!==N.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "):this.constant&&(e+="view "),this.outputs&&this.outputs.length&&(e+="returns ("+this.outputs.map((e=>e.format(t))).join(", ")+") "),null!=this.gas&&(e+="@"+this.gas.toString()+" ")),e.trim()}static from(t){return"string"==typeof t?L.fromString(t):L.fromObject(t)}static fromObject(t){if(L.isFunctionFragment(t))return t;"function"!==t.type&&_.throwArgumentError("invalid function object","value",t);let e=P(t);const r={type:t.type,name:D(t.name),constant:e.constant,inputs:t.inputs?t.inputs.map(F.fromObject):[],outputs:t.outputs?t.outputs.map(F.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?c.from(t.gas):null};return new L(A,r)}static fromString(t){let e={type:"function"},r=(t=R(t,e)).split(" returns ");r.length>2&&_.throwArgumentError("invalid function string","value",t);let n=r[0].match(J);if(n||_.throwArgumentError("invalid function signature","value",t),e.name=n[1].trim(),e.name&&D(e.name),e.inputs=V(n[2],!1),C(n[3].trim(),e),r.length>1){let n=r[1].match(J);""==n[1].trim()&&""==n[3].trim()||_.throwArgumentError("unexpected tokens","value",t),e.outputs=V(n[2],!1)}else e.outputs=[];return L.fromObject(e)}static isFunctionFragment(t){return t&&t._isFragment&&"function"===t.type}}function I(t){const e=t.format();return"Error(string)"!==e&&"Panic(uint256)"!==e||_.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class U extends M{format(t){if(t||(t=N.sighash),N[t]||_.throwArgumentError("invalid format type","format",t),t===N.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==N.sighash&&(e+="error "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===N.full?", ":",")+") ",e.trim()}static from(t){return"string"==typeof t?U.fromString(t):U.fromObject(t)}static fromObject(t){if(U.isErrorFragment(t))return t;"error"!==t.type&&_.throwArgumentError("invalid error object","value",t);const e={type:t.type,name:D(t.name),inputs:t.inputs?t.inputs.map(F.fromObject):[]};return I(new U(A,e))}static fromString(t){let e={type:"error"},r=t.match(J);return r||_.throwArgumentError("invalid error signature","value",t),e.name=r[1].trim(),e.name&&D(e.name),e.inputs=V(r[2],!1),I(U.fromObject(e))}static isErrorFragment(t){return t&&t._isFragment&&"error"===t.type}}function $(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const B=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function D(t){return t&&t.match(B)||_.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const J=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const W=new u(v);function G(t){const e=[],r=function(t,n){if(Array.isArray(n))for(let a in n){const s=t.slice();s.push(a);try{r(s,n[a])}catch(t){e.push({path:s,error:t})}}};return r([],t),e}class Z{constructor(t,e,r,n){this.name=t,this.type=e,this.localName=r,this.dynamic=n}_throwError(t,e){W.throwArgumentError(t,this.localName,e)}}class H{constructor(t){d(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}get data(){return e(this._data)}get length(){return this._dataLength}_writeData(t){return this._data.push(t),this._dataLength+=t.length,t.length}appendWriter(t){return this._writeData(r(t._data))}writeBytes(t){let e=n(t);const a=e.length%this.wordSize;return a&&(e=r([e,this._padding.slice(a)])),this._writeData(e)}_getValue(t){let e=n(c.from(t));return e.length>this.wordSize&&W.throwError("value out-of-bounds",u.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:e.length}),e.length%this.wordSize&&(e=r([this._padding.slice(e.length%this.wordSize),e])),e}writeValue(t){return this._writeData(this._getValue(t))}writeUpdatableValue(){const t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,e=>{this._data[t]=this._getValue(e)}}}class X{constructor(t,e,r,a){d(this,"_data",n(t)),d(this,"wordSize",e||32),d(this,"_coerceFunc",r),d(this,"allowLoose",a),this._offset=0}get data(){return a(this._data)}get consumed(){return this._offset}static coerce(t,e){let r=t.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(e=e.toNumber()),e}coerce(t,e){return this._coerceFunc?this._coerceFunc(t,e):X.coerce(t,e)}_peekBytes(t,e,r){let n=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+e<=this._data.length?n=e:W.throwError("data out-of-bounds",u.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(t){return new X(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(t,e){let r=this._peekBytes(0,t,!!e);return this._offset+=r.length,r.slice(0,t)}readValue(){return c.from(this.readBytes(this.wordSize))}}class q extends Z{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=t(r)}catch(t){this._throwError(t.message,r)}return e.writeValue(r)}decode(e){return t(s(e.readValue().toHexString(),20))}}class K extends Z{constructor(t){super(t.name,t.type,void 0,t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}const Q=new u(v);function Y(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let t={};n=e.map((e=>{const n=e.localName;return n||Q.throwError("cannot encode object for signature with missing names",u.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]&&Q.throwError("cannot encode object for signature with duplicate names",u.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:r}),t[n]=!0,r[n]}))}else Q.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&Q.throwArgumentError("types/value length mismatch","tuple",r);let a=new H(t.wordSize),s=new H(t.wordSize),o=[];e.forEach(((t,e)=>{let r=n[e];if(t.dynamic){let e=s.length;t.encode(s,r);let n=a.writeUpdatableValue();o.push((t=>{n(t+e)}))}else t.encode(a,r)})),o.forEach((t=>{t(a.length)}));let i=t.appendWriter(a);return i+=t.appendWriter(s),i}function tt(t,e){let r=[],n=t.subReader(0);e.forEach((e=>{let a=null;if(e.dynamic){let r=t.readValue(),s=n.subReader(r.toNumber());try{a=e.decode(s)}catch(t){if(t.code===u.errors.BUFFER_OVERRUN)throw t;a=t,a.baseType=e.name,a.name=e.localName,a.type=e.type}}else try{a=e.decode(t)}catch(t){if(t.code===u.errors.BUFFER_OVERRUN)throw t;a=t,a.baseType=e.name,a.name=e.localName,a.type=e.type}null!=a&&r.push(a)}));const a=e.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});e.forEach(((t,e)=>{let n=t.localName;if(!n||1!==a[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const s=r[e];s instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw s}}):r[n]=s}));for(let t=0;t<r.length;t++){const e=r[t];e instanceof Error&&Object.defineProperty(r,t,{enumerable:!0,get:()=>{throw e}})}return Object.freeze(r)}class et extends Z{constructor(t,e,r){super("array",t.type+"["+(e>=0?e:"")+"]",r,-1===e||t.dynamic),this.coder=t,this.length=e}defaultValue(){const t=this.coder.defaultValue(),e=[];for(let r=0;r<this.length;r++)e.push(t);return e}encode(t,e){Array.isArray(e)||this._throwError("expected array value",e);let r=this.length;-1===r&&(r=e.length,t.writeValue(e.length)),Q.checkArgumentCount(e.length,r,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let t=0;t<e.length;t++)n.push(this.coder);return Y(t,n,e)}decode(t){let e=this.length;-1===e&&(e=t.readValue().toNumber(),32*e>t._data.length&&Q.throwError("insufficient data length",u.errors.BUFFER_OVERRUN,{length:t._data.length,count:e}));let r=[];for(let t=0;t<e;t++)r.push(new K(this.coder));return t.coerce(this.name,tt(t,r))}}class rt extends Z{constructor(t){super("bool","bool",t,!1)}defaultValue(){return!1}encode(t,e){return t.writeValue(e?1:0)}decode(t){return t.coerce(this.type,!t.readValue().isZero())}}class nt extends Z{constructor(t,e){super(t,t,e,!0)}defaultValue(){return"0x"}encode(t,e){e=n(e);let r=t.writeValue(e.length);return r+=t.writeBytes(e),r}decode(t){return t.readBytes(t.readValue().toNumber(),!0)}}class at extends nt{constructor(t){super("bytes",t)}decode(t){return t.coerce(this.name,a(super.decode(t)))}}class st extends Z{constructor(t,e){let r="bytes"+String(t);super(r,r,e,!1),this.size=t}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(t,e){let r=n(e);return r.length!==this.size&&this._throwError("incorrect data length",e),t.writeBytes(r)}decode(t){return t.coerce(this.name,a(t.readBytes(this.size)))}}class ot extends Z{constructor(t){super("null","",t,!1)}defaultValue(){return null}encode(t,e){return null!=e&&this._throwError("not null",e),t.writeBytes([])}decode(t){return t.readBytes(0),t.coerce(this.name,null)}}class it extends Z{constructor(t,e,r){const n=(e?"int":"uint")+8*t;super(n,n,r,!1),this.size=t,this.signed=e}defaultValue(){return 0}encode(t,e){let r=c.from(e),n=y.mask(8*t.wordSize);if(this.signed){let t=n.mask(8*this.size-1);(r.gt(t)||r.lt(t.add(b).mul(w)))&&this._throwError("value out-of-bounds",e)}else(r.lt(E)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",e);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*t.wordSize)),t.writeValue(r)}decode(t){let e=t.readValue().mask(8*this.size);return this.signed&&(e=e.fromTwos(8*this.size)),t.coerce(this.name,e)}}class ut extends nt{constructor(t){super("string",t)}defaultValue(){return""}encode(t,e){return super.encode(t,l(e))}decode(t){return h(super.decode(t))}}class ct extends Z{constructor(t,e){let r=!1;const n=[];t.forEach((t=>{t.dynamic&&(r=!0),n.push(t.type)}));super("tuple","tuple("+n.join(",")+")",e,r),this.coders=t}defaultValue(){const t=[];this.coders.forEach((e=>{t.push(e.defaultValue())}));const e=this.coders.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});return this.coders.forEach(((r,n)=>{let a=r.localName;a&&1===e[a]&&("length"===a&&(a="_length"),null==t[a]&&(t[a]=t[n]))})),Object.freeze(t)}encode(t,e){return Y(t,this.coders,e)}decode(t){return t.coerce(this.name,tt(t,this.coders))}}const lt=new u(v),ht=new RegExp(/^bytes([0-9]*)$/),mt=new RegExp(/^(u?int)([0-9]*)$/);class pt{constructor(t){d(this,"coerceFunc",t||null)}_getCoder(t){switch(t.baseType){case"address":return new q(t.name);case"bool":return new rt(t.name);case"string":return new ut(t.name);case"bytes":return new at(t.name);case"array":return new et(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new ct((t.components||[]).map((t=>this._getCoder(t))),t.name);case"":return new ot(t.name)}let e=t.type.match(mt);if(e){let r=parseInt(e[2]||"256");return(0===r||r>256||r%8!=0)&&lt.throwArgumentError("invalid "+e[1]+" bit length","param",t),new it(r/8,"int"===e[1],t.name)}if(e=t.type.match(ht),e){let r=parseInt(e[1]);return(0===r||r>32)&&lt.throwArgumentError("invalid bytes length","param",t),new st(r,t.name)}return lt.throwArgumentError("invalid type","type",t.type)}_getWordSize(){return 32}_getReader(t,e){return new X(t,this._getWordSize(),this.coerceFunc,e)}_getWriter(){return new H(this._getWordSize())}getDefaultValue(t){const e=t.map((t=>this._getCoder(F.from(t))));return new ct(e,"_").defaultValue()}encode(t,e){t.length!==e.length&&lt.throwError("types/values length mismatch",u.errors.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});const r=t.map((t=>this._getCoder(F.from(t)))),n=new ct(r,"_"),a=this._getWriter();return n.encode(a,e),a.data}decode(t,e,r){const a=t.map((t=>this._getCoder(F.from(t))));return new ct(a,"_").decode(this._getReader(n(e),r))}}const dt=new pt,gt=new u(v);class ft extends g{}class yt extends g{}class bt extends g{}class wt extends g{static isIndexed(t){return!(!t||!t._isIndexed)}}const Et={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function vt(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class _t{constructor(t){let e=[];e="string"==typeof t?JSON.parse(t):t,d(this,"fragments",e.map((t=>M.from(t))).filter((t=>null!=t))),d(this,"_abiCoder",f(new.target,"getAbiCoder")()),d(this,"functions",{}),d(this,"errors",{}),d(this,"events",{}),d(this,"structs",{}),this.fragments.forEach((t=>{let e=null;switch(t.type){case"constructor":return this.deploy?void gt.warn("duplicate definition - constructor"):void d(this,"deploy",t);case"function":e=this.functions;break;case"event":e=this.events;break;case"error":e=this.errors;break;default:return}let r=t.format();e[r]?gt.warn("duplicate definition - "+r):e[r]=t})),this.deploy||d(this,"deploy",k.from({payable:!1,type:"constructor"})),d(this,"_isInterface",!0)}format(t){t||(t=N.full),t===N.sighash&&gt.throwArgumentError("interface does not support formatting sighash","format",t);const e=this.fragments.map((e=>e.format(t)));return t===N.json?JSON.stringify(e.map((t=>JSON.parse(t)))):e}static getAbiCoder(){return dt}static getAddress(e){return t(e)}static getSighash(t){return o(m(t.format()),0,4)}static getEventTopic(t){return m(t.format())}getFunction(t){if(i(t)){for(const e in this.functions)if(t===this.getSighash(e))return this.functions[e];gt.throwArgumentError("no matching function","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.functions).filter((t=>t.split("(")[0]===e));return 0===r.length?gt.throwArgumentError("no matching function","name",e):r.length>1&&gt.throwArgumentError("multiple matching functions","name",e),this.functions[r[0]]}const e=this.functions[L.fromString(t).format()];return e||gt.throwArgumentError("no matching function","signature",t),e}getEvent(t){if(i(t)){const e=t.toLowerCase();for(const t in this.events)if(e===this.getEventTopic(t))return this.events[t];gt.throwArgumentError("no matching event","topichash",e)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.events).filter((t=>t.split("(")[0]===e));return 0===r.length?gt.throwArgumentError("no matching event","name",e):r.length>1&&gt.throwArgumentError("multiple matching events","name",e),this.events[r[0]]}const e=this.events[z.fromString(t).format()];return e||gt.throwArgumentError("no matching event","signature",t),e}getError(t){if(i(t)){const e=f(this.constructor,"getSighash");for(const r in this.errors){if(t===e(this.errors[r]))return this.errors[r]}gt.throwArgumentError("no matching error","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.errors).filter((t=>t.split("(")[0]===e));return 0===r.length?gt.throwArgumentError("no matching error","name",e):r.length>1&&gt.throwArgumentError("multiple matching errors","name",e),this.errors[r[0]]}const e=this.errors[L.fromString(t).format()];return e||gt.throwArgumentError("no matching error","signature",t),e}getSighash(t){if("string"==typeof t)try{t=this.getFunction(t)}catch(e){try{t=this.getError(t)}catch(t){throw e}}return f(this.constructor,"getSighash")(t)}getEventTopic(t){return"string"==typeof t&&(t=this.getEvent(t)),f(this.constructor,"getEventTopic")(t)}_decodeParams(t,e){return this._abiCoder.decode(t,e)}_encodeParams(t,e){return this._abiCoder.encode(t,e)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,e){"string"==typeof t&&(t=this.getError(t));const r=n(e);return a(r.slice(0,4))!==this.getSighash(t)&&gt.throwArgumentError(`data signature does not match error ${t.name}.`,"data",a(r)),this._decodeParams(t.inputs,r.slice(4))}encodeErrorResult(t,e){return"string"==typeof t&&(t=this.getError(t)),a(r([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionData(t,e){"string"==typeof t&&(t=this.getFunction(t));const r=n(e);return a(r.slice(0,4))!==this.getSighash(t)&&gt.throwArgumentError(`data signature does not match function ${t.name}.`,"data",a(r)),this._decodeParams(t.inputs,r.slice(4))}encodeFunctionData(t,e){return"string"==typeof t&&(t=this.getFunction(t)),a(r([this.getSighash(t),this._encodeParams(t.inputs,e||[])]))}decodeFunctionResult(t,e){"string"==typeof t&&(t=this.getFunction(t));let r=n(e),s=null,o="",i=null,c=null,l=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(t.outputs,r)}catch(t){}break;case 4:{const t=a(r.slice(0,4)),e=Et[t];if(e)i=this._abiCoder.decode(e.inputs,r.slice(4)),c=e.name,l=e.signature,e.reason&&(s=i[0]),"Error"===c?o=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(i[0])}`:"Panic"===c&&(o=`; VM Exception while processing transaction: reverted with panic code ${i[0]}`);else try{const e=this.getError(t);i=this._abiCoder.decode(e.inputs,r.slice(4)),c=e.name,l=e.format()}catch(t){}break}}return gt.throwError("call revert exception"+o,u.errors.CALL_EXCEPTION,{method:t.format(),data:a(e),errorArgs:i,errorName:c,errorSignature:l,reason:s})}encodeFunctionResult(t,e){return"string"==typeof t&&(t=this.getFunction(t)),a(this._abiCoder.encode(t.outputs,e||[]))}encodeFilterTopics(t,e){"string"==typeof t&&(t=this.getEvent(t)),e.length>t.inputs.length&&gt.throwError("too many arguments for "+t.format(),u.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:e});let r=[];t.anonymous||r.push(this.getEventTopic(t));const n=(t,e)=>"string"===t.type?m(e):"bytes"===t.type?p(a(e)):("bool"===t.type&&"boolean"==typeof e&&(e=e?"0x01":"0x00"),t.type.match(/^u?int/)&&(e=c.from(e).toHexString()),"address"===t.type&&this._abiCoder.encode(["address"],[e]),s(a(e),32));for(e.forEach(((e,a)=>{let s=t.inputs[a];s.indexed?null==e?r.push(null):"array"===s.baseType||"tuple"===s.baseType?gt.throwArgumentError("filtering with tuples or arrays not supported","contract."+s.name,e):Array.isArray(e)?r.push(e.map((t=>n(s,t)))):r.push(n(s,e)):null!=e&&gt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+s.name,e)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(t,e){"string"==typeof t&&(t=this.getEvent(t));const r=[],n=[],a=[];return t.anonymous||r.push(this.getEventTopic(t)),e.length!==t.inputs.length&&gt.throwArgumentError("event arguments/values mismatch","values",e),t.inputs.forEach(((t,s)=>{const o=e[s];if(t.indexed)if("string"===t.type)r.push(m(o));else if("bytes"===t.type)r.push(p(o));else{if("tuple"===t.baseType||"array"===t.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([t.type],[o]))}else n.push(t),a.push(o)})),{data:this._abiCoder.encode(n,a),topics:r}}decodeEventLog(t,e,n){if("string"==typeof t&&(t=this.getEvent(t)),null!=n&&!t.anonymous){let e=this.getEventTopic(t);i(n[0],32)&&n[0].toLowerCase()===e||gt.throwError("fragment/topic mismatch",u.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:e,value:n[0]}),n=n.slice(1)}let a=[],s=[],o=[];t.inputs.forEach(((t,e)=>{t.indexed?"string"===t.type||"bytes"===t.type||"tuple"===t.baseType||"array"===t.baseType?(a.push(F.fromObject({type:"bytes32",name:t.name})),o.push(!0)):(a.push(t),o.push(!1)):(s.push(t),o.push(!1))}));let c=null!=n?this._abiCoder.decode(a,r(n)):null,l=this._abiCoder.decode(s,e,!0),h=[],m=0,p=0;t.inputs.forEach(((t,e)=>{if(t.indexed)if(null==c)h[e]=new wt({_isIndexed:!0,hash:null});else if(o[e])h[e]=new wt({_isIndexed:!0,hash:c[p++]});else try{h[e]=c[p++]}catch(t){h[e]=t}else try{h[e]=l[m++]}catch(t){h[e]=t}if(t.name&&null==h[t.name]){const r=h[e];r instanceof Error?Object.defineProperty(h,t.name,{enumerable:!0,get:()=>{throw vt(`property ${JSON.stringify(t.name)}`,r)}}):h[t.name]=r}}));for(let t=0;t<h.length;t++){const e=h[t];e instanceof Error&&Object.defineProperty(h,t,{enumerable:!0,get:()=>{throw vt(`index ${t}`,e)}})}return Object.freeze(h)}parseTransaction(t){let e=this.getFunction(t.data.substring(0,10).toLowerCase());return e?new yt({args:this._abiCoder.decode(e.inputs,"0x"+t.data.substring(10)),functionFragment:e,name:e.name,signature:e.format(),sighash:this.getSighash(e),value:c.from(t.value||"0")}):null}parseLog(t){let e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new ft({eventFragment:e,name:e.name,signature:e.format(),topic:this.getEventTopic(e),args:this.decodeEventLog(e,t.data,t.topics)})}parseError(t){const e=a(t);let r=this.getError(e.substring(0,10).toLowerCase());return r?new bt({args:this._abiCoder.decode(r.inputs,"0x"+e.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(t){return!(!t||!t._isInterface)}}export{pt as A,k as C,U as E,M as F,_t as I,ft as L,F as P,yt as T,z as a,L as b,N as c,dt as d,G as e,wt as f};
@@ -1 +1 @@
1
- import{c as r}from"./index-7decf620.js";import{r as t}from"./sha256-fe7bb483.js";var o,i,e={exports:{}},n={exports:{}};function a(){return o||(o=1,n.exports=(f=t(),e=(i=f).lib,a=e.Base,s=e.WordArray,(h=i.x64={}).Word=a.extend({init:function(r,t){this.high=r,this.low=t}}),h.WordArray=a.extend({init:function(t,o){t=this.words=t||[],this.sigBytes=o!=r?o:8*t.length},toX32:function(){for(var r=this.words,t=r.length,o=[],i=0;i<t;i++){var e=r[i];o.push(e.high),o.push(e.low)}return s.create(o,this.sigBytes)},clone:function(){for(var r=a.clone.call(this),t=r.words=this.words.slice(0),o=t.length,i=0;i<o;i++)t[i]=t[i].clone();return r}}),f)),n.exports;var r,i,e,a,s,h,f}function s(){return i?e.exports:(i=1,e.exports=(r=t(),a(),function(t){var o=r,i=o.lib,e=i.WordArray,n=i.Hasher,a=o.x64.Word,s=o.algo,h=[],f=[],c=[];!function(){for(var r=1,t=0,o=0;o<24;o++){h[r+5*t]=(o+1)*(o+2)/2%64;var i=(2*r+3*t)%5;r=t%5,t=i}for(r=0;r<5;r++)for(t=0;t<5;t++)f[r+5*t]=t+(2*r+3*t)%5*5;for(var e=1,n=0;n<24;n++){for(var s=0,l=0,u=0;u<7;u++){if(1&e){var v=(1<<u)-1;v<32?l^=1<<v:s^=1<<v-32}128&e?e=e<<1^113:e<<=1}c[n]=a.create(s,l)}}();var l=[];!function(){for(var r=0;r<25;r++)l[r]=a.create()}();var u=s.SHA3=n.extend({cfg:n.cfg.extend({outputLength:512}),_doReset:function(){for(var r=this._state=[],t=0;t<25;t++)r[t]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(r,t){for(var o=this._state,i=this.blockSize/2,e=0;e<i;e++){var n=r[t+2*e],a=r[t+2*e+1];n=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(W=o[e]).high^=a,W.low^=n}for(var s=0;s<24;s++){for(var u=0;u<5;u++){for(var v=0,g=0,y=0;y<5;y++)v^=(W=o[u+5*y]).high,g^=W.low;var p=l[u];p.high=v,p.low=g}for(u=0;u<5;u++){var w=l[(u+4)%5],d=l[(u+1)%5],A=d.high,x=d.low;for(v=w.high^(A<<1|x>>>31),g=w.low^(x<<1|A>>>31),y=0;y<5;y++)(W=o[u+5*y]).high^=v,W.low^=g}for(var b=1;b<25;b++){var _=(W=o[b]).high,B=W.low,H=h[b];H<32?(v=_<<H|B>>>32-H,g=B<<H|_>>>32-H):(v=B<<H-32|_>>>64-H,g=_<<H-32|B>>>64-H);var m=l[f[b]];m.high=v,m.low=g}var S=l[0],U=o[0];for(S.high=U.high,S.low=U.low,u=0;u<5;u++)for(y=0;y<5;y++){var W=o[b=u+5*y],L=l[b],k=l[(u+1)%5+5*y],z=l[(u+2)%5+5*y];W.high=L.high^~k.high&z.high,W.low=L.low^~k.low&z.low}W=o[0];var F=c[s];W.high^=F.high,W.low^=F.low}},_doFinalize:function(){var r=this._data,o=r.words;this._nDataBytes;var i=8*r.sigBytes,n=32*this.blockSize;o[i>>>5]|=1<<24-i%32,o[(t.ceil((i+1)/n)*n>>>5)-1]|=128,r.sigBytes=4*o.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,h=s/8,f=[],c=0;c<h;c++){var l=a[c],u=l.high,v=l.low;u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),v=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8),f.push(v),f.push(u)}return new e.init(f,s)},clone:function(){for(var r=n.clone.call(this),t=r._state=this._state.slice(0),o=0;o<25;o++)t[o]=t[o].clone();return r}});o.SHA3=n._createHelper(u),o.HmacSHA3=n._createHmacHelper(u)}(Math),r.SHA3));var r}var h,f={exports:{}};function c(){return h||(h=1,f.exports=(r=t(),function(){if("function"==typeof ArrayBuffer){var t=r.lib.WordArray,o=t.init,i=t.init=function(r){if(r instanceof ArrayBuffer&&(r=new Uint8Array(r)),(r instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&r instanceof Uint8ClampedArray||r instanceof Int16Array||r instanceof Uint16Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Float32Array||r instanceof Float64Array)&&(r=new Uint8Array(r.buffer,r.byteOffset,r.byteLength)),r instanceof Uint8Array){for(var t=r.byteLength,i=[],e=0;e<t;e++)i[e>>>2]|=r[e]<<24-e%4*8;o.call(this,i,t)}else o.apply(this,arguments)};i.prototype=t}}(),r.lib.WordArray)),f.exports;var r}export{c as a,a as b,s as r};
1
+ import{c as r}from"./index-9b7de542.js";import{r as t}from"./sha256-c7e66f3f.js";var o,i,e={exports:{}},n={exports:{}};function a(){return o||(o=1,n.exports=(f=t(),e=(i=f).lib,a=e.Base,s=e.WordArray,(h=i.x64={}).Word=a.extend({init:function(r,t){this.high=r,this.low=t}}),h.WordArray=a.extend({init:function(t,o){t=this.words=t||[],this.sigBytes=o!=r?o:8*t.length},toX32:function(){for(var r=this.words,t=r.length,o=[],i=0;i<t;i++){var e=r[i];o.push(e.high),o.push(e.low)}return s.create(o,this.sigBytes)},clone:function(){for(var r=a.clone.call(this),t=r.words=this.words.slice(0),o=t.length,i=0;i<o;i++)t[i]=t[i].clone();return r}}),f)),n.exports;var r,i,e,a,s,h,f}function s(){return i?e.exports:(i=1,e.exports=(r=t(),a(),function(t){var o=r,i=o.lib,e=i.WordArray,n=i.Hasher,a=o.x64.Word,s=o.algo,h=[],f=[],c=[];!function(){for(var r=1,t=0,o=0;o<24;o++){h[r+5*t]=(o+1)*(o+2)/2%64;var i=(2*r+3*t)%5;r=t%5,t=i}for(r=0;r<5;r++)for(t=0;t<5;t++)f[r+5*t]=t+(2*r+3*t)%5*5;for(var e=1,n=0;n<24;n++){for(var s=0,l=0,u=0;u<7;u++){if(1&e){var v=(1<<u)-1;v<32?l^=1<<v:s^=1<<v-32}128&e?e=e<<1^113:e<<=1}c[n]=a.create(s,l)}}();var l=[];!function(){for(var r=0;r<25;r++)l[r]=a.create()}();var u=s.SHA3=n.extend({cfg:n.cfg.extend({outputLength:512}),_doReset:function(){for(var r=this._state=[],t=0;t<25;t++)r[t]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(r,t){for(var o=this._state,i=this.blockSize/2,e=0;e<i;e++){var n=r[t+2*e],a=r[t+2*e+1];n=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(W=o[e]).high^=a,W.low^=n}for(var s=0;s<24;s++){for(var u=0;u<5;u++){for(var v=0,g=0,y=0;y<5;y++)v^=(W=o[u+5*y]).high,g^=W.low;var p=l[u];p.high=v,p.low=g}for(u=0;u<5;u++){var w=l[(u+4)%5],d=l[(u+1)%5],A=d.high,x=d.low;for(v=w.high^(A<<1|x>>>31),g=w.low^(x<<1|A>>>31),y=0;y<5;y++)(W=o[u+5*y]).high^=v,W.low^=g}for(var b=1;b<25;b++){var _=(W=o[b]).high,B=W.low,H=h[b];H<32?(v=_<<H|B>>>32-H,g=B<<H|_>>>32-H):(v=B<<H-32|_>>>64-H,g=_<<H-32|B>>>64-H);var m=l[f[b]];m.high=v,m.low=g}var S=l[0],U=o[0];for(S.high=U.high,S.low=U.low,u=0;u<5;u++)for(y=0;y<5;y++){var W=o[b=u+5*y],L=l[b],k=l[(u+1)%5+5*y],z=l[(u+2)%5+5*y];W.high=L.high^~k.high&z.high,W.low=L.low^~k.low&z.low}W=o[0];var F=c[s];W.high^=F.high,W.low^=F.low}},_doFinalize:function(){var r=this._data,o=r.words;this._nDataBytes;var i=8*r.sigBytes,n=32*this.blockSize;o[i>>>5]|=1<<24-i%32,o[(t.ceil((i+1)/n)*n>>>5)-1]|=128,r.sigBytes=4*o.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,h=s/8,f=[],c=0;c<h;c++){var l=a[c],u=l.high,v=l.low;u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),v=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8),f.push(v),f.push(u)}return new e.init(f,s)},clone:function(){for(var r=n.clone.call(this),t=r._state=this._state.slice(0),o=0;o<25;o++)t[o]=t[o].clone();return r}});o.SHA3=n._createHelper(u),o.HmacSHA3=n._createHmacHelper(u)}(Math),r.SHA3));var r}var h,f={exports:{}};function c(){return h||(h=1,f.exports=(r=t(),function(){if("function"==typeof ArrayBuffer){var t=r.lib.WordArray,o=t.init,i=t.init=function(r){if(r instanceof ArrayBuffer&&(r=new Uint8Array(r)),(r instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&r instanceof Uint8ClampedArray||r instanceof Int16Array||r instanceof Uint16Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Float32Array||r instanceof Float64Array)&&(r=new Uint8Array(r.buffer,r.byteOffset,r.byteLength)),r instanceof Uint8Array){for(var t=r.byteLength,i=[],e=0;e<t;e++)i[e>>>2]|=r[e]<<24-e%4*8;o.call(this,i,t)}else o.apply(this,arguments)};i.prototype=t}}(),r.lib.WordArray)),f.exports;var r}export{c as a,a as b,s as r};
@@ -1,4 +1,4 @@
1
- import{b as e,c as t,_ as r,d as n}from"./index-7decf620.js";import"@ethersproject/providers";import"zustand";import"events";import"@ethersproject/address";import"@ethersproject/constants";import"@ethersproject/contracts";import"@ethersproject/properties";import"@ethersproject/transactions";import"@ethersproject/bytes";var i={exports:{}},o=e(i.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=262)}([function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){(function(e){
1
+ import{b as e,c as t,_ as r,d as n}from"./index-9b7de542.js";import"@ethersproject/providers";import"zustand";import"events";import"@ethersproject/address";import"@ethersproject/constants";import"@ethersproject/contracts";import"@ethersproject/properties";import"@ethersproject/transactions";import"@ethersproject/bytes";var i={exports:{}},o=e(i.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=262)}([function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){(function(e){
2
2
  /*!
3
3
  * The buffer module from node.js, for the browser.
4
4
  *
@@ -1 +1 @@
1
- import{_ as e}from"./index-7decf620.js";import"@ethersproject/providers";import"zustand";import"events";import"@ethersproject/address";import"@ethersproject/constants";import"@ethersproject/contracts";import"@ethersproject/properties";import"@ethersproject/transactions";import"@ethersproject/bytes";const t="dapp-inpage-integration",i="openblock-content-integration",n=["https://cocoswap.com","https://app.openocean.finance"],o=["https://oec.cocoswap.com"];class s{constructor(){console.log("start initialize openblockinpage provider"),this.callBackList={},this.eventListener={},this.isMetaMask=!0,this.isOpenBlock=!0,this.chainId=null,this.networkVersion=null,this.selectedAddress=null,this.request=this.request.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.on=this.on.bind(this),this.isConnected=this.isConnected.bind(this),this.enable=this.enable.bind(this),this._metamask=this._getExperimentalApi(),this._initInpageListener(),this.getProviderData()}getProviderData(){var t;return e(this,void 0,void 0,(function*(){const e=yield this.request("metamask_getProviderState");this.chainId=null==e?void 0:e.chainId,this.networkVersion=null==e?void 0:e.networkVersion,this.selectedAddress=null===(t=null==e?void 0:e.accounts)||void 0===t?void 0:t[0]}))}request(t){return e(this,void 0,void 0,(function*(){if("eth_requestAccounts"===t.method){const e=yield this._hookRequest("eth_accounts");if(e.length)return new Promise((t=>t(e)))}return this._hookRequest(t)}))}send(...t){return e(this,void 0,void 0,(function*(){if("function"!=typeof t[1])return"string"==typeof t[0]?this.request({method:t[0],params:t[1]}):1===t.length?this.request(t):void 0;this.sendAsync(t[0],t[1])}))}sendAsync(...t){return e(this,void 0,void 0,(function*(){const e={method:t[0].method,params:t[0].params},i=t[0].id;this.request(e).then((e=>{t[1](null,{id:i,jsonrpc:"2.0",result:e})})).catch((e=>{t[1](null,{id:i,jsonrpc:"2.0",error:e})}))}))}isConnected(){return!0}enable(){return e(this,void 0,void 0,(function*(){const e=yield this._hookRequest("eth_accounts");return e.length?new Promise((t=>t(e))):this.request({method:"eth_requestAccounts"})}))}on(e,t){"string"==typeof e&&"function"==typeof t&&(this.eventListener[e]&&this.eventListener[e].length>5||(this.eventListener[e]?(this.eventListener[e].push(t),this.eventListener[e]=Array.from(new Set(this.eventListener[e]))):this.eventListener[e]||(this.eventListener=Object.assign(Object.assign({},this.eventListener),{[e]:[t]})),this._registerEvent(e)))}removeListener(){}_initInpageListener(){window.addEventListener("message",(e=>{var i,n,o;if(e.data.target!==t)return;const s=null===(o=null===(n=null===(i=e.data)||void 0===i?void 0:i.value)||void 0===n?void 0:n.data)||void 0===o?void 0:o.mark;s&&("call_method"===s.type?this._handleNormalMethod(s,e):"register_event"===s.type&&this._handleEventMethod(s,e))}),!1)}_handleNormalMethod(e,t){var i,n,o,s,r;(null===(i=t.data.value.data)||void 0===i?void 0:i.error)?null===(n=this.callBackList[e.id])||void 0===n||n.reject(null===(o=t.data.value.data)||void 0===o?void 0:o.error):null===(s=this.callBackList[e.id])||void 0===s||s.resolve(null===(r=t.data.value.data)||void 0===r?void 0:r.result),delete this.callBackList[e.id]}_handleEventMethod(e,t){var i,s,r,d,a,h,l;const c=null===(d=null===(r=null===(s=null===(i=t.data)||void 0===i?void 0:i.value)||void 0===s?void 0:s.data)||void 0===r?void 0:r.mark)||void 0===d?void 0:d.eventName,u=null===(l=null===(h=null===(a=t.data)||void 0===a?void 0:a.value)||void 0===h?void 0:h.data)||void 0===l?void 0:l.params;if(c){const e=this.eventListener[c];if(!e)return void("https://app.openocean.finance"===window.location.origin&&window.location.reload());e.forEach((e=>{"chainChanged"===c&&(this.chainId=u,this.networkVersion=Number(u)),o.includes(window.location.origin)&&"chainChanged"===c||(n.includes(window.location.origin)?window.location.reload():e(u))}))}}_hookRequest(e){return new Promise(((n,o)=>{const s=(()=>{function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+e()+e()+e()+e()+e()+e()+e()})();"string"==typeof e&&(e={method:e}),e=Object.assign(Object.assign({},e),{mark:{id:s,method:e.method,type:"call_method"}}),window.parent.postMessage({from:t,target:i,data:e},"*"),this.callBackList[s]={resolve:n,reject:o}}))}_registerEvent(e){const n={mark:{eventName:e,type:"register_event"},eventName:e};window.parent.postMessage({from:t,target:i,data:n},"*")}_getExperimentalApi(){return new Proxy({isUnlocked:()=>new Promise((e=>e(!0)))},{get:(e,t,...i)=>Reflect.get(e,t,...i)})}}function r(){var e;if(null===(e=window.obethereum)||void 0===e?void 0:e.isOpenBlock)return window.obethereum;let t=new s;t=new Proxy(t,{deleteProperty:()=>!0});try{Object.defineProperty(window,"obethereum",{set(e){console.log("set ethereum",e)},get:()=>t})}catch(e){console.log("initializeProvider error",e),window.obethereum=t}return window.web3=Object.assign({},window.web3),window.web3.currentProvider=t,window.dispatchEvent(new Event("ethereum#initialized")),t}export{r as default};
1
+ import{_ as e}from"./index-9b7de542.js";import"@ethersproject/providers";import"zustand";import"events";import"@ethersproject/address";import"@ethersproject/constants";import"@ethersproject/contracts";import"@ethersproject/properties";import"@ethersproject/transactions";import"@ethersproject/bytes";const t="dapp-inpage-integration",i="openblock-content-integration",n=["https://cocoswap.com","https://app.openocean.finance"],o=["https://oec.cocoswap.com"];class s{constructor(){console.log("start initialize openblockinpage provider"),this.callBackList={},this.eventListener={},this.isMetaMask=!0,this.isOpenBlock=!0,this.chainId=null,this.networkVersion=null,this.selectedAddress=null,this.request=this.request.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.on=this.on.bind(this),this.isConnected=this.isConnected.bind(this),this.enable=this.enable.bind(this),this._metamask=this._getExperimentalApi(),this._initInpageListener(),this.getProviderData()}getProviderData(){var t;return e(this,void 0,void 0,(function*(){const e=yield this.request("metamask_getProviderState");this.chainId=null==e?void 0:e.chainId,this.networkVersion=null==e?void 0:e.networkVersion,this.selectedAddress=null===(t=null==e?void 0:e.accounts)||void 0===t?void 0:t[0]}))}request(t){return e(this,void 0,void 0,(function*(){if("eth_requestAccounts"===t.method){const e=yield this._hookRequest("eth_accounts");if(e.length)return new Promise((t=>t(e)))}return this._hookRequest(t)}))}send(...t){return e(this,void 0,void 0,(function*(){if("function"!=typeof t[1])return"string"==typeof t[0]?this.request({method:t[0],params:t[1]}):1===t.length?this.request(t):void 0;this.sendAsync(t[0],t[1])}))}sendAsync(...t){return e(this,void 0,void 0,(function*(){const e={method:t[0].method,params:t[0].params},i=t[0].id;this.request(e).then((e=>{t[1](null,{id:i,jsonrpc:"2.0",result:e})})).catch((e=>{t[1](null,{id:i,jsonrpc:"2.0",error:e})}))}))}isConnected(){return!0}enable(){return e(this,void 0,void 0,(function*(){const e=yield this._hookRequest("eth_accounts");return e.length?new Promise((t=>t(e))):this.request({method:"eth_requestAccounts"})}))}on(e,t){"string"==typeof e&&"function"==typeof t&&(this.eventListener[e]&&this.eventListener[e].length>5||(this.eventListener[e]?(this.eventListener[e].push(t),this.eventListener[e]=Array.from(new Set(this.eventListener[e]))):this.eventListener[e]||(this.eventListener=Object.assign(Object.assign({},this.eventListener),{[e]:[t]})),this._registerEvent(e)))}removeListener(){}_initInpageListener(){window.addEventListener("message",(e=>{var i,n,o;if(e.data.target!==t)return;const s=null===(o=null===(n=null===(i=e.data)||void 0===i?void 0:i.value)||void 0===n?void 0:n.data)||void 0===o?void 0:o.mark;s&&("call_method"===s.type?this._handleNormalMethod(s,e):"register_event"===s.type&&this._handleEventMethod(s,e))}),!1)}_handleNormalMethod(e,t){var i,n,o,s,r;(null===(i=t.data.value.data)||void 0===i?void 0:i.error)?null===(n=this.callBackList[e.id])||void 0===n||n.reject(null===(o=t.data.value.data)||void 0===o?void 0:o.error):null===(s=this.callBackList[e.id])||void 0===s||s.resolve(null===(r=t.data.value.data)||void 0===r?void 0:r.result),delete this.callBackList[e.id]}_handleEventMethod(e,t){var i,s,r,d,a,h,l;const c=null===(d=null===(r=null===(s=null===(i=t.data)||void 0===i?void 0:i.value)||void 0===s?void 0:s.data)||void 0===r?void 0:r.mark)||void 0===d?void 0:d.eventName,u=null===(l=null===(h=null===(a=t.data)||void 0===a?void 0:a.value)||void 0===h?void 0:h.data)||void 0===l?void 0:l.params;if(c){const e=this.eventListener[c];if(!e)return void("https://app.openocean.finance"===window.location.origin&&window.location.reload());e.forEach((e=>{"chainChanged"===c&&(this.chainId=u,this.networkVersion=Number(u)),o.includes(window.location.origin)&&"chainChanged"===c||(n.includes(window.location.origin)?window.location.reload():e(u))}))}}_hookRequest(e){return new Promise(((n,o)=>{const s=(()=>{function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+e()+e()+e()+e()+e()+e()+e()})();"string"==typeof e&&(e={method:e}),e=Object.assign(Object.assign({},e),{mark:{id:s,method:e.method,type:"call_method"}}),window.parent.postMessage({from:t,target:i,data:e},"*"),this.callBackList[s]={resolve:n,reject:o}}))}_registerEvent(e){const n={mark:{eventName:e,type:"register_event"},eventName:e};window.parent.postMessage({from:t,target:i,data:n},"*")}_getExperimentalApi(){return new Proxy({isUnlocked:()=>new Promise((e=>e(!0)))},{get:(e,t,...i)=>Reflect.get(e,t,...i)})}}function r(){var e;if(null===(e=window.obethereum)||void 0===e?void 0:e.isOpenBlock)return window.obethereum;let t=new s;t=new Proxy(t,{deleteProperty:()=>!0});try{Object.defineProperty(window,"obethereum",{set(e){console.log("set ethereum",e)},get:()=>t})}catch(e){console.log("initializeProvider error",e),window.obethereum=t}return window.web3=Object.assign({},window.web3),window.web3.currentProvider=t,window.dispatchEvent(new Event("ethereum#initialized")),t}export{r as default};
@@ -18,7 +18,6 @@ export declare function getUniPassPackage(): Promise<typeof import("./uniPass")>
18
18
  export declare function getBinancePackage(): Promise<typeof import("./binance")>;
19
19
  export declare function getMetamaskPackage(): Promise<typeof import("./metamask")>;
20
20
  export declare function getSocialLoginPackage(): Promise<typeof import("./socialLogin")>;
21
- export declare function getAlchemyPackage(): Promise<typeof import("./alchemy")>;
22
21
  export declare function getBloctoConnector(params: ConnectorParams, events: ConnectEvents): Promise<import("@ethersproject/providers").JsonRpcProvider>;
23
22
  export declare function getPortisConnector(params: ConnectorParams, events: ConnectEvents): Promise<import("@ethersproject/providers").JsonRpcProvider>;
24
23
  export declare function getWalletLinkConnector(params: ConnectorParams, events: ConnectEvents): Promise<import("@ethersproject/providers").JsonRpcProvider>;
@@ -45,30 +44,30 @@ export declare function getUniPassConnector(params: ConnectorParams, events: Con
45
44
  detectNetwork(): Promise<import("@ethersproject/networks").Network>;
46
45
  _uncachedDetectNetwork(): Promise<import("@ethersproject/networks").Network>;
47
46
  getUncheckedSigner(addressOrIndex?: string | number | undefined): {
48
- sendTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("alchemy-sdk").TransactionResponse>;
47
+ sendTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
49
48
  readonly provider: import("@ethersproject/providers").JsonRpcProvider;
50
49
  _index: number;
51
50
  _address: string;
52
51
  connect(provider: import("@ethersproject/abstract-provider").Provider): import("@ethersproject/providers").JsonRpcSigner;
53
52
  connectUnchecked(): import("@ethersproject/providers").JsonRpcSigner;
54
53
  getAddress(): Promise<string>;
55
- sendUncheckedTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<string>;
56
- signTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<string>;
54
+ sendUncheckedTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<string>;
55
+ signTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<string>;
57
56
  signMessage(message: string | import("ethers").Bytes): Promise<string>;
58
57
  _legacySignMessage(message: string | import("ethers").Bytes): Promise<string>;
59
58
  _signTypedData(domain: import("ethers").TypedDataDomain, types: Record<string, import("ethers").TypedDataField[]>, value: Record<string, any>): Promise<string>;
60
59
  unlock(password: string): Promise<boolean>;
61
60
  readonly _isSigner: boolean;
62
- getBalance(blockTag?: import("alchemy-sdk").BlockTag | undefined): Promise<import("alchemy-sdk").BigNumber>;
63
- getTransactionCount(blockTag?: import("alchemy-sdk").BlockTag | undefined): Promise<number>;
64
- estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("alchemy-sdk").BigNumber>;
65
- call(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>, blockTag?: import("alchemy-sdk").BlockTag | undefined): Promise<string>;
61
+ getBalance(blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<import("ethers").BigNumber>;
62
+ getTransactionCount(blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<number>;
63
+ estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("ethers").BigNumber>;
64
+ call(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | undefined): Promise<string>;
66
65
  getChainId(): Promise<number>;
67
- getGasPrice(): Promise<import("alchemy-sdk").BigNumber>;
68
- getFeeData(): Promise<import("alchemy-sdk").FeeData>;
66
+ getGasPrice(): Promise<import("ethers").BigNumber>;
67
+ getFeeData(): Promise<import("@ethersproject/abstract-provider").FeeData>;
69
68
  resolveName(name: string): Promise<string>;
70
- checkTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>;
71
- populateTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("alchemy-sdk").TransactionRequest>;
69
+ checkTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>;
70
+ populateTransaction(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("@ethersproject/abstract-provider").TransactionRequest>;
72
71
  _checkProvider(operation?: string | undefined): void;
73
72
  };
74
73
  send(method: string, params: any[]): Promise<any>;
@@ -113,186 +112,55 @@ export declare function getUniPassConnector(params: ConnectorParams, events: Con
113
112
  pollingInterval: number;
114
113
  _getFastBlockNumber(): Promise<number>;
115
114
  _setFastBlockNumber(blockNumber: number): void;
116
- waitForTransaction(transactionHash: string, confirmations?: number | undefined, timeout?: number | undefined): Promise<import("alchemy-sdk").TransactionReceipt>;
115
+ waitForTransaction(transactionHash: string, confirmations?: number | undefined, timeout?: number | undefined): Promise<import("@ethersproject/abstract-provider").TransactionReceipt>;
117
116
  _waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: {
118
117
  data: string;
119
118
  from: string;
120
119
  nonce: number;
121
120
  to: string;
122
- value: import("alchemy-sdk").BigNumber;
121
+ value: import("ethers").BigNumber;
123
122
  startBlock: number;
124
- }): Promise<import("alchemy-sdk").TransactionReceipt>;
123
+ }): Promise<import("@ethersproject/abstract-provider").TransactionReceipt>;
125
124
  getBlockNumber(): Promise<number>;
126
- getGasPrice(): Promise<import("alchemy-sdk").BigNumber>;
127
- getBalance(addressOrName: string | Promise<string>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<import("alchemy-sdk").BigNumber>;
128
- getTransactionCount(addressOrName: string | Promise<string>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<number>;
129
- getCode(addressOrName: string | Promise<string>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<string>;
130
- getStorageAt(addressOrName: string | Promise<string>, position: import("alchemy-sdk").BigNumberish | Promise<import("alchemy-sdk").BigNumberish>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<string>;
131
- _wrapTransaction(tx: import("ethers").Transaction, hash?: string | undefined, startBlock?: number | undefined): import("alchemy-sdk").TransactionResponse;
132
- sendTransaction(signedTransaction: string | Promise<string>): Promise<import("alchemy-sdk").TransactionResponse>;
133
- _getTransactionRequest(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("ethers").Transaction>;
125
+ getGasPrice(): Promise<import("ethers").BigNumber>;
126
+ getBalance(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<import("ethers").BigNumber>;
127
+ getTransactionCount(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<number>;
128
+ getCode(addressOrName: string | Promise<string>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<string>;
129
+ getStorageAt(addressOrName: string | Promise<string>, position: import("ethers").BigNumberish | Promise<import("ethers").BigNumberish>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<string>;
130
+ _wrapTransaction(tx: import("ethers").Transaction, hash?: string | undefined, startBlock?: number | undefined): import("@ethersproject/abstract-provider").TransactionResponse;
131
+ sendTransaction(signedTransaction: string | Promise<string>): Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
132
+ _getTransactionRequest(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("ethers").Transaction>;
134
133
  _getFilter(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>;
135
- _call(transaction: import("alchemy-sdk").TransactionRequest, blockTag: import("alchemy-sdk").BlockTag, attempt: number): Promise<string>;
136
- call(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<string>;
137
- estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("alchemy-sdk").BigNumber>;
134
+ _call(transaction: import("@ethersproject/abstract-provider").TransactionRequest, blockTag: import("@ethersproject/abstract-provider").BlockTag, attempt: number): Promise<string>;
135
+ call(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>, blockTag?: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag> | undefined): Promise<string>;
136
+ estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("@ethersproject/abstract-provider").TransactionRequest>): Promise<import("ethers").BigNumber>;
138
137
  _getAddress(addressOrName: string | Promise<string>): Promise<string>;
139
- _getBlock(blockHashOrBlockTag: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag>, includeTransactions?: boolean | undefined): Promise<import("alchemy-sdk").Block | import("alchemy-sdk").BlockWithTransactions>;
140
- getBlock(blockHashOrBlockTag: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag>): Promise<import("alchemy-sdk").Block>;
141
- getBlockWithTransactions(blockHashOrBlockTag: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag>): Promise<import("alchemy-sdk").BlockWithTransactions>;
142
- getTransaction(transactionHash: string | Promise<string>): Promise<import("alchemy-sdk").TransactionResponse>;
143
- getTransactionReceipt(transactionHash: string | Promise<string>): Promise<import("alchemy-sdk").TransactionReceipt>;
144
- getLogs(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("alchemy-sdk").Log[]>;
138
+ _getBlock(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>, includeTransactions?: boolean | undefined): Promise<import("@ethersproject/abstract-provider").Block | import("@ethersproject/abstract-provider").BlockWithTransactions>;
139
+ getBlock(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>): Promise<import("@ethersproject/abstract-provider").Block>;
140
+ getBlockWithTransactions(blockHashOrBlockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>): Promise<import("@ethersproject/abstract-provider").BlockWithTransactions>;
141
+ getTransaction(transactionHash: string | Promise<string>): Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
142
+ getTransactionReceipt(transactionHash: string | Promise<string>): Promise<import("@ethersproject/abstract-provider").TransactionReceipt>;
143
+ getLogs(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("@ethersproject/abstract-provider").Log[]>;
145
144
  getEtherPrice(): Promise<number>;
146
- _getBlockTag(blockTag: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag>): Promise<import("alchemy-sdk").BlockTag>;
145
+ _getBlockTag(blockTag: import("@ethersproject/abstract-provider").BlockTag | Promise<import("@ethersproject/abstract-provider").BlockTag>): Promise<import("@ethersproject/abstract-provider").BlockTag>;
147
146
  getResolver(name: string): Promise<import("@ethersproject/providers").Resolver | null>;
148
147
  _getResolver(name: string, operation?: string | undefined): Promise<string>;
149
148
  resolveName(name: string | Promise<string>): Promise<string | null>;
150
149
  lookupAddress(address: string | Promise<string>): Promise<string | null>;
151
150
  getAvatar(nameOrAddress: string): Promise<string | null>;
152
- _addEventListener(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener, once: boolean): any;
153
- on(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener): any;
154
- once(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener): any;
155
- emit(eventName: import("alchemy-sdk").EventType, ...args: any[]): boolean;
156
- listenerCount(eventName?: import("alchemy-sdk").EventType | undefined): number;
157
- listeners(eventName?: import("alchemy-sdk").EventType | undefined): import("@ethersproject/abstract-provider").Listener[];
158
- off(eventName: import("alchemy-sdk").EventType, listener?: import("@ethersproject/abstract-provider").Listener | undefined): any;
159
- removeAllListeners(eventName?: import("alchemy-sdk").EventType | undefined): any;
160
- getFeeData(): Promise<import("alchemy-sdk").FeeData>;
161
- addListener(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener): import("@ethersproject/abstract-provider").Provider;
162
- removeListener(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener): import("@ethersproject/abstract-provider").Provider;
151
+ _addEventListener(eventName: import("@ethersproject/abstract-provider").EventType, listener: import("@ethersproject/abstract-provider").Listener, once: boolean): any;
152
+ on(eventName: import("@ethersproject/abstract-provider").EventType, listener: import("@ethersproject/abstract-provider").Listener): any;
153
+ once(eventName: import("@ethersproject/abstract-provider").EventType, listener: import("@ethersproject/abstract-provider").Listener): any;
154
+ emit(eventName: import("@ethersproject/abstract-provider").EventType, ...args: any[]): boolean;
155
+ listenerCount(eventName?: import("@ethersproject/abstract-provider").EventType | undefined): number;
156
+ listeners(eventName?: import("@ethersproject/abstract-provider").EventType | undefined): import("@ethersproject/abstract-provider").Listener[];
157
+ off(eventName: import("@ethersproject/abstract-provider").EventType, listener?: import("@ethersproject/abstract-provider").Listener | undefined): any;
158
+ removeAllListeners(eventName?: import("@ethersproject/abstract-provider").EventType | undefined): any;
159
+ getFeeData(): Promise<import("@ethersproject/abstract-provider").FeeData>;
160
+ addListener(eventName: import("@ethersproject/abstract-provider").EventType, listener: import("@ethersproject/abstract-provider").Listener): import("@ethersproject/abstract-provider").Provider;
161
+ removeListener(eventName: import("@ethersproject/abstract-provider").EventType, listener: import("@ethersproject/abstract-provider").Listener): import("@ethersproject/abstract-provider").Provider;
163
162
  readonly _isProvider: boolean;
164
163
  }>;
165
164
  export declare function getBinanceConnector(params: ConnectorParams, events: ConnectEvents): Promise<import("@ethersproject/providers").JsonRpcProvider>;
166
165
  export declare function getMetamaskConnector(params: ConnectorParams, events: ConnectEvents): Promise<import("@ethersproject/providers").JsonRpcProvider>;
167
166
  export declare function getSocialLoginConnector(params: ConnectorParams, events: ConnectEvents): Promise<import("@ethersproject/providers").JsonRpcProvider>;
168
- export declare function getAlchemyConnector(params: ConnectorParams, events: ConnectEvents): Promise<{
169
- rpcUrl?: string | undefined;
170
- getSigner(): import("@ethersproject/providers").JsonRpcSigner;
171
- disconnect(): Promise<void>;
172
- listAccounts(): Promise<`0x${string}`[]>;
173
- getAddress(): Promise<string>;
174
- readonly connection: import("@ethersproject/web").ConnectionInfo;
175
- _pendingFilter: Promise<number>;
176
- _nextId: number;
177
- _eventLoopCache: Record<string, Promise<any>>;
178
- readonly _cache: Record<string, Promise<any>>;
179
- detectNetwork(): Promise<import("@ethersproject/networks").Network>;
180
- _uncachedDetectNetwork(): Promise<import("@ethersproject/networks").Network>;
181
- getUncheckedSigner(addressOrIndex?: string | number | undefined): {
182
- sendTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("alchemy-sdk").TransactionResponse>;
183
- readonly provider: import("@ethersproject/providers").JsonRpcProvider;
184
- _index: number;
185
- _address: string;
186
- connect(provider: import("@ethersproject/abstract-provider").Provider): import("@ethersproject/providers").JsonRpcSigner;
187
- connectUnchecked(): import("@ethersproject/providers").JsonRpcSigner;
188
- getAddress(): Promise<string>;
189
- sendUncheckedTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<string>;
190
- signTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<string>;
191
- signMessage(message: string | import("ethers").Bytes): Promise<string>;
192
- _legacySignMessage(message: string | import("ethers").Bytes): Promise<string>;
193
- _signTypedData(domain: import("ethers").TypedDataDomain, types: Record<string, import("ethers").TypedDataField[]>, value: Record<string, any>): Promise<string>;
194
- unlock(password: string): Promise<boolean>;
195
- readonly _isSigner: boolean;
196
- getBalance(blockTag?: import("alchemy-sdk").BlockTag | undefined): Promise<import("alchemy-sdk").BigNumber>;
197
- getTransactionCount(blockTag?: import("alchemy-sdk").BlockTag | undefined): Promise<number>;
198
- estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("alchemy-sdk").BigNumber>;
199
- call(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>, blockTag?: import("alchemy-sdk").BlockTag | undefined): Promise<string>;
200
- getChainId(): Promise<number>;
201
- getGasPrice(): Promise<import("alchemy-sdk").BigNumber>;
202
- getFeeData(): Promise<import("alchemy-sdk").FeeData>;
203
- resolveName(name: string): Promise<string>;
204
- checkTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>;
205
- populateTransaction(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("alchemy-sdk").TransactionRequest>;
206
- _checkProvider(operation?: string | undefined): void;
207
- };
208
- send(method: string, params: any[]): Promise<any>;
209
- prepareRequest(method: string, params: any): [string, any[]];
210
- perform(method: string, params: any): Promise<any>;
211
- _startEvent(event: import("@ethersproject/providers/lib/base-provider").Event): void;
212
- _startPending(): void;
213
- _stopEvent(event: import("@ethersproject/providers/lib/base-provider").Event): void;
214
- _networkPromise: Promise<import("@ethersproject/networks").Network>;
215
- _network: import("@ethersproject/networks").Network;
216
- _events: import("@ethersproject/providers/lib/base-provider").Event[];
217
- formatter: import("@ethersproject/providers").Formatter;
218
- _emitted: {
219
- [eventName: string]: number | "pending";
220
- };
221
- _pollingInterval: number;
222
- _poller: NodeJS.Timer;
223
- _bootstrapPoll: NodeJS.Timer;
224
- _lastBlockNumber: number;
225
- _maxFilterBlockRange: number;
226
- _fastBlockNumber: number;
227
- _fastBlockNumberPromise: Promise<number>;
228
- _fastQueryDate: number;
229
- _maxInternalBlockNumber: number;
230
- _internalBlockNumber: Promise<{
231
- blockNumber: number;
232
- reqTime: number;
233
- respTime: number;
234
- }>;
235
- readonly anyNetwork: boolean;
236
- disableCcipRead: boolean;
237
- _ready(): Promise<import("@ethersproject/networks").Network>;
238
- readonly ready: Promise<import("@ethersproject/networks").Network>;
239
- ccipReadFetch(tx: import("ethers").Transaction, calldata: string, urls: string[]): Promise<string | null>;
240
- _getInternalBlockNumber(maxAge: number): Promise<number>;
241
- poll(): Promise<void>;
242
- resetEventsBlock(blockNumber: number): void;
243
- readonly network: import("@ethersproject/networks").Network;
244
- getNetwork(): Promise<import("@ethersproject/networks").Network>;
245
- readonly blockNumber: number;
246
- polling: boolean;
247
- pollingInterval: number;
248
- _getFastBlockNumber(): Promise<number>;
249
- _setFastBlockNumber(blockNumber: number): void;
250
- waitForTransaction(transactionHash: string, confirmations?: number | undefined, timeout?: number | undefined): Promise<import("alchemy-sdk").TransactionReceipt>;
251
- _waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: {
252
- data: string;
253
- from: string;
254
- nonce: number;
255
- to: string;
256
- value: import("alchemy-sdk").BigNumber;
257
- startBlock: number;
258
- }): Promise<import("alchemy-sdk").TransactionReceipt>;
259
- getBlockNumber(): Promise<number>;
260
- getGasPrice(): Promise<import("alchemy-sdk").BigNumber>;
261
- getBalance(addressOrName: string | Promise<string>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<import("alchemy-sdk").BigNumber>;
262
- getTransactionCount(addressOrName: string | Promise<string>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<number>;
263
- getCode(addressOrName: string | Promise<string>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<string>;
264
- getStorageAt(addressOrName: string | Promise<string>, position: import("alchemy-sdk").BigNumberish | Promise<import("alchemy-sdk").BigNumberish>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<string>;
265
- _wrapTransaction(tx: import("ethers").Transaction, hash?: string | undefined, startBlock?: number | undefined): import("alchemy-sdk").TransactionResponse;
266
- sendTransaction(signedTransaction: string | Promise<string>): Promise<import("alchemy-sdk").TransactionResponse>;
267
- _getTransactionRequest(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("ethers").Transaction>;
268
- _getFilter(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>;
269
- _call(transaction: import("alchemy-sdk").TransactionRequest, blockTag: import("alchemy-sdk").BlockTag, attempt: number): Promise<string>;
270
- call(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>, blockTag?: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag> | undefined): Promise<string>;
271
- estimateGas(transaction: import("@ethersproject/properties").Deferrable<import("alchemy-sdk").TransactionRequest>): Promise<import("alchemy-sdk").BigNumber>;
272
- _getAddress(addressOrName: string | Promise<string>): Promise<string>;
273
- _getBlock(blockHashOrBlockTag: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag>, includeTransactions?: boolean | undefined): Promise<import("alchemy-sdk").Block | import("alchemy-sdk").BlockWithTransactions>;
274
- getBlock(blockHashOrBlockTag: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag>): Promise<import("alchemy-sdk").Block>;
275
- getBlockWithTransactions(blockHashOrBlockTag: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag>): Promise<import("alchemy-sdk").BlockWithTransactions>;
276
- getTransaction(transactionHash: string | Promise<string>): Promise<import("alchemy-sdk").TransactionResponse>;
277
- getTransactionReceipt(transactionHash: string | Promise<string>): Promise<import("alchemy-sdk").TransactionReceipt>;
278
- getLogs(filter: import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash | Promise<import("@ethersproject/abstract-provider").Filter | import("@ethersproject/abstract-provider").FilterByBlockHash>): Promise<import("alchemy-sdk").Log[]>;
279
- getEtherPrice(): Promise<number>;
280
- _getBlockTag(blockTag: import("alchemy-sdk").BlockTag | Promise<import("alchemy-sdk").BlockTag>): Promise<import("alchemy-sdk").BlockTag>;
281
- getResolver(name: string): Promise<import("@ethersproject/providers").Resolver | null>;
282
- _getResolver(name: string, operation?: string | undefined): Promise<string>;
283
- resolveName(name: string | Promise<string>): Promise<string | null>;
284
- lookupAddress(address: string | Promise<string>): Promise<string | null>;
285
- getAvatar(nameOrAddress: string): Promise<string | null>;
286
- _addEventListener(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener, once: boolean): any;
287
- on(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener): any;
288
- once(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener): any;
289
- emit(eventName: import("alchemy-sdk").EventType, ...args: any[]): boolean;
290
- listenerCount(eventName?: import("alchemy-sdk").EventType | undefined): number;
291
- listeners(eventName?: import("alchemy-sdk").EventType | undefined): import("@ethersproject/abstract-provider").Listener[];
292
- off(eventName: import("alchemy-sdk").EventType, listener?: import("@ethersproject/abstract-provider").Listener | undefined): any;
293
- removeAllListeners(eventName?: import("alchemy-sdk").EventType | undefined): any;
294
- getFeeData(): Promise<import("alchemy-sdk").FeeData>;
295
- addListener(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener): import("@ethersproject/abstract-provider").Provider;
296
- removeListener(eventName: import("alchemy-sdk").EventType, listener: import("@ethersproject/abstract-provider").Listener): import("@ethersproject/abstract-provider").Provider;
297
- readonly _isProvider: boolean;
298
- }>;
@@ -13,7 +13,7 @@ interface AddChainParameter {
13
13
  iconUrls?: string[];
14
14
  }
15
15
  interface AddEthereumChainParameter {
16
- chainId: '0x1' | '0x4' | '0x5' | '0x45' | '0x1c' | '0x61' | '0xaa36a7';
16
+ chainId: '0x1' | '0x4' | '0x5' | '0x45' | '0x1c' | '0x61';
17
17
  }
18
18
  export interface RegisterNetworkWithMetamaskParams {
19
19
  addChainDirectly?: boolean;