Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@equilab/network

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equilab/network - npm Package Compare versions

Comparing version 0.2.11 to 0.2.13

dist/config/chains/ethereum.d.ts

44

dist/config/chains/index.d.ts

@@ -5,2 +5,39 @@ declare const _default: {

readonly bifrost: import("../../types/v1").SubstrateChain<import("./bifrost").BifrostContext>;
readonly ethereum: {
info: {
readonly abi: readonly [{
readonly inputs: readonly [{
readonly internalType: "uint8";
readonly name: "destinationChainID";
readonly type: "uint8";
}, {
readonly internalType: "bytes32";
readonly name: "resourceID";
readonly type: "bytes32";
}, {
readonly internalType: "bytes";
readonly name: "data";
readonly type: "bytes";
}];
readonly name: "deposit";
readonly outputs: readonly [];
readonly stateMutability: "payable";
readonly type: "function";
}];
readonly address: "0x267c4d894db79a3023e266B84401e58f7434e1F1";
readonly spender: "0xe2a1D7C0c2ED4d3937bd6f93d9aCeA7498232F2F";
readonly nodes: readonly ["https://eth.llamarpc.com"];
readonly getTransferArgs: (context: import("./ethereum").EthereumContext, amount: `0x${number}`, pub: `0x${string}`) => {
readonly functionName: "deposit";
readonly args: readonly [7, `0x${string}`, `0x${string}`];
readonly value: bigint;
};
};
type: "evm";
name: string;
title: string;
nativeToken: string;
logo?: string | null | undefined;
paraId?: number | undefined;
};
readonly genshiro: import("../../types/v1").SubstrateChain<import("./genshiro").GenshiroContext>;

@@ -44,2 +81,9 @@ readonly interlay: import("../../types/v1").SubstrateChain<import("./interlay").InterlayContext>;

readonly nodes: readonly ["wss://wss.api.moonbeam.network"];
readonly getTransferArgs: (context: import("./moonbeam").MoonbeamContext, amount: `0x${number}`, pub: `0x${string}`) => {
readonly functionName: "transfer";
readonly args: readonly [`0x${string}`, bigint, {
readonly parents: 1;
readonly interior: `0x${string}`[];
}, bigint];
};
};

@@ -46,0 +90,0 @@ type: "evm";

2

dist/config/chains/index.js

@@ -9,2 +9,3 @@ "use strict";

const bifrost_1 = __importDefault(require("./bifrost"));
const ethereum_1 = __importDefault(require("./ethereum"));
const genshiro_1 = __importDefault(require("./genshiro"));

@@ -20,2 +21,3 @@ const interlay_1 = __importDefault(require("./interlay"));

bifrost: bifrost_1.default,
ethereum: ethereum_1.default,
genshiro: genshiro_1.default,

@@ -22,0 +24,0 @@ interlay: interlay_1.default,

