@equilab/network
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -1,3 +0,9 @@ | ||
import type { SubstrateChain } from "../../types/v1"; | ||
import type { DefaultContext, SubstrateChain } from "../../types/v1"; | ||
export interface GenshiroContext extends DefaultContext { | ||
prices?: Record<string, number>; | ||
asset?: number; | ||
decimals?: number; | ||
resourceId?: string; | ||
} | ||
declare const chainDef: SubstrateChain; | ||
export default chainDef; |
declare const _default: { | ||
readonly genshiro: import("../../types/v1").SubstrateChain; | ||
readonly statemint: import("../../types/v1").SubstrateChain; | ||
readonly genshiro: import("../../types/v1").SubstrateChain<import("../../types/v1").DefaultContext>; | ||
readonly statemint: import("../../types/v1").SubstrateChain<import("../../types/v1").DefaultContext>; | ||
}; | ||
export default _default; |
@@ -1,3 +0,9 @@ | ||
import type { SubstrateChain } from "../../types/v1"; | ||
import type { DefaultContext, SubstrateChain } from "../../types/v1"; | ||
export interface StatemintContext extends DefaultContext { | ||
prices?: Record<string, number>; | ||
asset?: number; | ||
decimals?: number; | ||
resourceId?: string; | ||
} | ||
declare const chainDef: SubstrateChain; | ||
export default chainDef; |
import * as tokens from "./tokens"; | ||
declare const _default: { | ||
chains: { | ||
readonly genshiro: import("../types/v1").SubstrateChain; | ||
readonly statemint: import("../types/v1").SubstrateChain; | ||
readonly genshiro: import("../types/v1").SubstrateChain<import("../types/v1").DefaultContext>; | ||
readonly statemint: import("../types/v1").SubstrateChain<import("../types/v1").DefaultContext>; | ||
}; | ||
@@ -7,0 +7,0 @@ tokens: typeof tokens; |
@@ -1,72 +0,6 @@ | ||
export declare const eqd: { | ||
token: string; | ||
isNative: boolean; | ||
isFeeToken: boolean; | ||
context: { | ||
asset: number; | ||
decimals: number; | ||
prices: { | ||
gens: number; | ||
}; | ||
resourceId: string; | ||
}; | ||
fees: { | ||
amount: number; | ||
name: string; | ||
token: string; | ||
}[]; | ||
}; | ||
export declare const xdot: { | ||
token: string; | ||
isNative: boolean; | ||
isFeeToken: boolean; | ||
context: { | ||
asset: number; | ||
decimals: number; | ||
prices: { | ||
gens: number; | ||
}; | ||
resourceId: string; | ||
}; | ||
fees: { | ||
amount: number; | ||
name: string; | ||
token: string; | ||
}[]; | ||
}; | ||
export declare const xdot2: { | ||
token: string; | ||
isNative: boolean; | ||
isFeeToken: boolean; | ||
context: { | ||
asset: number; | ||
decimals: number; | ||
prices: { | ||
gens: number; | ||
}; | ||
resourceId: string; | ||
}; | ||
fees: { | ||
amount: number; | ||
name: string; | ||
token: string; | ||
}[]; | ||
}; | ||
export declare const xdot3: { | ||
token: string; | ||
isNative: boolean; | ||
isFeeToken: boolean; | ||
context: { | ||
asset: number; | ||
decimals: number; | ||
prices: { | ||
gens: number; | ||
}; | ||
resourceId: string; | ||
}; | ||
fees: { | ||
amount: number; | ||
name: string; | ||
token: string; | ||
}[]; | ||
}; | ||
import type { CrosschainTokenConf } from "../../../types/v1"; | ||
import type { GenshiroContext } from "../../chains/genshiro"; | ||
export declare const eqd: CrosschainTokenConf<GenshiroContext>; | ||
export declare const xdot: CrosschainTokenConf<GenshiroContext>; | ||
export declare const xdot2: CrosschainTokenConf<GenshiroContext>; | ||
export declare const xdot3: CrosschainTokenConf<GenshiroContext>; |
@@ -1,16 +0,3 @@ | ||
export declare const usdt: { | ||
token: string; | ||
isNative: boolean; | ||
isFeeToken: boolean; | ||
context: { | ||
asset: number; | ||
decimals: number; | ||
}; | ||
fees: { | ||
convert: boolean; | ||
amount: number; | ||
name: string; | ||
token: string; | ||
}[]; | ||
existentialDeposit: number; | ||
}; | ||
import type { CrosschainTokenConf } from "../../../types/v1"; | ||
import type { StatemintContext } from "../../chains/statemint"; | ||
export declare const usdt: CrosschainTokenConf<StatemintContext>; |
@@ -15,16 +15,29 @@ import type chains from "../../config/chains"; | ||
export type DefaultContext = Record<string, any>; | ||
type Parser<T extends {} = any, C extends DefaultContext = DefaultContext> = (context?: C, data?: T) => BigDecimals; | ||
type Getter<A extends any[], T extends {} = any, C extends DefaultContext = DefaultContext> = (context?: C, ...args: A) => T; | ||
export interface SubstrateChain extends BaseChain<"substrate"> { | ||
type Parser<C extends DefaultContext = DefaultContext, T extends {} = any> = (context?: C, data?: T) => BigDecimals; | ||
type Getter<A extends any[], C extends DefaultContext = DefaultContext, T extends {} = any> = (context?: C, ...args: A) => T; | ||
export interface SubstrateChain<C extends DefaultContext = DefaultContext> extends BaseChain<"substrate"> { | ||
nodes: string[]; | ||
paraId?: number; | ||
withdraw?: SubstrateWithdrawType; | ||
getBalance: Getter<[`0x${string}`]>; | ||
getNativeBalance: Getter<[`0x${string}`]>; | ||
getTransferArgs: Getter<[`${number}`, `0x${string}`]>; | ||
parseBalance: Parser; | ||
parseNativeBalance: Parser; | ||
getBalance: Getter<[`0x${string}`], C>; | ||
getNativeBalance: Getter<[`0x${string}`, C]>; | ||
getTransferArgs: Getter<[`${number}`, `0x${string}`, C]>; | ||
parseBalance: Parser<C>; | ||
parseNativeBalance: Parser<C>; | ||
} | ||
export interface EVMChain extends BaseChain<"evm"> { | ||
} | ||
export interface CrosschainTokenConf<C extends DefaultContext = DefaultContext> { | ||
token: string; | ||
context?: C; | ||
isNative?: boolean; | ||
isFeeToken?: boolean; | ||
fees?: { | ||
amount: number; | ||
convert?: boolean; | ||
name: string; | ||
token: string; | ||
}[]; | ||
existentialDeposit?: number; | ||
} | ||
/** @deprecated still hacks */ | ||
@@ -31,0 +44,0 @@ export interface TypeMap { |
{ | ||
"name": "@equilab/network", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"main": "./dist/index.js", | ||
@@ -5,0 +5,0 @@ "license": "none", |
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
696483
14350