@dodoex/wallet-web3 0.0.22-2 → 0.0.22-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__node-resolve_empty-8632adc3.js +1 -0
- package/dist/__tslib-6ff4d83f.js +1 -0
- package/dist/blocto-532eeb3b.js +7 -0
- package/dist/bn-d8b2aa48.js +1 -0
- package/dist/browser-ponyfill-17a49e59.js +1 -0
- package/dist/cjs/__node-resolve_empty-e6311036.cjs +1 -0
- package/dist/cjs/__tslib-b9bb49bb.cjs +1 -0
- package/dist/cjs/blocto-dc83ab21.cjs +7 -0
- package/dist/cjs/bn-2f18fb63.cjs +1 -0
- package/dist/cjs/browser-ponyfill-4411ec49.cjs +1 -0
- package/dist/cjs/ethers-bc02633f.cjs +1 -0
- package/dist/cjs/id-4255a5f8.cjs +1 -0
- package/dist/cjs/{index-4585c950.cjs → index-0ec82476.cjs} +1 -1
- package/dist/cjs/{index-f2c04d55.cjs → index-165c948d.cjs} +1 -1
- package/dist/cjs/index-217a1036.cjs +46 -0
- package/dist/cjs/{index-4abb9db3.cjs → index-27942063.cjs} +1 -1
- package/dist/cjs/index-3e255821.cjs +1 -0
- package/dist/cjs/index-4e5d1d8d.cjs +1 -0
- package/dist/cjs/index-4f2d1da0.cjs +15 -0
- package/dist/cjs/index-5672be01.cjs +1 -0
- package/dist/cjs/index-8e209085.cjs +10 -0
- package/dist/cjs/{index-5d7b94fd.cjs → index-979d2927.cjs} +1 -1
- package/dist/cjs/index-cf3bf3b5.cjs +3 -0
- package/dist/cjs/{index-3d1a3da9.cjs → index-df8e5839.cjs} +1 -1
- package/dist/cjs/index-eb09e54d.cjs +60 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.es-fa952979.cjs +9 -0
- package/dist/cjs/{interface-1b54eefa.cjs → interface-c0ab0ac8.cjs} +1 -1
- package/dist/cjs/portis-c69e492c.cjs +24 -0
- package/dist/cjs/{provider-403219c9.cjs → provider-692e5c89.cjs} +1 -1
- package/dist/cjs/rainbow-d0f3ec18.cjs +1 -0
- package/dist/cjs/uAuth-43d34532.cjs +1 -0
- package/dist/cjs/walletConnect-c0e36fea.cjs +1 -0
- package/dist/cjs/walletLink-7b9716e2.cjs +1 -0
- package/dist/ethers-7757efa9.js +1 -0
- package/dist/id-8c638e81.js +1 -0
- package/dist/index-0ee5ef8d.js +60 -0
- package/dist/index-30664326.js +10 -0
- package/dist/index-40f05896.js +15 -0
- package/dist/index-4e992427.js +1 -0
- package/dist/index-5a901c0e.js +2 -0
- package/dist/{index-650785ec.js → index-77db3261.js} +1 -1
- package/dist/{index-de37f6bb.js → index-82bd9877.js} +1 -1
- package/dist/index-89309b1f.js +1 -0
- package/dist/index-b54cb21d.js +46 -0
- package/dist/{index-235259d8.js → index-bab1214b.js} +1 -1
- package/dist/index-c2c42137.js +1 -0
- package/dist/index-c8690ee6.js +1 -0
- package/dist/{index-5f9e8321.js → index-e0d3617a.js} +1 -1
- package/dist/index.es-571d50ca.js +9 -0
- package/dist/index.js +1 -1
- package/dist/{interface-f97a878a.js → interface-2082dd3f.js} +1 -1
- package/dist/portis-fb908c06.js +24 -0
- package/dist/{provider-453e2483.js → provider-6caed3b7.js} +1 -1
- package/dist/rainbow-98eb30ca.js +1 -0
- package/dist/uAuth-034cff41.js +1 -0
- package/dist/walletConnect-2c923830.js +1 -0
- package/dist/walletLink-d4240be5.js +1 -0
- package/package.json +1 -1
- package/dist/__tslib-dd22ed7d.js +0 -1
- package/dist/blocto-69a506f8.js +0 -1
- package/dist/bn-3e892825.js +0 -1
- package/dist/cjs/__tslib-8344f379.cjs +0 -1
- package/dist/cjs/blocto-bdab3cea.cjs +0 -1
- package/dist/cjs/bn-ce9dbccd.cjs +0 -1
- package/dist/cjs/ethers-767c2337.cjs +0 -1
- package/dist/cjs/id-6c4d97dd.cjs +0 -1
- package/dist/cjs/index-2428f0a6.cjs +0 -1
- package/dist/cjs/index-659dc842.cjs +0 -61
- package/dist/cjs/index-67e59d1a.cjs +0 -1
- package/dist/cjs/index-795ad993.cjs +0 -46
- package/dist/cjs/index-a5fa1e6e.cjs +0 -15
- package/dist/cjs/index-aa04e7a3.cjs +0 -1
- package/dist/cjs/index-cfe3e391.cjs +0 -10
- package/dist/cjs/index-d226aab9.cjs +0 -8
- package/dist/cjs/index-e875b498.cjs +0 -1
- package/dist/cjs/index.es-a3704620.cjs +0 -9
- package/dist/cjs/node-ponyfill-a7a0b431.cjs +0 -1
- package/dist/cjs/portis-ec0ce54d.cjs +0 -1
- package/dist/cjs/rainbow-caa66e39.cjs +0 -1
- package/dist/cjs/uAuth-a2d2617a.cjs +0 -1
- package/dist/cjs/walletConnect-c57b3b5d.cjs +0 -1
- package/dist/cjs/walletLink-f0f9e2a7.cjs +0 -3
- package/dist/ethers-51e19435.js +0 -1
- package/dist/id-830e09aa.js +0 -1
- package/dist/index-3158e93a.js +0 -46
- package/dist/index-46c2059e.js +0 -1
- package/dist/index-5091218e.js +0 -1
- package/dist/index-6bf494b0.js +0 -1
- package/dist/index-80483be2.js +0 -8
- package/dist/index-82b4fd64.js +0 -60
- package/dist/index-88837567.js +0 -1
- package/dist/index-c699a924.js +0 -1
- package/dist/index-cc453bb1.js +0 -10
- package/dist/index-f3052552.js +0 -15
- package/dist/index.es-877101c5.js +0 -9
- package/dist/node-ponyfill-55b945e1.js +0 -1
- package/dist/portis-7d46b7ed.js +0 -1
- package/dist/rainbow-61a52379.js +0 -1
- package/dist/uAuth-40d8acab.js +0 -1
- package/dist/walletConnect-d6a9aa67.js +0 -1
- package/dist/walletLink-106461e6.js +0 -3
- /package/dist/cjs/{index-47f3e61d.cjs → index-70269942.cjs} +0 -0
- /package/dist/{index-0103e089.js → index-6be6f872.js} +0 -0
package/dist/index-46c2059e.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as a}from"./index-cc453bb1.js";import{C as r,E as e,a as s,F as t,b as o,P as n,c,A as i,d as m,I as f,f as p,e as F,L as d,T as g}from"./interface-f97a878a.js";var b=a(Object.freeze({__proto__:null,ConstructorFragment:r,ErrorFragment:e,EventFragment:s,Fragment:t,FunctionFragment:o,ParamType:n,FormatTypes:c,AbiCoder:i,defaultAbiCoder:m,Interface:f,Indexed:p,checkResultErrors:F,LogDescription:d,TransactionDescription:g}));export{b as r};
|
package/dist/index-5091218e.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,g as t,b as s,_ as r,d as n,u as a}from"./index-cc453bb1.js";import{n as o,p as i}from"./node-ponyfill-55b945e1.js";import{e as c,W as d,F as u,l,u as f,w as h,v as p,a as g}from"./ethers-51e19435.js";import{S as m,V as y}from"./index-de37f6bb.js";import*as b from"@ethersproject/providers";import{getDefaultProvider as E}from"@ethersproject/providers";import{BaseContract as v,Contract as w,ContractFactory as _}from"@ethersproject/contracts";import{B as T,E as S}from"./id-830e09aa.js";import*as A from"@ethersproject/constants";import I from"events";import P from"stream";import O from"http";import C from"url";import M from"https";import R from"zlib";import"zustand";import"@ethersproject/address";import"@ethersproject/properties";import"@ethersproject/transactions";import"@ethersproject/bytes";import"punycode";import"./interface-f97a878a.js";import"./index-650785ec.js";import"./index-235259d8.js";var L={},j={},N={},x={},B={},D={name:"@safe-global/safe-apps-sdk",version:"7.10.1",description:"SDK developed to integrate third-party apps with Safe app.",main:"dist/src/index.js",typings:"dist/src/index.d.ts",_files:["dist/**/*","src/**/*","CHANGELOG.md","README.md"],keywords:["Safe","sdk","apps"],scripts:{test:"jest","format-dist":"sed -i '' 's/\"files\":/\"_files\":/' dist/package.json",build:"yarn rimraf dist && tsc && yarn format-dist"},author:"Safe (https://safe.global)",license:"MIT",dependencies:{"@safe-global/safe-gateway-typescript-sdk":"^3.5.3",ethers:"^5.7.2"},devDependencies:{rimraf:"^3.0.2"},repository:{type:"git",url:"git+https://github.com/safe-global/safe-apps-sdk.git"},bugs:{url:"https://github.com/safe-global/safe-apps-sdk/issues"},homepage:"https://github.com/safe-global/safe-apps-sdk#readme",publishConfig:{access:"public"}},k=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(B,"__esModule",{value:!0}),B.getSDKVersion=void 0;const H=k(D);B.getSDKVersion=()=>H.default.version.split("-")[0];var U={};Object.defineProperty(U,"__esModule",{value:!0}),U.generateRequestId=void 0;const $=e=>e.toString(16).padStart(2,"0");U.generateRequestId=()=>"undefined"!=typeof window?(e=>{const t=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(t),Array.from(t,$).join("")})(10):(new Date).getTime().toString(36),Object.defineProperty(x,"__esModule",{value:!0}),x.MessageFormatter=void 0;const q=B,G=U;class F{}x.MessageFormatter=F,F.makeRequest=(e,t)=>({id:(0,G.generateRequestId)(),method:e,params:t,env:{sdkVersion:(0,q.getSDKVersion)()}}),F.makeResponse=(e,t,s)=>({id:e,success:!0,version:s,data:t}),F.makeErrorResponse=(e,t,s)=>({id:e,success:!1,error:t,version:s});var V,W,z={};V=z,Object.defineProperty(V,"__esModule",{value:!0}),V.RestrictedMethods=V.Methods=void 0,(W=V.Methods||(V.Methods={})).sendTransactions="sendTransactions",W.rpcCall="rpcCall",W.getChainInfo="getChainInfo",W.getSafeInfo="getSafeInfo",W.getTxBySafeTxHash="getTxBySafeTxHash",W.getSafeBalances="getSafeBalances",W.signMessage="signMessage",W.signTypedMessage="signTypedMessage",W.getEnvironmentInfo="getEnvironmentInfo",W.getOffChainSignature="getOffChainSignature",W.requestAddressBook="requestAddressBook",W.wallet_getPermissions="wallet_getPermissions",W.wallet_requestPermissions="wallet_requestPermissions",(V.RestrictedMethods||(V.RestrictedMethods={})).requestAddressBook="requestAddressBook",function(t){var s=e&&e.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var n=Object.getOwnPropertyDescriptor(t,s);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,n)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),r=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0});const n=x;t.default=class{constructor(e=null,t=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer="undefined"==typeof window,this.isValidMessage=({origin:e,data:t,source:s})=>{const r=!t,n=!this.isServer&&s===window.parent,a=(void 0!==t.version&&parseInt(t.version.split(".")[0]))>=1;let o=!0;return Array.isArray(this.allowedOrigins)&&(o=void 0!==this.allowedOrigins.find((t=>t.test(e)))),!r&&n&&a&&o},this.logIncomingMessage=e=>{console.info(`Safe Apps SDK v1: A message was received from origin ${e.origin}. `,e.data)},this.onParentMessage=e=>{this.isValidMessage(e)&&(this.debugMode&&this.logIncomingMessage(e),this.handleIncomingMessage(e.data))},this.handleIncomingMessage=e=>{const{id:t}=e,s=this.callbacks.get(t);s&&(s(e),this.callbacks.delete(t))},this.send=(e,t)=>{const s=n.MessageFormatter.makeRequest(e,t);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(s,"*"),new Promise(((e,t)=>{this.callbacks.set(s.id,(s=>{s.success?e(s):t(new Error(s.error))}))}))},this.allowedOrigins=e,this.debugMode=t,this.isServer||window.addEventListener("message",this.onParentMessage)}},r(z,t)}(N);var K={},Y={},Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.isObjectEIP712TypedData=void 0;Q.isObjectEIP712TypedData=e=>"object"==typeof e&&null!=e&&"domain"in e&&"types"in e&&"message"in e;var X={};Object.defineProperty(X,"__esModule",{value:!0});var J={},Z={},ee={},te={},se=e&&e.__awaiter||function(e,t,s,r){return new(s||(s=Promise))((function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function i(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,i)}c((r=r.apply(e,t||[])).next())}))},re=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(te,"__esModule",{value:!0}),te.fetchData=te.stringifyQuery=te.insertParams=void 0;const ne=re(o.exports);te.insertParams=function(e,t){return t?Object.keys(t).reduce(((e,s)=>function(e,t,s){return e.replace(new RegExp(`\\{${t}\\}`,"g"),s)}(e,s,String(t[s]))),e):e},te.stringifyQuery=function(e){if(!e)return"";const t=new URLSearchParams;Object.keys(e).forEach((s=>{null!=e[s]&&t.append(s,String(e[s]))}));const s=t.toString();return s?`?${s}`:""},te.fetchData=function(e,t){return se(this,void 0,void 0,(function*(){let s;null!=t&&(s={method:"POST",body:"string"==typeof t?t:JSON.stringify(t),headers:{"Content-Type":"application/json"}});const r=yield(0,ne.default)(e,s);let n;try{n=yield r.json()}catch(e){if(r.headers&&"0"!==r.headers.get("content-length"))throw new Error(`Invalid response content: ${r.statusText}`)}if(!r.ok){const e="object"==typeof(a=n)&&null!==a&&"code"in a&&"message"in a?`${n.code}: ${n.message}`:r.statusText;throw new Error(e)}var a;return n}))},Object.defineProperty(ee,"__esModule",{value:!0}),ee.getEndpoint=ee.postEndpoint=void 0;const ae=te;function oe(e,t,s,r){return`${e}${(0,ae.insertParams)(t,s)}${(0,ae.stringifyQuery)(r)}`}ee.postEndpoint=function(e,t,s){const r=oe(e,t,null==s?void 0:s.path,null==s?void 0:s.query);return(0,ae.fetchData)(r,null==s?void 0:s.body)},ee.getEndpoint=function(e,t,s,r){if(r)return(0,ae.fetchData)(r);const n=oe(e,t,null==s?void 0:s.path,null==s?void 0:s.query);return(0,ae.fetchData)(n)};var ie={};Object.defineProperty(ie,"__esModule",{value:!0}),ie.DEFAULT_BASE_URL=void 0,ie.DEFAULT_BASE_URL="https://safe-client.safe.global";var ce={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationVersionState=void 0,(t=e.ImplementationVersionState||(e.ImplementationVersionState={})).UP_TO_DATE="UP_TO_DATE",t.OUTDATED="OUTDATED",t.UNKNOWN="UNKNOWN"}(ce);var de={};!function(e){var t,s;Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppSocialPlatforms=e.SafeAppFeatures=e.SafeAppAccessPolicyTypes=void 0,(t=e.SafeAppAccessPolicyTypes||(e.SafeAppAccessPolicyTypes={})).NoRestrictions="NO_RESTRICTIONS",t.DomainAllowlist="DOMAIN_ALLOWLIST",(e.SafeAppFeatures||(e.SafeAppFeatures={})).BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS",(s=e.SafeAppSocialPlatforms||(e.SafeAppSocialPlatforms={})).TWITTER="TWITTER",s.GITHUB="GITHUB",s.DISCORD="DISCORD"}(de);var ue={};!function(e){var t,s,r,n,a,o,i,c,d,u;Object.defineProperty(e,"__esModule",{value:!0}),e.LabelValue=e.DetailedExecutionInfoType=e.TransactionListItemType=e.ConflictType=e.TransactionInfoType=e.SettingsInfoType=e.TransactionTokenType=e.TransferDirection=e.TransactionStatus=e.Operation=void 0,(t=e.Operation||(e.Operation={}))[t.CALL=0]="CALL",t[t.DELEGATE=1]="DELEGATE",(s=e.TransactionStatus||(e.TransactionStatus={})).AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",s.AWAITING_EXECUTION="AWAITING_EXECUTION",s.CANCELLED="CANCELLED",s.FAILED="FAILED",s.SUCCESS="SUCCESS",(r=e.TransferDirection||(e.TransferDirection={})).INCOMING="INCOMING",r.OUTGOING="OUTGOING",r.UNKNOWN="UNKNOWN",(n=e.TransactionTokenType||(e.TransactionTokenType={})).ERC20="ERC20",n.ERC721="ERC721",n.NATIVE_COIN="NATIVE_COIN",(a=e.SettingsInfoType||(e.SettingsInfoType={})).SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",a.ADD_OWNER="ADD_OWNER",a.REMOVE_OWNER="REMOVE_OWNER",a.SWAP_OWNER="SWAP_OWNER",a.CHANGE_THRESHOLD="CHANGE_THRESHOLD",a.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",a.ENABLE_MODULE="ENABLE_MODULE",a.DISABLE_MODULE="DISABLE_MODULE",a.SET_GUARD="SET_GUARD",a.DELETE_GUARD="DELETE_GUARD",(o=e.TransactionInfoType||(e.TransactionInfoType={})).TRANSFER="Transfer",o.SETTINGS_CHANGE="SettingsChange",o.CUSTOM="Custom",o.CREATION="Creation",(i=e.ConflictType||(e.ConflictType={})).NONE="None",i.HAS_NEXT="HasNext",i.END="End",(c=e.TransactionListItemType||(e.TransactionListItemType={})).TRANSACTION="TRANSACTION",c.LABEL="LABEL",c.CONFLICT_HEADER="CONFLICT_HEADER",c.DATE_LABEL="DATE_LABEL",(d=e.DetailedExecutionInfoType||(e.DetailedExecutionInfoType={})).MULTISIG="MULTISIG",d.MODULE="MODULE",(u=e.LabelValue||(e.LabelValue={})).Queued="Queued",u.Next="Next"}(ue);var le={};!function(e){var t,s,r;Object.defineProperty(e,"__esModule",{value:!0}),e.FEATURES=e.GAS_PRICE_TYPE=e.RPC_AUTHENTICATION=void 0,(t=e.RPC_AUTHENTICATION||(e.RPC_AUTHENTICATION={})).API_KEY_PATH="API_KEY_PATH",t.NO_AUTHENTICATION="NO_AUTHENTICATION",t.UNKNOWN="UNKNOWN",(s=e.GAS_PRICE_TYPE||(e.GAS_PRICE_TYPE={})).ORACLE="ORACLE",s.FIXED="FIXED",s.UNKNOWN="UNKNOWN",(r=e.FEATURES||(e.FEATURES={})).ERC721="ERC721",r.SAFE_APPS="SAFE_APPS",r.CONTRACT_INTERACTION="CONTRACT_INTERACTION",r.DOMAIN_LOOKUP="DOMAIN_LOOKUP",r.SPENDING_LIMIT="SPENDING_LIMIT",r.EIP1559="EIP1559",r.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL",r.TX_SIMULATION="TX_SIMULATION",r.EIP1271="EIP1271"}(le);var fe={};!function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TokenType=void 0,(t=e.TokenType||(e.TokenType={})).ERC20="ERC20",t.ERC721="ERC721",t.NATIVE_TOKEN="NATIVE_TOKEN"}(fe);var he={};Object.defineProperty(he,"__esModule",{value:!0});var pe={};Object.defineProperty(pe,"__esModule",{value:!0});var ge={};!function(e){var t,s;Object.defineProperty(e,"__esModule",{value:!0}),e.SafeMessageStatus=e.SafeMessageListItemType=void 0,(t=e.SafeMessageListItemType||(e.SafeMessageListItemType={})).DATE_LABEL="DATE_LABEL",t.MESSAGE="MESSAGE",(s=e.SafeMessageStatus||(e.SafeMessageStatus={})).NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",s.CONFIRMED="CONFIRMED"}(ge),function(t){var s=e&&e.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var n=Object.getOwnPropertyDescriptor(t,s);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,n)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),r=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.confirmSafeMessage=t.proposeSafeMessage=t.getSafeMessage=t.getSafeMessages=t.getDecodedData=t.getMasterCopies=t.getSafeApps=t.getChainConfig=t.getChainsConfig=t.proposeTransaction=t.postSafeGasEstimation=t.getTransactionDetails=t.getTransactionQueue=t.getTransactionHistory=t.getCollectiblesPage=t.getCollectibles=t.getOwnedSafes=t.getFiatCurrencies=t.getBalances=t.getMultisigTransactions=t.getModuleTransactions=t.getIncomingTransfers=t.getSafeInfo=t.setBaseUrl=void 0;const n=ee,a=ie;r(ce,t),r(de,t),r(ue,t),r(le,t),r(fe,t),r(he,t),r(pe,t),r(ge,t);let o=a.DEFAULT_BASE_URL;t.setBaseUrl=e=>{o=e},t.getSafeInfo=function(e,t){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:e,address:t}})},t.getIncomingTransfers=function(e,t,s,r){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/incoming-transfers/",{path:{chainId:e,address:t},query:s},r)},t.getModuleTransactions=function(e,t,s,r){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/module-transactions/",{path:{chainId:e,address:t},query:s},r)},t.getMultisigTransactions=function(e,t,s,r){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/multisig-transactions/",{path:{chainId:e,address:t},query:s},r)},t.getBalances=function(e,t,s="usd",r={}){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:e,address:t,currency:s},query:r})},t.getFiatCurrencies=function(){return(0,n.getEndpoint)(o,"/v1/balances/supported-fiat-codes")},t.getOwnedSafes=function(e,t){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:e,address:t}})},t.getCollectibles=function(e,t,s={}){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:e,address:t},query:s})},t.getCollectiblesPage=function(e,t,s={},r){return(0,n.getEndpoint)(o,"/v2/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:e,address:t},query:s},r)},t.getTransactionHistory=function(e,t,s){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:e,safe_address:t},query:{}},s)},t.getTransactionQueue=function(e,t,s,r){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:e,safe_address:t},query:{trusted:r}},s)},t.getTransactionDetails=function(e,t){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:e,transactionId:t}})},t.postSafeGasEstimation=function(e,t,s){return(0,n.postEndpoint)(o,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:e,safe_address:t},body:s})},t.proposeTransaction=function(e,t,s){return(0,n.postEndpoint)(o,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:e,safe_address:t},body:s})},t.getChainsConfig=function(e){return(0,n.getEndpoint)(o,"/v1/chains",{query:e})},t.getChainConfig=function(e){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}",{path:{chainId:e}})},t.getSafeApps=function(e,t={}){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safe-apps",{path:{chainId:e},query:t})},t.getMasterCopies=function(e){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:e}})},t.getDecodedData=function(e,t){return(0,n.postEndpoint)(o,"/v1/chains/{chainId}/data-decoder",{path:{chainId:e},body:{data:t}})},t.getSafeMessages=function(e,t,s){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:e,safe_address:t},query:{}},s)},t.getSafeMessage=function(e,t){return(0,n.getEndpoint)(o,"/v1/chains/{chainId}/messages/{message_hash}",{path:{chainId:e,message_hash:t}})},t.proposeSafeMessage=function(e,t,s){return(0,n.postEndpoint)(o,"/v1/chains/{chainId}/safes/{safe_address}/messages",{path:{chainId:e,safe_address:t},body:s})},t.confirmSafeMessage=function(e,t,s){return(0,n.postEndpoint)(o,"/v1/chains/{chainId}/messages/{message_hash}/signatures",{path:{chainId:e,message_hash:t},body:s})}}(Z),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransferDirection=e.TransactionStatus=e.TokenType=e.Operation=void 0;var t=Z;Object.defineProperty(e,"Operation",{enumerable:!0,get:function(){return t.Operation}}),Object.defineProperty(e,"TokenType",{enumerable:!0,get:function(){return t.TokenType}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return t.TransactionStatus}}),Object.defineProperty(e,"TransferDirection",{enumerable:!0,get:function(){return t.TransferDirection}})}(J);var me={};Object.defineProperty(me,"__esModule",{value:!0}),function(t){var s=e&&e.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var n=Object.getOwnPropertyDescriptor(t,s);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,n)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),r=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),r(Q,t),r(X,t),r(J,t),r(me,t)}(Y),Object.defineProperty(K,"__esModule",{value:!0}),K.TXs=void 0;const ye=z,be=Y;K.TXs=class{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw new Error("Invalid safeTxHash");return(await this.communicator.send(ye.Methods.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){const t={message:e};return(await this.communicator.send(ye.Methods.signMessage,t)).data}async signTypedMessage(e){if(!(0,be.isObjectEIP712TypedData)(e))throw new Error("Invalid typed data");return(await this.communicator.send(ye.Methods.signTypedMessage,{typedData:e})).data}async send({txs:e,params:t}){if(!e||!e.length)throw new Error("No transactions were passed");const s={txs:e,params:t};return(await this.communicator.send(ye.Methods.sendTransactions,s)).data}};var Ee={},ve={};Object.defineProperty(ve,"__esModule",{value:!0}),ve.RPC_CALLS=void 0,ve.RPC_CALLS={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"},Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.Eth=void 0;const we=ve,_e=z,Te={defaultBlockParam:(e="latest")=>e,returnFullTxObjectParam:(e=!1)=>e,blockNumberToHex:e=>Number.isInteger(e)?`0x${e.toString(16)}`:e};Ee.Eth=class{constructor(e){this.communicator=e,this.call=this.buildRequest({call:we.RPC_CALLS.eth_call,formatters:[null,Te.defaultBlockParam]}),this.getBalance=this.buildRequest({call:we.RPC_CALLS.eth_getBalance,formatters:[null,Te.defaultBlockParam]}),this.getCode=this.buildRequest({call:we.RPC_CALLS.eth_getCode,formatters:[null,Te.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:we.RPC_CALLS.eth_getStorageAt,formatters:[null,Te.blockNumberToHex,Te.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:we.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:we.RPC_CALLS.eth_getBlockByHash,formatters:[null,Te.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:we.RPC_CALLS.eth_getBlockByNumber,formatters:[Te.blockNumberToHex,Te.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:we.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:we.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:we.RPC_CALLS.eth_getTransactionCount,formatters:[null,Te.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:we.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=e=>this.buildRequest({call:we.RPC_CALLS.eth_estimateGas})([e]),this.setSafeSettings=this.buildRequest({call:we.RPC_CALLS.safe_setSettings})}buildRequest(e){const{call:t,formatters:s}=e;return async e=>{s&&Array.isArray(e)&&s.forEach(((t,s)=>{t&&(e[s]=t(e[s]))}));const r={call:t,params:e||[]};return(await this.communicator.send(_e.Methods.rpcCall,r)).data}}};var Se={};try{const e=window;null==e._ethers&&(e._ethers=c)}catch(e){}var Ae=t(Object.freeze({__proto__:null,ethers:c,Signer:m,Wallet:d,VoidSigner:y,getDefaultProvider:E,providers:b,BaseContract:v,Contract:w,ContractFactory:_,BigNumber:T,FixedNumber:u,constants:A,get errors(){return S},logger:l,utils:f,wordlists:h,version:p,Wordlist:g})),Ie={};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.MAGIC_VALUE_BYTES=Ie.MAGIC_VALUE=Ie.EIP_1271_BYTES_INTERFACE=Ie.EIP_1271_INTERFACE=void 0;const Pe=Ae;Ie.MAGIC_VALUE="0x1626ba7e";Ie.MAGIC_VALUE_BYTES="0x20c13b0b";const Oe=new Pe.ethers.utils.Interface(["function isValidSignature(bytes32 _dataHash, bytes calldata _signature) external view"]);Ie.EIP_1271_INTERFACE=Oe;const Ce=new Pe.ethers.utils.Interface(["function isValidSignature(bytes calldata _data, bytes calldata _signature) public view"]);Ie.EIP_1271_BYTES_INTERFACE=Ce;var Me={},Re={},Le={};Object.defineProperty(Le,"__esModule",{value:!0}),Le.PermissionsError=Le.PERMISSIONS_REQUEST_REJECTED=void 0,Le.PERMISSIONS_REQUEST_REJECTED=4001;class je extends Error{constructor(e,t,s){super(e),this.code=t,this.data=s,Object.setPrototypeOf(this,je.prototype)}}Le.PermissionsError=je,Object.defineProperty(Re,"__esModule",{value:!0}),Re.Wallet=void 0;const Ne=z,xe=Le;Re.Wallet=class{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(Ne.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new xe.PermissionsError("Permissions request is invalid",xe.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(Ne.Methods.wallet_requestPermissions,e)).data}catch(e){throw new xe.PermissionsError("Permissions rejected",xe.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(e){return e.every((e=>"object"==typeof e&&Object.keys(e).every((e=>!!Object.values(Ne.RestrictedMethods).includes(e)))))}},Object.defineProperty(Me,"__esModule",{value:!0});const Be=Re,De=Le,ke=(e,t)=>t.some((t=>t.parentCapability===e));Me.default=()=>(e,t,s)=>{const r=s.value;return s.value=async function(){const e=new Be.Wallet(this.communicator);let s=await e.getPermissions();if(ke(t,s)||(s=await e.requestPermissions([{[t]:{}}])),!ke(t,s))throw new De.PermissionsError("Permissions rejected",De.PERMISSIONS_REQUEST_REJECTED);return r.apply(this)},s};var He=e&&e.__decorate||function(e,t,s,r){var n,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,s):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,s,r);else for(var i=e.length-1;i>=0;i--)(n=e[i])&&(o=(a<3?n(o):a>3?n(t,s,o):n(t,s))||o);return a>3&&o&&Object.defineProperty(t,s,o),o},Ue=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.Safe=void 0;const $e=Ae,qe=Ie,Ge=z,Fe=ve,Ve=Y,We=Ue(Me);class ze{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(Ge.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(Ge.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(Ge.Methods.getSafeBalances,{currency:e})).data}async check1271Signature(e,t="0x"){const s=await this.getInfo(),r=qe.EIP_1271_INTERFACE.encodeFunctionData("isValidSignature",[e,t]),n={call:Fe.RPC_CALLS.eth_call,params:[{to:s.safeAddress,data:r},"latest"]};try{return(await this.communicator.send(Ge.Methods.rpcCall,n)).data.slice(0,10).toLowerCase()===qe.MAGIC_VALUE}catch(e){return!1}}async check1271SignatureBytes(e,t="0x"){const s=await this.getInfo(),r=$e.ethers.utils.arrayify(e),n=qe.EIP_1271_BYTES_INTERFACE.encodeFunctionData("isValidSignature",[r,t]),a={call:Fe.RPC_CALLS.eth_call,params:[{to:s.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(Ge.Methods.rpcCall,a)).data.slice(0,10).toLowerCase()===qe.MAGIC_VALUE_BYTES}catch(e){return!1}}calculateMessageHash(e){return $e.ethers.utils.hashMessage(e)}calculateTypedMessageHash(e){return $e.ethers.utils._TypedDataEncoder.hash(e.domain,e.types,e.message)}async getOffChainSignature(e){return(await this.communicator.send(Ge.Methods.getOffChainSignature,e)).data}async isMessageSigned(e,t="0x"){let s;if("string"==typeof e&&(s=async()=>{const s=this.calculateMessageHash(e);return await this.isMessageHashSigned(s,t)}),(0,Ve.isObjectEIP712TypedData)(e)&&(s=async()=>{const s=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(s,t)}),s){return await s()}throw new Error("Invalid message type")}async isMessageHashSigned(e,t="0x"){const s=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const r of s){if(await r(e,t))return!0}return!1}async getEnvironmentInfo(){return(await this.communicator.send(Ge.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(Ge.Methods.requestAddressBook,void 0)).data}}He([(0,We.default)()],ze.prototype,"requestAddressBook",null),Se.Safe=ze;var Ke=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(j,"__esModule",{value:!0});const Ye=Ke(N),Qe=K,Xe=Ee,Je=Se,Ze=Re;j.default=class{constructor(e={}){const{allowedDomains:t=null,debug:s=!1}=e;this.communicator=new Ye.default(t,s),this.eth=new Xe.Eth(this.communicator),this.txs=new Qe.TXs(this.communicator),this.safe=new Je.Safe(this.communicator),this.wallet=new Ze.Wallet(this.communicator)}},function(t){var s=e&&e.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var n=Object.getOwnPropertyDescriptor(t,s);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,n)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),r=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)},n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0;const a=n(j);t.default=a.default,r(j,t),r(Y,t),r(z,t),r(x,t);var o=B;Object.defineProperty(t,"getSDKVersion",{enumerable:!0,get:function(){return o.getSDKVersion}})}(L);var et=s(L),tt={},st={},rt={};Object.defineProperty(rt,"__esModule",{value:!0}),rt.getLowerCase=void 0,rt.getLowerCase=function(e){return e?e.toLowerCase():e},Object.defineProperty(st,"__esModule",{value:!0}),st.SafeAppProvider=void 0;const nt=I,at=rt;class ot extends nt.EventEmitter{constructor(e,t){super(),this.submittedTxs=new Map,this.safe=e,this.sdk=t}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(e){const{method:t,params:s=[]}=e;switch(t){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return`0x${this.chainId.toString(16)}`;case"personal_sign":{const[e,t]=s;if(this.safe.safeAddress.toLowerCase()!==t.toLowerCase())throw new Error("The address or message hash is invalid");return await this.sdk.txs.signMessage(e),"0x"}case"eth_sign":{const[e,t]=s;if(this.safe.safeAddress.toLowerCase()!==e.toLowerCase()||!t.startsWith("0x"))throw new Error("The address or message hash is invalid");return await this.sdk.txs.signMessage(t),"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[e,t]=s,r="string"==typeof t?JSON.parse(t):t;if(this.safe.safeAddress.toLowerCase()!==e.toLowerCase())throw new Error("The address is invalid");return await this.sdk.txs.signTypedMessage(r),"0x"}case"eth_sendTransaction":const t=Object.assign({value:"0",data:"0x"},s[0]);"string"==typeof t.gas&&t.gas.startsWith("0x")&&(t.gas=parseInt(t.gas,16));const r=await this.sdk.txs.send({txs:[t],params:{safeTxGas:t.gas}});return this.submittedTxs.set(r.safeTxHash,{from:this.safe.safeAddress,hash:r.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:t.data,value:t.value,to:t.to,blockHash:null,blockNumber:null,transactionIndex:null}),r.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,at.getLowerCase)(s[0]),s[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,at.getLowerCase)(s[0]),s[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,at.getLowerCase)(s[0]),s[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,at.getLowerCase)(s[0]),s[1],s[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([s[0],s[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([s[0],s[1]]);case"eth_getTransactionByHash":let n=s[0];try{n=(await this.sdk.txs.getBySafeTxHash(n)).txHash||n}catch(e){}return this.submittedTxs.has(n)?this.submittedTxs.get(n):this.sdk.eth.getTransactionByHash([n]).then((e=>(e&&(e.hash=s[0]),e)));case"eth_getTransactionReceipt":{let e=s[0];try{e=(await this.sdk.txs.getBySafeTxHash(e)).txHash||e}catch(e){}return this.sdk.eth.getTransactionReceipt([e]).then((e=>(e&&(e.transactionHash=s[0]),e)))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(s[0]);case"eth_call":return this.sdk.eth.call([s[0],s[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([s[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(s[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([s[0]]);default:throw Error(`"${e.method}" not implemented`)}}send(e,t){e||t("Undefined request"),this.request(e).then((s=>t(null,{jsonrpc:"2.0",id:e.id,result:s}))).catch((e=>t(e,null)))}}let it,ct;function dt(){return r(this,void 0,void 0,(function*(){return ct||(ct=new et),void 0===it&&(it=yield Promise.race([ct.safe.getInfo(),new Promise((e=>setTimeout(e,200)))])),it}))}function ut(){return r(this,void 0,void 0,(function*(){return!!(yield dt())}))}function lt(e){return r(this,void 0,void 0,(function*(){const t=yield dt();if(!t)throw Error("Could not load Safe information");const s=new tt.SafeAppProvider(t,ct);return s.on("connect",e.connect),s.on("disconnect",e.disconnect),s.on("accountsChanged",e.accountsChanged),s.on("chainChanged",e.chainChanged),s.on("message",e.message),n(s)}))}st.SafeAppProvider=ot,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppProvider=void 0;var t=st;Object.defineProperty(e,"SafeAppProvider",{enumerable:!0,get:function(){return t.SafeAppProvider}})}(tt);var ft={},ht={},pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.getTxServiceBaseUrl=void 0,pt.getTxServiceBaseUrl=function(e){return`${e}/api`};var gt={};const mt=P.Readable,yt=Symbol("buffer"),bt=Symbol("type");class Et{constructor(){this[bt]="";const e=arguments[0],t=arguments[1],s=[];let r=0;if(e){const t=e,n=Number(t.length);for(let e=0;e<n;e++){const n=t[e];let a;a=n instanceof Buffer?n:ArrayBuffer.isView(n)?Buffer.from(n.buffer,n.byteOffset,n.byteLength):n instanceof ArrayBuffer?Buffer.from(n):n instanceof Et?n[yt]:Buffer.from("string"==typeof n?n:String(n)),r+=a.length,s.push(a)}}this[yt]=Buffer.concat(s);let n=t&&void 0!==t.type&&String(t.type).toLowerCase();n&&!/[^\u0020-\u007E]/.test(n)&&(this[bt]=n)}get size(){return this[yt].length}get type(){return this[bt]}text(){return Promise.resolve(this[yt].toString())}arrayBuffer(){const e=this[yt],t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return Promise.resolve(t)}stream(){const e=new mt;return e._read=function(){},e.push(this[yt]),e.push(null),e}toString(){return"[object Blob]"}slice(){const e=this.size,t=arguments[0],s=arguments[1];let r,n;r=void 0===t?0:t<0?Math.max(e+t,0):Math.min(t,e),n=void 0===s?e:s<0?Math.max(e+s,0):Math.min(s,e);const a=Math.max(n-r,0),o=this[yt].slice(r,r+a),i=new Et([],{type:arguments[2]});return i[yt]=o,i}}function vt(e,t,s){Error.call(this,e),this.message=e,this.type=t,s&&(this.code=this.errno=s.code),Error.captureStackTrace(this,this.constructor)}let wt;Object.defineProperties(Et.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(Et.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),vt.prototype=Object.create(Error.prototype),vt.prototype.constructor=vt,vt.prototype.name="FetchError";try{wt=require("encoding").convert}catch(e){}const _t=Symbol("Body internals"),Tt=P.PassThrough;function St(e){var t=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=s.size;let n=void 0===r?0:r;var a=s.timeout;let o=void 0===a?0:a;null==e?e=null:It(e)?e=Buffer.from(e.toString()):Pt(e)||Buffer.isBuffer(e)||("[object ArrayBuffer]"===Object.prototype.toString.call(e)?e=Buffer.from(e):ArrayBuffer.isView(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof P||(e=Buffer.from(String(e)))),this[_t]={body:e,disturbed:!1,error:null},this.size=n,this.timeout=o,e instanceof P&&e.on("error",(function(e){const s="AbortError"===e.name?e:new vt(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[_t].error=s}))}function At(){var e=this;if(this[_t].disturbed)return St.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[_t].disturbed=!0,this[_t].error)return St.Promise.reject(this[_t].error);let t=this.body;if(null===t)return St.Promise.resolve(Buffer.alloc(0));if(Pt(t)&&(t=t.stream()),Buffer.isBuffer(t))return St.Promise.resolve(t);if(!(t instanceof P))return St.Promise.resolve(Buffer.alloc(0));let s=[],r=0,n=!1;return new St.Promise((function(a,o){let i;e.timeout&&(i=setTimeout((function(){n=!0,o(new vt(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)),t.on("error",(function(t){"AbortError"===t.name?(n=!0,o(t)):o(new vt(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))})),t.on("data",(function(t){if(!n&&null!==t){if(e.size&&r+t.length>e.size)return n=!0,void o(new vt(`content size at ${e.url} over limit: ${e.size}`,"max-size"));r+=t.length,s.push(t)}})),t.on("end",(function(){if(!n){clearTimeout(i);try{a(Buffer.concat(s,r))}catch(t){o(new vt(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}}))}))}function It(e){return"object"==typeof e&&"function"==typeof e.append&&"function"==typeof e.delete&&"function"==typeof e.get&&"function"==typeof e.getAll&&"function"==typeof e.has&&"function"==typeof e.set&&("URLSearchParams"===e.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(e)||"function"==typeof e.sort)}function Pt(e){return"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.constructor&&"string"==typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function Ot(e){let t,s,r=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof P&&"function"!=typeof r.getBoundary&&(t=new Tt,s=new Tt,r.pipe(t),r.pipe(s),e[_t].body=t,r=s),r}function Ct(e){return null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":It(e)?"application/x-www-form-urlencoded;charset=UTF-8":Pt(e)?e.type||null:Buffer.isBuffer(e)||"[object ArrayBuffer]"===Object.prototype.toString.call(e)||ArrayBuffer.isView(e)?null:"function"==typeof e.getBoundary?`multipart/form-data;boundary=${e.getBoundary()}`:e instanceof P?null:"text/plain;charset=UTF-8"}function Mt(e){const t=e.body;return null===t?0:Pt(t)?t.size:Buffer.isBuffer(t)?t.length:t&&"function"==typeof t.getLengthSync&&(t._lengthRetrievers&&0==t._lengthRetrievers.length||t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}St.prototype={get body(){return this[_t].body},get bodyUsed(){return this[_t].disturbed},arrayBuffer(){return At.call(this).then((function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}))},blob(){let e=this.headers&&this.headers.get("content-type")||"";return At.call(this).then((function(t){return Object.assign(new Et([],{type:e.toLowerCase()}),{[yt]:t})}))},json(){var e=this;return At.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return St.Promise.reject(new vt(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}}))},text(){return At.call(this).then((function(e){return e.toString()}))},buffer(){return At.call(this)},textConverted(){var e=this;return At.call(this).then((function(t){return function(e,t){if("function"!=typeof wt)throw new Error("The package `encoding` must be installed to use the textConverted() function");const s=t.get("content-type");let r,n,a="utf-8";s&&(r=/charset=([^;]*)/i.exec(s));n=e.slice(0,1024).toString(),!r&&n&&(r=/<meta.+?charset=(['"])(.+?)\1/i.exec(n));!r&&n&&(r=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(n),r||(r=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(n),r&&r.pop()),r&&(r=/charset=(.*)/i.exec(r.pop())));!r&&n&&(r=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(n));r&&(a=r.pop(),"gb2312"!==a&&"gbk"!==a||(a="gb18030"));return wt(e,"UTF-8",a).toString()}(t,e.headers)}))}},Object.defineProperties(St.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),St.mixIn=function(e){for(const t of Object.getOwnPropertyNames(St.prototype))if(!(t in e)){const s=Object.getOwnPropertyDescriptor(St.prototype,t);Object.defineProperty(e,t,s)}},St.Promise=global.Promise;const Rt=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,Lt=/[^\t\x20-\x7e\x80-\xff]/;function jt(e){if(e=`${e}`,Rt.test(e)||""===e)throw new TypeError(`${e} is not a legal HTTP header name`)}function Nt(e){if(e=`${e}`,Lt.test(e))throw new TypeError(`${e} is not a legal HTTP header value`)}function xt(e,t){t=t.toLowerCase();for(const s in e)if(s.toLowerCase()===t)return s}const Bt=Symbol("map");class Dt{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[Bt]=Object.create(null),e instanceof Dt){const t=e.raw(),s=Object.keys(t);for(const e of s)for(const s of t[e])this.append(e,s)}else if(null==e);else{if("object"!=typeof e)throw new TypeError("Provided initializer must be an object");{const t=e[Symbol.iterator];if(null!=t){if("function"!=typeof t)throw new TypeError("Header pairs must be iterable");const s=[];for(const t of e){if("object"!=typeof t||"function"!=typeof t[Symbol.iterator])throw new TypeError("Each header pair must be iterable");s.push(Array.from(t))}for(const e of s){if(2!==e.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(e[0],e[1])}}else for(const t of Object.keys(e)){const s=e[t];this.append(t,s)}}}}get(e){jt(e=`${e}`);const t=xt(this[Bt],e);return void 0===t?null:this[Bt][t].join(", ")}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,s=kt(this),r=0;for(;r<s.length;){var n=s[r];const a=n[0],o=n[1];e.call(t,o,a,this),s=kt(this),r++}}set(e,t){t=`${t}`,jt(e=`${e}`),Nt(t);const s=xt(this[Bt],e);this[Bt][void 0!==s?s:e]=[t]}append(e,t){t=`${t}`,jt(e=`${e}`),Nt(t);const s=xt(this[Bt],e);void 0!==s?this[Bt][s].push(t):this[Bt][e]=[t]}has(e){return jt(e=`${e}`),void 0!==xt(this[Bt],e)}delete(e){jt(e=`${e}`);const t=xt(this[Bt],e);void 0!==t&&delete this[Bt][t]}raw(){return this[Bt]}keys(){return Ut(this,"key")}values(){return Ut(this,"value")}[Symbol.iterator](){return Ut(this,"key+value")}}function kt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(e[Bt]).sort().map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[Bt][t].join(", ")}:function(t){return[t.toLowerCase(),e[Bt][t].join(", ")]})}Dt.prototype.entries=Dt.prototype[Symbol.iterator],Object.defineProperty(Dt.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Dt.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const Ht=Symbol("internal");function Ut(e,t){const s=Object.create($t);return s[Ht]={target:e,kind:t,index:0},s}const $t=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==$t)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[Ht];const t=e.target,s=e.kind,r=e.index,n=kt(t,s);return r>=n.length?{value:void 0,done:!0}:(this[Ht].index=r+1,{value:n[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function qt(e){const t=Object.assign({__proto__:null},e[Bt]),s=xt(e[Bt],"Host");return void 0!==s&&(t[s]=t[s][0]),t}Object.defineProperty($t,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const Gt=Symbol("Response internals"),Ft=O.STATUS_CODES;class Vt{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};St.call(this,e,t);const s=t.status||200,r=new Dt(t.headers);if(null!=e&&!r.has("Content-Type")){const t=Ct(e);t&&r.append("Content-Type",t)}this[Gt]={url:t.url,status:s,statusText:t.statusText||Ft[s],headers:r,counter:t.counter}}get url(){return this[Gt].url||""}get status(){return this[Gt].status}get ok(){return this[Gt].status>=200&&this[Gt].status<300}get redirected(){return this[Gt].counter>0}get statusText(){return this[Gt].statusText}get headers(){return this[Gt].headers}clone(){return new Vt(Ot(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}St.mixIn(Vt.prototype),Object.defineProperties(Vt.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(Vt.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const Wt=Symbol("Request internals"),zt=C.URL||i.URL,Kt=C.parse,Yt=C.format;function Qt(e){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(e)&&(e=new zt(e).toString()),Kt(e)}const Xt="destroy"in P.Readable.prototype;function Jt(e){return"object"==typeof e&&"object"==typeof e[Wt]}class Zt{constructor(e){let t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Jt(e)?t=Qt(e.url):(t=e&&e.href?Qt(e.href):Qt(`${e}`),e={});let r=s.method||e.method||"GET";if(r=r.toUpperCase(),(null!=s.body||Jt(e)&&null!==e.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let n=null!=s.body?s.body:Jt(e)&&null!==e.body?Ot(e):null;St.call(this,n,{timeout:s.timeout||e.timeout||0,size:s.size||e.size||0});const a=new Dt(s.headers||e.headers||{});if(null!=n&&!a.has("Content-Type")){const e=Ct(n);e&&a.append("Content-Type",e)}let o=Jt(e)?e.signal:null;if("signal"in s&&(o=s.signal),null!=o&&!function(e){const t=e&&"object"==typeof e&&Object.getPrototypeOf(e);return!(!t||"AbortSignal"!==t.constructor.name)}(o))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[Wt]={method:r,redirect:s.redirect||e.redirect||"follow",headers:a,parsedURL:t,signal:o},this.follow=void 0!==s.follow?s.follow:void 0!==e.follow?e.follow:20,this.compress=void 0!==s.compress?s.compress:void 0===e.compress||e.compress,this.counter=s.counter||e.counter||0,this.agent=s.agent||e.agent}get method(){return this[Wt].method}get url(){return Yt(this[Wt].parsedURL)}get headers(){return this[Wt].headers}get redirect(){return this[Wt].redirect}get signal(){return this[Wt].signal}clone(){return new Zt(this)}}function es(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}St.mixIn(Zt.prototype),Object.defineProperty(Zt.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Zt.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),es.prototype=Object.create(Error.prototype),es.prototype.constructor=es,es.prototype.name="AbortError";const ts=C.URL||i.URL,ss=P.PassThrough;function rs(e,t){if(!rs.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return St.Promise=rs.Promise,new rs.Promise((function(s,r){const n=new Zt(e,t),a=function(e){const t=e[Wt].parsedURL,s=new Dt(e[Wt].headers);if(s.has("Accept")||s.set("Accept","*/*"),!t.protocol||!t.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&e.body instanceof P.Readable&&!Xt)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let r=null;if(null==e.body&&/^(POST|PUT)$/i.test(e.method)&&(r="0"),null!=e.body){const t=Mt(e);"number"==typeof t&&(r=String(t))}r&&s.set("Content-Length",r),s.has("User-Agent")||s.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),e.compress&&!s.has("Accept-Encoding")&&s.set("Accept-Encoding","gzip,deflate");let n=e.agent;return"function"==typeof n&&(n=n(t)),s.has("Connection")||n||s.set("Connection","close"),Object.assign({},t,{method:e.method,headers:qt(s),agent:n})}(n),o=("https:"===a.protocol?M:O).request,i=n.signal;let c=null;const d=function(){let e=new es("The user aborted a request.");r(e),n.body&&n.body instanceof P.Readable&&ns(n.body,e),c&&c.body&&c.body.emit("error",e)};if(i&&i.aborted)return void d();const u=function(){d(),h()},l=o(a);let f;function h(){l.abort(),i&&i.removeEventListener("abort",u),clearTimeout(f)}i&&i.addEventListener("abort",u),n.timeout&&l.once("socket",(function(e){f=setTimeout((function(){r(new vt(`network timeout at: ${n.url}`,"request-timeout")),h()}),n.timeout)})),l.on("error",(function(e){r(new vt(`request to ${n.url} failed, reason: ${e.message}`,"system",e)),c&&c.body&&ns(c.body,e),h()})),function(e,t){let s;e.on("socket",(function(e){s=e})),e.on("response",(function(e){const r=e.headers;"chunked"!==r["transfer-encoding"]||r["content-length"]||e.once("close",(function(e){if(s.listenerCount("data")>0&&!e){const e=new Error("Premature close");e.code="ERR_STREAM_PREMATURE_CLOSE",t(e)}}))}))}(l,(function(e){i&&i.aborted||c&&c.body&&ns(c.body,e)})),parseInt(process.version.substring(1))<14&&l.on("socket",(function(e){e.addListener("close",(function(t){const s=e.listenerCount("data")>0;if(c&&s&&!t&&(!i||!i.aborted)){const e=new Error("Premature close");e.code="ERR_STREAM_PREMATURE_CLOSE",c.body.emit("error",e)}}))})),l.on("response",(function(e){clearTimeout(f);const t=function(e){const t=new Dt;for(const s of Object.keys(e))if(!Rt.test(s))if(Array.isArray(e[s]))for(const r of e[s])Lt.test(r)||(void 0===t[Bt][s]?t[Bt][s]=[r]:t[Bt][s].push(r));else Lt.test(e[s])||(t[Bt][s]=[e[s]]);return t}(e.headers);if(rs.isRedirect(e.statusCode)){const o=t.get("Location");let i=null;try{i=null===o?null:new ts(o,n.url).toString()}catch(e){if("manual"!==n.redirect)return r(new vt(`uri requested responds with an invalid redirect URL: ${o}`,"invalid-redirect")),void h()}switch(n.redirect){case"error":return r(new vt(`uri requested responds with a redirect, redirect mode is set to error: ${n.url}`,"no-redirect")),void h();case"manual":if(null!==i)try{t.set("Location",i)}catch(e){r(e)}break;case"follow":if(null===i)break;if(n.counter>=n.follow)return r(new vt(`maximum redirect reached at: ${n.url}`,"max-redirect")),void h();const o={headers:new Dt(n.headers),follow:n.follow,counter:n.counter+1,agent:n.agent,compress:n.compress,method:n.method,body:n.body,signal:n.signal,timeout:n.timeout,size:n.size};if(!function(e,t){const s=new ts(t).hostname,r=new ts(e).hostname;return s===r||"."===s[s.length-r.length-1]&&s.endsWith(r)}(n.url,i)||(a=n.url,new ts(i).protocol!==new ts(a).protocol))for(const e of["authorization","www-authenticate","cookie","cookie2"])o.headers.delete(e);return 303!==e.statusCode&&n.body&&null===Mt(n)?(r(new vt("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void h()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==n.method)||(o.method="GET",o.body=void 0,o.headers.delete("content-length")),s(rs(new Zt(i,o))),void h())}}var a;e.once("end",(function(){i&&i.removeEventListener("abort",u)}));let o=e.pipe(new ss);const d={url:n.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:n.size,timeout:n.timeout,counter:n.counter},l=t.get("Content-Encoding");if(!n.compress||"HEAD"===n.method||null===l||204===e.statusCode||304===e.statusCode)return c=new Vt(o,d),void s(c);const p={flush:R.Z_SYNC_FLUSH,finishFlush:R.Z_SYNC_FLUSH};if("gzip"==l||"x-gzip"==l)return o=o.pipe(R.createGunzip(p)),c=new Vt(o,d),void s(c);if("deflate"==l||"x-deflate"==l){const t=e.pipe(new ss);return t.once("data",(function(e){o=8==(15&e[0])?o.pipe(R.createInflate()):o.pipe(R.createInflateRaw()),c=new Vt(o,d),s(c)})),void t.on("end",(function(){c||(c=new Vt(o,d),s(c))}))}if("br"==l&&"function"==typeof R.createBrotliDecompress)return o=o.pipe(R.createBrotliDecompress()),c=new Vt(o,d),void s(c);c=new Vt(o,d),s(c)})),function(e,t){const s=t.body;null===s?e.end():Pt(s)?s.stream().pipe(e):Buffer.isBuffer(s)?(e.write(s),e.end()):s.pipe(e)}(l,n)}))}function ns(e,t){e.destroy?e.destroy(t):(e.emit("error",t),e.end())}rs.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},rs.Promise=global.Promise;var as=t(Object.freeze({__proto__:null,default:rs,Headers:Dt,Request:Zt,Response:Vt,FetchError:vt}));!function(t){var s=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.sendRequest=t.HttpMethod=void 0;const r=s(as);var n;(n=t.HttpMethod||(t.HttpMethod={})).Get="get",n.Post="post",n.Delete="delete",t.sendRequest=async function({url:e,method:t,body:s}){const n=await(0,r.default)(e,{method:t,headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(s)});let a;try{a=await n.json()}catch(e){if(!n.ok)throw new Error(n.statusText)}if(n.ok)return a;if(a.data)throw new Error(a.data);if(a.detail)throw new Error(a.detail);if(a.message)throw new Error(a.message);if(a.nonFieldErrors)throw new Error(a.nonFieldErrors);if(a.delegate)throw new Error(a.delegate);if(a.safe)throw new Error(a.safe);if(a.delegator)throw new Error(a.delegator);throw new Error(n.statusText)}}(gt);var os,is,cs=e&&e.__classPrivateFieldSet||function(e,t,s,r,n){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?n.call(e,s):n?n.value=s:t.set(e,s),s},ds=e&&e.__classPrivateFieldGet||function(e,t,s,r){if("a"===s&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?r:"a"===s?r.call(e):r?r.value:t.get(e)};Object.defineProperty(ht,"__esModule",{value:!0});const us=pt,ls=gt;os=new WeakMap,is=new WeakMap,ht.default=class{constructor({txServiceUrl:e,ethAdapter:t}){os.set(this,void 0),is.set(this,void 0),cs(this,os,(0,us.getTxServiceBaseUrl)(e),"f"),cs(this,is,t,"f")}async getServiceInfo(){return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/about`,method:ls.HttpMethod.Get})}async getServiceMasterCopiesInfo(){return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/about/master-copies`,method:ls.HttpMethod.Get})}async decodeData(e){if(""===e)throw new Error("Invalid data");return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/data-decoder/`,method:ls.HttpMethod.Post,body:{data:e}})}async getSafesByOwner(e){if(""===e)throw new Error("Invalid owner address");const{address:t}=await ds(this,is,"f").getEip3770Address(e);return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/owners/${t}/safes/`,method:ls.HttpMethod.Get})}async getSafesByModule(e){if(""===e)throw new Error("Invalid module address");const{address:t}=await ds(this,is,"f").getEip3770Address(e);return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/modules/${t}/safes/`,method:ls.HttpMethod.Get})}async getTransaction(e){if(""===e)throw new Error("Invalid safeTxHash");return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/multisig-transactions/${e}/`,method:ls.HttpMethod.Get})}async getTransactionConfirmations(e){if(""===e)throw new Error("Invalid safeTxHash");return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/multisig-transactions/${e}/confirmations/`,method:ls.HttpMethod.Get})}async confirmTransaction(e,t){if(""===e)throw new Error("Invalid safeTxHash");if(""===t)throw new Error("Invalid signature");return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/multisig-transactions/${e}/confirmations/`,method:ls.HttpMethod.Post,body:{signature:t}})}async getSafeInfo(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await ds(this,is,"f").getEip3770Address(e);return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/safes/${t}/`,method:ls.HttpMethod.Get})}async getSafeDelegates({safeAddress:e,delegateAddress:t,delegatorAddress:s,label:r,limit:n,offset:a}){const o=new URL(`${ds(this,os,"f")}/v1/delegates`);if(e){const{address:t}=await ds(this,is,"f").getEip3770Address(e);o.searchParams.set("safe",t)}if(t){const{address:e}=await ds(this,is,"f").getEip3770Address(t);o.searchParams.set("delegate",e)}if(s){const{address:e}=await ds(this,is,"f").getEip3770Address(s);o.searchParams.set("delegator",e)}return r&&o.searchParams.set("label",r),n&&o.searchParams.set("limit",n),a&&o.searchParams.set("offset",a),(0,ls.sendRequest)({url:o.toString(),method:ls.HttpMethod.Get})}async addSafeDelegate({safeAddress:e,delegateAddress:t,delegatorAddress:s,label:r,signer:n}){if(""===t)throw new Error("Invalid Safe delegate address");if(""===s)throw new Error("Invalid Safe delegator address");if(""===r)throw new Error("Invalid label");const{address:a}=await ds(this,is,"f").getEip3770Address(t),{address:o}=await ds(this,is,"f").getEip3770Address(s),i=a+Math.floor(Date.now()/1e3/3600),c=await n.signMessage(i),d={safe:e?(await ds(this,is,"f").getEip3770Address(e)).address:null,delegate:a,delegator:o,label:r,signature:c};return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/delegates/`,method:ls.HttpMethod.Post,body:d})}async removeSafeDelegate({delegateAddress:e,delegatorAddress:t,signer:s}){if(""===e)throw new Error("Invalid Safe delegate address");if(""===t)throw new Error("Invalid Safe delegator address");const{address:r}=await ds(this,is,"f").getEip3770Address(e),{address:n}=await ds(this,is,"f").getEip3770Address(t),a=r+Math.floor(Date.now()/1e3/3600),o=await s.signMessage(a);return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/delegates/${r}`,method:ls.HttpMethod.Delete,body:{delegate:r,delegator:n,signature:o}})}async getSafeCreationInfo(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await ds(this,is,"f").getEip3770Address(e);return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/safes/${t}/creation/`,method:ls.HttpMethod.Get})}async estimateSafeTransaction(e,t){if(""===e)throw new Error("Invalid Safe address");const{address:s}=await ds(this,is,"f").getEip3770Address(e);return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/safes/${s}/multisig-transactions/estimations/`,method:ls.HttpMethod.Post,body:t})}async proposeTransaction({safeAddress:e,safeTransactionData:t,safeTxHash:s,senderAddress:r,senderSignature:n,origin:a}){if(""===e)throw new Error("Invalid Safe address");const{address:o}=await ds(this,is,"f").getEip3770Address(e),{address:i}=await ds(this,is,"f").getEip3770Address(r);if(""===s)throw new Error("Invalid safeTxHash");return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/safes/${o}/multisig-transactions/`,method:ls.HttpMethod.Post,body:{...t,contractTransactionHash:s,sender:i,signature:n,origin:a}})}async getIncomingTransactions(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await ds(this,is,"f").getEip3770Address(e);return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/safes/${t}/incoming-transfers?executed=true`,method:ls.HttpMethod.Get})}async getModuleTransactions(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await ds(this,is,"f").getEip3770Address(e);return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/safes/${t}/module-transactions/`,method:ls.HttpMethod.Get})}async getMultisigTransactions(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await ds(this,is,"f").getEip3770Address(e);return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/safes/${t}/multisig-transactions/`,method:ls.HttpMethod.Get})}async getPendingTransactions(e,t){if(""===e)throw new Error("Invalid Safe address");const{address:s}=await ds(this,is,"f").getEip3770Address(e),r=t||(await this.getSafeInfo(s)).nonce;return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/safes/${s}/multisig-transactions/?executed=false&nonce__gte=${r}`,method:ls.HttpMethod.Get})}async getAllTransactions(e,t){var s,r,n;if(""===e)throw new Error("Invalid Safe address");const{address:a}=await ds(this,is,"f").getEip3770Address(e),o=new URL(`${ds(this,os,"f")}/v1/safes/${a}/all-transactions/`),i=(null===(s=null==t?void 0:t.trusted)||void 0===s?void 0:s.toString())||"true";o.searchParams.set("trusted",i);const c=(null===(r=null==t?void 0:t.queued)||void 0===r?void 0:r.toString())||"true";o.searchParams.set("queued",c);const d=(null===(n=null==t?void 0:t.executed)||void 0===n?void 0:n.toString())||"false";return o.searchParams.set("executed",d),(0,ls.sendRequest)({url:o.toString(),method:ls.HttpMethod.Get})}async getNextNonce(e){if(""===e)throw new Error("Invalid Safe address");const{address:t}=await ds(this,is,"f").getEip3770Address(e),s=await this.getPendingTransactions(t);if(s.results.length>0){const e=s.results.map((e=>e.nonce));return Math.max(...e)+1}return(await this.getSafeInfo(t)).nonce}async getTokenList(){return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/tokens/`,method:ls.HttpMethod.Get})}async getToken(e){if(""===e)throw new Error("Invalid token address");const{address:t}=await ds(this,is,"f").getEip3770Address(e);return(0,ls.sendRequest)({url:`${ds(this,os,"f")}/v1/tokens/${t}/`,method:ls.HttpMethod.Get})}};var fs={};Object.defineProperty(fs,"__esModule",{value:!0}),function(t){var s=e&&e.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var n=Object.getOwnPropertyDescriptor(t,s);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,n)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),r=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)},n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=n(ht);r(fs,t),t.default=a.default}(ft);var hs=s(ft);const ps={1:"https://safe-transaction-mainnet.safe.global/",5:"https://safe-transaction-goerli.safe.global/",42161:"https://safe-transaction-arbitrum.safe.global/",43114:"https://safe-transaction-avalanche.safe.global/",1313161554:"https://safe-transaction-aurora.safe.global/",56:"https://safe-transaction-bsc.safe.global/",10:"https://safe-transaction-optimism.safe.global/",137:"https://safe-transaction-polygon.safe.global/"};let gs;function ms(e){return r(this,void 0,void 0,(function*(){if((null==gs?void 0:gs.chainId)===e)return gs.safeService;if(!a.getState().provider)throw new Error("provider is undefined");const t=function(){return{getEip3770Address:e=>r(this,void 0,void 0,(function*(){const{address:t,prefix:s}=function(e){const t=e.split(":"),s=t.length>1?t[1]:t[0];return{prefix:t.length>1?t[0]:"",address:s}}(e);return{address:t,prefix:s}}))}}(),s=ps[e];if(!s)return;const n=new hs({txServiceUrl:s,ethAdapter:t});return gs={safeService:n,chainId:e},gs.safeService}))}function ys(e,t){return r(this,void 0,void 0,(function*(){if(!t)return!1;const s=yield ms(e);if(!s)return!1;try{return!!(yield s.getSafeInfo(t))}catch(e){return console.error(e),!1}}))}function bs(e,t,s){return r(this,void 0,void 0,(function*(){const r=yield ms(e);if(!r)return console.error(`chainId: ${e} is not supported safe`),s;if(s!==t)return s;const n=yield r.getMultisigTransactions(s),[a]=n.results;return a.safeTxHash}))}function Es(e,t,s){return r(this,void 0,void 0,(function*(){const r=yield ms(e);if(!r)throw new Error(`chainId: ${e} is not supported safe`);try{const{results:e}=yield r.getMultisigTransactions(s),n=e.find((e=>e.safeTxHash.toLocaleLowerCase()===t.toLocaleLowerCase()));if(!n)return null;if(e.some((e=>!(e.nonce!==n.nonce||e.safeTxHash.toLocaleLowerCase()===t.toLocaleLowerCase()||!e.isExecuted||!e.isSuccessful))))return"rejected";if(null===n.isExecuted||null===n.isSuccessful)return null;return{status:n.isExecuted&&n.isSuccessful||!1,transactionHash:n.transactionHash,blockNumber:n.blockNumber||null}}catch(e){throw console.error(e),new Error(`safeTxHash: ${t} is not valid.`)}}))}function vs(e,t,s){const r={1:"eth",5:"gor",137:"matic",56:"bnb",42161:"arb1",10:"oeth",43114:"avax",1313161554:"aurora"}[t];if(!r)throw new Error(`Not Supported network: ${t}`);return`https://app.safe.global/transactions/tx?id=multisig_${s}_${e}&safe=${r}%3A${s}`}export{lt as default,ys as getAccountIsSafe,dt as getConnectedSafe,ut as getIsSafe,vs as getSafeHashDetailUrl,bs as getSafeTxHash,Es as getSafeTxStatus};
|
package/dist/index-6bf494b0.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"tty";import t from"util";import r from"os";var n,s,o,i,c,a={exports:{}},u={exports:{}};function l(){if(s)return n;s=1;var e=1e3,t=60*e,r=60*t,o=24*r,i=7*o,c=365.25*o;function a(e,t,r,n){var s=t>=1.5*r;return Math.round(e/r)+" "+n+(s?"s":"")}return n=function(n,s){s=s||{};var u=typeof n;if("string"===u&&n.length>0)return function(n){if((n=String(n)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(!s)return;var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*c;case"weeks":case"week":case"w":return a*i;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*r;case"minutes":case"minute":case"mins":case"min":case"m":return a*t;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(n);if("number"===u&&isFinite(n))return s.long?function(n){var s=Math.abs(n);if(s>=o)return a(n,s,o,"day");if(s>=r)return a(n,s,r,"hour");if(s>=t)return a(n,s,t,"minute");if(s>=e)return a(n,s,e,"second");return n+" ms"}(n):function(n){var s=Math.abs(n);if(s>=o)return Math.round(n/o)+"d";if(s>=r)return Math.round(n/r)+"h";if(s>=t)return Math.round(n/t)+"m";if(s>=e)return Math.round(n/e)+"s";return n+"ms"}(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))}}function C(){if(i)return o;return i=1,o=function(e){function t(e){let n,s,o,i=null;function c(...e){if(!c.enabled)return;const r=c,s=Number(new Date),o=s-(n||s);r.diff=o,r.prev=n,r.curr=s,n=s,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,s)=>{if("%%"===n)return"%";i++;const o=t.formatters[s];if("function"==typeof o){const t=e[i];n=o.call(r,t),e.splice(i,1),i--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return c.namespace=e,c.useColors=t.useColors(),c.color=t.selectColor(e),c.extend=r,c.destroy=t.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(s!==t.namespaces&&(s=t.namespaces,o=t.enabled(e)),o),set:e=>{i=e}}),"function"==typeof t.init&&t.init(c),c}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),s=n.length;for(r=0;r<s;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=l(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t},o}var f,p,d,m,g,h,F={exports:{}};function y(){return p?f:(p=1,f=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),s=t.indexOf("--");return-1!==n&&(-1===s||n<s)})}function O(){return g||(g=1,function(n,s){const o=e,i=t;s.init=function(e){e.inspectOpts={};const t=Object.keys(s.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=s.inspectOpts[t[r]]},s.log=function(...e){return process.stderr.write(i.format(...e)+"\n")},s.formatArgs=function(e){const{namespace:t,useColors:r}=this;if(r){const r=this.color,s="[3"+(r<8?r:"8;5;"+r),o=` ${s};1m${t} [0m`;e[0]=o+e[0].split("\n").join("\n"+o),e.push(s+"m+"+n.exports.humanize(this.diff)+"[0m")}else e[0]=function(){if(s.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+t+" "+e[0]},s.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},s.load=function(){return process.env.DEBUG},s.useColors=function(){return"colors"in s.inspectOpts?Boolean(s.inspectOpts.colors):o.isatty(process.stderr.fd)},s.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),s.colors=[6,2,3,4,5,1];try{const t=function(){if(m)return d;m=1;const t=r,n=e,s=y(),{env:o}=process;let i;function c(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function a(e,r){if(0===i)return 0;if(s("color=16m")||s("color=full")||s("color=truecolor"))return 3;if(s("color=256"))return 2;if(e&&!r&&void 0===i)return 0;const n=i||0;if("dumb"===o.TERM)return n;if("win32"===process.platform){const e=t.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in o))||"codeship"===o.CI_NAME?1:n;if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if("truecolor"===o.COLORTERM)return 3;if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||"COLORTERM"in o?1:n}return s("no-color")||s("no-colors")||s("color=false")||s("color=never")?i=0:(s("color")||s("colors")||s("color=true")||s("color=always"))&&(i=1),"FORCE_COLOR"in o&&(i="true"===o.FORCE_COLOR?1:"false"===o.FORCE_COLOR?0:0===o.FORCE_COLOR.length?1:Math.min(parseInt(o.FORCE_COLOR,10),3)),d={supportsColor:function(e){return c(a(e,e&&e.isTTY))},stdout:c(a(!0,n.isatty(1))),stderr:c(a(!0,n.isatty(2)))}}();t&&(t.stderr||t).level>=2&&(s.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}s.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),n.exports=C()(s);const{formatters:c}=n.exports;c.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},c.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}}(F,F.exports)),F.exports}h=a,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?h.exports=(c||(c=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,s=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(s=n))})),t.splice(s,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=C()(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(u,u.exports)),u.exports):h.exports=O();export{a as s};
|