import type { DefaultContext } from "../../types/v1";
export interface MoonbeamContext extends DefaultContext {
address?: `0x${string}`;
decimals: number;
}
declare function getTransferArgs(context: MoonbeamContext, amount: `0x${number}`, pub: `0x${string}`): {
readonly functionName: "transfer";
readonly args: readonly [`0x${string}`, bigint, {
readonly parents: 1;
readonly interior: `0x${string}`[];
}, bigint];
};
declare const _default: {

@@ -41,2 +49,3 @@ info: {

readonly nodes: readonly ["wss://wss.api.moonbeam.network"];
readonly getTransferArgs: typeof getTransferArgs;
};

@@ -43,0 +52,0 @@ type: "evm";

@@ -53,3 +53,34 @@ "use strict";

nodes: ["wss://wss.api.moonbeam.network"],
getTransferArgs,
};
function getTransferArgs(context, amount, pub) {
// Junction::AccountId32
const DESTINATION_ENUM_SELECTOR = "0x01";
// NetworkId::Any
const DESTINATION_NETWORK_ID = "00";
const getInterior = (pub) => [
"0x00000007db",
`${DESTINATION_ENUM_SELECTOR}${pub.slice(2)}${DESTINATION_NETWORK_ID}`, // AccountId32: { network: Any, id: pub}
];
const functionName = "transfer";
const { address, decimals } = context;
const [int, fra] = amount.split(".");
let _amount = BigInt(int !== null && int !== void 0 ? int : 0) * BigInt(10) ** BigInt(decimals);
if (fra === null || fra === void 0 ? void 0 : fra.length) {
const _fra = fra.slice(0, decimals);
const dec = decimals - _fra.length;
if (Number.isFinite(Number(_fra))) {
_amount += BigInt(_fra) * BigInt(10) ** BigInt(dec);
}
}
return {
functionName,
args: [
address,
_amount,
{ parents: 1, interior: getInterior(pub) },
BigInt(5000000),
],
};
}
const chainDef = {

@@ -56,0 +87,0 @@ name: "moonbeam",

2

dist/config/chains/parallel.js

@@ -8,3 +8,3 @@ "use strict";

type: "substrate",
nodes: ["wss://rpc.parallel.fi"],
nodes: ["wss://parallel-rpc.dwellir.com", "wss://rpc.parallel.fi"],
logo: "https://contentv2.equilibrium.io/uploads/parallel_3b34b5d6_ee793f8b57.svg",

@@ -11,0 +11,0 @@ paraId: 2012,

@@ -7,2 +7,39 @@ import * as tokens from "./tokens";

readonly bifrost: import("../types/v1").SubstrateChain<import("./chains/bifrost").BifrostContext>;
readonly ethereum: {
info: {
readonly abi: readonly [{
readonly inputs: readonly [{
readonly internalType: "uint8";
readonly name: "destinationChainID";
readonly type: "uint8";
}, {
readonly internalType: "bytes32";
readonly name: "resourceID";
readonly type: "bytes32";
}, {
readonly internalType: "bytes";
readonly name: "data";
readonly type: "bytes";
}];
readonly name: "deposit";
readonly outputs: readonly [];
readonly stateMutability: "payable";
readonly type: "function";
}];
readonly address: "0x267c4d894db79a3023e266B84401e58f7434e1F1";
readonly spender: "0xe2a1D7C0c2ED4d3937bd6f93d9aCeA7498232F2F";
readonly nodes: readonly ["https://eth.llamarpc.com"];
readonly getTransferArgs: (context: import("./chains/ethereum").EthereumContext, amount: `0x${number}`, pub: `0x${string}`) => {
readonly functionName: "deposit";
readonly args: readonly [7, `0x${string}`, `0x${string}`];
readonly value: bigint;
};
};
type: "evm";
name: string;
title: string;
nativeToken: string;
logo?: string | null | undefined;
paraId?: number | undefined;
};
readonly genshiro: import("../types/v1").SubstrateChain<import("./chains/genshiro").GenshiroContext>;

@@ -46,2 +83,9 @@ readonly interlay: import("../types/v1").SubstrateChain<import("./chains/interlay").InterlayContext>;

readonly nodes: readonly ["wss://wss.api.moonbeam.network"];
readonly getTransferArgs: (context: import("./chains/moonbeam").MoonbeamContext, amount: `0x${number}`, pub: `0x${string}`) => {
readonly functionName: "transfer";
readonly args: readonly [`0x${string}`, bigint, {
readonly parents: 1;
readonly interior: `0x${string}`[];
}, bigint];
};
};

@@ -48,0 +92,0 @@ type: "evm";

@@ -21,3 +21,3 @@ "use strict";

withdraw: "parachain",
withdrawFee: 0.004662276,
withdrawFee: 1.1,
existentialDeposit: 0.1,

@@ -24,0 +24,0 @@ };

