@unlock-protocol/paywall
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -922,2 +922,3 @@ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".unlock-protocol-checkout{display:none;position:fixed;top:0;left:0;width:100%;height:100vh;border:0;z-index:-2147483647}.unlock-protocol-checkout.show{display:block;z-index:2147483647}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})(); | ||
publicLockVersionToDeploy: 13, | ||
cardPurchaserAddress: "0x061Bfda0446c5f71Da760BC31371CB95808f5d82", | ||
featured: !0, | ||
@@ -924,0 +925,0 @@ publicProvider: "https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161", |
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".unlock-protocol-checkout{display:none;position:fixed;top:0;left:0;width:100%;height:100vh;border:0;z-index:-2147483647}.unlock-protocol-checkout.show{display:block;z-index:2147483647}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})(); | ||
(function(l,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("postmate")):typeof define=="function"&&define.amd?define(["exports","postmate"],h):(l=typeof globalThis<"u"?globalThis:l||self,h(l["@unlock-protocol/paywall"]={},l.Postmate))})(this,function(l,h){"use strict";const fe="",p=(e,a)=>{let t;e===u.status&&p("unlockProtocol",a.state);try{t=new window.CustomEvent(e,{detail:a})}catch{t=window.document.createEvent("customevent"),t.initCustomEvent(e,!0,!0,a)}window.dispatchEvent(t)},u={status:"unlockProtocol.status",authenticated:"unlockProtocol.authenticated",transactionSent:"unlockProtocol.transactionSent",closeModal:"unlockProtocol.closeModal"},I=e=>{const a={},t={writable:!1,configurable:!1,enumerable:!1},r=Object.keys(e).map(o=>({[o]:{value:e[o],...t}}));Object.defineProperties(a,Object.assign({},...r)),(Object.freeze||Object)(a);try{Object.defineProperties(window,{unlockProtocol:{value:a,...t}})}catch{console.warn("WARNING: unlockProtocol already defined, cannot re-define it")}},b=(e,a)=>{const t={...e};return t.autoconnect&&(t.useDelegatedProvider=!!a),t.useDelegatedProvider||(t.useDelegatedProvider=!!a),t};function k(){const e=localStorage;try{const a="__storage_test__";return e.setItem(a,a),e.removeItem(a),!0}catch(a){return a instanceof DOMException&&(a.code===22||a.code===1014||a.name==="QuotaExceededError"||a.name==="NS_ERROR_DOM_QUOTA_REACHED")&&e.length!==0}}function $(e,a){k()&&localStorage.setItem(e,JSON.stringify(a))}function M(e){if(k()){const a=localStorage.getItem(e)||!1;return a?JSON.parse(a):void 0}}const N=async(e,a,t)=>{const r={method:"eth_call",params:[{to:a,data:`0x6d8ea5b4000000000000000000000000${t.substring(2)}`},"latest"],id:31337,jsonrpc:"2.0"};try{const s=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!s)return 0;const{result:o}=await s.json();return parseInt(o,16)===1}catch(s){return console.error(`Error fetching hasValidKey for ${t} on ${a}: ${s}`),!1}},V=async(e,a,t)=>{const r=[];return await Promise.all(Object.entries(a.locks).map(async([s])=>{const o=a.locks[s].network||a.network,{provider:c}=t[o];await N(c,s,e)&&r.push(s)})),r},W=e=>{if(e.ethereum)return e.ethereum;if(e.web3)return e.web3.currentProvider},L=async e=>{if(!e)throw new Error("Fatal: no web3 provider found.");return e.enable?await e.enable():null};let y="https://paywall.unlock-protocol.com";const R=e=>{try{return new URL(e)}catch{return null}};if(typeof window<"u"){const e=document?.currentScript?.getAttribute("src");if(e){const a=R(e);a&&["paywall.unlock-protocol.com","staging-paywall.unlock-protocol.com"].includes(a.hostname)&&(y=a.toString())}}const j=new URL(y);function q(e){let a;return e.match("staging-paywall.unlock-protocol.com")?a="https://staging-app.unlock-protocol.com":e.match("paywall.unlock-protocol.com")?a="https://app.unlock-protocol.com":a="http://localhost:3000",{unlockAppUrl:a}}const{unlockAppUrl:E}=q(j.toString()),D="unlock-protocol-checkout";let f;class K{constructor(a,t,r){this.childCallBuffer=[],this.authenticate=s=>{this.iframe?this.showIframe():this.shakeHands(s||E),this.sendOrBuffer("authenticate",{})},this.loadCheckoutModal=(s,o)=>{this.iframe?this.showIframe():this.shakeHands(o||E),this.sendOrBuffer("setConfig",b(s||this.paywallConfig,this.provider))},this.getUserAccountAddress=()=>this.userAccountAddress,this.resetConfig=s=>{this.paywallConfig=b(s,this.provider),this.checkKeysAndLock(),this.sendOrBuffer("setConfig",b(s||this.paywallConfig,this.provider))},this.getState=()=>this.lockStatus,this.cacheUserInfo=async s=>{$("userInfo",s)},this.loadCache=async()=>{const s=M("userInfo");if(!s)return this.lockPage();this.userAccountAddress=s.address,this.checkKeysAndLock()},this.shakeHands=async s=>{console.debug(`Connecting to ${s}`),f||(f=await new h({url:`${s}/checkout`,classListArray:[D]})),this.child=f,this.iframe=document.getElementsByClassName(D)[0],this.showIframe(),this.child.on("checkout.closeModal",this.hideIframe),this.child.on("checkout.userInfo",this.handleUserInfoEvent),this.child.on("checkout.methodCall",this.handleMethodCallEvent),this.child.on("checkout.onEvent",this.handleOnEventEvent),this.child.on("checkout.enable",this.handleEnable),this.child.on("checkout.transactionInfo",this.handleTransactionInfoEvent),this.childCallBuffer.forEach(o=>this.child.call(...o))},this.sendOrBuffer=(s,o)=>{this.child?this.child.call(s,o):this.childCallBuffer.push([s,o])},this.handleTransactionInfoEvent=async({hash:s,lock:o})=>{p(u.transactionSent,{hash:s,lock:o}),!this.paywallConfig.pessimistic&&s&&o&&this.unlockPage([o])},this.handleUserInfoEvent=async s=>{this.userAccountAddress=s.address,p(u.authenticated,s),this.cacheUserInfo(s),this.checkKeysAndLock()},this.handleMethodCallEvent=async({method:s,params:o,id:c})=>{const n=this.provider;if(n.request)return n.request({method:s,params:o,id:c}).then(m=>{this.child.call("resolveMethodCall",{id:c,error:null,response:m})}).catch(m=>{this.child.call("resolveMethodCall",{id:c,error:m,response:null})});n.sendAsync?n.sendAsync({method:s,params:o,id:c},(m,be)=>{this.child.call("resolveMethodCall",{id:c,error:m,response:be})}):console.error("unknown method to call provider! Please make sure you use and EIP1193 provider!")},this.handleOnEventEvent=async s=>{this.provider.on(s,()=>{this.child.call("resolveOnEvent",s)})},this.handleEnable=async()=>{const s=await L(this.provider);this.child.call("resolveOnEnable",s)},this.showIframe=()=>{this.iframe.classList.add("show")},this.hideIframe=()=>{p(u.closeModal,{}),this.iframe.classList.remove("show")},this.lockPage=()=>{this.lockStatus="locked",p(u.status,{state:this.lockStatus})},this.unlockPage=(s=[])=>{this.lockStatus="unlocked",p(u.status,{locks:s,state:this.lockStatus})},this.networkConfigs=t,r&&(a.autoconnect=!0),this.provider=r||W(window),this.paywallConfig=b(a,this.provider),this.loadCache()}async checkKeysAndLock(){if(!this.userAccountAddress)return;this.lockStatus=void 0;const a=await V(this.userAccountAddress,this.paywallConfig,this.networkConfigs);return a.length?this.unlockPage(a):this.lockPage()}}var G=Object.create,C=Object.defineProperty,z=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,J=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty,x=(e,a)=>function(){return a||(0,e[g(e)[0]])((a={exports:{}}).exports,a),a.exports},X=(e,a)=>{for(var t in a)C(e,t,{get:a[t],enumerable:!0})},Q=(e,a,t,r)=>{if(a&&typeof a=="object"||typeof a=="function")for(let s of g(a))!Y.call(e,s)&&s!==t&&C(e,s,{get:()=>a[s],enumerable:!(r=z(a,s))||r.enumerable});return e},i=(e,a,t)=>(t=e!=null?G(J(e)):{},Q(a||!e||!e.__esModule?C(t,"default",{value:e,enumerable:!0}):t,e)),Z=x({"../types/dist/types/unlockTypes.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.KeyStatus=e.HooksName=e.HookType=e.TransactionStatus=e.TransactionType=void 0,function(a){a.LOCK_CREATION="LOCK_CREATION",a.KEY_PURCHASE="KEY_PURCHASE",a.WITHDRAWAL="WITHDRAWAL",a.UPDATE_KEY_PRICE="UPDATE_KEY_PRICE"}(e.TransactionType||(e.TransactionType={})),function(a){a.SUBMITTED="submitted",a.PENDING="pending",a.MINED="mined",a.STALE="stale",a.FAILED="failed",a.NONE=""}(e.TransactionStatus||(e.TransactionStatus={})),function(a){a.CUSTOM_CONTRACT="CUSTOM_CONTRACT",a.PASSWORD="PASSWORD",a.CAPTCHA="CAPTCHA"}(e.HookType||(e.HookType={})),e.HooksName=["onKeyPurchaseHook","onKeyCancelHook","onValidKeyHook","onTokenURIHook","onKeyTransferHook","onKeyExtendHook","onKeyGrantHook"],function(a){a.NONE="none",a.CONFIRMING="confirming",a.CONFIRMED="confirmed",a.EXPIRED="expired",a.VALID="valid",a.SUBMITTED="submitted",a.PENDING="pending",a.FAILED="failed"}(e.KeyStatus||(e.KeyStatus={}))}}),d=x({"../types/dist/index.js"(e){var a=e&&e.__createBinding||(Object.create?function(r,s,o,c){c===void 0&&(c=o);var n=Object.getOwnPropertyDescriptor(s,o);(!n||("get"in n?!s.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return s[o]}}),Object.defineProperty(r,c,n)}:function(r,s,o,c){c===void 0&&(c=o),r[c]=s[o]}),t=e&&e.__exportStar||function(r,s){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&a(s,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),t(Z(),e)}}),A={};X(A,{arbitrum:()=>le,avalanche:()=>ue,baseGoerli:()=>me,bsc:()=>te,celo:()=>de,gnosis:()=>se,goerli:()=>ne,localhost:()=>ee,mainnet:()=>ae,mumbai:()=>ce,optimism:()=>re,palm:()=>he,polygon:()=>oe});var ee={publicLockVersionToDeploy:13,id:31337,name:"localhost",chain:"localhost",provider:"http://127.0.0.1:8545",publicProvider:"http://127.0.0.1:8545",subgraph:{endpoint:"http://localhost:8000/subgraphs/name/unlock-protocol/unlock",endpointV2:"http://localhost:8000/subgraphs/name/testgraph"},nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18,coingecko:"ethereum"},serializerAddress:"0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1",description:"Localhost network.",isTestNetwork:!0,fullySubsidizedGas:!0},B=i(d()),ae={publicLockVersionToDeploy:13,featured:!0,id:1,publicProvider:"https://cloudflare-eth.com/v1/mainnet",provider:"https://rpc.unlock-protocol.com/1",unlockAddress:"0xe79B93f8E22676774F2A8dAd469175ebd00029FA",previousDeploys:[{unlockAddress:"0x3d5409CcE1d45233dE1D4eBDEe74b8E004abDD13",startBlock:7120795}],multisig:"0x9168EABE624e9515f3836bA1716EC1DDd4C461D4",keyManagerAddress:"0x9A1f43090307034DBFBE2ba20320Ce815ff046D4",name:"Ethereum",chain:"ethereum",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/unlock",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/mainnet-v2"},explorer:{name:"Etherscan",urls:{base:"https://etherscan.io/",address:e=>`https://etherscan.io/address/${e}`,transaction:e=>`https://etherscan.io/tx/${e}`,token:(e,a)=>`https://etherscan.com/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>`https://opensea.io/assets/${e}/${a}`,collectionUrl:e=>`https://opensea.io/assets/${e}`,profileUrl:e=>`https://opensea.io/${e}`},blockScan:{url:e=>`https://blockscan.com/address/${e}`},nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18,coingecko:"ethereum"},startBlock:16989e3,description:"The original and most secure EVM network. Gas fees are expensive on this network.",url:"https://ethereum.org/en/",isTestNetwork:!1,maxFreeClaimCost:1,uniswapV2:{oracle:"0xE118d797E1c44F2e2A2823191a51D8b46a4A1D51"},uniswapV3:{subgraph:"https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3",factoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",oracle:"0x951A807b523cF6e178e0ab80fBd2C9B035521931",universalRouterAddress:"0xEf1c6E67703c7BD7107eed8303Fbe6EC2554BF6B"},swapPurchaser:"0x7039d2BB4CfC5f5DA49E6b4b9c40400bccb0d1E8",wrappedNativeCurrency:{name:"Wrapped Ether",symbol:"WETH",decimals:18,address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},tokens:[{name:"Wrapped Ether",address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",symbol:"WETH",decimals:18},{name:"Dai Stablecoin",address:"0x6B175474E89094C44Da98b954EedeAC495271d0F",symbol:"DAI",decimals:18},{name:"USD Coin",address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",symbol:"USDC",decimals:6},{address:"0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0",name:"Polygon",symbol:"MATIC",decimals:18},{name:"Tether USD",address:"0xdAC17F958D2ee523a2206206994597C13D831ec7",symbol:"USDT",decimals:6},{name:"Wrapped BTC",address:"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",symbol:"WBTC",decimals:8},{address:"0x0D8775F648430679A709E98d2b0Cb6250d2887EF",name:"Basic Attention Token",symbol:"BAT",decimals:18}],hooks:{onKeyPurchaseHook:[{id:B.HookType.PASSWORD,name:"Password required",address:"0x936Ed3E71b5990bC9A94074835D08C6ca7bbFad0"},{id:B.HookType.CAPTCHA,name:"Captcha",address:"0x0959482CbFB3c3C85ECd7bf690a0cde808eE8471"}]}},v=i(d()),se={publicLockVersionToDeploy:13,featured:!0,publicProvider:"https://rpc.gnosischain.com",provider:"https://rpc.unlock-protocol.com/100",unlockAddress:"0x1bc53f4303c711cc693F6Ec3477B83703DcB317f",serializerAddress:"0x646E373EAf8a4AEc31Bf62B7Fd6fB59296d6CdA9",multisig:"0xfAC611a5b5a578628C28F77cEBDDB8C6159Ae79D",keyManagerAddress:"0xBa81C9379AC1221BF8C100800dD0B0b0b048ba14",id:100,name:"Gnosis Chain",chain:"xdai",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/xdai",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/gnosis-v2"},explorer:{name:"Blockscout",urls:{base:"https://gnosisscan.io/",address:e=>`https://gnosisscan.io/address/${e}/transactions`,transaction:e=>`https://gnosisscan.io/tx/${e}`,token:(e,a)=>`https://gnosisscan.io/token/${e}/token-holders#holders`}},opensea:{tokenUrl:(e,a)=>null},nativeCurrency:{name:"xDAI",symbol:"xDAI",decimals:18,coingecko:"xdai",coinbase:"DAI"},startBlock:19338700,previousDeploys:[{unlockAddress:"0x14bb3586Ce2946E71B95Fe00Fc73dd30ed830863",startBlock:14521200}],description:"Gnosis Chain is one of the first Ethereum sidechains and has stayed true to its values.",url:"https://www.gnosis.io/",faucet:"https://gnosisfaucet.com/",isTestNetwork:!1,maxFreeClaimCost:100,tokens:[{name:"USD Coin",symbol:"USDC",decimals:6,address:"0xddafbb505ad214d7b80b1f830fccc89b60fb7a83"},{name:"Tether USD",decimals:6,address:"0x4ecaba5870353805a9f068101a40e0f32ed605c6",symbol:"USDT"}],hooks:{onKeyPurchaseHook:[{id:v.HookType.PASSWORD,name:"Password required",address:"0x927D68eAE936Ec0111f01Fc4Ddd9cC57DB3f0Af2"},{id:v.HookType.CAPTCHA,name:"Captcha",address:"0x6E422f8eDCE3586e8c384f7e602D3b5706463e12"}]}},F=i(d()),oe={publicLockVersionToDeploy:13,featured:!0,publicProvider:"https://polygon-rpc.com/",provider:"https://rpc.unlock-protocol.com/137",unlockAddress:"0xE8E5cd156f89F7bdB267EabD5C43Af3d5AF2A78f",multisig:"0x479f3830fbd715342868BA95E438609BCe443DFB",serializerAddress:"0x646e373eaf8a4aec31bf62b7fd6fb59296d6cda9",keyManagerAddress:"0x7111a1aDfbED501beaAd556Bba7cB6dCa3296aa9",id:137,name:"Polygon",chain:"polygon",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/polygon",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/polygon-v2",networkName:"matic"},url:"https://polygon.technology/",explorer:{name:"Polygonscan",urls:{base:"https://polygonscan.com/",address:e=>`https://polygonscan.com/address/${e}`,transaction:e=>`https://polygonscan.com/tx/${e}`,token:(e,a)=>`https://polygonscan.com/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>`https://opensea.io/assets/matic/${e}/${a}`,collectionUrl:e=>`https://opensea.io/assets/matic/${e}`},nativeCurrency:{name:"Matic",symbol:"MATIC",decimals:18,coingecko:"matic-network"},startBlock:21986688,previousDeploys:[{unlockAddress:"0x14bb3586Ce2946E71B95Fe00Fc73dd30ed830863",startBlock:15714206}],description:"Polygon is a side-chain to build and scale your projects on Ethereum, the world's largest blockchain ecosystem.",isTestNetwork:!1,maxFreeClaimCost:100,uniswapV2:{oracle:"0xE20ef269CE3ac2Af8107E706FC2Ec6E1831e3125"},uniswapV3:{factoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",oracle:"0xE77c7F14e8EB9925ca418bF80c0a81a5B9C87683",universalRouterAddress:"0x4C60051384bd2d3C01bfc845Cf5F4b44bcbE9de5"},swapPurchaser:"0x33aC9CAE1Cd9CBB191116607f564F7381d81BAD9",wrappedNativeCurrency:{name:"Wrapped MATIC",symbol:"WMATIC",decimals:18,address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"},tokens:[{name:"Wrapped Ether",address:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",symbol:"WETH",decimals:18},{name:"Dai Stablecoin",address:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",symbol:"DAI",decimals:18},{name:"Tether USD",address:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F",symbol:"USDT",decimals:6},{name:"USD Coin",address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",symbol:"USDC",decimals:6},{name:"Wrapped BTC",address:"0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6",symbol:"WBTC",decimals:8}],hooks:{onKeyPurchaseHook:[{id:F.HookType.PASSWORD,name:"Password required",address:"0x9F4AE507d7E91Ab37CF35f792940fE079bd4E24d"},{id:F.HookType.CAPTCHA,name:"Captcha",address:"0xA0863a0B58457A86c937e91533e3F6B8dA27cf4b"}]}},w=i(d()),te={publicLockVersionToDeploy:13,publicProvider:"https://bsc-dataseed.binance.org/",provider:"https://rpc.unlock-protocol.com/56",unlockAddress:"0xeC83410DbC48C7797D2f2AFe624881674c65c856",keyManagerAddress:"0x34EbEc0AE80A2d078DE5489f0f5cAa4d3aaEA355",id:56,name:"BNB Chain",chain:"bsc",multisig:"0x373D7cbc4F2700719DEa237500c7a154310B0F9B",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/bsc",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/bsc-v2"},explorer:{name:"BscScan",urls:{base:"https://bscscan.com/",address:e=>`https://bscscan.com/address/${e}`,transaction:e=>`https://bscscan.com/tx/${e}`,token:(e,a)=>`https://bscscan.com/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>null},nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18,coingecko:"binancecoin"},uniswapV3:{universalRouterAddress:"0x4648a43B2C14Da09FdF82B161150d3F634f40491"},startBlock:13079e3,previousDeploys:[{unlockAddress:"0x99b1348a9129ac49c6de7F11245773dE2f51fB0c",startBlock:12396e3}],description:"The best-performing EVM compatible layer 1. Fully compatible tooling for EVM with up to 35 times of capacity.",url:"https://www.bnbchain.org/en",isTestNetwork:!1,maxFreeClaimCost:1,swapPurchaser:"0x5Ad19758103D474bdF5E8764D97cB02b83c3c844",tokens:[{name:"Ethereum",symbol:"ETH",decimals:18,address:"0x2170ed0880ac9a755fd29b2688956bd959f933f8"},{name:"USD Coin",symbol:"USDC",decimals:18,address:"0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d"},{name:"Tether",symbol:"USDT",decimals:18,address:"0x55d398326f99059ff775485246999027b3197955"},{name:"Dai",symbol:"DAI",decimals:18,address:"0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3"}],hooks:{onKeyPurchaseHook:[{id:w.HookType.PASSWORD,name:"Password required",address:"0x338b1f296217485bf4df6CE9f93ab4C73F72b57D"},{id:w.HookType.CAPTCHA,name:"Captcha",address:"0x88ed81de2d62849B337c3f31cd84D041bF26A38C"}]}},T=i(d()),re={publicLockVersionToDeploy:13,featured:!0,publicProvider:"https://mainnet.optimism.io",provider:"https://rpc.unlock-protocol.com/10",unlockAddress:"0x99b1348a9129ac49c6de7F11245773dE2f51fB0c",multisig:"0x6E78b4447e34e751EC181DCBed63633aA753e145",keyManagerAddress:"0x8c5D54B2CAA4C2D08B0DDF82a1e6D2641779B8EC",id:10,name:"Optimism",chain:"optimism",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/optimism",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/optimism-v2"},explorer:{name:"Etherscan",urls:{base:"https://optimistic.etherscan.io/",address:e=>`https://optimistic.etherscan.io/address/${e}`,transaction:e=>`https://optimistic.etherscan.io/tx/${e}`,token:(e,a)=>`https://optimistic.etherscan.io/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>`https://opensea.io/assets/optimism/${e}/${a}`,collectionUrl:e=>`https://opensea.io/assets/optimism/${e}`},nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18,coingecko:"ethereum"},description:"Optimism is a Layer 2 Optimistic Rollup network designed to utilize the strong security guarantees of Ethereum while reducing its cost and latency.",url:"https://www.optimism.io/",isTestNetwork:!1,maxFreeClaimCost:10,uniswapV3:{factoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",oracle:"0x1FF7e338d5E582138C46044dc238543Ce555C963",universalRouterAddress:"0xb555edF5dcF85f42cEeF1f3630a52A108E55A654"},swapPurchaser:"0x72381052e4F7765A00a403891420BF75876c75bB",wrappedNativeCurrency:{name:"Wrapped Ether",symbol:"WETH",decimals:18,address:"0x4200000000000000000000000000000000000006"},tokens:[{name:"Ethereum",symbol:"ETH",decimals:18,address:"0x0000000000000000000000000000000000000000"},{name:"USD Coin",symbol:"USDC",decimals:6,address:"0x7f5c764cbc14f9669b88837ca1490cca17c31607"},{name:"Tether",symbol:"USDT",decimals:6,address:"0x94b008aa00579c1307b0ef2c499ad98a8ce58e58"},{name:"Dai",symbol:"DAI",decimals:18,address:"0xda10009cbd5d07dd0cecc66161fc93d7c9000da1"}],hooks:{onKeyPurchaseHook:[{id:T.HookType.PASSWORD,name:"Password required",address:"0x34EbEc0AE80A2d078DE5489f0f5cAa4d3aaEA355"},{id:T.HookType.CAPTCHA,name:"Captcha",address:"0x639143cbf90F27eA5Ce4b3A7D869d4D7878009A5"}]}},P=i(d()),ce={publicLockVersionToDeploy:13,publicProvider:"https://matic-mumbai.chainstacklabs.com",provider:"https://rpc.unlock-protocol.com/80001",unlockAddress:"0x1FF7e338d5E582138C46044dc238543Ce555C963",multisig:"0x12E37A8880801E1e5290c815a894d322ac591607",keyManagerAddress:"0x8c5D54B2CAA4C2D08B0DDF82a1e6D2641779B8EC",id:80001,name:"Mumbai (Polygon)",chain:"mumbai",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/mumbai",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/mumbai-v2"},explorer:{name:"PolygonScan (Mumbai)",urls:{base:"https://mumbai.polygonscan.com/",address:e=>`https://mumbai.polygonscan.com/address/${e}`,transaction:e=>`https://mumbai.polygonscan.com/tx/${e}`,token:(e,a)=>`https://mumbai.polygonscan.com/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>null},nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18,coingecko:"matic-network"},startBlock:26584912,previousDeploys:[],description:"Polygon test network. Do not use for production.",url:"https://mumbai.polygonscan.com/",faucet:"https://faucet.polygon.technology/",isTestNetwork:!0,fullySubsidizedGas:!0,maxFreeClaimCost:500,uniswapV3:{factoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",oracle:"0x5108412Dd50A6ea79d2F13D5d1A23FDD9bF532db",universalRouterAddress:"0x4648a43B2C14Da09FdF82B161150d3F634f40491"},swapPurchaser:"0x302E9D970A657B42c1C124C69f3a1c1575CB4AD3",wrappedNativeCurrency:{name:"Wrapped MATIC",symbol:"WMATIC",decimals:18,address:"0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889"},tokens:[{name:"USD Coin",address:"0x0FA8781a83E46826621b3BC094Ea2A0212e71B23",symbol:"USDC",decimals:6,mainnetAddress:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"Wrapped Ether",address:"0xA6FA4fB5f76172d178d61B04b0ecd319C5d1C0aa",symbol:"WETH",decimals:18,mainnetAddress:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},{name:"Wrapped Matic",address:"0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889",symbol:"WMATIC",decimals:18,mainnetAddress:"0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0"},{name:"Dai Stablecoin",address:"0xcB1e72786A6eb3b44C2a2429e317c8a2462CFeb1",symbol:"DAI",decimals:18,mainnetAddress:"0x6B175474E89094C44Da98b954EedeAC495271d0F"}],hooks:{onKeyPurchaseHook:[{id:P.HookType.PASSWORD,name:"Password required",address:"0x34EbEc0AE80A2d078DE5489f0f5cAa4d3aaEA355"},{id:P.HookType.CAPTCHA,name:"Captcha",address:"0x639143cbf90F27eA5Ce4b3A7D869d4D7878009A5"}]}},S=i(d()),ne={publicLockVersionToDeploy:13,featured:!0,publicProvider:"https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",provider:"https://rpc.unlock-protocol.com/5",unlockAddress:"0x627118a4fB747016911e5cDA82e2E77C531e8206",multisig:"0x95C06469e557d8645966077891B4aeDe8D55A755",keyManagerAddress:"0xc328aE7fc36f975BE120aaa99f2d96C3E732e5b6",id:5,name:"Goerli (Testnet)",chain:"goerli",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/goerli",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/goerli-v2"},explorer:{name:"Goerli (Testnet)",urls:{base:"https://goerli.etherscan.io/",address:e=>`https://goerli.etherscan.io/address/${e}`,transaction:e=>`https://goerli.etherscan.io/tx/${e}`,token:(e,a)=>`https://goerli.etherscan.io/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>`https://testnets.opensea.io/assets/goerli/${e}/${a}`,collectionUrl:e=>`https://testnets.opensea.io/assets/goerli/${e}`},description:"Main Ethereum test network. Do not use for production.",faucet:"https://goerlifaucet.com/",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18,coingecko:"ethereum"},startBlock:7179039,previousDeploys:[],isTestNetwork:!0,fullySubsidizedGas:!0,maxFreeClaimCost:1e5,uniswapV3:{factoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",oracle:"0x25197CaCDE16500032EF4B35d60c6f7aEd4a38a5",universalRouterAddress:"0x4648a43B2C14Da09FdF82B161150d3F634f40491"},swapPurchaser:"0x49aD0039B30De002d4C27A6E8Fc026c7e23d083C",wrappedNativeCurrency:{name:"Wrapped Ether",symbol:"WETH",decimals:18,address:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6"},tokens:[{name:"USD Coin",symbol:"USDC",address:"0x07865c6E87B9F70255377e024ace6630C1Eaa37F",decimals:6,mainnetAddress:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"Wrapped Ether",address:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",symbol:"WETH",decimals:18,mainnetAddress:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},{name:"Uniswap",address:"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",symbol:"UNI",decimals:18,mainnetAddress:"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984"}],hooks:{onKeyPurchaseHook:[{id:S.HookType.PASSWORD,name:"Password required",address:"0xCa837900f7DaB40787b608b6738d1B730f1d2759"},{id:S.HookType.CAPTCHA,name:"Captcha",address:"0xbBBdD46ef548712c203d306F6587336EC15E0d7f"}]}},ie=i(d()),de={publicLockVersionToDeploy:13,publicProvider:"https://forno.celo.org",provider:"https://rpc.unlock-protocol.com/42220",unlockAddress:"0x1FF7e338d5E582138C46044dc238543Ce555C963",multisig:"0xc293E2da9E558bD8B1DFfC4a7b174729fAb2e4E8",keyManagerAddress:"0xF6963D3c395A7914De77f771C2fC44b47B8379AC",id:42220,name:"Celo",chain:"celo",description:"Celo is the carbon-negative, mobile-first, EVM-compatible blockchain ecosystem leading a thriving new digital economy for all.",url:"https://celo.org",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/celo",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/celo-v2"},explorer:{name:"Celoscan",urls:{base:"https://celoscan.io/",address:e=>`https://celoscan.io/address/${e}`,transaction:e=>`https://celoscan.io/tx/${e}`,token:(e,a)=>`https://celoscan.io/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>null},nativeCurrency:{name:"CELO",symbol:"CELO",decimals:18,coingecko:"celo"},startBlock:7179039,previousDeploys:[],isTestNetwork:!1,maxFreeClaimCost:1,uniswapV3:{factoryAddress:"0xAfE208a311B21f13EF87E33A90049fC17A7acDEc",quoterAddress:"0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8",oracle:"0x5108412Dd50A6ea79d2F13D5d1A23FDD9bF532db",universalRouterAddress:"0xC73d61d192FB994157168Fb56730FdEc64C9Cb8F"},swapPurchaser:"0x42F5c7839Bf00FAea6ca09517E96E82e7364384D",wrappedNativeCurrency:{name:"Celo native asset",symbol:"CELO",decimals:18,address:"0x471ece3750da237f93b8e339c536989b8978a438"},tokens:[{name:"USD Coin",symbol:"USDC",decimals:6,address:"0xef4229c8c3250c675f21bcefa42f58efbff6002a",mainnetAddress:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"Dai Stablecoin",address:"0xE4fE50cdD716522A56204352f00AA110F731932d",symbol:"DAI",decimals:18,mainnetAddress:"0x6B175474E89094C44Da98b954EedeAC495271d0F"}],hooks:{onKeyPurchaseHook:[{id:ie.HookType.CAPTCHA,name:"Captcha",address:"0x80E085D7591C61153D876b5171dc25756a7A3254"}]}},_=i(d()),le={publicLockVersionToDeploy:13,featured:!0,publicProvider:"https://arb1.arbitrum.io/rpc",provider:"https://rpc.unlock-protocol.com/42161",unlockAddress:"0x1FF7e338d5E582138C46044dc238543Ce555C963",multisig:"0x310e9f9E3918a71dB8230cFCF32a083c7D9536d0",keyManagerAddress:"0x520294E736167303efa038205D4391b58261BC9c",id:42161,name:"Arbitrum",chain:"arbitrum",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/arbitrum",networkName:"arbitrum-one",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/arbitrum-v2"},explorer:{name:"Arbitrum",urls:{base:"https://arbiscan.io/",address:e=>`https://arbiscan.io/address/${e}`,transaction:e=>`https://arbiscan.io/tx/${e}`,token:(e,a)=>`https://arbiscan.io/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>`https://opensea.io/assets/arbitrum/${e}/${a}`,collectionUrl:e=>`https://opensea.io/assets/arbitrum/${e}`},nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18,coingecko:"ethereum"},startBlock:17429533,previousDeploys:[],isTestNetwork:!1,maxFreeClaimCost:100,description:"Arbitrum One is a Layer 2 (L2) chain running on top of Ethereum Mainnet that enables high-throughput, low cost smart contracts operations.",url:"https://arbitrum.io/",uniswapV3:{factoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",oracle:"0x821d830a7b9902F83359Bf3Ac727B04b10FD461d",universalRouterAddress:"0x4C60051384bd2d3C01bfc845Cf5F4b44bcbE9de5"},swapPurchaser:"0x0C33884Ab3eE799E7628FA3fCF20B81997745a72",wrappedNativeCurrency:{name:"Wrapped Ether",symbol:"WETH",decimals:18,address:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"},tokens:[{name:"Ethereum",symbol:"WETH",decimals:18,address:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1"},{name:"USD Coin",symbol:"USDC",decimals:6,address:"0xff970a61a04b1ca14834a43f5de4533ebddb5cc8"},{name:"Tether",symbol:"USDT",decimals:6,address:"0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"},{name:"Dai",symbol:"DAI",decimals:18,address:"0xda10009cbd5d07dd0cecc66161fc93d7c9000da1"},{name:"Wrapped Bitcoin",symbol:"WBTC",decimals:8,address:"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f"}],hooks:{onKeyPurchaseHook:[{id:_.HookType.PASSWORD,name:"Password required",address:"0xd0b14797b9D08493392865647384974470202A78"},{id:_.HookType.CAPTCHA,name:"Captcha",address:"0xF6963D3c395A7914De77f771C2fC44b47B8379AC"}]}},pe=i(d()),ue={publicLockVersionToDeploy:13,publicProvider:"https://api.avax.network/ext/bc/C/rpc",provider:"https://rpc.unlock-protocol.com/43114",unlockAddress:"0x70cBE5F72dD85aA634d07d2227a421144Af734b3",multisig:"0xEc7777C51327917fd2170c62873272ea168120Cb",keyManagerAddress:"0x8e0B46ec3B95c81355175693dA0083b00fCc1326",id:43114,name:"Avalanche (C-Chain)",chain:"avax",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/avalanche",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/avalanche-v2"},explorer:{name:"Snowtrace (Avalanche)",urls:{base:"https://snowtrace.io/",address:e=>`https://snowtrace.io/address/${e}`,transaction:e=>`https://snowtrace.io/tx/${e}`,token:(e,a)=>`https://snowtrace.io/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>null},nativeCurrency:{name:"AVAX",symbol:"AVAX",decimals:18,coingecko:"avalanche-2"},startBlock:17188332,previousDeploys:[],isTestNetwork:!1,maxFreeClaimCost:1,description:"Avalanche is an open, programmable smart contracts platform for decentralized applications.",url:"https://www.avalabs.org/",tokens:[{name:"Ethereum",symbol:"WETH",decimals:18,address:"0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab"},{name:"USD Coin",symbol:"USDC",decimals:6,address:"0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664"},{name:"Tether",symbol:"USDT",decimals:6,address:"0xc7198437980c041c805a1edcba50c1ce5db95118"},{name:"Dai",symbol:"DAI",decimals:18,address:"0xd586e7f844cea2f87f50152665bcbc2c279d8d70"},{name:"Wrapped Bitcoin",symbol:"WBTC",decimals:8,address:"0x50b7545627a5162f82a992c33b87adc75187b218"}],hooks:{onKeyPurchaseHook:[{id:pe.HookType.CAPTCHA,name:"Captcha",address:"0x2499D94880B30fA505543550ac8a1e24cfFeFe78"}]}},he={publicLockVersionToDeploy:13,fullySubsidizedGas:!0,publicProvider:"https://palm-mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",provider:"https://rpc.unlock-protocol.com/11297108109",unlockAddress:"0x0314E34345C2327aC753C5Bf0D0751Cf6C1BfdE2",multisig:"0xABEAf8F93bEA2a2E65866CccC3060626eEc7d304",id:11297108109,name:"Palm",chain:"palm",keyManagerAddress:"0x70cBE5F72dD85aA634d07d2227a421144Af734b3",subgraph:{endpoint:"https://graph.palm.io/subgraphs/name/unlock-protocol/Palm-mainnet",networkName:"palm-mainnet",endpointV2:"https://graph.palm.io/subgraphs/name/unlock-protocol/Palm-mainnet"},explorer:{name:"Palm Explorer",urls:{base:"https://explorer.palm.io/",address:e=>`https://explorer.palm.io/address/${e}`,transaction:e=>`https://explorer.palm.io/tx/${e}`,token:(e,a)=>`https://explorer.palm.io/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>null},erc20:null,nativeCurrency:{name:"PALM",symbol:"PALM",decimals:18,coingecko:"palm"},startBlock:9856400,previousDeploys:[],isTestNetwork:!1,maxFreeClaimCost:1,description:"The Palm network is an Ethereum-compatible sidechain, built to serve as the foundation of a new scalable and sustainable ecosystem for NFTs. It is designed by, and for, Ethereum developers and features low gas costs and fast transaction finality.",uniswapV3:{factoryAddress:"0x",quoterAddress:"0x",oracle:"0x"},wrappedNativeCurrency:{name:"Wrapped PALM",symbol:"WPALM",decimals:18,address:"0xF98cABF0a963452C5536330408B2590567611a71"},tokens:[{name:"Wrapped ETH",symbol:"WETH",decimals:18,address:"0x726138359C17F1E56bA8c4F737a7CAf724F6010b"},{name:"Dai",symbol:"DAI",decimals:18,address:"0x4C1f6fCBd233241bF2f4D02811E3bF8429BC27B8"}]},me={publicLockVersionToDeploy:13,publicProvider:"https://goerli.base.org",provider:"https://goerli.base.org",unlockAddress:"0x51A1ceB83B83F1985a81C295d1fF28Afef186E02",multisig:"",keyManagerAddress:"0x70cBE5F72dD85aA634d07d2227a421144Af734b3",id:84531,name:"Base Goerli (Testnet)",chain:"base-goerli",subgraph:{networkName:"base-testnet",endpoint:"https://api.studio.thegraph.com/query/44190/unlock-protocol-base-goerli/0.0.2",endpointV2:"https://api.studio.thegraph.com/query/44190/unlock-protocol-base-goerli/0.0.2"},explorer:{name:"Base Goerli",urls:{base:"https://goerli.basescan.org/",address:e=>`https://goerli.basescan.org/address/${e}`,transaction:e=>`https://goerli.basescan.org/tx/${e}`,token:(e,a)=>`https://goerli.basescan.org/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>`https://testnets.opensea.io/assets/goerli/${e}/${a}`,collectionUrl:e=>`https://testnets.opensea.io/assets/goerli/${e}`},description:"Main Ethereum test network. Do not use for production.",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18,coingecko:"ethereum"},startBlock:2247300,isTestNetwork:!0,fullySubsidizedGas:!0,maxFreeClaimCost:1e4},H={};Object.keys(A).forEach(e=>{const a=A[e];H[a.id]=a});var O=H;const U={};Object.keys(O).map(Number).forEach(e=>{const{provider:a,publicProvider:t,name:r,id:s,subgraph:o}=O[e];U[e]={id:s,name:r,publicProvider:t,provider:a,subgraph:o}}),l.Paywall=K,l.networkConfigs=U,l.setupUnlockProtocolVariable=I,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}); | ||
(function(l,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("postmate")):typeof define=="function"&&define.amd?define(["exports","postmate"],h):(l=typeof globalThis<"u"?globalThis:l||self,h(l["@unlock-protocol/paywall"]={},l.Postmate))})(this,function(l,h){"use strict";const fe="",p=(e,a)=>{let t;e===u.status&&p("unlockProtocol",a.state);try{t=new window.CustomEvent(e,{detail:a})}catch{t=window.document.createEvent("customevent"),t.initCustomEvent(e,!0,!0,a)}window.dispatchEvent(t)},u={status:"unlockProtocol.status",authenticated:"unlockProtocol.authenticated",transactionSent:"unlockProtocol.transactionSent",closeModal:"unlockProtocol.closeModal"},I=e=>{const a={},t={writable:!1,configurable:!1,enumerable:!1},r=Object.keys(e).map(o=>({[o]:{value:e[o],...t}}));Object.defineProperties(a,Object.assign({},...r)),(Object.freeze||Object)(a);try{Object.defineProperties(window,{unlockProtocol:{value:a,...t}})}catch{console.warn("WARNING: unlockProtocol already defined, cannot re-define it")}},b=(e,a)=>{const t={...e};return t.autoconnect&&(t.useDelegatedProvider=!!a),t.useDelegatedProvider||(t.useDelegatedProvider=!!a),t};function k(){const e=localStorage;try{const a="__storage_test__";return e.setItem(a,a),e.removeItem(a),!0}catch(a){return a instanceof DOMException&&(a.code===22||a.code===1014||a.name==="QuotaExceededError"||a.name==="NS_ERROR_DOM_QUOTA_REACHED")&&e.length!==0}}function $(e,a){k()&&localStorage.setItem(e,JSON.stringify(a))}function M(e){if(k()){const a=localStorage.getItem(e)||!1;return a?JSON.parse(a):void 0}}const N=async(e,a,t)=>{const r={method:"eth_call",params:[{to:a,data:`0x6d8ea5b4000000000000000000000000${t.substring(2)}`},"latest"],id:31337,jsonrpc:"2.0"};try{const s=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!s)return 0;const{result:o}=await s.json();return parseInt(o,16)===1}catch(s){return console.error(`Error fetching hasValidKey for ${t} on ${a}: ${s}`),!1}},V=async(e,a,t)=>{const r=[];return await Promise.all(Object.entries(a.locks).map(async([s])=>{const o=a.locks[s].network||a.network,{provider:c}=t[o];await N(c,s,e)&&r.push(s)})),r},W=e=>{if(e.ethereum)return e.ethereum;if(e.web3)return e.web3.currentProvider},L=async e=>{if(!e)throw new Error("Fatal: no web3 provider found.");return e.enable?await e.enable():null};let y="https://paywall.unlock-protocol.com";const R=e=>{try{return new URL(e)}catch{return null}};if(typeof window<"u"){const e=document?.currentScript?.getAttribute("src");if(e){const a=R(e);a&&["paywall.unlock-protocol.com","staging-paywall.unlock-protocol.com"].includes(a.hostname)&&(y=a.toString())}}const j=new URL(y);function q(e){let a;return e.match("staging-paywall.unlock-protocol.com")?a="https://staging-app.unlock-protocol.com":e.match("paywall.unlock-protocol.com")?a="https://app.unlock-protocol.com":a="http://localhost:3000",{unlockAppUrl:a}}const{unlockAppUrl:E}=q(j.toString()),D="unlock-protocol-checkout";let f;class K{constructor(a,t,r){this.childCallBuffer=[],this.authenticate=s=>{this.iframe?this.showIframe():this.shakeHands(s||E),this.sendOrBuffer("authenticate",{})},this.loadCheckoutModal=(s,o)=>{this.iframe?this.showIframe():this.shakeHands(o||E),this.sendOrBuffer("setConfig",b(s||this.paywallConfig,this.provider))},this.getUserAccountAddress=()=>this.userAccountAddress,this.resetConfig=s=>{this.paywallConfig=b(s,this.provider),this.checkKeysAndLock(),this.sendOrBuffer("setConfig",b(s||this.paywallConfig,this.provider))},this.getState=()=>this.lockStatus,this.cacheUserInfo=async s=>{$("userInfo",s)},this.loadCache=async()=>{const s=M("userInfo");if(!s)return this.lockPage();this.userAccountAddress=s.address,this.checkKeysAndLock()},this.shakeHands=async s=>{console.debug(`Connecting to ${s}`),f||(f=await new h({url:`${s}/checkout`,classListArray:[D]})),this.child=f,this.iframe=document.getElementsByClassName(D)[0],this.showIframe(),this.child.on("checkout.closeModal",this.hideIframe),this.child.on("checkout.userInfo",this.handleUserInfoEvent),this.child.on("checkout.methodCall",this.handleMethodCallEvent),this.child.on("checkout.onEvent",this.handleOnEventEvent),this.child.on("checkout.enable",this.handleEnable),this.child.on("checkout.transactionInfo",this.handleTransactionInfoEvent),this.childCallBuffer.forEach(o=>this.child.call(...o))},this.sendOrBuffer=(s,o)=>{this.child?this.child.call(s,o):this.childCallBuffer.push([s,o])},this.handleTransactionInfoEvent=async({hash:s,lock:o})=>{p(u.transactionSent,{hash:s,lock:o}),!this.paywallConfig.pessimistic&&s&&o&&this.unlockPage([o])},this.handleUserInfoEvent=async s=>{this.userAccountAddress=s.address,p(u.authenticated,s),this.cacheUserInfo(s),this.checkKeysAndLock()},this.handleMethodCallEvent=async({method:s,params:o,id:c})=>{const n=this.provider;if(n.request)return n.request({method:s,params:o,id:c}).then(m=>{this.child.call("resolveMethodCall",{id:c,error:null,response:m})}).catch(m=>{this.child.call("resolveMethodCall",{id:c,error:m,response:null})});n.sendAsync?n.sendAsync({method:s,params:o,id:c},(m,be)=>{this.child.call("resolveMethodCall",{id:c,error:m,response:be})}):console.error("unknown method to call provider! Please make sure you use and EIP1193 provider!")},this.handleOnEventEvent=async s=>{this.provider.on(s,()=>{this.child.call("resolveOnEvent",s)})},this.handleEnable=async()=>{const s=await L(this.provider);this.child.call("resolveOnEnable",s)},this.showIframe=()=>{this.iframe.classList.add("show")},this.hideIframe=()=>{p(u.closeModal,{}),this.iframe.classList.remove("show")},this.lockPage=()=>{this.lockStatus="locked",p(u.status,{state:this.lockStatus})},this.unlockPage=(s=[])=>{this.lockStatus="unlocked",p(u.status,{locks:s,state:this.lockStatus})},this.networkConfigs=t,r&&(a.autoconnect=!0),this.provider=r||W(window),this.paywallConfig=b(a,this.provider),this.loadCache()}async checkKeysAndLock(){if(!this.userAccountAddress)return;this.lockStatus=void 0;const a=await V(this.userAccountAddress,this.paywallConfig,this.networkConfigs);return a.length?this.unlockPage(a):this.lockPage()}}var G=Object.create,C=Object.defineProperty,z=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,J=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty,B=(e,a)=>function(){return a||(0,e[g(e)[0]])((a={exports:{}}).exports,a),a.exports},X=(e,a)=>{for(var t in a)C(e,t,{get:a[t],enumerable:!0})},Q=(e,a,t,r)=>{if(a&&typeof a=="object"||typeof a=="function")for(let s of g(a))!Y.call(e,s)&&s!==t&&C(e,s,{get:()=>a[s],enumerable:!(r=z(a,s))||r.enumerable});return e},i=(e,a,t)=>(t=e!=null?G(J(e)):{},Q(a||!e||!e.__esModule?C(t,"default",{value:e,enumerable:!0}):t,e)),Z=B({"../types/dist/types/unlockTypes.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.KeyStatus=e.HooksName=e.HookType=e.TransactionStatus=e.TransactionType=void 0,function(a){a.LOCK_CREATION="LOCK_CREATION",a.KEY_PURCHASE="KEY_PURCHASE",a.WITHDRAWAL="WITHDRAWAL",a.UPDATE_KEY_PRICE="UPDATE_KEY_PRICE"}(e.TransactionType||(e.TransactionType={})),function(a){a.SUBMITTED="submitted",a.PENDING="pending",a.MINED="mined",a.STALE="stale",a.FAILED="failed",a.NONE=""}(e.TransactionStatus||(e.TransactionStatus={})),function(a){a.CUSTOM_CONTRACT="CUSTOM_CONTRACT",a.PASSWORD="PASSWORD",a.CAPTCHA="CAPTCHA"}(e.HookType||(e.HookType={})),e.HooksName=["onKeyPurchaseHook","onKeyCancelHook","onValidKeyHook","onTokenURIHook","onKeyTransferHook","onKeyExtendHook","onKeyGrantHook"],function(a){a.NONE="none",a.CONFIRMING="confirming",a.CONFIRMED="confirmed",a.EXPIRED="expired",a.VALID="valid",a.SUBMITTED="submitted",a.PENDING="pending",a.FAILED="failed"}(e.KeyStatus||(e.KeyStatus={}))}}),d=B({"../types/dist/index.js"(e){var a=e&&e.__createBinding||(Object.create?function(r,s,o,c){c===void 0&&(c=o);var n=Object.getOwnPropertyDescriptor(s,o);(!n||("get"in n?!s.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return s[o]}}),Object.defineProperty(r,c,n)}:function(r,s,o,c){c===void 0&&(c=o),r[c]=s[o]}),t=e&&e.__exportStar||function(r,s){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&a(s,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),t(Z(),e)}}),A={};X(A,{arbitrum:()=>le,avalanche:()=>ue,baseGoerli:()=>me,bsc:()=>te,celo:()=>de,gnosis:()=>se,goerli:()=>ne,localhost:()=>ee,mainnet:()=>ae,mumbai:()=>ce,optimism:()=>re,palm:()=>he,polygon:()=>oe});var ee={publicLockVersionToDeploy:13,id:31337,name:"localhost",chain:"localhost",provider:"http://127.0.0.1:8545",publicProvider:"http://127.0.0.1:8545",subgraph:{endpoint:"http://localhost:8000/subgraphs/name/unlock-protocol/unlock",endpointV2:"http://localhost:8000/subgraphs/name/testgraph"},nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18,coingecko:"ethereum"},serializerAddress:"0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1",description:"Localhost network.",isTestNetwork:!0,fullySubsidizedGas:!0},x=i(d()),ae={publicLockVersionToDeploy:13,featured:!0,id:1,publicProvider:"https://cloudflare-eth.com/v1/mainnet",provider:"https://rpc.unlock-protocol.com/1",unlockAddress:"0xe79B93f8E22676774F2A8dAd469175ebd00029FA",previousDeploys:[{unlockAddress:"0x3d5409CcE1d45233dE1D4eBDEe74b8E004abDD13",startBlock:7120795}],multisig:"0x9168EABE624e9515f3836bA1716EC1DDd4C461D4",keyManagerAddress:"0x9A1f43090307034DBFBE2ba20320Ce815ff046D4",name:"Ethereum",chain:"ethereum",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/unlock",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/mainnet-v2"},explorer:{name:"Etherscan",urls:{base:"https://etherscan.io/",address:e=>`https://etherscan.io/address/${e}`,transaction:e=>`https://etherscan.io/tx/${e}`,token:(e,a)=>`https://etherscan.com/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>`https://opensea.io/assets/${e}/${a}`,collectionUrl:e=>`https://opensea.io/assets/${e}`,profileUrl:e=>`https://opensea.io/${e}`},blockScan:{url:e=>`https://blockscan.com/address/${e}`},nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18,coingecko:"ethereum"},startBlock:16989e3,description:"The original and most secure EVM network. Gas fees are expensive on this network.",url:"https://ethereum.org/en/",isTestNetwork:!1,maxFreeClaimCost:1,uniswapV2:{oracle:"0xE118d797E1c44F2e2A2823191a51D8b46a4A1D51"},uniswapV3:{subgraph:"https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3",factoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",oracle:"0x951A807b523cF6e178e0ab80fBd2C9B035521931",universalRouterAddress:"0xEf1c6E67703c7BD7107eed8303Fbe6EC2554BF6B"},swapPurchaser:"0x7039d2BB4CfC5f5DA49E6b4b9c40400bccb0d1E8",wrappedNativeCurrency:{name:"Wrapped Ether",symbol:"WETH",decimals:18,address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},tokens:[{name:"Wrapped Ether",address:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",symbol:"WETH",decimals:18},{name:"Dai Stablecoin",address:"0x6B175474E89094C44Da98b954EedeAC495271d0F",symbol:"DAI",decimals:18},{name:"USD Coin",address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",symbol:"USDC",decimals:6},{address:"0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0",name:"Polygon",symbol:"MATIC",decimals:18},{name:"Tether USD",address:"0xdAC17F958D2ee523a2206206994597C13D831ec7",symbol:"USDT",decimals:6},{name:"Wrapped BTC",address:"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",symbol:"WBTC",decimals:8},{address:"0x0D8775F648430679A709E98d2b0Cb6250d2887EF",name:"Basic Attention Token",symbol:"BAT",decimals:18}],hooks:{onKeyPurchaseHook:[{id:x.HookType.PASSWORD,name:"Password required",address:"0x936Ed3E71b5990bC9A94074835D08C6ca7bbFad0"},{id:x.HookType.CAPTCHA,name:"Captcha",address:"0x0959482CbFB3c3C85ECd7bf690a0cde808eE8471"}]}},v=i(d()),se={publicLockVersionToDeploy:13,featured:!0,publicProvider:"https://rpc.gnosischain.com",provider:"https://rpc.unlock-protocol.com/100",unlockAddress:"0x1bc53f4303c711cc693F6Ec3477B83703DcB317f",serializerAddress:"0x646E373EAf8a4AEc31Bf62B7Fd6fB59296d6CdA9",multisig:"0xfAC611a5b5a578628C28F77cEBDDB8C6159Ae79D",keyManagerAddress:"0xBa81C9379AC1221BF8C100800dD0B0b0b048ba14",id:100,name:"Gnosis Chain",chain:"xdai",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/xdai",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/gnosis-v2"},explorer:{name:"Blockscout",urls:{base:"https://gnosisscan.io/",address:e=>`https://gnosisscan.io/address/${e}/transactions`,transaction:e=>`https://gnosisscan.io/tx/${e}`,token:(e,a)=>`https://gnosisscan.io/token/${e}/token-holders#holders`}},opensea:{tokenUrl:(e,a)=>null},nativeCurrency:{name:"xDAI",symbol:"xDAI",decimals:18,coingecko:"xdai",coinbase:"DAI"},startBlock:19338700,previousDeploys:[{unlockAddress:"0x14bb3586Ce2946E71B95Fe00Fc73dd30ed830863",startBlock:14521200}],description:"Gnosis Chain is one of the first Ethereum sidechains and has stayed true to its values.",url:"https://www.gnosis.io/",faucet:"https://gnosisfaucet.com/",isTestNetwork:!1,maxFreeClaimCost:100,tokens:[{name:"USD Coin",symbol:"USDC",decimals:6,address:"0xddafbb505ad214d7b80b1f830fccc89b60fb7a83"},{name:"Tether USD",decimals:6,address:"0x4ecaba5870353805a9f068101a40e0f32ed605c6",symbol:"USDT"}],hooks:{onKeyPurchaseHook:[{id:v.HookType.PASSWORD,name:"Password required",address:"0x927D68eAE936Ec0111f01Fc4Ddd9cC57DB3f0Af2"},{id:v.HookType.CAPTCHA,name:"Captcha",address:"0x6E422f8eDCE3586e8c384f7e602D3b5706463e12"}]}},F=i(d()),oe={publicLockVersionToDeploy:13,featured:!0,publicProvider:"https://polygon-rpc.com/",provider:"https://rpc.unlock-protocol.com/137",unlockAddress:"0xE8E5cd156f89F7bdB267EabD5C43Af3d5AF2A78f",multisig:"0x479f3830fbd715342868BA95E438609BCe443DFB",serializerAddress:"0x646e373eaf8a4aec31bf62b7fd6fb59296d6cda9",keyManagerAddress:"0x7111a1aDfbED501beaAd556Bba7cB6dCa3296aa9",id:137,name:"Polygon",chain:"polygon",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/polygon",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/polygon-v2",networkName:"matic"},url:"https://polygon.technology/",explorer:{name:"Polygonscan",urls:{base:"https://polygonscan.com/",address:e=>`https://polygonscan.com/address/${e}`,transaction:e=>`https://polygonscan.com/tx/${e}`,token:(e,a)=>`https://polygonscan.com/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>`https://opensea.io/assets/matic/${e}/${a}`,collectionUrl:e=>`https://opensea.io/assets/matic/${e}`},nativeCurrency:{name:"Matic",symbol:"MATIC",decimals:18,coingecko:"matic-network"},startBlock:21986688,previousDeploys:[{unlockAddress:"0x14bb3586Ce2946E71B95Fe00Fc73dd30ed830863",startBlock:15714206}],description:"Polygon is a side-chain to build and scale your projects on Ethereum, the world's largest blockchain ecosystem.",isTestNetwork:!1,maxFreeClaimCost:100,uniswapV2:{oracle:"0xE20ef269CE3ac2Af8107E706FC2Ec6E1831e3125"},uniswapV3:{factoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",oracle:"0xE77c7F14e8EB9925ca418bF80c0a81a5B9C87683",universalRouterAddress:"0x4C60051384bd2d3C01bfc845Cf5F4b44bcbE9de5"},swapPurchaser:"0x33aC9CAE1Cd9CBB191116607f564F7381d81BAD9",wrappedNativeCurrency:{name:"Wrapped MATIC",symbol:"WMATIC",decimals:18,address:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"},tokens:[{name:"Wrapped Ether",address:"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",symbol:"WETH",decimals:18},{name:"Dai Stablecoin",address:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",symbol:"DAI",decimals:18},{name:"Tether USD",address:"0xc2132D05D31c914a87C6611C10748AEb04B58e8F",symbol:"USDT",decimals:6},{name:"USD Coin",address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",symbol:"USDC",decimals:6},{name:"Wrapped BTC",address:"0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6",symbol:"WBTC",decimals:8}],hooks:{onKeyPurchaseHook:[{id:F.HookType.PASSWORD,name:"Password required",address:"0x9F4AE507d7E91Ab37CF35f792940fE079bd4E24d"},{id:F.HookType.CAPTCHA,name:"Captcha",address:"0xA0863a0B58457A86c937e91533e3F6B8dA27cf4b"}]}},w=i(d()),te={publicLockVersionToDeploy:13,publicProvider:"https://bsc-dataseed.binance.org/",provider:"https://rpc.unlock-protocol.com/56",unlockAddress:"0xeC83410DbC48C7797D2f2AFe624881674c65c856",keyManagerAddress:"0x34EbEc0AE80A2d078DE5489f0f5cAa4d3aaEA355",id:56,name:"BNB Chain",chain:"bsc",multisig:"0x373D7cbc4F2700719DEa237500c7a154310B0F9B",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/bsc",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/bsc-v2"},explorer:{name:"BscScan",urls:{base:"https://bscscan.com/",address:e=>`https://bscscan.com/address/${e}`,transaction:e=>`https://bscscan.com/tx/${e}`,token:(e,a)=>`https://bscscan.com/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>null},nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18,coingecko:"binancecoin"},uniswapV3:{universalRouterAddress:"0x4648a43B2C14Da09FdF82B161150d3F634f40491"},startBlock:13079e3,previousDeploys:[{unlockAddress:"0x99b1348a9129ac49c6de7F11245773dE2f51fB0c",startBlock:12396e3}],description:"The best-performing EVM compatible layer 1. Fully compatible tooling for EVM with up to 35 times of capacity.",url:"https://www.bnbchain.org/en",isTestNetwork:!1,maxFreeClaimCost:1,swapPurchaser:"0x5Ad19758103D474bdF5E8764D97cB02b83c3c844",tokens:[{name:"Ethereum",symbol:"ETH",decimals:18,address:"0x2170ed0880ac9a755fd29b2688956bd959f933f8"},{name:"USD Coin",symbol:"USDC",decimals:18,address:"0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d"},{name:"Tether",symbol:"USDT",decimals:18,address:"0x55d398326f99059ff775485246999027b3197955"},{name:"Dai",symbol:"DAI",decimals:18,address:"0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3"}],hooks:{onKeyPurchaseHook:[{id:w.HookType.PASSWORD,name:"Password required",address:"0x338b1f296217485bf4df6CE9f93ab4C73F72b57D"},{id:w.HookType.CAPTCHA,name:"Captcha",address:"0x88ed81de2d62849B337c3f31cd84D041bF26A38C"}]}},T=i(d()),re={publicLockVersionToDeploy:13,featured:!0,publicProvider:"https://mainnet.optimism.io",provider:"https://rpc.unlock-protocol.com/10",unlockAddress:"0x99b1348a9129ac49c6de7F11245773dE2f51fB0c",multisig:"0x6E78b4447e34e751EC181DCBed63633aA753e145",keyManagerAddress:"0x8c5D54B2CAA4C2D08B0DDF82a1e6D2641779B8EC",id:10,name:"Optimism",chain:"optimism",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/optimism",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/optimism-v2"},explorer:{name:"Etherscan",urls:{base:"https://optimistic.etherscan.io/",address:e=>`https://optimistic.etherscan.io/address/${e}`,transaction:e=>`https://optimistic.etherscan.io/tx/${e}`,token:(e,a)=>`https://optimistic.etherscan.io/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>`https://opensea.io/assets/optimism/${e}/${a}`,collectionUrl:e=>`https://opensea.io/assets/optimism/${e}`},nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18,coingecko:"ethereum"},description:"Optimism is a Layer 2 Optimistic Rollup network designed to utilize the strong security guarantees of Ethereum while reducing its cost and latency.",url:"https://www.optimism.io/",isTestNetwork:!1,maxFreeClaimCost:10,uniswapV3:{factoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",oracle:"0x1FF7e338d5E582138C46044dc238543Ce555C963",universalRouterAddress:"0xb555edF5dcF85f42cEeF1f3630a52A108E55A654"},swapPurchaser:"0x72381052e4F7765A00a403891420BF75876c75bB",wrappedNativeCurrency:{name:"Wrapped Ether",symbol:"WETH",decimals:18,address:"0x4200000000000000000000000000000000000006"},tokens:[{name:"Ethereum",symbol:"ETH",decimals:18,address:"0x0000000000000000000000000000000000000000"},{name:"USD Coin",symbol:"USDC",decimals:6,address:"0x7f5c764cbc14f9669b88837ca1490cca17c31607"},{name:"Tether",symbol:"USDT",decimals:6,address:"0x94b008aa00579c1307b0ef2c499ad98a8ce58e58"},{name:"Dai",symbol:"DAI",decimals:18,address:"0xda10009cbd5d07dd0cecc66161fc93d7c9000da1"}],hooks:{onKeyPurchaseHook:[{id:T.HookType.PASSWORD,name:"Password required",address:"0x34EbEc0AE80A2d078DE5489f0f5cAa4d3aaEA355"},{id:T.HookType.CAPTCHA,name:"Captcha",address:"0x639143cbf90F27eA5Ce4b3A7D869d4D7878009A5"}]}},P=i(d()),ce={publicLockVersionToDeploy:13,publicProvider:"https://matic-mumbai.chainstacklabs.com",provider:"https://rpc.unlock-protocol.com/80001",unlockAddress:"0x1FF7e338d5E582138C46044dc238543Ce555C963",multisig:"0x12E37A8880801E1e5290c815a894d322ac591607",keyManagerAddress:"0x8c5D54B2CAA4C2D08B0DDF82a1e6D2641779B8EC",id:80001,name:"Mumbai (Polygon)",chain:"mumbai",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/mumbai",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/mumbai-v2"},explorer:{name:"PolygonScan (Mumbai)",urls:{base:"https://mumbai.polygonscan.com/",address:e=>`https://mumbai.polygonscan.com/address/${e}`,transaction:e=>`https://mumbai.polygonscan.com/tx/${e}`,token:(e,a)=>`https://mumbai.polygonscan.com/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>null},nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18,coingecko:"matic-network"},startBlock:26584912,previousDeploys:[],description:"Polygon test network. Do not use for production.",url:"https://mumbai.polygonscan.com/",faucet:"https://faucet.polygon.technology/",isTestNetwork:!0,fullySubsidizedGas:!0,maxFreeClaimCost:500,uniswapV3:{factoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",oracle:"0x5108412Dd50A6ea79d2F13D5d1A23FDD9bF532db",universalRouterAddress:"0x4648a43B2C14Da09FdF82B161150d3F634f40491"},swapPurchaser:"0x302E9D970A657B42c1C124C69f3a1c1575CB4AD3",wrappedNativeCurrency:{name:"Wrapped MATIC",symbol:"WMATIC",decimals:18,address:"0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889"},tokens:[{name:"USD Coin",address:"0x0FA8781a83E46826621b3BC094Ea2A0212e71B23",symbol:"USDC",decimals:6,mainnetAddress:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"Wrapped Ether",address:"0xA6FA4fB5f76172d178d61B04b0ecd319C5d1C0aa",symbol:"WETH",decimals:18,mainnetAddress:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},{name:"Wrapped Matic",address:"0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889",symbol:"WMATIC",decimals:18,mainnetAddress:"0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0"},{name:"Dai Stablecoin",address:"0xcB1e72786A6eb3b44C2a2429e317c8a2462CFeb1",symbol:"DAI",decimals:18,mainnetAddress:"0x6B175474E89094C44Da98b954EedeAC495271d0F"}],hooks:{onKeyPurchaseHook:[{id:P.HookType.PASSWORD,name:"Password required",address:"0x34EbEc0AE80A2d078DE5489f0f5cAa4d3aaEA355"},{id:P.HookType.CAPTCHA,name:"Captcha",address:"0x639143cbf90F27eA5Ce4b3A7D869d4D7878009A5"}]}},S=i(d()),ne={publicLockVersionToDeploy:13,cardPurchaserAddress:"0x061Bfda0446c5f71Da760BC31371CB95808f5d82",featured:!0,publicProvider:"https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",provider:"https://rpc.unlock-protocol.com/5",unlockAddress:"0x627118a4fB747016911e5cDA82e2E77C531e8206",multisig:"0x95C06469e557d8645966077891B4aeDe8D55A755",keyManagerAddress:"0xc328aE7fc36f975BE120aaa99f2d96C3E732e5b6",id:5,name:"Goerli (Testnet)",chain:"goerli",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/goerli",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/goerli-v2"},explorer:{name:"Goerli (Testnet)",urls:{base:"https://goerli.etherscan.io/",address:e=>`https://goerli.etherscan.io/address/${e}`,transaction:e=>`https://goerli.etherscan.io/tx/${e}`,token:(e,a)=>`https://goerli.etherscan.io/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>`https://testnets.opensea.io/assets/goerli/${e}/${a}`,collectionUrl:e=>`https://testnets.opensea.io/assets/goerli/${e}`},description:"Main Ethereum test network. Do not use for production.",faucet:"https://goerlifaucet.com/",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18,coingecko:"ethereum"},startBlock:7179039,previousDeploys:[],isTestNetwork:!0,fullySubsidizedGas:!0,maxFreeClaimCost:1e5,uniswapV3:{factoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",oracle:"0x25197CaCDE16500032EF4B35d60c6f7aEd4a38a5",universalRouterAddress:"0x4648a43B2C14Da09FdF82B161150d3F634f40491"},swapPurchaser:"0x49aD0039B30De002d4C27A6E8Fc026c7e23d083C",wrappedNativeCurrency:{name:"Wrapped Ether",symbol:"WETH",decimals:18,address:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6"},tokens:[{name:"USD Coin",symbol:"USDC",address:"0x07865c6E87B9F70255377e024ace6630C1Eaa37F",decimals:6,mainnetAddress:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"Wrapped Ether",address:"0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",symbol:"WETH",decimals:18,mainnetAddress:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},{name:"Uniswap",address:"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",symbol:"UNI",decimals:18,mainnetAddress:"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984"}],hooks:{onKeyPurchaseHook:[{id:S.HookType.PASSWORD,name:"Password required",address:"0xCa837900f7DaB40787b608b6738d1B730f1d2759"},{id:S.HookType.CAPTCHA,name:"Captcha",address:"0xbBBdD46ef548712c203d306F6587336EC15E0d7f"}]}},ie=i(d()),de={publicLockVersionToDeploy:13,publicProvider:"https://forno.celo.org",provider:"https://rpc.unlock-protocol.com/42220",unlockAddress:"0x1FF7e338d5E582138C46044dc238543Ce555C963",multisig:"0xc293E2da9E558bD8B1DFfC4a7b174729fAb2e4E8",keyManagerAddress:"0xF6963D3c395A7914De77f771C2fC44b47B8379AC",id:42220,name:"Celo",chain:"celo",description:"Celo is the carbon-negative, mobile-first, EVM-compatible blockchain ecosystem leading a thriving new digital economy for all.",url:"https://celo.org",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/celo",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/celo-v2"},explorer:{name:"Celoscan",urls:{base:"https://celoscan.io/",address:e=>`https://celoscan.io/address/${e}`,transaction:e=>`https://celoscan.io/tx/${e}`,token:(e,a)=>`https://celoscan.io/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>null},nativeCurrency:{name:"CELO",symbol:"CELO",decimals:18,coingecko:"celo"},startBlock:7179039,previousDeploys:[],isTestNetwork:!1,maxFreeClaimCost:1,uniswapV3:{factoryAddress:"0xAfE208a311B21f13EF87E33A90049fC17A7acDEc",quoterAddress:"0x82825d0554fA07f7FC52Ab63c961F330fdEFa8E8",oracle:"0x5108412Dd50A6ea79d2F13D5d1A23FDD9bF532db",universalRouterAddress:"0xC73d61d192FB994157168Fb56730FdEc64C9Cb8F"},swapPurchaser:"0x42F5c7839Bf00FAea6ca09517E96E82e7364384D",wrappedNativeCurrency:{name:"Celo native asset",symbol:"CELO",decimals:18,address:"0x471ece3750da237f93b8e339c536989b8978a438"},tokens:[{name:"USD Coin",symbol:"USDC",decimals:6,address:"0xef4229c8c3250c675f21bcefa42f58efbff6002a",mainnetAddress:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"Dai Stablecoin",address:"0xE4fE50cdD716522A56204352f00AA110F731932d",symbol:"DAI",decimals:18,mainnetAddress:"0x6B175474E89094C44Da98b954EedeAC495271d0F"}],hooks:{onKeyPurchaseHook:[{id:ie.HookType.CAPTCHA,name:"Captcha",address:"0x80E085D7591C61153D876b5171dc25756a7A3254"}]}},_=i(d()),le={publicLockVersionToDeploy:13,featured:!0,publicProvider:"https://arb1.arbitrum.io/rpc",provider:"https://rpc.unlock-protocol.com/42161",unlockAddress:"0x1FF7e338d5E582138C46044dc238543Ce555C963",multisig:"0x310e9f9E3918a71dB8230cFCF32a083c7D9536d0",keyManagerAddress:"0x520294E736167303efa038205D4391b58261BC9c",id:42161,name:"Arbitrum",chain:"arbitrum",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/arbitrum",networkName:"arbitrum-one",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/arbitrum-v2"},explorer:{name:"Arbitrum",urls:{base:"https://arbiscan.io/",address:e=>`https://arbiscan.io/address/${e}`,transaction:e=>`https://arbiscan.io/tx/${e}`,token:(e,a)=>`https://arbiscan.io/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>`https://opensea.io/assets/arbitrum/${e}/${a}`,collectionUrl:e=>`https://opensea.io/assets/arbitrum/${e}`},nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18,coingecko:"ethereum"},startBlock:17429533,previousDeploys:[],isTestNetwork:!1,maxFreeClaimCost:100,description:"Arbitrum One is a Layer 2 (L2) chain running on top of Ethereum Mainnet that enables high-throughput, low cost smart contracts operations.",url:"https://arbitrum.io/",uniswapV3:{factoryAddress:"0x1F98431c8aD98523631AE4a59f267346ea31F984",quoterAddress:"0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6",oracle:"0x821d830a7b9902F83359Bf3Ac727B04b10FD461d",universalRouterAddress:"0x4C60051384bd2d3C01bfc845Cf5F4b44bcbE9de5"},swapPurchaser:"0x0C33884Ab3eE799E7628FA3fCF20B81997745a72",wrappedNativeCurrency:{name:"Wrapped Ether",symbol:"WETH",decimals:18,address:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"},tokens:[{name:"Ethereum",symbol:"WETH",decimals:18,address:"0x82af49447d8a07e3bd95bd0d56f35241523fbab1"},{name:"USD Coin",symbol:"USDC",decimals:6,address:"0xff970a61a04b1ca14834a43f5de4533ebddb5cc8"},{name:"Tether",symbol:"USDT",decimals:6,address:"0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"},{name:"Dai",symbol:"DAI",decimals:18,address:"0xda10009cbd5d07dd0cecc66161fc93d7c9000da1"},{name:"Wrapped Bitcoin",symbol:"WBTC",decimals:8,address:"0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f"}],hooks:{onKeyPurchaseHook:[{id:_.HookType.PASSWORD,name:"Password required",address:"0xd0b14797b9D08493392865647384974470202A78"},{id:_.HookType.CAPTCHA,name:"Captcha",address:"0xF6963D3c395A7914De77f771C2fC44b47B8379AC"}]}},pe=i(d()),ue={publicLockVersionToDeploy:13,publicProvider:"https://api.avax.network/ext/bc/C/rpc",provider:"https://rpc.unlock-protocol.com/43114",unlockAddress:"0x70cBE5F72dD85aA634d07d2227a421144Af734b3",multisig:"0xEc7777C51327917fd2170c62873272ea168120Cb",keyManagerAddress:"0x8e0B46ec3B95c81355175693dA0083b00fCc1326",id:43114,name:"Avalanche (C-Chain)",chain:"avax",subgraph:{endpoint:"https://api.thegraph.com/subgraphs/name/unlock-protocol/avalanche",endpointV2:"https://api.thegraph.com/subgraphs/name/unlock-protocol/avalanche-v2"},explorer:{name:"Snowtrace (Avalanche)",urls:{base:"https://snowtrace.io/",address:e=>`https://snowtrace.io/address/${e}`,transaction:e=>`https://snowtrace.io/tx/${e}`,token:(e,a)=>`https://snowtrace.io/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>null},nativeCurrency:{name:"AVAX",symbol:"AVAX",decimals:18,coingecko:"avalanche-2"},startBlock:17188332,previousDeploys:[],isTestNetwork:!1,maxFreeClaimCost:1,description:"Avalanche is an open, programmable smart contracts platform for decentralized applications.",url:"https://www.avalabs.org/",tokens:[{name:"Ethereum",symbol:"WETH",decimals:18,address:"0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab"},{name:"USD Coin",symbol:"USDC",decimals:6,address:"0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664"},{name:"Tether",symbol:"USDT",decimals:6,address:"0xc7198437980c041c805a1edcba50c1ce5db95118"},{name:"Dai",symbol:"DAI",decimals:18,address:"0xd586e7f844cea2f87f50152665bcbc2c279d8d70"},{name:"Wrapped Bitcoin",symbol:"WBTC",decimals:8,address:"0x50b7545627a5162f82a992c33b87adc75187b218"}],hooks:{onKeyPurchaseHook:[{id:pe.HookType.CAPTCHA,name:"Captcha",address:"0x2499D94880B30fA505543550ac8a1e24cfFeFe78"}]}},he={publicLockVersionToDeploy:13,fullySubsidizedGas:!0,publicProvider:"https://palm-mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",provider:"https://rpc.unlock-protocol.com/11297108109",unlockAddress:"0x0314E34345C2327aC753C5Bf0D0751Cf6C1BfdE2",multisig:"0xABEAf8F93bEA2a2E65866CccC3060626eEc7d304",id:11297108109,name:"Palm",chain:"palm",keyManagerAddress:"0x70cBE5F72dD85aA634d07d2227a421144Af734b3",subgraph:{endpoint:"https://graph.palm.io/subgraphs/name/unlock-protocol/Palm-mainnet",networkName:"palm-mainnet",endpointV2:"https://graph.palm.io/subgraphs/name/unlock-protocol/Palm-mainnet"},explorer:{name:"Palm Explorer",urls:{base:"https://explorer.palm.io/",address:e=>`https://explorer.palm.io/address/${e}`,transaction:e=>`https://explorer.palm.io/tx/${e}`,token:(e,a)=>`https://explorer.palm.io/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>null},erc20:null,nativeCurrency:{name:"PALM",symbol:"PALM",decimals:18,coingecko:"palm"},startBlock:9856400,previousDeploys:[],isTestNetwork:!1,maxFreeClaimCost:1,description:"The Palm network is an Ethereum-compatible sidechain, built to serve as the foundation of a new scalable and sustainable ecosystem for NFTs. It is designed by, and for, Ethereum developers and features low gas costs and fast transaction finality.",uniswapV3:{factoryAddress:"0x",quoterAddress:"0x",oracle:"0x"},wrappedNativeCurrency:{name:"Wrapped PALM",symbol:"WPALM",decimals:18,address:"0xF98cABF0a963452C5536330408B2590567611a71"},tokens:[{name:"Wrapped ETH",symbol:"WETH",decimals:18,address:"0x726138359C17F1E56bA8c4F737a7CAf724F6010b"},{name:"Dai",symbol:"DAI",decimals:18,address:"0x4C1f6fCBd233241bF2f4D02811E3bF8429BC27B8"}]},me={publicLockVersionToDeploy:13,publicProvider:"https://goerli.base.org",provider:"https://goerli.base.org",unlockAddress:"0x51A1ceB83B83F1985a81C295d1fF28Afef186E02",multisig:"",keyManagerAddress:"0x70cBE5F72dD85aA634d07d2227a421144Af734b3",id:84531,name:"Base Goerli (Testnet)",chain:"base-goerli",subgraph:{networkName:"base-testnet",endpoint:"https://api.studio.thegraph.com/query/44190/unlock-protocol-base-goerli/0.0.2",endpointV2:"https://api.studio.thegraph.com/query/44190/unlock-protocol-base-goerli/0.0.2"},explorer:{name:"Base Goerli",urls:{base:"https://goerli.basescan.org/",address:e=>`https://goerli.basescan.org/address/${e}`,transaction:e=>`https://goerli.basescan.org/tx/${e}`,token:(e,a)=>`https://goerli.basescan.org/token/${e}?a=${a}`}},opensea:{tokenUrl:(e,a)=>`https://testnets.opensea.io/assets/goerli/${e}/${a}`,collectionUrl:e=>`https://testnets.opensea.io/assets/goerli/${e}`},description:"Main Ethereum test network. Do not use for production.",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18,coingecko:"ethereum"},startBlock:2247300,isTestNetwork:!0,fullySubsidizedGas:!0,maxFreeClaimCost:1e4},H={};Object.keys(A).forEach(e=>{const a=A[e];H[a.id]=a});var O=H;const U={};Object.keys(O).map(Number).forEach(e=>{const{provider:a,publicProvider:t,name:r,id:s,subgraph:o}=O[e];U[e]={id:s,name:r,publicProvider:t,provider:a,subgraph:o}}),l.Paywall=K,l.networkConfigs=U,l.setupUnlockProtocolVariable=I,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}); | ||
//# sourceMappingURL=unlock.latest.umd.js.map |
{ | ||
"name": "@unlock-protocol/paywall", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"main": "./dist/unlock.latest.umd.js", | ||
@@ -32,10 +32,10 @@ "module": "./dist/unlock.latest.es.js", | ||
"@unlock-protocol/eslint-config": "./packages/eslint-config", | ||
"@unlock-protocol/networks": "^0.0.12", | ||
"@unlock-protocol/networks": "^0.0.13", | ||
"@unlock-protocol/tsconfig": "^0.0.1", | ||
"@unlock-protocol/types": "^0.0.6", | ||
"eslint": "8.37.0", | ||
"@unlock-protocol/types": "^0.0.7", | ||
"eslint": "8.39.0", | ||
"typescript": "5.0.4", | ||
"vite": "4.2.1", | ||
"vite": "4.3.3", | ||
"vite-plugin-css-injected-by-js": "3.1.0", | ||
"vitest": "0.29.7", | ||
"vitest": "0.30.1", | ||
"vitest-fetch-mock": "0.2.2" | ||
@@ -42,0 +42,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
249233
1530