@xchainjs/xchain-client
Advanced tools
Comparing version 0.16.8 to 1.0.0
@@ -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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
83602
943
+ Added@xchainjs/xchain-util@1.0.0(transitive)
- Removed@xchainjs/xchain-util@0.13.7(transitive)
Updated@xchainjs/xchain-util@1.0.0