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

@xchainjs/xchain-client

Package Overview
Dependencies
Maintainers
0
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xchainjs/xchain-client - npm Package Compare versions

Comparing version 0.16.8 to 1.0.0

4

lib/BaseXChainClient.d.ts

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

import { Address, Asset, Chain } from '@xchainjs/xchain-util';
import { Address, AnyAsset, Chain } from '@xchainjs/xchain-util';
/**

@@ -70,3 +70,3 @@ * This abstract class serves as the base for XChain clients.

abstract validateAddress(address: string): boolean;
abstract getBalance(address: string, assets?: Asset[]): Promise<Balance[]>;
abstract getBalance(address: string, assets?: AnyAsset[]): Promise<Balance[]>;
abstract getTransactions(params?: TxHistoryParams): Promise<TxsPage>;

@@ -73,0 +73,0 @@ abstract getTransactionData(txId: string, assetAddress?: string): Promise<Tx>;

@@ -1,49 +0,6 @@

import { Address, Asset } from '@xchainjs/xchain-util';
import { ExplorerProvider } from './explorer-provider';
import { Balance, FeeRates, Network, Tx, TxHistoryParams, TxsPage } from './types';
import { Network } from './types';
/**
* Interface for online data providers.
*/
export interface OnlineDataProvider {
/**
* Get the balance for a given address.
* @param {Address} address The address to get the balance for.
* @param {Asset[]} assets (Optional) An array of assets to get the balance for.
* @returns {Promise<Balance[]>} A promise that resolves to an array of balances.
*/
getBalance(address: Address, assets?: Asset[]): Promise<Balance[]>;
/**
* Get transactions based on provided parameters.
* @param {TxHistoryParams} params The parameters for fetching transactions.
* @returns {Promise<TxsPage>} A promise that resolves to a page of transactions.
*/
getTransactions(params: TxHistoryParams): Promise<TxsPage>;
/**
* Get transaction data based on its ID.
* @param {string} txId The ID of the transaction.
* @param {Address} assetAddress (Optional) The address of the asset.
* @returns {Promise<Tx>} A promise that resolves to the transaction data.
*/
getTransactionData(txId: string, assetAddress?: Address): Promise<Tx>;
/**
* Get the fee rates.
* @returns {Promise<FeeRates>} A promise that resolves to the fee rates.
*/
getFeeRates(): Promise<FeeRates>;
}
/**
* Type alias for Ethereum Virtual Machine (EVM) online data provider.
*/
export type EvmOnlineDataProvider = OnlineDataProvider;
/**
* Type alias for explorer providers.
*/
export type ExplorerProviders = Record<Network, ExplorerProvider>;
/**
* Type alias for online data providers.
*/
export type OnlineDataProviders = Record<Network, OnlineDataProvider | undefined>;
/**
* Type alias for EVM online data providers.
*/
export type EvmOnlineDataProviders = Record<Network, EvmOnlineDataProvider | undefined>;

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

import { Address, Asset, BaseAmount } from '@xchainjs/xchain-util';
import { Address, AnyAsset, Asset, BaseAmount } from '@xchainjs/xchain-util';
/**

@@ -21,3 +21,3 @@ * Enumeration of network types.

export type Balance = {
asset: Asset;
asset: AnyAsset;
amount: BaseAmount;

@@ -42,3 +42,3 @@ };

amount: BaseAmount;
asset?: Asset;
asset?: AnyAsset;
};

@@ -51,3 +51,3 @@ /**

amount: BaseAmount;
asset?: Asset;
asset?: AnyAsset;
};

@@ -58,3 +58,3 @@ /**

export type Tx = {
asset: Asset;
asset: AnyAsset;
from: TxFrom[];

@@ -88,3 +88,3 @@ to: TxTo[];

walletIndex?: number;
asset?: Asset;
asset?: AnyAsset;
amount: BaseAmount;

@@ -180,3 +180,3 @@ recipient: Address;

setPhrase(phrase: string, walletIndex: number): Address;
getBalance(address: Address, assets?: Asset[]): Promise<Balance[]>;
getBalance(address: Address, assets?: AnyAsset[]): Promise<Balance[]>;
getTransactions(params?: TxHistoryParams): Promise<TxsPage>;

@@ -183,0 +183,0 @@ getTransactionData(txId: string, assetAddress?: Address): Promise<Tx>;

{
"name": "@xchainjs/xchain-client",
"version": "0.16.8",
"version": "1.0.0",
"license": "MIT",

@@ -23,3 +23,3 @@ "main": "lib/index.js",

"@xchainjs/xchain-crypto": "0.3.4",
"@xchainjs/xchain-util": "0.13.7",
"@xchainjs/xchain-util": "1.0.0",
"axios": "1.3.6"

@@ -26,0 +26,0 @@ },

Sorry, the diff of this file is not supported yet

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