import type { CrosschainTokenConf } from "../../../types/v1";
import type { GenshiroContext } from "../../chains/genshiro";
export declare const eqd: CrosschainTokenConf<GenshiroContext>;
export declare const gens: CrosschainTokenConf<GenshiroContext>;
export declare const xdot: CrosschainTokenConf<GenshiroContext>;
export declare const xdot2: CrosschainTokenConf<GenshiroContext>;
export declare const xdot3: CrosschainTokenConf<GenshiroContext>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.xdot3 = exports.xdot2 = exports.xdot = exports.eqd = void 0;
exports.xdot3 = exports.xdot2 = exports.xdot = exports.gens = exports.eqd = void 0;
exports.eqd = {

@@ -25,2 +25,23 @@ token: "eqd",

};
exports.gens = {
token: "gens",
isNative: true,
isFeeToken: false,
context: {
asset: 1734700659,
decimals: 9,
prices: {
gens: 0.0002475,
},
resourceId: "0x0000000000000000000000000000007a05c51f15d366ac77bc86672166836100",
},
fees: [
{
amount: 100,
name: "chainbridge",
token: "gens",
},
],
withdraw: "eq-bridge",
};
exports.xdot = {

@@ -27,0 +48,0 @@ token: "xdot",

import * as acala from "./acala";
import * as astar from "./astar";
import * as bifrost from "./bifrost";
import * as ethereum from "./ethereum";
import * as genshiro from "./genshiro";

@@ -14,2 +15,3 @@ import * as interlay from "./interlay";

readonly bifrost: typeof bifrost;
readonly ethereum: typeof ethereum;
readonly genshiro: typeof genshiro;

@@ -16,0 +18,0 @@ readonly interlay: typeof interlay;

@@ -29,2 +29,3 @@ "use strict";

const bifrost = __importStar(require("./bifrost"));
const ethereum = __importStar(require("./ethereum"));
const genshiro = __importStar(require("./genshiro"));

@@ -40,2 +41,3 @@ const interlay = __importStar(require("./interlay"));

bifrost,
ethereum,
genshiro,

@@ -42,0 +44,0 @@ interlay,

@@ -21,3 +21,3 @@ "use strict";

withdraw: "parachain",
withdrawFee: 0.00000062,
withdrawFee: 0.0000007,
};

@@ -43,3 +43,3 @@ exports.intr = {

withdraw: "parachain",
withdrawFee: 0.000188632,
withdrawFee: 0.002,
};
import type { CrosschainTokenConf } from "../../../types/v1";
import type { MoonbeamContext } from "../../chains/moonbeam";
export declare const glmr: CrosschainTokenConf<MoonbeamContext>;
export declare const eqd: CrosschainTokenConf;
export declare const eq: CrosschainTokenConf;
export declare const eqd: CrosschainTokenConf<MoonbeamContext>;
export declare const eq: CrosschainTokenConf<MoonbeamContext>;

@@ -29,2 +29,3 @@ "use strict";

address: "0xFFffFfFF8cdA1707bAF23834d211B08726B1E499",
decimals: 9,
},

@@ -40,3 +41,4 @@ fees: [

withdraw: "parachain-evm",
withdrawFee: 2.5,
withdrawFee: 100,
withdrawToken: "eq",
};

@@ -49,2 +51,3 @@ exports.eq = {

address: "0xFffFFfFf8f6267e040D8a0638C576dfBa4F0F6D6",
decimals: 9,
},

@@ -60,3 +63,3 @@ fees: [

withdraw: "parachain-evm",
withdrawFee: 2.5,
withdrawFee: 100,
};

@@ -45,3 +45,3 @@ "use strict";

withdraw: "parachain",
withdrawFee: 0.003222687,
withdrawFee: 0.004,
};

@@ -65,3 +65,3 @@ exports.cd815 = {

withdraw: "parachain",
withdrawFee: 0.003222687,
withdrawFee: 0.004,
};

@@ -106,3 +106,3 @@ exports.para = {

withdraw: "parachain",
withdrawFee: 0.003222687,
withdrawFee: 0.004,
};

@@ -19,3 +19,3 @@ "use strict";

withdraw: "relay",
withdrawFee: 0.003222687,
withdrawFee: 0.004,
};

@@ -46,2 +46,3 @@ import type chains from "../../config/chains";

withdrawFee?: number;
withdrawToken?: string;
}

@@ -48,0 +49,0 @@ /** @deprecated still hacks */

{
"name": "@equilab/network",
"version": "0.2.11",
"version": "0.2.13",
"main": "./dist/index.js",

@@ -5,0 +5,0 @@ "license": "none",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc