Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@pancakeswap/chains

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pancakeswap/chains - npm Package Compare versions

Comparing version
0.5.3
to
0.6.0
+10
dist/chains.d.ts
import { UnifiedChainId } from './chainId';
export interface Chain {
id: UnifiedChainId;
name: string;
fullName: string;
isEVM: boolean;
testnet?: boolean;
}
export declare const Chains: Chain[];
//# sourceMappingURL=chains.d.ts.map
{"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../src/chains.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,cAAc,EAAE,MAAM,WAAW,CAAA;AAGlE,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,cAAc,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,EAmGzB,CAAA"}
+5
-0

@@ -24,3 +24,8 @@ export declare enum ChainId {

}
export declare enum NonEVMChainId {
SOLANA = 8000001001,
APTOS = 8000002000
}
export type UnifiedChainId = ChainId | NonEVMChainId;
export declare const testnetChainIds: ChainId[];
//# sourceMappingURL=chainId.d.ts.map
+1
-1

@@ -1,1 +0,1 @@

{"version":3,"file":"chainId.d.ts","sourceRoot":"","sources":["../src/chainId.ts"],"names":[],"mappings":"AAAA,oBAAY,OAAO;IACjB,QAAQ,IAAI;IACZ,MAAM,IAAI;IACV,GAAG,KAAK;IACR,WAAW,KAAK;IAChB,cAAc,MAAM;IACpB,MAAM,MAAM;IACZ,aAAa,OAAO;IACpB,KAAK,MAAM;IACX,aAAa,OAAO;IACpB,qBAAqB,OAAO;IAC5B,YAAY,QAAQ;IACpB,eAAe,SAAS;IACxB,gBAAgB,SAAS;IACzB,cAAc,SAAS;IACvB,KAAK,QAAQ;IACb,aAAa,QAAQ;IACrB,IAAI,OAAO;IACX,YAAY,QAAQ;IACpB,YAAY,QAAQ;IACpB,OAAO,WAAW;IAClB,aAAa,QAAQ;CACtB;AAED,eAAO,MAAM,eAAe,WAc3B,CAAA"}
{"version":3,"file":"chainId.d.ts","sourceRoot":"","sources":["../src/chainId.ts"],"names":[],"mappings":"AAAA,oBAAY,OAAO;IACjB,QAAQ,IAAI;IACZ,MAAM,IAAI;IACV,GAAG,KAAK;IACR,WAAW,KAAK;IAChB,cAAc,MAAM;IACpB,MAAM,MAAM;IACZ,aAAa,OAAO;IACpB,KAAK,MAAM;IACX,aAAa,OAAO;IACpB,qBAAqB,OAAO;IAC5B,YAAY,QAAQ;IACpB,eAAe,SAAS;IACxB,gBAAgB,SAAS;IACzB,cAAc,SAAS;IACvB,KAAK,QAAQ;IACb,aAAa,QAAQ;IACrB,IAAI,OAAO;IACX,YAAY,QAAQ;IACpB,YAAY,QAAQ;IACpB,OAAO,WAAW;IAClB,aAAa,QAAQ;CACtB;AAED,oBAAY,aAAa;IACvB,MAAM,aAAa;IACnB,KAAK,aAAa;CACnB;AAED,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,aAAa,CAAA;AAEpD,eAAO,MAAM,eAAe,WAc3B,CAAA"}

@@ -1,3 +0,4 @@

import { ChainId } from './chainId';
export declare const chainNames: Record<ChainId, string>;
import { UnifiedChainId } from './chainId';
export declare const chainNames: Record<UnifiedChainId, string>;
export declare const chainFullNames: Record<UnifiedChainId, string>;
export declare const chainNamesInKebabCase: {

@@ -25,2 +26,4 @@ readonly 1: "ethereum";

readonly 10143: "monad-testnet";
readonly 8000001001: "solana";
readonly 8000002000: "aptos";
};

