forked from 88-mph/88mphlandingpage
-
Notifications
You must be signed in to change notification settings - Fork 1
/
5.e98420f81a716b27e6e2.js
1 lines (1 loc) · 21.3 KB
/
5.e98420f81a716b27e6e2.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{"/uSP":function(e,t,r){const n=r("+qE3").EventEmitter,s=r("MCLT").inherits;function o(){n.call(this),this.isLocked=!0}e.exports=o,s(o,n),o.prototype.go=function(){this.isLocked=!1,this.emit("unlock")},o.prototype.stop=function(){this.isLocked=!0,this.emit("lock")},o.prototype.await=function(e){this.isLocked?this.once("unlock",e):setTimeout(e)}},11:function(e,t){},"1TIO":function(e){e.exports=JSON.parse('{"4001":{"standard":"EIP 1193","message":"User rejected the request."},"4100":{"standard":"EIP 1193","message":"The requested account and/or method has not been authorized by the user."},"4200":{"standard":"EIP 1193","message":"The requested method is not supported by this Ethereum provider."},"-32700":{"standard":"JSON RPC 2.0","message":"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{"standard":"JSON RPC 2.0","message":"The JSON sent is not a valid Request object."},"-32601":{"standard":"JSON RPC 2.0","message":"The method does not exist / is not available."},"-32602":{"standard":"JSON RPC 2.0","message":"Invalid method parameter(s)."},"-32603":{"standard":"JSON RPC 2.0","message":"Internal JSON-RPC error."}}')},EqmL:function(e,t,r){const n=r("ja2i"),s=r("t7TP");e.exports=class extends n{constructor(){super(({blockTracker:e,provider:t,engine:r})=>{const{events:n,middleware:o}=s({blockTracker:e,provider:t});return n.on("notification",e=>r.emit("data",null,e)),o})}}},Lf5n:function(e,t,r){const n=r("N1pS");class s extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return n(this.serialize(),o,2)}}function o(e,t){if("[Circular]"!==t)return t}e.exports={JsonRpcError:s,EthJsonRpcError:class extends s{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}}},Rlsf:function(e,t,r){const n=r("l1gh"),s=r("KWkM"),o=r("MCLT").inherits,a=r("tnHP"),i=r("HtlB"),c=r("U6jy"),u=r("odnP"),d=r("Uu7K"),p=r("a5O3"),l=/^[0-9A-Fa-f]+$/g;function h(e){const t=this;t.nonceLock=u(1),e.getAccounts&&(t.getAccounts=e.getAccounts),e.processTransaction&&(t.processTransaction=e.processTransaction),e.processSignTransaction&&(t.processSignTransaction=e.processSignTransaction),e.processMessage&&(t.processMessage=e.processMessage),e.processPersonalMessage&&(t.processPersonalMessage=e.processPersonalMessage),e.processTypedMessage&&(t.processTypedMessage=e.processTypedMessage),t.approveTransaction=e.approveTransaction||t.autoApprove,t.approveMessage=e.approveMessage||t.autoApprove,t.approvePersonalMessage=e.approvePersonalMessage||t.autoApprove,t.approveTypedMessage=e.approveTypedMessage||t.autoApprove,t.signTransaction=e.signTransaction||m("signTransaction"),t.signMessage=e.signMessage||m("signMessage"),t.signPersonalMessage=e.signPersonalMessage||m("signPersonalMessage"),t.signTypedMessage=e.signTypedMessage||m("signTypedMessage"),e.recoverPersonalSignature&&(t.recoverPersonalSignature=e.recoverPersonalSignature),e.publishTransaction&&(t.publishTransaction=e.publishTransaction),t.estimateGas=e.estimateGas||t.estimateGas,t.getGasPrice=e.getGasPrice||t.getGasPrice}function g(e){return e.toLowerCase()}function f(e){return"string"==typeof e&&"0x"===e.slice(0,2)&&e.slice(2).match(l)}function m(e){return function(t,r){r(new Error('ProviderEngine - HookedWalletSubprovider - Must provide "'+e+'" fn in constructor options'))}}e.exports=h,o(h,d),h.prototype.handleRequest=function(e,t,r){const s=this;let o,i,u,d,p;switch(s._parityRequests={},s._parityRequestCount=0,e.method){case"eth_coinbase":return void s.getAccounts(function(e,t){if(e)return r(e);r(null,t[0]||null)});case"eth_accounts":return void s.getAccounts(function(e,t){if(e)return r(e);r(null,t)});case"eth_sendTransaction":return o=e.params[0],void n([e=>s.validateTransaction(o,e),e=>s.processTransaction(o,e)],r);case"eth_signTransaction":return o=e.params[0],void n([e=>s.validateTransaction(o,e),e=>s.processSignTransaction(o,e)],r);case"eth_sign":return p=e.params[0],d=e.params[1],u=e.params[2]||{},i=c(u,{from:p,data:d}),void n([e=>s.validateMessage(i,e),e=>s.processMessage(i,e)],r);case"personal_sign":return function(){const t=e.params[0];if(function(e){const t=a.addHexPrefix(e);return!a.isValidAddress(t)&&f(e)}(e.params[1])&&function(e){const t=a.addHexPrefix(e);return a.isValidAddress(t)}(t)){let t="The eth_personalSign method requires params ordered ";t+="[message, address]. This was previously handled incorrectly, ",t+="and has been corrected automatically. ",t+="Please switch this param order for smooth behavior in the future.",console.warn(t),p=e.params[0],d=e.params[1]}else d=e.params[0],p=e.params[1];u=e.params[2]||{},i=c(u,{from:p,data:d}),n([e=>s.validatePersonalMessage(i,e),e=>s.processPersonalMessage(i,e)],r)}();case"personal_ecRecover":return d=e.params[0],u=e.params[2]||{},i=c(u,{sig:e.params[1],data:d}),void s.recoverPersonalSignature(i,r);case"eth_signTypedData":return d=e.params[0],p=e.params[1],u=e.params[2]||{},i=c(u,{from:p,data:d}),void n([e=>s.validateTypedMessage(i,e),e=>s.processTypedMessage(i,e)],r);case"parity_postTransaction":return o=e.params[0],void s.parityPostTransaction(o,r);case"parity_postSign":return p=e.params[0],d=e.params[1],void s.parityPostSign(p,d,r);case"parity_checkRequest":return void s.parityCheckRequest(e.params[0],r);case"parity_defaultAccount":return void s.getAccounts(function(e,t){if(e)return r(e);r(null,t[0]||null)});default:return void t()}},h.prototype.getAccounts=function(e){e(null,[])},h.prototype.processTransaction=function(e,t){const r=this;n([t=>r.approveTransaction(e,t),(e,t)=>r.checkApproval("transaction",e,t),t=>r.finalizeAndSubmitTx(e,t)],t)},h.prototype.processSignTransaction=function(e,t){const r=this;n([t=>r.approveTransaction(e,t),(e,t)=>r.checkApproval("transaction",e,t),t=>r.finalizeTx(e,t)],t)},h.prototype.processMessage=function(e,t){const r=this;n([t=>r.approveMessage(e,t),(e,t)=>r.checkApproval("message",e,t),t=>r.signMessage(e,t)],t)},h.prototype.processPersonalMessage=function(e,t){const r=this;n([t=>r.approvePersonalMessage(e,t),(e,t)=>r.checkApproval("message",e,t),t=>r.signPersonalMessage(e,t)],t)},h.prototype.processTypedMessage=function(e,t){const r=this;n([t=>r.approveTypedMessage(e,t),(e,t)=>r.checkApproval("message",e,t),t=>r.signTypedMessage(e,t)],t)},h.prototype.autoApprove=function(e,t){t(null,!0)},h.prototype.checkApproval=function(e,t,r){r(t?null:new Error("User denied "+e+" signature."))},h.prototype.parityPostTransaction=function(e,t){const r=this,n=`0x${r._parityRequestCount.toString(16)}`;r._parityRequestCount++,r.emitPayload({method:"eth_sendTransaction",params:[e]},function(e,t){r._parityRequests[n]=e?{error:e}:t.result}),t(null,n)},h.prototype.parityPostSign=function(e,t,r){const n=this,s=`0x${n._parityRequestCount.toString(16)}`;n._parityRequestCount++,n.emitPayload({method:"eth_sign",params:[e,t]},function(e,t){n._parityRequests[s]=e?{error:e}:t.result}),r(null,s)},h.prototype.parityCheckRequest=function(e,t){const r=this._parityRequests[e]||null;return r?r.error?t(r.error):void t(null,r):t(null,null)},h.prototype.recoverPersonalSignature=function(e,t){let r;try{r=i.recoverPersonalSignature(e)}catch(n){return t(n)}t(null,r)},h.prototype.validateTransaction=function(e,t){if(void 0===e.from)return t(new Error("Undefined address - from address required to sign transaction."));this.validateSender(e.from,function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to sign transaction for this address: "${e.from}"`))})},h.prototype.validateMessage=function(e,t){if(void 0===e.from)return t(new Error("Undefined address - from address required to sign message."));this.validateSender(e.from,function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to sign message for this address: "${e.from}"`))})},h.prototype.validatePersonalMessage=function(e,t){return void 0===e.from?t(new Error("Undefined address - from address required to sign personal message.")):void 0===e.data?t(new Error("Undefined message - message required to sign personal message.")):f(e.data)?void this.validateSender(e.from,function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to sign message for this address: "${e.from}"`))}):t(new Error("HookedWalletSubprovider - validateMessage - message was not encoded as hex."))},h.prototype.validateTypedMessage=function(e,t){return void 0===e.from?t(new Error("Undefined address - from address required to sign typed data.")):void 0===e.data?t(new Error("Undefined data - message required to sign typed data.")):void this.validateSender(e.from,function(r,n){return r?t(r):n?void t():t(new Error(`Unknown address - unable to sign message for this address: "${e.from}"`))})},h.prototype.validateSender=function(e,t){if(!e)return t(null,!1);this.getAccounts(function(r,n){if(r)return t(r);const s=-1!==n.map(g).indexOf(e.toLowerCase());t(null,s)})},h.prototype.finalizeAndSubmitTx=function(e,t){const r=this;r.nonceLock.take(function(){n([r.fillInTxExtras.bind(r,e),r.signTransaction.bind(r),r.publishTransaction.bind(r)],function(e,n){if(r.nonceLock.leave(),e)return t(e);t(null,n)})})},h.prototype.finalizeTx=function(e,t){const r=this;r.nonceLock.take(function(){n([r.fillInTxExtras.bind(r,e),r.signTransaction.bind(r)],function(n,s){if(r.nonceLock.leave(),n)return t(n);t(null,{raw:s,tx:e})})})},h.prototype.publishTransaction=function(e,t){this.emitPayload({method:"eth_sendRawTransaction",params:[e]},function(e,r){if(e)return t(e);t(null,r.result)})},h.prototype.estimateGas=function(e,t){p(this.engine,e,t)},h.prototype.getGasPrice=function(e){this.emitPayload({method:"eth_gasPrice",params:[]},function(t,r){if(t)return e(t);e(null,r.result)})},h.prototype.fillInTxExtras=function(e,t){const r=this,n=e.from,o={};void 0===e.gasPrice&&(o.gasPrice=r.getGasPrice.bind(r)),void 0===e.nonce&&(o.nonce=r.emitPayload.bind(r,{method:"eth_getTransactionCount",params:[n,"pending"]})),void 0===e.gas&&(o.gas=r.estimateGas.bind(r,function(e){return{from:e.from,to:e.to,value:e.value,data:e.data,gas:e.gas,gasPrice:e.gasPrice,nonce:e.nonce}}(e))),s(o,function(r,n){if(r)return t(r);const s={};n.gasPrice&&(s.gasPrice=n.gasPrice),n.nonce&&(s.nonce=n.nonce.result),n.gas&&(s.gas=n.gas),t(null,c(e,s))})}},Uu7K:function(e,t,r){const n=r("xQaN");function s(){}e.exports=s,s.prototype.setEngine=function(e){const t=this;t.engine||(t.engine=e,e.on("block",function(e){t.currentBlock=e}),e.on("start",function(){t.start()}),e.on("stop",function(){t.stop()}))},s.prototype.handleRequest=function(e,t,r){throw new Error("Subproviders should override `handleRequest`.")},s.prototype.emitPayload=function(e,t){this.engine.sendAsync(n(e),t)},s.prototype.stop=function(){},s.prototype.start=function(){}},WPTD:function(e,t,r){(function(t){const n=r(t.browser?"7sdD":11),s=r("MCLT").inherits,o=r("xQaN"),a=r("Uu7K"),{errors:i}=r("z8+S");function c(e){this.rpcUrl=e.rpcUrl}e.exports=c,s(c,a),c.prototype.handleRequest=function(e,t,r){const s=this.rpcUrl;let a=o(e);n({uri:s,method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a),rejectUnauthorized:!1,timeout:2e4},function(e,t,n){if(e)return r(i.internal(e));switch(t.statusCode){case 405:return r(i.methodNotFound());case 504:return function(){let e="Gateway timeout. The request took too long to process. ";return e+="This can happen when querying logs over too wide a block range.",r(i.internal("Gateway timeout. The request took too long to process. This can happen when querying logs over too wide a block range."))}();case 429:return function(){const e=new Error("Too Many Requests");return r(i.internal(e))}();default:if(200!=t.statusCode)return r(i.internal(t.body))}let s;try{s=JSON.parse(n)}catch(e){return console.error(e.stack),r(i.internal(e))}if(s.error)return r(s.error);r(null,s.result)})}}).call(this,r("8oxB"))},a5O3:function(e,t,r){const n=r("xQaN");e.exports=function(e,t,r){e.sendAsync(n({method:"eth_estimateGas",params:[t]}),function(e,t){if(e)return"no contract code at given address"===e.message?r(null,"0xcf08"):r(e);r(null,t.result)})}},"cC/c":function(e,t,r){const n=r("ja2i"),s=r("2nhq");e.exports=class extends n{constructor(){super(({blockTracker:e,provider:t})=>s({blockTracker:e,provider:t}))}}},drvL:function(e){e.exports=JSON.parse('{"jsonRpc":{"parse":-32700,"invalidRequest":-32600,"methodNotFound":-32601,"invalidParams":-32602,"internal":-32603},"eth":{"userRejectedRequest":4001,"unauthorized":4100,"unsupportedMethod":4200}}')},f4g2:function(e,t,r){const n=r("+qE3").EventEmitter,s=r("MCLT").inherits,o=r("tnHP"),a=r("V5x4"),i=r("LCem"),c=r("YOJA"),u=r("/uSP"),d=(r("gO+T"),r("xQaN")),p=function(){};function l(e){const t=this;n.call(t),t.setMaxListeners(30),e=e||{};const r={sendAsync:t._handleAsync.bind(t)};t._blockTracker=e.blockTracker||new a({provider:e.blockTrackerProvider||r,pollingInterval:e.pollingInterval||4e3,setSkipCacheFlag:!0}),t._ready=new u,t.currentBlock=null,t._providers=[]}e.exports=l,s(l,n),l.prototype.start=function(e=p){const t=this;t._ready.go(),t._blockTracker.on("latest",e=>{t._getBlockByNumber(e,(e,r)=>{if(e)return void this.emit("error",e);if(!r)return void this.emit("error",new Error("Could not find block"));const n={number:o.toBuffer((s=r).number),hash:o.toBuffer(s.hash),parentHash:o.toBuffer(s.parentHash),nonce:o.toBuffer(s.nonce),mixHash:o.toBuffer(s.mixHash),sha3Uncles:o.toBuffer(s.sha3Uncles),logsBloom:o.toBuffer(s.logsBloom),transactionsRoot:o.toBuffer(s.transactionsRoot),stateRoot:o.toBuffer(s.stateRoot),receiptsRoot:o.toBuffer(s.receiptRoot||s.receiptsRoot),miner:o.toBuffer(s.miner),difficulty:o.toBuffer(s.difficulty),totalDifficulty:o.toBuffer(s.totalDifficulty),size:o.toBuffer(s.size),extraData:o.toBuffer(s.extraData),gasLimit:o.toBuffer(s.gasLimit),gasUsed:o.toBuffer(s.gasUsed),timestamp:o.toBuffer(s.timestamp),transactions:s.transactions};var s;t._setCurrentBlock(n),t.emit("rawBlock",r),t.emit("latest",r)})}),t._blockTracker.on("sync",t.emit.bind(t,"sync")),t._blockTracker.on("error",t.emit.bind(t,"error")),t._running=!0,t.emit("start")},l.prototype.stop=function(){const e=this;e._blockTracker.removeAllListeners(),e._running=!1,e.emit("stop")},l.prototype.isRunning=function(){return this._running},l.prototype.addProvider=function(e,t){"number"==typeof t?this._providers.splice(t,0,e):this._providers.push(e),e.setEngine(this)},l.prototype.removeProvider=function(e){const t=this._providers.indexOf(e);if(t<0)throw new Error("Provider not found.");this._providers.splice(t,1)},l.prototype.send=function(e){throw new Error("Web3ProviderEngine does not support synchronous requests.")},l.prototype.sendAsync=function(e,t){const r=this;r._ready.await(function(){Array.isArray(e)?i(e,r._handleAsync.bind(r),t):r._handleAsync(e,t)})},l.prototype._getBlockByNumber=function(e,t){const r=d({method:"eth_getBlockByNumber",params:[e,!1],skipCache:!0});this._handleAsync(r,(e,r)=>e?t(e):t(null,r.result))},l.prototype._handleAsync=function(e,t){var r=this,n=-1,s=null,o=null,a=[];function i(r,n){o=r,s=n,c(a,function(e,t){e?e(o,s,t):t()},function(){var r={id:e.id,jsonrpc:e.jsonrpc,result:s};null!=o?(r.error={message:o.stack||o.message||o,code:-32e3},t(o,r)):t(null,r)})}!function t(s){if(n+=1,a.unshift(s),n>=r._providers.length)i(new Error('Request for method "'+e.method+'" not handled by any subprovider. Please check your subprovider configuration to ensure this method is handled.'));else try{r._providers[n].handleRequest(e,t,i)}catch(o){i(o)}}()},l.prototype._setCurrentBlock=function(e){this.currentBlock=e,this.emit("block",e)}},"gO+T":function(e,t,r){const n=r("rE/H");function s(e){return"never"!==i(e)}function o(e){var t=a(e);return t>=e.params.length?e.params:"eth_getBlockByNumber"===e.method?e.params.slice(1):e.params.slice(0,t)}function a(e){switch(e.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":return 1;case"eth_getBlockByNumber":return 0;default:return}}function i(e){switch(e.method){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":return"fork";case"eth_gasPrice":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"eth_blockNumber":return"block";case"net_version":case"net_peerCount":case"net_listening":case"eth_syncing":case"eth_sign":case"eth_coinbase":case"eth_mining":case"eth_hashrate":case"eth_accounts":case"eth_sendTransaction":case"eth_sendRawTransaction":case"eth_newFilter":case"eth_newBlockFilter":case"eth_newPendingTransactionFilter":case"eth_uninstallFilter":case"eth_getFilterChanges":case"eth_getWork":case"eth_submitWork":case"eth_submitHashrate":case"db_putString":case"db_getString":case"db_putHex":case"db_getHex":case"shh_post":case"shh_newIdentity":case"shh_hasIdentity":case"shh_newGroup":case"shh_addToGroup":case"shh_newFilter":case"shh_uninstallFilter":case"shh_getFilterChanges":case"shh_getMessages":return"never"}}e.exports={cacheIdentifierForPayload:function(e,t={}){if(!s(e))return null;const{includeBlockRef:r}=t,a=r?e.params:o(e);return e.method+":"+n(a)},canCache:s,blockTagForPayload:function(e){var t=a(e);return t>=e.params.length?null:e.params[t]},paramsWithoutBlockTag:o,blockTagParamIndex:a,cacheTypeForPayload:i}},ja2i:function(e,t,r){const n=r("Uu7K");e.exports=class extends n{constructor(e){if(super(),!e)throw new Error("JsonRpcEngineMiddlewareSubprovider - no constructorFn specified");this._constructorFn=e}setEngine(e){if(this.middleware)throw new Error("JsonRpcEngineMiddlewareSubprovider - subprovider added to engine twice");const t=this._constructorFn({engine:e,provider:e,blockTracker:e._blockTracker});if(!t)throw new Error("JsonRpcEngineMiddlewareSubprovider - _constructorFn did not return middleware");if("function"!=typeof t)throw new Error("JsonRpcEngineMiddlewareSubprovider - specified middleware is not a function");this.middleware=t}handleRequest(e,t,r){const n={id:e.id};this.middleware(e,n,function(e){t((t,r,s)=>{t?(delete n.result,n.error={message:t.message||t}):n.result=r,e?e(s):s()})},function(e){if(e)return r(e);r(null,n.result)})}}},"kzD/":function(e,t){e.exports=function(){return(new Date).getTime()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}},rdiz:function(e,t,r){const n=r("1TIO"),s=r("drvL").jsonRpc.internal,{JsonRpcError:o}=r("Lf5n"),a="Unspecified server error.",i={code:s,message:c(s)};function c(e,t="Unspecified error message. This is bug, please report it."){if(Number.isInteger(e)){const t=e.toString();if(n[t])return n[t].message;if(d(e))return a}return t}function u(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!n[t]||!!d(e)}function d(e){return e>=-32099&&e<=-32e3}function p(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}e.exports={getMessageFromCode:c,isValidCode:u,serializeError:function(e,t=i){if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("fallbackError must contain integer number code and string message.");if("object"==typeof e&&e instanceof o)return e.serialize();const r={};return e&&u(e.code)?(r.code=e.code,e.message&&"string"==typeof e.message?(r.message=e.message,e.hasOwnProperty("data")&&(r.data=e.data)):(r.message=c(r.code),r.data={originalError:p(e)})):(r.code=t.code,r.message=e&&e.message?e.message:t.message,r.data={originalError:p(e)}),e&&e.stack&&(r.stack=e.stack),r},JSON_RPC_SERVER_ERROR_MESSAGE:a}},xQaN:function(e,t,r){const n=r("kzD/"),s=r("U6jy");e.exports=function(e){return s({id:n(),jsonrpc:"2.0",params:[]},e)}},"z8+S":function(e,t,r){const{JsonRpcError:n,EthJsonRpcError:s}=r("Lf5n"),{serializeError:o,getMessageFromCode:a}=r("rdiz"),i=r("zUc0"),c=r("drvL");e.exports={errors:i,JsonRpcError:n,EthJsonRpcError:s,serializeError:o,getMessageFromCode:a,ERROR_CODES:c}},zUc0:function(e,t,r){const{JsonRpcError:n,EthJsonRpcError:s}=r("Lf5n"),{getMessageFromCode:o}=r("rdiz"),a=r("drvL");function i(e,t,r){return new n(e,t||o(e),r)}function c(e,t,r){return new s(e,t||o(e),r)}e.exports={parse:(e,t)=>i(a.jsonRpc.parse,e,t),invalidRequest:(e,t)=>i(a.jsonRpc.invalidRequest,e,t),invalidParams:(e,t)=>i(a.jsonRpc.invalidParams,e,t),methodNotFound:(e,t)=>i(a.jsonRpc.methodNotFound,e,t),internal:(e,t)=>i(a.jsonRpc.internal,e,t),server:(e,t,r)=>{if(!Number.isInteger(e)||e>-32e3||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32000');return i(e,t,r)},eth:{userRejectedRequest:(e,t)=>c(a.eth.userRejectedRequest,e,t),unauthorized:(e,t)=>c(a.eth.unauthorized,e,t),unsupportedMethod:(e,t)=>c(a.eth.unsupportedMethod,e,t),custom:(e,t,r)=>{if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string');return new s(e,t,r)}}}}}]);