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

@axelarjs/api

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@axelarjs/api - npm Package Compare versions

Comparing version 0.3.12 to 0.3.13

axelar-config/spec/axelar-config.schema.json

10

axelar-config/isomorphic.d.ts
import type { Environment } from "@axelarjs/core";
import { RestService, type RestServiceOptions } from "../lib/rest-service";
import type { ChainConfig } from "./types";
import type { AxelarConfigsResponse } from "./types";
export declare class AxelarConfigClient extends RestService {
static init(options: RestServiceOptions): AxelarConfigClient;
getChainConfigs(env: Environment): Promise<{
chains: {
[k: string]: ChainConfig;
};
version: string;
environment: string;
}>;
getAxelarConfigs(env: Environment): Promise<AxelarConfigsResponse>;
}

21

axelar-config/isomorphic.js

@@ -12,23 +12,8 @@ "use strict";

}
async getChainConfigs(env) {
const response = await this.client
.get(`configs/${env}-chain-config-latest.json`)
async getAxelarConfigs(env) {
return this.client
.get(`configs/${env}-config-1.x.json`)
.json();
const chainEntries = Object.entries(response.chains);
const tagChainAsset = ([chainId, chainConfig]) => [
chainId,
{
...chainConfig,
assets: chainConfig.assets.map((asset) => ({
...asset,
module: chainConfig.module === "evm" ? "evm" : "axelarnet",
})),
},
];
return {
...response,
chains: Object.fromEntries(chainEntries.map(tagChainAsset)),
};
}
}
exports.AxelarConfigClient = AxelarConfigClient;

@@ -1,64 +0,127 @@

