@crossmint/common-sdk-base
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -123,5 +123,7 @@ declare const CROSSMINT_API_KEY_SIGNER_PUBLICKEY_STAGING = "3hSfN4dWSwgCg1uf2yytBtK6KxK3ySFKasd2h9J2vSK5"; | ||
readonly ZKATANA: "zkatana"; | ||
readonly ASTAR_ZKEVM: "astar-zkevm"; | ||
readonly APEX: "apex"; | ||
}; | ||
type EVMBlockchain = ObjectValues<typeof EVMBlockchain>; | ||
declare const EVM_CHAINS: readonly ("ethereum" | "polygon" | "bsc" | "optimism" | "arbitrum" | "base" | "zora" | "arbitrumnova" | "zkatana")[]; | ||
declare const EVM_CHAINS: readonly ("ethereum" | "polygon" | "bsc" | "optimism" | "arbitrum" | "base" | "zora" | "arbitrumnova" | "zkatana" | "astar-zkevm" | "apex")[]; | ||
declare const EVMBlockchainTestnet: { | ||
@@ -163,5 +165,7 @@ readonly ARBITRUM_SEPOLIA: "arbitrum-sepolia"; | ||
readonly ZKATANA: "zkatana"; | ||
readonly ASTAR_ZKEVM: "astar-zkevm"; | ||
readonly APEX: "apex"; | ||
}; | ||
type EVMBlockchainIncludingTestnet = ObjectValues<typeof EVMBlockchainIncludingTestnet>; | ||
declare const EVM_BLOCKCHAINS_INCLUDING_TESTNETS: readonly ("ethereum" | "polygon" | "bsc" | "optimism" | "arbitrum" | "base" | "zora" | "arbitrumnova" | "zkatana" | "arbitrum-sepolia" | "base-goerli" | "base-sepolia" | "bsc-testnet" | "ethereum-goerli" | "ethereum-sepolia" | "polygon-mumbai" | "optimism-goerli" | "optimism-sepolia" | "zora-goerli" | "zora-sepolia")[]; | ||
declare const EVM_BLOCKCHAINS_INCLUDING_TESTNETS: readonly ("ethereum" | "polygon" | "bsc" | "optimism" | "arbitrum" | "base" | "zora" | "arbitrumnova" | "zkatana" | "astar-zkevm" | "apex" | "arbitrum-sepolia" | "base-goerli" | "base-sepolia" | "bsc-testnet" | "ethereum-goerli" | "ethereum-sepolia" | "polygon-mumbai" | "optimism-goerli" | "optimism-sepolia" | "zora-goerli" | "zora-sepolia")[]; | ||
@@ -200,2 +204,4 @@ interface EVMNFT { | ||
readonly ZKATANA: "zkatana"; | ||
readonly ASTAR_ZKEVM: "astar-zkevm"; | ||
readonly APEX: "apex"; | ||
readonly SOLANA: "solana"; | ||
@@ -207,3 +213,3 @@ readonly CARDANO: "cardano"; | ||
type Blockchain = ObjectValues<typeof Blockchain>; | ||
declare const BLOCKCHAINS: readonly ("ethereum" | "polygon" | "bsc" | "optimism" | "arbitrum" | "base" | "zora" | "arbitrumnova" | "zkatana" | "solana" | "cardano" | "sui" | "aptos")[]; | ||
declare const BLOCKCHAINS: readonly ("ethereum" | "polygon" | "bsc" | "optimism" | "arbitrum" | "base" | "zora" | "arbitrumnova" | "zkatana" | "astar-zkevm" | "apex" | "solana" | "cardano" | "sui" | "aptos")[]; | ||
declare const BlockchainTestnet: { | ||
@@ -245,2 +251,4 @@ readonly ARBITRUM_SEPOLIA: "arbitrum-sepolia"; | ||
readonly ZKATANA: "zkatana"; | ||
readonly ASTAR_ZKEVM: "astar-zkevm"; | ||
readonly APEX: "apex"; | ||
readonly SOLANA: "solana"; | ||
@@ -252,3 +260,3 @@ readonly CARDANO: "cardano"; | ||
type BlockchainIncludingTestnet = ObjectValues<typeof BlockchainIncludingTestnet>; | ||
declare const BLOCKCHAINS_INCLUDING_TESTNETS: readonly ("ethereum" | "polygon" | "bsc" | "optimism" | "arbitrum" | "base" | "zora" | "arbitrumnova" | "zkatana" | "arbitrum-sepolia" | "base-goerli" | "base-sepolia" | "bsc-testnet" | "ethereum-goerli" | "ethereum-sepolia" | "polygon-mumbai" | "optimism-goerli" | "optimism-sepolia" | "zora-goerli" | "zora-sepolia" | "solana" | "cardano" | "sui" | "aptos")[]; | ||
declare const BLOCKCHAINS_INCLUDING_TESTNETS: readonly ("ethereum" | "polygon" | "bsc" | "optimism" | "arbitrum" | "base" | "zora" | "arbitrumnova" | "zkatana" | "astar-zkevm" | "apex" | "arbitrum-sepolia" | "base-goerli" | "base-sepolia" | "bsc-testnet" | "ethereum-goerli" | "ethereum-sepolia" | "polygon-mumbai" | "optimism-goerli" | "optimism-sepolia" | "zora-goerli" | "zora-sepolia" | "solana" | "cardano" | "sui" | "aptos")[]; | ||
@@ -271,2 +279,3 @@ interface CommonProps { | ||
declare const BLOCKCHAIN_TO_COPY_NAME: Record<BlockchainIncludingTestnet, string>; | ||
declare function blockchainToDisplayName(blockchain: BlockchainIncludingTestnet): string; | ||
@@ -281,2 +290,2 @@ declare const BLOCKCHAIN_TO_CHAIN_ID: Record<EVMBlockchainIncludingTestnet, number>; | ||
export { APIKeyEnvironmentPrefix, APIKeyPrefix, APIKeyUsageOrigin, APIKeyUsageOriginPrefix, BLOCKCHAINS, BLOCKCHAINS_INCLUDING_TESTNETS, BLOCKCHAIN_BASE_LAYERS, BLOCKCHAIN_TESTNETS, BLOCKCHAIN_TO_CHAIN_ID, BLOCKCHAIN_TO_COPY_NAME, Blockchain, BlockchainBaseLayer, BlockchainIncludingTestnet, BlockchainTestnet, CHAIN_ID_TO_BLOCKCHAIN, CROSSMINT_API_KEY_SIGNER_PUBLICKEY_PROD, CROSSMINT_API_KEY_SIGNER_PUBLICKEY_STAGING, CardanoNFT, CssFontSource, CustomFontSource, EVMBlockchain, EVMBlockchainIncludingTestnet, EVMBlockchainTestnet, EVMNFT, EVM_BLOCKCHAINS_INCLUDING_TESTNETS, EVM_BLOCKCHAIN_TESTNETS, EVM_CHAINS, NFT, NFTCollectionViewProps, NFTDetailProps, NFTLocator, NFTOrNFTLocator, ObjectValues, SolanaNFT, UIConfig, UiConfigColors, UiConfigFonts, UserIdentifier, UserIdentifierParams, ValidateAPIKeyPrefixExpectations, ValidateAPIKeyPrefixResult, ValidateAPIKeyPrefixSuccessData, ValidateAPIKeyResult, Wallet, blockchainToChainId, chainIdToBlockchain, environmentToExpectedPublicKey, isBlockchain, isBlockchainIncludingTestnets, isEVMBlockchain, objectValues, usageOriginToPrefix, validateAPIKey, validateAPIKeyPrefix }; | ||
export { APIKeyEnvironmentPrefix, APIKeyPrefix, APIKeyUsageOrigin, APIKeyUsageOriginPrefix, BLOCKCHAINS, BLOCKCHAINS_INCLUDING_TESTNETS, BLOCKCHAIN_BASE_LAYERS, BLOCKCHAIN_TESTNETS, BLOCKCHAIN_TO_CHAIN_ID, BLOCKCHAIN_TO_COPY_NAME, Blockchain, BlockchainBaseLayer, BlockchainIncludingTestnet, BlockchainTestnet, CHAIN_ID_TO_BLOCKCHAIN, CROSSMINT_API_KEY_SIGNER_PUBLICKEY_PROD, CROSSMINT_API_KEY_SIGNER_PUBLICKEY_STAGING, CardanoNFT, CssFontSource, CustomFontSource, EVMBlockchain, EVMBlockchainIncludingTestnet, EVMBlockchainTestnet, EVMNFT, EVM_BLOCKCHAINS_INCLUDING_TESTNETS, EVM_BLOCKCHAIN_TESTNETS, EVM_CHAINS, NFT, NFTCollectionViewProps, NFTDetailProps, NFTLocator, NFTOrNFTLocator, ObjectValues, SolanaNFT, UIConfig, UiConfigColors, UiConfigFonts, UserIdentifier, UserIdentifierParams, ValidateAPIKeyPrefixExpectations, ValidateAPIKeyPrefixResult, ValidateAPIKeyPrefixSuccessData, ValidateAPIKeyResult, Wallet, blockchainToChainId, blockchainToDisplayName, chainIdToBlockchain, environmentToExpectedPublicKey, isBlockchain, isBlockchainIncludingTestnets, isEVMBlockchain, objectValues, usageOriginToPrefix, validateAPIKey, validateAPIKeyPrefix }; |
@@ -1,2 +0,2 @@ | ||
var C=Object.defineProperty,b=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var T=(e,t,i)=>t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,r=(e,t)=>{for(var i in t||(t={}))R.call(t,i)&&T(e,i,t[i]);if(y)for(var i of y(t))L.call(t,i)&&T(e,i,t[i]);return e},O=(e,t)=>b(e,M(t));var I="3hSfN4dWSwgCg1uf2yytBtK6KxK3ySFKasd2h9J2vSK5",m="8erZh8YApGck3iUSUHqATBxqMTM1Ukp9mHmvGgUWHtkK";function x(e){return e==="client"?"ck":"sk"}function S(e){switch(e){case"development":case"staging":return I;case"production":return m;default:return null}}var u={CLIENT:"ck",SERVER:"sk"},o={DEVELOPMENT:"development",STAGING:"staging",PRODUCTION:"production"},A={CLIENT:"client",SERVER:"server"};import E from"bs58";import D from"tweetnacl";function B(e,t){if(U(e))return{isValid:!1,message:"Old API key format detected. Please create a new API key from the Crossmint console."};let i=v(e);if(i==null)return{isValid:!1,message:`Malformed API key. Must start with '${u.CLIENT}' or '${u.SERVER}'.`};if((t==null?void 0:t.usageOrigin)!=null&&i!==t.usageOrigin)return{isValid:!1,message:`Disallowed API key. You passed a ${i} API key, but a ${t.usageOrigin} API key is required.`};let n=G(e);return n==null?{isValid:!1,message:`Malformed API key. Must have a valid environment: '${o.DEVELOPMENT}', '${o.STAGING}' or '${o.PRODUCTION}'.`}:(t==null?void 0:t.environment)!=null&&n!==t.environment?{isValid:!1,message:`Disallowed API key. You passed a ${n} API key, but a ${t.environment} API key is required.`}:{isValid:!0,usageOrigin:i,environment:n,prefix:`${x(i)}_${n}`}}function U(e){return e.startsWith("sk_live")||e.startsWith("sk_test")}function v(e){return e.startsWith(u.CLIENT+"_")?A.CLIENT:e.startsWith(u.SERVER+"_")?A.SERVER:null}function G(e){let t=e.slice(3);return t.startsWith(o.DEVELOPMENT+"_")?o.DEVELOPMENT:t.startsWith(o.STAGING+"_")?o.STAGING:t.startsWith(o.PRODUCTION+"_")?o.PRODUCTION:null}function le(e,t){let i=B(e,t);if(!i.isValid)return i;let{prefix:n}=i,{keyData:s,keyDataWithoutPrefix:c,signature:l}=H(e,n);if(!j(s,l,t))return{isValid:!1,message:"Invalid API key. Failed to validate signature"};let[f]=c.split(".");return O(r({},i),{projectId:f})}function H(e,t){let i=e.slice(`${t}_`.length),n=E.decode(i),s=new TextDecoder().decode(n),[c,l]=s.split(":");return{keyData:`${t}.${c}`,keyDataWithoutPrefix:c,signature:l}}function j(e,t,i){let n=S(i==null?void 0:i.environment);function s(c){try{let l=E.decode(t),g=new TextEncoder().encode(e),f=E.decode(c);return D.sign.detached.verify(g,l,f)}catch(l){return console.error("Failed to validate API key signature"),!1}}return n!=null?s(n):s(m)||s(I)}function a(e){return Object.values(e)}var P={ETHEREUM:"ethereum",POLYGON:"polygon",BSC:"bsc",OPTIMISM:"optimism",ARBITRUM:"arbitrum",BASE:"base",ZORA:"zora",ARBITRUMNOVA:"arbitrumnova",ZKATANA:"zkatana"},ge=a(P),p={ARBITRUM_SEPOLIA:"arbitrum-sepolia",BASE_GOERLI:"base-goerli",BASE_SEPOLIA:"base-sepolia",BSC_TESTNET:"bsc-testnet",ETHEREUM_GOERLI:"ethereum-goerli",ETHEREUM_SEPOLIA:"ethereum-sepolia",POLYGON_MUMBAI:"polygon-mumbai",OPTIMISM_GOERLI:"optimism-goerli",OPTIMISM_SEPOLIA:"optimism-sepolia",ZORA_GOERLI:"zora-goerli",ZORA_SEPOLIA:"zora-sepolia"},fe=a(p),Y=r(r({},P),p),k=a(Y);var $={EVM:"evm",SOLANA:"solana",CARDANO:"cardano",SUI:"sui",APTOS:"aptos"},Te=a($);var K=r({SOLANA:"solana",CARDANO:"cardano",SUI:"sui",APTOS:"aptos"},P),h=a(K),V=r({},p),ke=a(V),z=r(r({},K),V),_=a(z);function Re(e,t){return t?e===t:h.includes(e)}function N(e,t){return t?e===t:_.includes(e)}var He={aptos:"Aptos",solana:"Solana",ethereum:"Ethereum","ethereum-sepolia":"Ethereum Sepolia","ethereum-goerli":"Ethereum Goerli",polygon:"Polygon","polygon-mumbai":"Polygon Mumbai",cardano:"Cardano",bsc:"BNB Smart Chain","bsc-testnet":"BNB Smart Chain Testnet",sui:"Sui",optimism:"Optimism","optimism-goerli":"Optimism Goerli","optimism-sepolia":"Optimism Sepolia",arbitrum:"Arbitrum","arbitrum-sepolia":"Arbitrum Sepolia",arbitrumnova:"Arbitrum Nova",base:"Base","base-goerli":"Base Goerli","base-sepolia":"Base Sepolia",zora:"Zora","zora-goerli":"Zora Goerli","zora-sepolia":"Zora Sepolia",zkatana:"zKatana"};var d={ethereum:1,polygon:137,bsc:56,optimism:10,arbitrum:42161,base:8453,zora:7777777,arbitrumnova:42170,"ethereum-sepolia":11155111,"ethereum-goerli":5,"polygon-mumbai":80001,"bsc-testnet":97,"optimism-sepolia":11155420,"optimism-goerli":420,"base-goerli":84531,"base-sepolia":84532,"arbitrum-sepolia":421614,"zora-sepolia":999999999,"zora-goerli":999,zkatana:1261120};function Ye(e){return d[e]}var W=Object.entries(d).reduce((e,[t,i])=>(e[i]=t,e),{});function We(e){return W[e]}function Je(e){return k.some(t=>N(e,t))}export{o as APIKeyEnvironmentPrefix,A as APIKeyUsageOrigin,u as APIKeyUsageOriginPrefix,h as BLOCKCHAINS,_ as BLOCKCHAINS_INCLUDING_TESTNETS,Te as BLOCKCHAIN_BASE_LAYERS,ke as BLOCKCHAIN_TESTNETS,d as BLOCKCHAIN_TO_CHAIN_ID,He as BLOCKCHAIN_TO_COPY_NAME,K as Blockchain,$ as BlockchainBaseLayer,z as BlockchainIncludingTestnet,V as BlockchainTestnet,W as CHAIN_ID_TO_BLOCKCHAIN,m as CROSSMINT_API_KEY_SIGNER_PUBLICKEY_PROD,I as CROSSMINT_API_KEY_SIGNER_PUBLICKEY_STAGING,P as EVMBlockchain,Y as EVMBlockchainIncludingTestnet,p as EVMBlockchainTestnet,k as EVM_BLOCKCHAINS_INCLUDING_TESTNETS,fe as EVM_BLOCKCHAIN_TESTNETS,ge as EVM_CHAINS,Ye as blockchainToChainId,We as chainIdToBlockchain,S as environmentToExpectedPublicKey,Re as isBlockchain,N as isBlockchainIncludingTestnets,Je as isEVMBlockchain,a as objectValues,x as usageOriginToPrefix,le as validateAPIKey,B as validateAPIKeyPrefix}; | ||
var C=Object.defineProperty,b=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var T=(e,t,i)=>t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,r=(e,t)=>{for(var i in t||(t={}))R.call(t,i)&&T(e,i,t[i]);if(y)for(var i of y(t))v.call(t,i)&&T(e,i,t[i]);return e},O=(e,t)=>b(e,M(t));var I="3hSfN4dWSwgCg1uf2yytBtK6KxK3ySFKasd2h9J2vSK5",m="8erZh8YApGck3iUSUHqATBxqMTM1Ukp9mHmvGgUWHtkK";function x(e){return e==="client"?"ck":"sk"}function S(e){switch(e){case"development":case"staging":return I;case"production":return m;default:return null}}var u={CLIENT:"ck",SERVER:"sk"},o={DEVELOPMENT:"development",STAGING:"staging",PRODUCTION:"production"},f={CLIENT:"client",SERVER:"server"};import E from"bs58";import D from"tweetnacl";function k(e,t){if(L(e))return{isValid:!1,message:"Old API key format detected. Please create a new API key from the Crossmint console."};let i=U(e);if(i==null)return{isValid:!1,message:`Malformed API key. Must start with '${u.CLIENT}' or '${u.SERVER}'.`};if((t==null?void 0:t.usageOrigin)!=null&&i!==t.usageOrigin)return{isValid:!1,message:`Disallowed API key. You passed a ${i} API key, but a ${t.usageOrigin} API key is required.`};let n=G(e);return n==null?{isValid:!1,message:`Malformed API key. Must have a valid environment: '${o.DEVELOPMENT}', '${o.STAGING}' or '${o.PRODUCTION}'.`}:(t==null?void 0:t.environment)!=null&&n!==t.environment?{isValid:!1,message:`Disallowed API key. You passed a ${n} API key, but a ${t.environment} API key is required.`}:{isValid:!0,usageOrigin:i,environment:n,prefix:`${x(i)}_${n}`}}function L(e){return e.startsWith("sk_live")||e.startsWith("sk_test")}function U(e){return e.startsWith(u.CLIENT+"_")?f.CLIENT:e.startsWith(u.SERVER+"_")?f.SERVER:null}function G(e){let t=e.slice(3);return t.startsWith(o.DEVELOPMENT+"_")?o.DEVELOPMENT:t.startsWith(o.STAGING+"_")?o.STAGING:t.startsWith(o.PRODUCTION+"_")?o.PRODUCTION:null}function ue(e,t){let i=k(e,t);if(!i.isValid)return i;let{prefix:n}=i,{keyData:s,keyDataWithoutPrefix:c,signature:l}=H(e,n);if(!j(s,l,t))return{isValid:!1,message:"Invalid API key. Failed to validate signature"};let[A]=c.split(".");return O(r({},i),{projectId:A})}function H(e,t){let i=e.slice(`${t}_`.length),n=E.decode(i),s=new TextDecoder().decode(n),[c,l]=s.split(":");return{keyData:`${t}.${c}`,keyDataWithoutPrefix:c,signature:l}}function j(e,t,i){let n=S(i==null?void 0:i.environment);function s(c){try{let l=E.decode(t),g=new TextEncoder().encode(e),A=E.decode(c);return D.sign.detached.verify(g,l,A)}catch(l){return console.error("Failed to validate API key signature"),!1}}return n!=null?s(n):s(m)||s(I)}function a(e){return Object.values(e)}var p={ETHEREUM:"ethereum",POLYGON:"polygon",BSC:"bsc",OPTIMISM:"optimism",ARBITRUM:"arbitrum",BASE:"base",ZORA:"zora",ARBITRUMNOVA:"arbitrumnova",ZKATANA:"zkatana",ASTAR_ZKEVM:"astar-zkevm",APEX:"apex"},Ae=a(p),P={ARBITRUM_SEPOLIA:"arbitrum-sepolia",BASE_GOERLI:"base-goerli",BASE_SEPOLIA:"base-sepolia",BSC_TESTNET:"bsc-testnet",ETHEREUM_GOERLI:"ethereum-goerli",ETHEREUM_SEPOLIA:"ethereum-sepolia",POLYGON_MUMBAI:"polygon-mumbai",OPTIMISM_GOERLI:"optimism-goerli",OPTIMISM_SEPOLIA:"optimism-sepolia",ZORA_GOERLI:"zora-goerli",ZORA_SEPOLIA:"zora-sepolia"},fe=a(P),Y=r(r({},p),P),B=a(Y);var z={EVM:"evm",SOLANA:"solana",CARDANO:"cardano",SUI:"sui",APTOS:"aptos"},Oe=a(z);var K=r({SOLANA:"solana",CARDANO:"cardano",SUI:"sui",APTOS:"aptos"},p),h=a(K),V=r({},P),Ke=a(V),$=r(r({},K),V),_=a($);function ve(e,t){return t?e===t:h.includes(e)}function N(e,t){return t?e===t:_.includes(e)}var W={aptos:"Aptos",solana:"Solana",ethereum:"Ethereum","ethereum-sepolia":"Ethereum Sepolia","ethereum-goerli":"Ethereum Goerli",polygon:"Polygon","polygon-mumbai":"Polygon Mumbai",cardano:"Cardano",bsc:"BNB Smart Chain","bsc-testnet":"BNB Smart Chain Testnet",sui:"Sui",optimism:"Optimism","optimism-goerli":"Optimism Goerli","optimism-sepolia":"Optimism Sepolia",arbitrum:"Arbitrum","arbitrum-sepolia":"Arbitrum Sepolia",arbitrumnova:"Arbitrum Nova",base:"Base","base-goerli":"Base Goerli","base-sepolia":"Base Sepolia",zora:"Zora","zora-goerli":"Zora Goerli","zora-sepolia":"Zora Sepolia",zkatana:"zKatana","astar-zkevm":"Astar zkEVM",apex:"Apex"};function je(e){return W[e]}var d={ethereum:1,polygon:137,bsc:56,optimism:10,arbitrum:42161,base:8453,zora:7777777,arbitrumnova:42170,"ethereum-sepolia":11155111,"ethereum-goerli":5,"polygon-mumbai":80001,"bsc-testnet":97,"optimism-sepolia":11155420,"optimism-goerli":420,"base-goerli":84531,"base-sepolia":84532,"arbitrum-sepolia":421614,"zora-sepolia":999999999,"zora-goerli":999,zkatana:1261120,"astar-zkevm":3776,apex:70700};function ze(e){return d[e]}var w=Object.entries(d).reduce((e,[t,i])=>(e[i]=t,e),{});function we(e){return w[e]}function Xe(e){return B.some(t=>N(e,t))}export{o as APIKeyEnvironmentPrefix,f as APIKeyUsageOrigin,u as APIKeyUsageOriginPrefix,h as BLOCKCHAINS,_ as BLOCKCHAINS_INCLUDING_TESTNETS,Oe as BLOCKCHAIN_BASE_LAYERS,Ke as BLOCKCHAIN_TESTNETS,d as BLOCKCHAIN_TO_CHAIN_ID,W as BLOCKCHAIN_TO_COPY_NAME,K as Blockchain,z as BlockchainBaseLayer,$ as BlockchainIncludingTestnet,V as BlockchainTestnet,w as CHAIN_ID_TO_BLOCKCHAIN,m as CROSSMINT_API_KEY_SIGNER_PUBLICKEY_PROD,I as CROSSMINT_API_KEY_SIGNER_PUBLICKEY_STAGING,p as EVMBlockchain,Y as EVMBlockchainIncludingTestnet,P as EVMBlockchainTestnet,B as EVM_BLOCKCHAINS_INCLUDING_TESTNETS,fe as EVM_BLOCKCHAIN_TESTNETS,Ae as EVM_CHAINS,ze as blockchainToChainId,je as blockchainToDisplayName,we as chainIdToBlockchain,S as environmentToExpectedPublicKey,ve as isBlockchain,N as isBlockchainIncludingTestnets,Xe as isEVMBlockchain,a as objectValues,x as usageOriginToPrefix,ue as validateAPIKey,k as validateAPIKeyPrefix}; | ||
//# sourceMappingURL=index.js.map |
@@ -36,4 +36,3 @@ { | ||
"types": "./dist/index.d.ts", | ||
"version": "0.0.6", | ||
"gitHead": "23dfa1bcfd729fbdc0f073b342c99b7f6539d04e" | ||
"version": "0.0.7" | ||
} |
@@ -13,2 +13,4 @@ import { ObjectValues, objectValues } from "@/types"; | ||
ZKATANA: "zkatana", | ||
ASTAR_ZKEVM: "astar-zkevm", | ||
APEX: "apex", | ||
} as const; | ||
@@ -15,0 +17,0 @@ export type EVMBlockchain = ObjectValues<typeof EVMBlockchain>; |
@@ -28,2 +28,8 @@ import { BlockchainIncludingTestnet } from "../types"; | ||
zkatana: "zKatana", | ||
"astar-zkevm": "Astar zkEVM", | ||
apex: "Apex", | ||
}; | ||
export function blockchainToDisplayName(blockchain: BlockchainIncludingTestnet) { | ||
return BLOCKCHAIN_TO_COPY_NAME[blockchain]; | ||
} |
@@ -24,2 +24,4 @@ import { EVMBlockchainIncludingTestnet } from "../../types/evm"; | ||
zkatana: 1261120, | ||
"astar-zkevm": 3776, | ||
apex: 70700, | ||
}; | ||
@@ -26,0 +28,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
3
119868
38
922