@@ -47,5 +50,8 @@ export declare const mainnetChainNamesInKebabCase: {

readonly 84532: "base";
readonly 8000001001: "solana";
readonly 8000002000: "aptos";
};
export declare const chainNameToChainId: Record<string, ChainId>;
export declare const defiLlamaChainNames: Record<ChainId, string>;
export declare const chainNameToChainId: Record<string, UnifiedChainId>;
export declare const allCasesNameToChainId: Record<string, UnifiedChainId>;
export declare const defiLlamaChainNames: Record<UnifiedChainId, string>;
//# sourceMappingURL=chainNames.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"chainNames.d.ts","sourceRoot":"","sources":["../src/chainNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAsB9C,CAAA;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;CAsBxB,CAAA;AAEV,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;CAoB/B,CAAA;AAEV,eAAO,MAAM,kBAAkB,yBAKE,CAAA;AAIjC,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAsBvD,CAAA"}
{"version":3,"file":"chainNames.d.ts","sourceRoot":"","sources":["../src/chainNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,cAAc,EAAE,MAAM,WAAW,CAAA;AAElE,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAwBrD,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAwBzD,CAAA;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;CAwBxB,CAAA;AAEV,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;CAsB/B,CAAA;AAOV,eAAO,MAAM,kBAAkB,gCAKS,CAAA;AAgBxC,eAAO,MAAM,qBAAqB,gCAYQ,CAAA;AAI1C,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAwB9D,CAAA"}
export * from './averageChainBlockTimes';
export * from './chainId';
export * from './chainNames';
export * from './chains';
export * from './utils';
export * from './subgraphs';
//# sourceMappingURL=index.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA"}
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA"}
'use strict';
// src/chainId.ts
var ChainId = /* @__PURE__ */ ((ChainId3) => {
ChainId3[ChainId3["ETHEREUM"] = 1] = "ETHEREUM";
ChainId3[ChainId3["GOERLI"] = 5] = "GOERLI";
ChainId3[ChainId3["BSC"] = 56] = "BSC";
ChainId3[ChainId3["BSC_TESTNET"] = 97] = "BSC_TESTNET";
ChainId3[ChainId3["ZKSYNC_TESTNET"] = 280] = "ZKSYNC_TESTNET";
ChainId3[ChainId3["ZKSYNC"] = 324] = "ZKSYNC";
ChainId3[ChainId3["OPBNB_TESTNET"] = 5611] = "OPBNB_TESTNET";
ChainId3[ChainId3["OPBNB"] = 204] = "OPBNB";
ChainId3[ChainId3["POLYGON_ZKEVM"] = 1101] = "POLYGON_ZKEVM";
ChainId3[ChainId3["POLYGON_ZKEVM_TESTNET"] = 1442] = "POLYGON_ZKEVM_TESTNET";
ChainId3[ChainId3["ARBITRUM_ONE"] = 42161] = "ARBITRUM_ONE";
ChainId3[ChainId3["ARBITRUM_GOERLI"] = 421613] = "ARBITRUM_GOERLI";
ChainId3[ChainId3["ARBITRUM_SEPOLIA"] = 421614] = "ARBITRUM_SEPOLIA";
ChainId3[ChainId3["SCROLL_SEPOLIA"] = 534351] = "SCROLL_SEPOLIA";
ChainId3[ChainId3["LINEA"] = 59144] = "LINEA";
ChainId3[ChainId3["LINEA_TESTNET"] = 59140] = "LINEA_TESTNET";
ChainId3[ChainId3["BASE"] = 8453] = "BASE";
ChainId3[ChainId3["BASE_TESTNET"] = 84531] = "BASE_TESTNET";
ChainId3[ChainId3["BASE_SEPOLIA"] = 84532] = "BASE_SEPOLIA";
ChainId3[ChainId3["SEPOLIA"] = 11155111] = "SEPOLIA";
ChainId3[ChainId3["MONAD_TESTNET"] = 10143] = "MONAD_TESTNET";
return ChainId3;
var ChainId = /* @__PURE__ */ ((ChainId2) => {
ChainId2[ChainId2["ETHEREUM"] = 1] = "ETHEREUM";
ChainId2[ChainId2["GOERLI"] = 5] = "GOERLI";
ChainId2[ChainId2["BSC"] = 56] = "BSC";
ChainId2[ChainId2["BSC_TESTNET"] = 97] = "BSC_TESTNET";
ChainId2[ChainId2["ZKSYNC_TESTNET"] = 280] = "ZKSYNC_TESTNET";
ChainId2[ChainId2["ZKSYNC"] = 324] = "ZKSYNC";
ChainId2[ChainId2["OPBNB_TESTNET"] = 5611] = "OPBNB_TESTNET";
ChainId2[ChainId2["OPBNB"] = 204] = "OPBNB";
ChainId2[ChainId2["POLYGON_ZKEVM"] = 1101] = "POLYGON_ZKEVM";
ChainId2[ChainId2["POLYGON_ZKEVM_TESTNET"] = 1442] = "POLYGON_ZKEVM_TESTNET";
ChainId2[ChainId2["ARBITRUM_ONE"] = 42161] = "ARBITRUM_ONE";
ChainId2[ChainId2["ARBITRUM_GOERLI"] = 421613] = "ARBITRUM_GOERLI";
ChainId2[ChainId2["ARBITRUM_SEPOLIA"] = 421614] = "ARBITRUM_SEPOLIA";
ChainId2[ChainId2["SCROLL_SEPOLIA"] = 534351] = "SCROLL_SEPOLIA";
ChainId2[ChainId2["LINEA"] = 59144] = "LINEA";
ChainId2[ChainId2["LINEA_TESTNET"] = 59140] = "LINEA_TESTNET";
ChainId2[ChainId2["BASE"] = 8453] = "BASE";
ChainId2[ChainId2["BASE_TESTNET"] = 84531] = "BASE_TESTNET";
ChainId2[ChainId2["BASE_SEPOLIA"] = 84532] = "BASE_SEPOLIA";
ChainId2[ChainId2["SEPOLIA"] = 11155111] = "SEPOLIA";
ChainId2[ChainId2["MONAD_TESTNET"] = 10143] = "MONAD_TESTNET";
return ChainId2;
})(ChainId || {});
var NonEVMChainId = /* @__PURE__ */ ((NonEVMChainId2) => {
NonEVMChainId2[NonEVMChainId2["SOLANA"] = 8000001001] = "SOLANA";
NonEVMChainId2[NonEVMChainId2["APTOS"] = 8000002e3] = "APTOS";
return NonEVMChainId2;
})(NonEVMChainId || {});
var testnetChainIds = [

@@ -91,4 +96,31 @@ 5 /* GOERLI */,

[84532 /* BASE_SEPOLIA */]: "baseSepolia",
[10143 /* MONAD_TESTNET */]: "monadTestnet"
[10143 /* MONAD_TESTNET */]: "monadTestnet",
[8000001001 /* SOLANA */]: "solana",
[8000002e3 /* APTOS */]: "aptos"
};
var chainFullNames = {
[1 /* ETHEREUM */]: "Ethereum",
[5 /* GOERLI */]: "Goerli",
[56 /* BSC */]: "BNB Chain",
[97 /* BSC_TESTNET */]: "BNB Chain Testnet",
[42161 /* ARBITRUM_ONE */]: "Arbitrum One",
[421613 /* ARBITRUM_GOERLI */]: "Arbitrum Goerli",
[1101 /* POLYGON_ZKEVM */]: "Polygon zkEVM",
[1442 /* POLYGON_ZKEVM_TESTNET */]: "Polygon zkEVM Testnet",
[324 /* ZKSYNC */]: "ZKsync Era",
[280 /* ZKSYNC_TESTNET */]: "ZKsync Era Testnet",
[59144 /* LINEA */]: "Linea",
[59140 /* LINEA_TESTNET */]: "Linea Testnet",
[204 /* OPBNB */]: "opBNB",
[5611 /* OPBNB_TESTNET */]: "opBNB Testnet",
[8453 /* BASE */]: "Base",
[84531 /* BASE_TESTNET */]: "Base Testnet",
[534351 /* SCROLL_SEPOLIA */]: "Scroll Sepolia",
[11155111 /* SEPOLIA */]: "Sepolia",
[421614 /* ARBITRUM_SEPOLIA */]: "Arbitrum Sepolia",
[84532 /* BASE_SEPOLIA */]: "Base Sepolia",
[10143 /* MONAD_TESTNET */]: "Monad Testnet",
[8000001001 /* SOLANA */]: "Solana",
[8000002e3 /* APTOS */]: "Aptos"
};
var chainNamesInKebabCase = {

@@ -115,3 +147,5 @@ [1 /* ETHEREUM */]: "ethereum",

[84532 /* BASE_SEPOLIA */]: "base-sepolia",
[10143 /* MONAD_TESTNET */]: "monad-testnet"
[10143 /* MONAD_TESTNET */]: "monad-testnet",
[8000001001 /* SOLANA */]: "solana",
[8000002e3 /* APTOS */]: "aptos"
};

@@ -137,10 +171,39 @@ var mainnetChainNamesInKebabCase = {

[421614 /* ARBITRUM_SEPOLIA */]: "arbitrum",
[84532 /* BASE_SEPOLIA */]: "base"
[84532 /* BASE_SEPOLIA */]: "base",
[8000001001 /* SOLANA */]: "solana",
[8000002e3 /* APTOS */]: "aptos"
};
var legacyChainNames = [
["Binance Smart Chain", 56 /* BSC */],
["BNB Smart Chain", 56 /* BSC */]
];
var chainNameToChainId = Object.entries(chainNames).reduce((acc, [chainId, chainName]) => {
return {
[chainName]: chainId,
[chainName]: +chainId,
...acc
};
}, {});
var chainFullNamesToChainId = Object.entries(chainFullNames).reduce((acc, [chainId, chainName]) => {
return {
[chainName]: +chainId,
...acc
};
}, {});
var kebabCaseNamesToChainId = Object.entries(chainNamesInKebabCase).reduce((acc, [chainId, chainName]) => {
return {
[chainName]: +chainId,
...acc
};
}, {});
var allCasesNameToChainId = Object.entries({
...chainFullNamesToChainId,
...kebabCaseNamesToChainId,
...chainNameToChainId
}).concat(legacyChainNames).reduce((acc, [chainName, chainId]) => {
return {
[chainName]: +chainId,
[chainName.toLowerCase()]: +chainId,
...acc
};
}, {});
var defiLlamaChainNames = {

@@ -167,5 +230,109 @@ [56 /* BSC */]: "bsc",

[84532 /* BASE_SEPOLIA */]: "",
[10143 /* MONAD_TESTNET */]: ""
[10143 /* MONAD_TESTNET */]: "",
[8000001001 /* SOLANA */]: "",
[8000002e3 /* APTOS */]: ""
};
// src/chains.ts
var Chains = [
{ id: 56 /* BSC */, name: chainNames[56 /* BSC */], fullName: chainFullNames[56 /* BSC */], isEVM: true },
{ id: 1 /* ETHEREUM */, name: chainNames[1 /* ETHEREUM */], fullName: chainFullNames[1 /* ETHEREUM */], isEVM: true },
{
id: 8000001001 /* SOLANA */,
name: chainNames[8000001001 /* SOLANA */],
fullName: chainFullNames[8000001001 /* SOLANA */],
isEVM: false
},
{
id: 8000002e3 /* APTOS */,
name: chainNames[8000002e3 /* APTOS */],
fullName: chainFullNames[8000002e3 /* APTOS */],
isEVM: false
},
{ id: 8453 /* BASE */, name: chainNames[8453 /* BASE */], fullName: chainFullNames[8453 /* BASE */], isEVM: true },
{
id: 42161 /* ARBITRUM_ONE */,
name: chainNames[42161 /* ARBITRUM_ONE */],
fullName: chainFullNames[42161 /* ARBITRUM_ONE */],
isEVM: true
},
{ id: 324 /* ZKSYNC */, name: chainNames[324 /* ZKSYNC */], fullName: chainFullNames[324 /* ZKSYNC */], isEVM: true },
{ id: 59144 /* LINEA */, name: chainNames[59144 /* LINEA */], fullName: chainFullNames[59144 /* LINEA */], isEVM: true },
{ id: 204 /* OPBNB */, name: chainNames[204 /* OPBNB */], fullName: chainFullNames[204 /* OPBNB */], isEVM: true },
{
id: 1101 /* POLYGON_ZKEVM */,
name: chainNames[1101 /* POLYGON_ZKEVM */],
fullName: chainFullNames[1101 /* POLYGON_ZKEVM */],
isEVM: true
},
{
id: 97 /* BSC_TESTNET */,
name: chainNames[97 /* BSC_TESTNET */],
fullName: chainFullNames[97 /* BSC_TESTNET */],
isEVM: true,
testnet: true
},
{ id: 5 /* GOERLI */, name: chainNames[5 /* GOERLI */], fullName: chainFullNames[5 /* GOERLI */], isEVM: true },
{ id: 11155111 /* SEPOLIA */, name: chainNames[11155111 /* SEPOLIA */], fullName: chainFullNames[11155111 /* SEPOLIA */], isEVM: true },
{
id: 1442 /* POLYGON_ZKEVM_TESTNET */,
name: chainNames[1442 /* POLYGON_ZKEVM_TESTNET */],
fullName: chainFullNames[1442 /* POLYGON_ZKEVM_TESTNET */],
isEVM: true,
testnet: true
},
{
id: 421613 /* ARBITRUM_GOERLI */,
name: chainNames[421613 /* ARBITRUM_GOERLI */],
fullName: chainFullNames[421613 /* ARBITRUM_GOERLI */],
isEVM: true
},
{
id: 421614 /* ARBITRUM_SEPOLIA */,
name: chainNames[421614 /* ARBITRUM_SEPOLIA */],
fullName: chainFullNames[421614 /* ARBITRUM_SEPOLIA */],
isEVM: true
},
{
id: 59140 /* LINEA_TESTNET */,
name: chainNames[59140 /* LINEA_TESTNET */],
fullName: chainFullNames[59140 /* LINEA_TESTNET */],
isEVM: true,
testnet: true
},
{
id: 84531 /* BASE_TESTNET */,
name: chainNames[84531 /* BASE_TESTNET */],
fullName: chainFullNames[84531 /* BASE_TESTNET */],
isEVM: true,
testnet: true
},
{
id: 84532 /* BASE_SEPOLIA */,
name: chainNames[84532 /* BASE_SEPOLIA */],
fullName: chainFullNames[84532 /* BASE_SEPOLIA */],
isEVM: true
},
{
id: 5611 /* OPBNB_TESTNET */,
name: chainNames[5611 /* OPBNB_TESTNET */],
fullName: chainFullNames[5611 /* OPBNB_TESTNET */],
isEVM: true,
testnet: true
},
{
id: 534351 /* SCROLL_SEPOLIA */,
name: chainNames[534351 /* SCROLL_SEPOLIA */],
fullName: chainFullNames[534351 /* SCROLL_SEPOLIA */],
isEVM: true
},
{
id: 10143 /* MONAD_TESTNET */,
name: chainNames[10143 /* MONAD_TESTNET */],
fullName: chainFullNames[10143 /* MONAD_TESTNET */],
isEVM: true,
testnet: true
}
];
// src/utils.ts

@@ -192,2 +359,17 @@ function getChainName(chainId) {

}
function isEvm(chainId) {
if (!chainId)
return false;
return chainId < 1e6;
}
function isSolana(chainId) {
if (!chainId)
return false;
return chainId === 8000001001 /* SOLANA */;
}
function isChainSupported(chainId) {
if (!chainId)
return false;
return Object.values(ChainId).includes(chainId) || Object.values(NonEVMChainId).includes(chainId);
}

@@ -261,5 +443,9 @@ // src/subgraphs.ts

exports.ChainId = ChainId;
exports.Chains = Chains;
exports.NonEVMChainId = NonEVMChainId;
exports.STABLESWAP_SUBGRAPHS = STABLESWAP_SUBGRAPHS;
exports.V2_SUBGRAPHS = V2_SUBGRAPHS;
exports.V3_SUBGRAPHS = V3_SUBGRAPHS;
exports.allCasesNameToChainId = allCasesNameToChainId;
exports.chainFullNames = chainFullNames;
exports.chainNameToChainId = chainNameToChainId;

@@ -278,4 +464,7 @@ exports.chainNames = chainNames;

exports.getV3Subgraphs = getV3Subgraphs;
exports.isChainSupported = isChainSupported;
exports.isEvm = isEvm;
exports.isSolana = isSolana;
exports.isTestnetChainId = isTestnetChainId;
exports.mainnetChainNamesInKebabCase = mainnetChainNamesInKebabCase;
exports.testnetChainIds = testnetChainIds;
// src/chainId.ts
var ChainId = /* @__PURE__ */ ((ChainId3) => {
ChainId3[ChainId3["ETHEREUM"] = 1] = "ETHEREUM";
ChainId3[ChainId3["GOERLI"] = 5] = "GOERLI";
ChainId3[ChainId3["BSC"] = 56] = "BSC";
ChainId3[ChainId3["BSC_TESTNET"] = 97] = "BSC_TESTNET";
ChainId3[ChainId3["ZKSYNC_TESTNET"] = 280] = "ZKSYNC_TESTNET";
ChainId3[ChainId3["ZKSYNC"] = 324] = "ZKSYNC";
ChainId3[ChainId3["OPBNB_TESTNET"] = 5611] = "OPBNB_TESTNET";
ChainId3[ChainId3["OPBNB"] = 204] = "OPBNB";
ChainId3[ChainId3["POLYGON_ZKEVM"] = 1101] = "POLYGON_ZKEVM";
ChainId3[ChainId3["POLYGON_ZKEVM_TESTNET"] = 1442] = "POLYGON_ZKEVM_TESTNET";
ChainId3[ChainId3["ARBITRUM_ONE"] = 42161] = "ARBITRUM_ONE";
ChainId3[ChainId3["ARBITRUM_GOERLI"] = 421613] = "ARBITRUM_GOERLI";
ChainId3[ChainId3["ARBITRUM_SEPOLIA"] = 421614] = "ARBITRUM_SEPOLIA";
ChainId3[ChainId3["SCROLL_SEPOLIA"] = 534351] = "SCROLL_SEPOLIA";
ChainId3[ChainId3["LINEA"] = 59144] = "LINEA";
ChainId3[ChainId3["LINEA_TESTNET"] = 59140] = "LINEA_TESTNET";
ChainId3[ChainId3["BASE"] = 8453] = "BASE";
ChainId3[ChainId3["BASE_TESTNET"] = 84531] = "BASE_TESTNET";
ChainId3[ChainId3["BASE_SEPOLIA"] = 84532] = "BASE_SEPOLIA";
ChainId3[ChainId3["SEPOLIA"] = 11155111] = "SEPOLIA";
ChainId3[ChainId3["MONAD_TESTNET"] = 10143] = "MONAD_TESTNET";
return ChainId3;
var ChainId = /* @__PURE__ */ ((ChainId2) => {
ChainId2[ChainId2["ETHEREUM"] = 1] = "ETHEREUM";
ChainId2[ChainId2["GOERLI"] = 5] = "GOERLI";
ChainId2[ChainId2["BSC"] = 56] = "BSC";
ChainId2[ChainId2["BSC_TESTNET"] = 97] = "BSC_TESTNET";
ChainId2[ChainId2["ZKSYNC_TESTNET"] = 280] = "ZKSYNC_TESTNET";
ChainId2[ChainId2["ZKSYNC"] = 324] = "ZKSYNC";
ChainId2[ChainId2["OPBNB_TESTNET"] = 5611] = "OPBNB_TESTNET";
ChainId2[ChainId2["OPBNB"] = 204] = "OPBNB";
ChainId2[ChainId2["POLYGON_ZKEVM"] = 1101] = "POLYGON_ZKEVM";
ChainId2[ChainId2["POLYGON_ZKEVM_TESTNET"] = 1442] = "POLYGON_ZKEVM_TESTNET";
ChainId2[ChainId2["ARBITRUM_ONE"] = 42161] = "ARBITRUM_ONE";
ChainId2[ChainId2["ARBITRUM_GOERLI"] = 421613] = "ARBITRUM_GOERLI";
ChainId2[ChainId2["ARBITRUM_SEPOLIA"] = 421614] = "ARBITRUM_SEPOLIA";
ChainId2[ChainId2["SCROLL_SEPOLIA"] = 534351] = "SCROLL_SEPOLIA";
ChainId2[ChainId2["LINEA"] = 59144] = "LINEA";
ChainId2[ChainId2["LINEA_TESTNET"] = 59140] = "LINEA_TESTNET";
ChainId2[ChainId2["BASE"] = 8453] = "BASE";
ChainId2[ChainId2["BASE_TESTNET"] = 84531] = "BASE_TESTNET";
ChainId2[ChainId2["BASE_SEPOLIA"] = 84532] = "BASE_SEPOLIA";
ChainId2[ChainId2["SEPOLIA"] = 11155111] = "SEPOLIA";
ChainId2[ChainId2["MONAD_TESTNET"] = 10143] = "MONAD_TESTNET";
return ChainId2;
})(ChainId || {});
var NonEVMChainId = /* @__PURE__ */ ((NonEVMChainId2) => {
NonEVMChainId2[NonEVMChainId2["SOLANA"] = 8000001001] = "SOLANA";
NonEVMChainId2[NonEVMChainId2["APTOS"] = 8000002e3] = "APTOS";
return NonEVMChainId2;
})(NonEVMChainId || {});
var testnetChainIds = [

@@ -89,4 +94,31 @@ 5 /* GOERLI */,

[84532 /* BASE_SEPOLIA */]: "baseSepolia",
[10143 /* MONAD_TESTNET */]: "monadTestnet"
[10143 /* MONAD_TESTNET */]: "monadTestnet",
[8000001001 /* SOLANA */]: "solana",
[8000002e3 /* APTOS */]: "aptos"
};
var chainFullNames = {
[1 /* ETHEREUM */]: "Ethereum",
[5 /* GOERLI */]: "Goerli",
[56 /* BSC */]: "BNB Chain",
[97 /* BSC_TESTNET */]: "BNB Chain Testnet",
[42161 /* ARBITRUM_ONE */]: "Arbitrum One",
[421613 /* ARBITRUM_GOERLI */]: "Arbitrum Goerli",
[1101 /* POLYGON_ZKEVM */]: "Polygon zkEVM",
[1442 /* POLYGON_ZKEVM_TESTNET */]: "Polygon zkEVM Testnet",
[324 /* ZKSYNC */]: "ZKsync Era",
[280 /* ZKSYNC_TESTNET */]: "ZKsync Era Testnet",
[59144 /* LINEA */]: "Linea",
[59140 /* LINEA_TESTNET */]: "Linea Testnet",
[204 /* OPBNB */]: "opBNB",
[5611 /* OPBNB_TESTNET */]: "opBNB Testnet",
[8453 /* BASE */]: "Base",
[84531 /* BASE_TESTNET */]: "Base Testnet",
[534351 /* SCROLL_SEPOLIA */]: "Scroll Sepolia",
[11155111 /* SEPOLIA */]: "Sepolia",
[421614 /* ARBITRUM_SEPOLIA */]: "Arbitrum Sepolia",
[84532 /* BASE_SEPOLIA */]: "Base Sepolia",
[10143 /* MONAD_TESTNET */]: "Monad Testnet",
[8000001001 /* SOLANA */]: "Solana",
[8000002e3 /* APTOS */]: "Aptos"
};
var chainNamesInKebabCase = {

@@ -113,3 +145,5 @@ [1 /* ETHEREUM */]: "ethereum",

[84532 /* BASE_SEPOLIA */]: "base-sepolia",
[10143 /* MONAD_TESTNET */]: "monad-testnet"
[10143 /* MONAD_TESTNET */]: "monad-testnet",
[8000001001 /* SOLANA */]: "solana",
[8000002e3 /* APTOS */]: "aptos"
};

@@ -135,10 +169,39 @@ var mainnetChainNamesInKebabCase = {

[421614 /* ARBITRUM_SEPOLIA */]: "arbitrum",
[84532 /* BASE_SEPOLIA */]: "base"
[84532 /* BASE_SEPOLIA */]: "base",
[8000001001 /* SOLANA */]: "solana",
[8000002e3 /* APTOS */]: "aptos"
};
var legacyChainNames = [
["Binance Smart Chain", 56 /* BSC */],
["BNB Smart Chain", 56 /* BSC */]
];
var chainNameToChainId = Object.entries(chainNames).reduce((acc, [chainId, chainName]) => {
return {
[chainName]: chainId,
[chainName]: +chainId,
...acc
};
}, {});
var chainFullNamesToChainId = Object.entries(chainFullNames).reduce((acc, [chainId, chainName]) => {
return {
[chainName]: +chainId,
...acc
};
}, {});
var kebabCaseNamesToChainId = Object.entries(chainNamesInKebabCase).reduce((acc, [chainId, chainName]) => {
return {
[chainName]: +chainId,
...acc
};
}, {});
var allCasesNameToChainId = Object.entries({
...chainFullNamesToChainId,
...kebabCaseNamesToChainId,
...chainNameToChainId
}).concat(legacyChainNames).reduce((acc, [chainName, chainId]) => {
return {
[chainName]: +chainId,
[chainName.toLowerCase()]: +chainId,
...acc
};
}, {});
var defiLlamaChainNames = {

@@ -165,5 +228,109 @@ [56 /* BSC */]: "bsc",

[84532 /* BASE_SEPOLIA */]: "",
[10143 /* MONAD_TESTNET */]: ""
[10143 /* MONAD_TESTNET */]: "",
[8000001001 /* SOLANA */]: "",
[8000002e3 /* APTOS */]: ""
};
// src/chains.ts
var Chains = [
{ id: 56 /* BSC */, name: chainNames[56 /* BSC */], fullName: chainFullNames[56 /* BSC */], isEVM: true },
{ id: 1 /* ETHEREUM */, name: chainNames[1 /* ETHEREUM */], fullName: chainFullNames[1 /* ETHEREUM */], isEVM: true },
{
id: 8000001001 /* SOLANA */,
name: chainNames[8000001001 /* SOLANA */],
fullName: chainFullNames[8000001001 /* SOLANA */],
isEVM: false
},
{
id: 8000002e3 /* APTOS */,
name: chainNames[8000002e3 /* APTOS */],
fullName: chainFullNames[8000002e3 /* APTOS */],
isEVM: false
},
{ id: 8453 /* BASE */, name: chainNames[8453 /* BASE */], fullName: chainFullNames[8453 /* BASE */], isEVM: true },
{
id: 42161 /* ARBITRUM_ONE */,
name: chainNames[42161 /* ARBITRUM_ONE */],
fullName: chainFullNames[42161 /* ARBITRUM_ONE */],
isEVM: true
},
{ id: 324 /* ZKSYNC */, name: chainNames[324 /* ZKSYNC */], fullName: chainFullNames[324 /* ZKSYNC */], isEVM: true },
{ id: 59144 /* LINEA */, name: chainNames[59144 /* LINEA */], fullName: chainFullNames[59144 /* LINEA */], isEVM: true },
{ id: 204 /* OPBNB */, name: chainNames[204 /* OPBNB */], fullName: chainFullNames[204 /* OPBNB */], isEVM: true },
{
id: 1101 /* POLYGON_ZKEVM */,
name: chainNames[1101 /* POLYGON_ZKEVM */],
fullName: chainFullNames[1101 /* POLYGON_ZKEVM */],
isEVM: true
},
{
id: 97 /* BSC_TESTNET */,
name: chainNames[97 /* BSC_TESTNET */],
fullName: chainFullNames[97 /* BSC_TESTNET */],
isEVM: true,
testnet: true
},
{ id: 5 /* GOERLI */, name: chainNames[5 /* GOERLI */], fullName: chainFullNames[5 /* GOERLI */], isEVM: true },
{ id: 11155111 /* SEPOLIA */, name: chainNames[11155111 /* SEPOLIA */], fullName: chainFullNames[11155111 /* SEPOLIA */], isEVM: true },
{
id: 1442 /* POLYGON_ZKEVM_TESTNET */,
name: chainNames[1442 /* POLYGON_ZKEVM_TESTNET */],
fullName: chainFullNames[1442 /* POLYGON_ZKEVM_TESTNET */],
isEVM: true,
testnet: true
},
{
id: 421613 /* ARBITRUM_GOERLI */,
name: chainNames[421613 /* ARBITRUM_GOERLI */],
fullName: chainFullNames[421613 /* ARBITRUM_GOERLI */],
isEVM: true
},
{
id: 421614 /* ARBITRUM_SEPOLIA */,
name: chainNames[421614 /* ARBITRUM_SEPOLIA */],
fullName: chainFullNames[421614 /* ARBITRUM_SEPOLIA */],
isEVM: true
},
{
id: 59140 /* LINEA_TESTNET */,
name: chainNames[59140 /* LINEA_TESTNET */],
fullName: chainFullNames[59140 /* LINEA_TESTNET */],
isEVM: true,
testnet: true
},
{
id: 84531 /* BASE_TESTNET */,
name: chainNames[84531 /* BASE_TESTNET */],
fullName: chainFullNames[84531 /* BASE_TESTNET */],
isEVM: true,
testnet: true
},
{
id: 84532 /* BASE_SEPOLIA */,
name: chainNames[84532 /* BASE_SEPOLIA */],
fullName: chainFullNames[84532 /* BASE_SEPOLIA */],
isEVM: true
},
{
id: 5611 /* OPBNB_TESTNET */,
name: chainNames[5611 /* OPBNB_TESTNET */],
fullName: chainFullNames[5611 /* OPBNB_TESTNET */],
isEVM: true,
testnet: true
},
{
id: 534351 /* SCROLL_SEPOLIA */,
name: chainNames[534351 /* SCROLL_SEPOLIA */],
fullName: chainFullNames[534351 /* SCROLL_SEPOLIA */],
isEVM: true
},
{
id: 10143 /* MONAD_TESTNET */,
name: chainNames[10143 /* MONAD_TESTNET */],
fullName: chainFullNames[10143 /* MONAD_TESTNET */],
isEVM: true,
testnet: true
}
];
// src/utils.ts

@@ -190,2 +357,17 @@ function getChainName(chainId) {

}
function isEvm(chainId) {
if (!chainId)
return false;
return chainId < 1e6;
}
function isSolana(chainId) {
if (!chainId)
return false;
return chainId === 8000001001 /* SOLANA */;
}
function isChainSupported(chainId) {
if (!chainId)
return false;
return Object.values(ChainId).includes(chainId) || Object.values(NonEVMChainId).includes(chainId);
}

@@ -256,2 +438,2 @@ // src/subgraphs.ts

export { AVERAGE_CHAIN_BLOCK_TIMES, BLOCKS_SUBGRAPHS, ChainId, STABLESWAP_SUBGRAPHS, V2_SUBGRAPHS, V3_SUBGRAPHS, chainNameToChainId, chainNames, chainNamesInKebabCase, defiLlamaChainNames, getBlocksSubgraphs, getChainIdByChainName, getChainName, getChainNameInKebabCase, getLlamaChainName, getMainnetChainNameInKebabCase, getStableSwapSubgraphs, getV2Subgraphs, getV3Subgraphs, isTestnetChainId, mainnetChainNamesInKebabCase, testnetChainIds };
export { AVERAGE_CHAIN_BLOCK_TIMES, BLOCKS_SUBGRAPHS, ChainId, Chains, NonEVMChainId, STABLESWAP_SUBGRAPHS, V2_SUBGRAPHS, V3_SUBGRAPHS, allCasesNameToChainId, chainFullNames, chainNameToChainId, chainNames, chainNamesInKebabCase, defiLlamaChainNames, getBlocksSubgraphs, getChainIdByChainName, getChainName, getChainNameInKebabCase, getLlamaChainName, getMainnetChainNameInKebabCase, getStableSwapSubgraphs, getV2Subgraphs, getV3Subgraphs, isChainSupported, isEvm, isSolana, isTestnetChainId, mainnetChainNamesInKebabCase, testnetChainIds };

@@ -1,9 +0,12 @@

import { ChainId } from './chainId';
import { ChainId, UnifiedChainId } from './chainId';
import { mainnetChainNamesInKebabCase } from './chainNames';
export declare function getChainName(chainId: ChainId): string;
export declare function getChainNameInKebabCase(chainId: ChainId): "goerli" | "bsc" | "linea" | "base" | "sepolia" | "ethereum" | "bsc-testnet" | "arbitrum" | "arbitrum-goerli" | "polygon-zkevm" | "polygon-zkevm-testnet" | "zksync" | "zksync-testnet" | "linea-testnet" | "opbnb" | "opbnb-testnet" | "base-testnet" | "scroll-sepolia" | "arbitrum-sepolia" | "base-sepolia" | "monad-testnet";
export declare function getMainnetChainNameInKebabCase(chainId: keyof typeof mainnetChainNamesInKebabCase): "bsc" | "linea" | "base" | "ethereum" | "arbitrum" | "polygon-zkevm" | "zksync" | "opbnb";
export declare function getMainnetChainNameInKebabCase(chainId: keyof typeof mainnetChainNamesInKebabCase): "bsc" | "linea" | "base" | "solana" | "aptos" | "ethereum" | "arbitrum" | "polygon-zkevm" | "zksync" | "opbnb";
export declare function getLlamaChainName(chainId: ChainId): string;
export declare function getChainIdByChainName(chainName?: string): ChainId | undefined;
export declare function getChainIdByChainName(chainName?: string): UnifiedChainId | undefined;
export declare function isTestnetChainId(chainId: ChainId): boolean;
export declare function isEvm(chainId?: number): boolean;
export declare function isSolana(chainId?: UnifiedChainId): boolean;
export declare function isChainSupported(chainId?: UnifiedChainId): boolean;
//# sourceMappingURL=utils.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAmB,MAAM,WAAW,CAAA;AACpD,OAAO,EAKL,4BAA4B,EAC7B,MAAM,cAAc,CAAA;AAErB,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,UAE5C;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,qUAEvD;AAED,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,MAAM,OAAO,4BAA4B,6FAEhG;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,UAEjD;AAED,wBAAgB,qBAAqB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAG7E;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,WAEhD"}
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAkC,cAAc,EAAE,MAAM,WAAW,CAAA;AACnF,OAAO,EAKL,4BAA4B,EAC7B,MAAM,cAAc,CAAA;AAErB,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,UAE5C;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,qUAEvD;AAED,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,MAAM,OAAO,4BAA4B,kHAEhG;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,UAEjD;AAED,wBAAgB,qBAAqB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAGpF;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,WAEhD;AAED,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,WAGrC;AAED,wBAAgB,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,WAGhD;AAED,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,cAAc,WAMxD"}
{
"name": "@pancakeswap/chains",
"license": "MIT",
"version": "0.5.3",
"version": "0.6.0",
"description": "The single source of truth for Pancakeswap chain-related information",

@@ -6,0 +6,0 @@ "main": "dist/index.js",