@oak-network/config
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -13,2 +13,3 @@ "use strict"; | ||
endpoint: "ws://127.0.0.1:9948", | ||
family: Chain_1.ChainFamily.astar, | ||
isEthereum: true, | ||
@@ -31,2 +32,3 @@ key: "shibuya", | ||
endpoint: "ws://127.0.0.1:9946", | ||
family: Chain_1.ChainFamily.oak, | ||
key: "turing-local", | ||
@@ -46,2 +48,3 @@ name: "Turing Local", | ||
endpoint: "ws://127.0.0.1:9947", | ||
family: Chain_1.ChainFamily.mangata, | ||
key: "mangata-local", | ||
@@ -66,2 +69,3 @@ name: "Mangata Local", | ||
endpoint: "ws://127.0.0.1:9949", | ||
family: Chain_1.ChainFamily.moonbeam, | ||
isEthereum: true, | ||
@@ -68,0 +72,0 @@ key: "moonbase-local", |
@@ -13,2 +13,3 @@ "use strict"; | ||
endpoint: "wss://shiden-rpc.dwellir.com", | ||
family: Chain_1.ChainFamily.astar, | ||
isEthereum: true, | ||
@@ -31,2 +32,3 @@ key: "shiden", | ||
endpoint: "wss://rpc.turing.oak.tech", | ||
family: Chain_1.ChainFamily.oak, | ||
key: "turing", | ||
@@ -46,2 +48,3 @@ name: "Turing Network", | ||
endpoint: "wss://kusama-rpc.mangata.online", | ||
family: Chain_1.ChainFamily.mangata, | ||
key: "mangata", | ||
@@ -66,2 +69,3 @@ name: "Mangata", | ||
endpoint: "wss://wss.api.moonriver.moonbeam.network", | ||
family: Chain_1.ChainFamily.moonbeam, | ||
isEthereum: true, | ||
@@ -68,0 +72,0 @@ key: "moonriver", |
@@ -13,2 +13,3 @@ "use strict"; | ||
endpoint: "ws://167.99.226.24:8846", | ||
family: Chain_1.ChainFamily.oak, | ||
key: "turing-moonbase", | ||
@@ -33,2 +34,3 @@ name: "Moonbase Turing", | ||
endpoint: "wss://wss.api.moonbase.moonbeam.network", | ||
family: Chain_1.ChainFamily.moonbeam, | ||
isEthereum: true, | ||
@@ -35,0 +37,0 @@ key: "moonbase-alpha", |
@@ -13,2 +13,3 @@ "use strict"; | ||
endpoint: "wss://rocstar.astar.network", | ||
family: Chain_1.ChainFamily.astar, | ||
isEthereum: true, | ||
@@ -29,2 +30,3 @@ key: "rocstar", | ||
endpoint: "wss://collator-01-ws-rococo.mangata.online", | ||
family: Chain_1.ChainFamily.mangata, | ||
key: "mangata-rococo", | ||
@@ -44,2 +46,3 @@ name: "Mangata Rococo", | ||
endpoint: "wss://rpc.turing-staging.oak.tech", | ||
family: Chain_1.ChainFamily.oak, | ||
key: "turing-staging", | ||
@@ -46,0 +49,0 @@ name: "Turing Staging", |
@@ -6,2 +6,8 @@ import { XToken } from "../../tokens/types/XToken"; | ||
import { XcmInstructionNetworkType } from "./XcmInstructionNetworkType"; | ||
declare enum ChainFamily { | ||
oak = "oak", | ||
moonbeam = "moonbeam", | ||
astar = "astar", | ||
mangata = "mangata" | ||
} | ||
interface XcmConfig { | ||
@@ -23,2 +29,3 @@ instructionNetworkType?: XcmInstructionNetworkType; | ||
key: string; | ||
family: ChainFamily; | ||
name: string; | ||
@@ -33,2 +40,3 @@ relayChain: RelayChainType; | ||
key: string; | ||
family: ChainFamily; | ||
name: string | undefined; | ||
@@ -40,3 +48,3 @@ paraId: number | undefined; | ||
constructor({ assets, endpoint, isEthereum, // Set default value to false | ||
key, name, relayChain, xcm, }: ChainConstructorParams); | ||
key, family, name, relayChain, xcm, }: ChainConstructorParams); | ||
} | ||
@@ -48,2 +56,3 @@ declare function createChain(config: { | ||
key: string; | ||
family: ChainFamily; | ||
name: string; | ||
@@ -53,3 +62,3 @@ relayChain: RelayChainType; | ||
}): Chain; | ||
export { createChain }; | ||
export { ChainFamily, createChain }; | ||
export type { Chain, XcmConfig, ChainConstructorParams }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createChain = void 0; | ||
exports.createChain = exports.ChainFamily = void 0; | ||
const XToken_1 = require("../../tokens/types/XToken"); | ||
var ChainFamily; | ||
(function (ChainFamily) { | ||
ChainFamily["oak"] = "oak"; | ||
ChainFamily["moonbeam"] = "moonbeam"; | ||
ChainFamily["astar"] = "astar"; | ||
ChainFamily["mangata"] = "mangata"; | ||
})(ChainFamily || (exports.ChainFamily = ChainFamily = {})); | ||
class Chain { | ||
@@ -10,2 +17,3 @@ assets; | ||
key; | ||
family; | ||
name; | ||
@@ -17,3 +25,3 @@ paraId; | ||
constructor({ assets, endpoint, isEthereum = false, // Set default value to false | ||
key, name, relayChain, xcm, }) { | ||
key, family, name, relayChain, xcm, }) { | ||
this.assets = assets; | ||
@@ -23,2 +31,3 @@ this.endpoint = endpoint; | ||
this.key = key; | ||
this.family = family; | ||
this.name = name; | ||
@@ -30,6 +39,7 @@ this.relayChain = relayChain; | ||
function createChain(config) { | ||
const { assets, endpoint, isEthereum, key, name, relayChain, xcm } = config; | ||
const { assets, endpoint, isEthereum, key, family, name, relayChain, xcm } = config; | ||
return new Chain({ | ||
assets: assets.map((asset) => new XToken_1.XToken(asset)), | ||
endpoint, | ||
family, | ||
isEthereum, | ||
@@ -36,0 +46,0 @@ key, |
{ | ||
"name": "@oak-network/config", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119675
2642