export interface BaseAssetConfig {
export type TOKEN_TYPE = "customInterchain" | "interchain" | "canonical" | "gateway";
export type TOKEN_MANAGER_TYPE = "mintBurn" | "lockUnlock";
export interface AssetConfig {
id: string;
prettySymbol: string;
symbol: string;
originChainId: {
internal: string;
external: string;
};
registration: "network_asset" | "interchain_token";
name: string;
name: string | null;
originAxelarChainId: string;
coingeckoId: string;
decimals: number;
svg: string;
coingeckoId: string;
}
export interface ComosAssetConfig extends BaseAssetConfig {
module: "axelarnet";
fullDenomPath: string;
ibcDenom: string;
}
export interface EVMAssetConfig extends BaseAssetConfig {
module: "evm";
tokenAddress: string;
isERC20WrappedNativeGasToken?: boolean;
}
export type Asset = ComosAssetConfig | EVMAssetConfig;
export interface BaseChainConfig {
id: string;
externalId: {
chainId: string | number;
chainName: string;
iconUrl: string;
type: string;
details?: {
deployer: string;
deploySalt: string;
deploymentMessageId: string;
originalMinter: string;
};
chainId_internal: string;
assets: Asset[];
chains: {
[chainId: string]: {
tokenAddress: string;
symbol: string;
name: string | null;
tokenManager?: string;
tokenManagerType?: string;
isERC20WrappedNativeGasToken?: boolean;
details?: {
fullDenomPath?: string;
};
};
};
}
export interface AxelarEVMChainConfig extends BaseChainConfig {
module: "evm";
evmConfigs: {
finalityHeight: number;
contracts: {
gasService: `0x${string}`;
constAddressDeployer: `0x${string}`;
depositService: `0x${string}`;
gateway: `0x${string}`;
export type CHAIN_TYPE = "axelarnet" | "evm";
export interface ChainEvmSubconfig {
contracts?: {
AxelarGateway?: {
address: string;
};
AxelarGasService?: {
address: string;
};
AxelarDepositService?: {
address: string;
};
ConstAddressDeployer?: {
address: string;
};
Create3Deployer?: {
address: string;
};
InterchainProposalSender?: {
address: string;
};
InterchainGovernance?: {
address: string;
};
Multisig?: {
address: string;
};
Operators?: {
address: string;
};
InterchainTokenService?: {
address: string;
};
InterchainTokenFactory?: {
address: string;
};
};
approxFinalityHeight: number;
rpc: string[];
}
export interface AxelarCosmosChainConfig extends BaseChainConfig {
module: "axelarnet";
cosmosConfigs: {
rpc: string[];
lcd: string[];
grpc: string[];
addressPrefix: string;
channelIdToAxelar: string;
export interface ChainCosmosSubconfig {
addressPrefix: string;
ibc: {
fromAxelar: {
portId: string;
channelId: string;
};
toAxelar: {
portId: string;
channelId: string;
};
} | null;
rpc: string[];
lcd: string[];
grpc: string[];
}
export interface ChainConfig {
id: string;
displayName: string;
chainType: CHAIN_TYPE;
externalChainId: string | number;
iconUrl: string;
nativeCurrency: {
name: string;
symbol?: string;
denom?: string;
decimals: number;
iconUrl: string;
} | null;
blockExplorers: {
name: string;
url: string;
}[] | null;
config: ChainCosmosSubconfig | ChainEvmSubconfig;
assets: {
[assetId: string]: string;
};
}
export type ChainConfig = AxelarCosmosChainConfig | AxelarEVMChainConfig;
export interface ChainConfigsResponse {
export interface AxelarConfigsResponse {
chains: {
[chainId: string]: ChainConfig;
};
assets: {
[assetId: string]: AssetConfig;
};
tokenAddressToAsset: {
[chainId: string]: {
[assetId: string]: string;
};
};
version: string;
environment: string;
resources: {
staticAssetHost: string;
};
}
import type { Environment } from "@axelarjs/core";
import { RestService, type RestServiceOptions } from "../lib/rest-service";
import type { ChainConfig } from "./types";
import type { AxelarConfigsResponse } from "./types";
export declare class AxelarConfigClient extends RestService {
static init(options: RestServiceOptions): AxelarConfigClient;
getChainConfigs(env: Environment): Promise<{
chains: {
[k: string]: ChainConfig;
};
version: string;
environment: string;
}>;
getAxelarConfigs(env: Environment): Promise<AxelarConfigsResponse>;
}

@@ -12,23 +12,8 @@ "use strict";

}
async getChainConfigs(env) {
const response = await this.client
.get(`configs/${env}-chain-config-latest.json`)
async getAxelarConfigs(env) {
return this.client
.get(`configs/${env}-config-1.x.json`)
.json();
const chainEntries = Object.entries(response.chains);
const tagChainAsset = ([chainId, chainConfig]) => [
chainId,
{
...chainConfig,
assets: chainConfig.assets.map((asset) => ({
...asset,
module: chainConfig.module === "evm" ? "evm" : "axelarnet",
})),
},
];
return {
...response,
chains: Object.fromEntries(chainEntries.map(tagChainAsset)),
};
}
}
exports.AxelarConfigClient = AxelarConfigClient;

@@ -1,64 +0,127 @@

export interface BaseAssetConfig {
export type TOKEN_TYPE = "customInterchain" | "interchain" | "canonical" | "gateway";
export type TOKEN_MANAGER_TYPE = "mintBurn" | "lockUnlock";
export interface AssetConfig {
id: string;
prettySymbol: string;
symbol: string;
originChainId: {
internal: string;
external: string;
};
registration: "network_asset" | "interchain_token";
name: string;
name: string | null;
originAxelarChainId: string;
coingeckoId: string;
decimals: number;
svg: string;
coingeckoId: string;
}
export interface ComosAssetConfig extends BaseAssetConfig {
module: "axelarnet";
fullDenomPath: string;
ibcDenom: string;
}
export interface EVMAssetConfig extends BaseAssetConfig {
module: "evm";
tokenAddress: string;
isERC20WrappedNativeGasToken?: boolean;
}
export type Asset = ComosAssetConfig | EVMAssetConfig;
export interface BaseChainConfig {
id: string;
externalId: {
chainId: string | number;
chainName: string;
iconUrl: string;
type: string;
details?: {
deployer: string;
deploySalt: string;
deploymentMessageId: string;
originalMinter: string;
};
chainId_internal: string;
assets: Asset[];
chains: {
[chainId: string]: {
tokenAddress: string;
symbol: string;
name: string | null;
tokenManager?: string;
tokenManagerType?: string;
isERC20WrappedNativeGasToken?: boolean;
details?: {
fullDenomPath?: string;
};
};
};
}
export interface AxelarEVMChainConfig extends BaseChainConfig {
module: "evm";
evmConfigs: {
finalityHeight: number;
contracts: {
gasService: `0x${string}`;
constAddressDeployer: `0x${string}`;
depositService: `0x${string}`;
gateway: `0x${string}`;
export type CHAIN_TYPE = "axelarnet" | "evm";
export interface ChainEvmSubconfig {
contracts?: {
AxelarGateway?: {
address: string;
};
AxelarGasService?: {
address: string;
};
AxelarDepositService?: {
address: string;
};
ConstAddressDeployer?: {
address: string;
};
Create3Deployer?: {
address: string;
};
InterchainProposalSender?: {
address: string;
};
InterchainGovernance?: {
address: string;
};
Multisig?: {
address: string;
};
Operators?: {
address: string;
};
InterchainTokenService?: {
address: string;
};
InterchainTokenFactory?: {
address: string;
};
};
approxFinalityHeight: number;
rpc: string[];
}
export interface AxelarCosmosChainConfig extends BaseChainConfig {
module: "axelarnet";
cosmosConfigs: {
rpc: string[];
lcd: string[];
grpc: string[];
addressPrefix: string;
channelIdToAxelar: string;
export interface ChainCosmosSubconfig {
addressPrefix: string;
ibc: {
fromAxelar: {
portId: string;
channelId: string;
};
toAxelar: {
portId: string;
channelId: string;
};
} | null;
rpc: string[];
lcd: string[];
grpc: string[];
}
export interface ChainConfig {
id: string;
displayName: string;
chainType: CHAIN_TYPE;
externalChainId: string | number;
iconUrl: string;
nativeCurrency: {
name: string;
symbol?: string;
denom?: string;
decimals: number;
iconUrl: string;
} | null;
blockExplorers: {
name: string;
url: string;
}[] | null;
config: ChainCosmosSubconfig | ChainEvmSubconfig;
assets: {
[assetId: string]: string;
};
}
export type ChainConfig = AxelarCosmosChainConfig | AxelarEVMChainConfig;
export interface ChainConfigsResponse {
export interface AxelarConfigsResponse {
chains: {
[chainId: string]: ChainConfig;
};
assets: {
[assetId: string]: AssetConfig;
};
tokenAddressToAsset: {
[chainId: string]: {
[assetId: string]: string;
};
};
version: string;
environment: string;
resources: {
staticAssetHost: string;
};
}
import type { Environment } from "@axelarjs/core";
import { RestService, type RestServiceOptions } from "../lib/rest-service";
import type { ChainConfig } from "./types";
import type { AxelarConfigsResponse } from "./types";
export declare class AxelarConfigClient extends RestService {
static init(options: RestServiceOptions): AxelarConfigClient;
getChainConfigs(env: Environment): Promise<{
chains: {
[k: string]: ChainConfig;
};
version: string;
environment: string;
}>;
getAxelarConfigs(env: Environment): Promise<AxelarConfigsResponse>;
}

@@ -9,22 +9,7 @@ import { RestService } from "../lib/rest-service";

}
async getChainConfigs(env) {
const response = await this.client
.get(`configs/${env}-chain-config-latest.json`)
async getAxelarConfigs(env) {
return this.client
.get(`configs/${env}-config-1.x.json`)
.json();
const chainEntries = Object.entries(response.chains);
const tagChainAsset = ([chainId, chainConfig]) => [
chainId,
{
...chainConfig,
assets: chainConfig.assets.map((asset) => ({
...asset,
module: chainConfig.module === "evm" ? "evm" : "axelarnet",
})),
},
];
return {
...response,
chains: Object.fromEntries(chainEntries.map(tagChainAsset)),
};
}
}

@@ -1,64 +0,127 @@

export interface BaseAssetConfig {
export type TOKEN_TYPE = "customInterchain" | "interchain" | "canonical" | "gateway";
export type TOKEN_MANAGER_TYPE = "mintBurn" | "lockUnlock";
export interface AssetConfig {
id: string;
prettySymbol: string;
symbol: string;
originChainId: {
internal: string;
external: string;
};
registration: "network_asset" | "interchain_token";
name: string;
name: string | null;
originAxelarChainId: string;
coingeckoId: string;
decimals: number;
svg: string;
coingeckoId: string;
}
export interface ComosAssetConfig extends BaseAssetConfig {
module: "axelarnet";
fullDenomPath: string;
ibcDenom: string;
}
export interface EVMAssetConfig extends BaseAssetConfig {
module: "evm";
tokenAddress: string;
isERC20WrappedNativeGasToken?: boolean;
}
export type Asset = ComosAssetConfig | EVMAssetConfig;
export interface BaseChainConfig {
id: string;
externalId: {
chainId: string | number;
chainName: string;
iconUrl: string;
type: string;
details?: {
deployer: string;
deploySalt: string;
deploymentMessageId: string;
originalMinter: string;
};
chainId_internal: string;
assets: Asset[];
chains: {
[chainId: string]: {
tokenAddress: string;
symbol: string;
name: string | null;
tokenManager?: string;
tokenManagerType?: string;
isERC20WrappedNativeGasToken?: boolean;
details?: {
fullDenomPath?: string;
};
};
};
}
export interface AxelarEVMChainConfig extends BaseChainConfig {
module: "evm";
evmConfigs: {
finalityHeight: number;
contracts: {
gasService: `0x${string}`;
constAddressDeployer: `0x${string}`;
depositService: `0x${string}`;
gateway: `0x${string}`;
export type CHAIN_TYPE = "axelarnet" | "evm";
export interface ChainEvmSubconfig {
contracts?: {
AxelarGateway?: {
address: string;
};
AxelarGasService?: {
address: string;
};
AxelarDepositService?: {
address: string;
};
ConstAddressDeployer?: {
address: string;
};
Create3Deployer?: {
address: string;
};
InterchainProposalSender?: {
address: string;
};
InterchainGovernance?: {
address: string;
};
Multisig?: {
address: string;
};
Operators?: {
address: string;
};
InterchainTokenService?: {
address: string;
};
InterchainTokenFactory?: {
address: string;
};
};
approxFinalityHeight: number;
rpc: string[];
}
export interface AxelarCosmosChainConfig extends BaseChainConfig {
module: "axelarnet";
cosmosConfigs: {
rpc: string[];
lcd: string[];
grpc: string[];
addressPrefix: string;
channelIdToAxelar: string;
export interface ChainCosmosSubconfig {
addressPrefix: string;
ibc: {
fromAxelar: {
portId: string;
channelId: string;
};
toAxelar: {
portId: string;
channelId: string;
};
} | null;
rpc: string[];
lcd: string[];
grpc: string[];
}
export interface ChainConfig {
id: string;
displayName: string;
chainType: CHAIN_TYPE;
externalChainId: string | number;
iconUrl: string;
nativeCurrency: {
name: string;
symbol?: string;
denom?: string;
decimals: number;
iconUrl: string;
} | null;
blockExplorers: {
name: string;
url: string;
}[] | null;
config: ChainCosmosSubconfig | ChainEvmSubconfig;
assets: {
[assetId: string]: string;
};
}
export type ChainConfig = AxelarCosmosChainConfig | AxelarEVMChainConfig;
export interface ChainConfigsResponse {
export interface AxelarConfigsResponse {
chains: {
[chainId: string]: ChainConfig;
};
assets: {
[assetId: string]: AssetConfig;
};
tokenAddressToAsset: {
[chainId: string]: {
[assetId: string]: string;
};
};
version: string;
environment: string;
resources: {
staticAssetHost: string;
};
}
{
"name": "@axelarjs/api",
"version": "0.3.12",
"version": "0.3.13",
"publishConfig": {

@@ -74,6 +74,7 @@ "access": "public"

"devDependencies": {
"@types/node": "^20.11.20",
"@types/node": "^20.11.28",
"dotenv": "^16.4.5",
"fast-check": "^3.15.1",
"happy-dom": "^9.20.3",
"fast-check": "^3.16.0",
"happy-dom": "^13.9.0",
"jsonschema": "^1.4.1",
"matchers": "link:@testing-library/jest-dom/matchers",

@@ -83,5 +84,5 @@ "react": "^18.2.0",

"rimraf": "^5.0.5",
"typescript": "^5.3.3",
"vite": "^5.1.4",
"vitest": "^1.3.1",
"typescript": "^5.4.2",
"vite": "^5.1.6",
"vitest": "^1.4.0",
"@axelarjs/config": "0.1.8",

@@ -95,4 +96,4 @@ "@axelarjs/utils": "0.1.12"

"isomorphic-unfetch": "^4.0.2",
"rambda": "^9.1.0",
"viem": "^2.8.1",
"rambda": "^9.1.1",
"viem": "^2.8.11",
"@axelarjs/core": "0.2.10"

@@ -99,0 +100,0 @@ },

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