chaingate
Version:
Multi-chain cryptocurrency SDK for TypeScript — unified API for Bitcoin, Ethereum, Litecoin, Dogecoin, Bitcoin Cash, Polygon, Arbitrum, and any EVM-compatible chain. Create wallets, query balances, send transactions, and manage tokens and NFTs across UTXO
65 lines (64 loc) • 2.5 kB
TypeScript
/** Thrown when a string is not valid hexadecimal. */
export declare class InvalidHexError extends Error {
constructor(message: string);
}
/** Thrown when an input string cannot be recognized as any supported wallet format. */
export declare class UnrecognizedFormatError extends Error {
constructor(message: string);
}
/** Thrown when {@link importWallet} receives invalid parameters. */
export declare class InvalidWalletParamsError extends Error {
constructor(message: string);
}
/** Thrown when {@link deserializeWallet} receives invalid data. */
export declare class InvalidWalletExportError extends Error {
constructor(message: string);
}
/** Thrown when an operation is not supported for the given context (e.g. wrong wallet type, accessing token-only data on a native coin). */
export declare class UnsupportedOperationError extends Error {
constructor(message: string);
}
/** Thrown when a transaction fails to broadcast. */
export declare class BroadcastError extends Error {
constructor(message: string);
}
/** Thrown when a transaction has already been sent and cannot be modified. */
export declare class TransactionAlreadySentError extends Error {
constructor();
}
/** Thrown when the wallet does not have enough funds to cover the transfer amount plus fees. */
export declare class NotEnoughFundsError extends Error {
constructor();
}
/**
* Thrown when the keyless rate limit is exhausted (HTTP 429).
*
* ChainGate works without an API key for light usage. To raise the quota,
* grab a free API key at {@link https://api.chaingate.dev} and pass it as
* `new ChainGate({ apiKey })`.
*/
export declare class RateLimitError extends Error {
constructor();
}
/**
* Thrown when the API returns 429 Too Many Requests while using an API key.
*
* Upgrade your plan at {@link https://api.chaingate.dev} for a higher rate limit.
*/
export declare class RateLimitQuotaError extends Error {
constructor();
}
/** Thrown when a keystore password is incorrect. */
export declare class IncorrectKeystorePasswordError extends Error {
constructor();
}
/** Thrown when a keystore has an invalid or unrecognized format. */
export declare class InvalidKeystoreError extends Error {
constructor(message: string);
}
/** Thrown when a JSON-RPC call to an EVM node fails. */
export declare class RpcError extends Error {
/** JSON-RPC error code, if provided by the node. */
readonly code?: number;
constructor(message: string, code?: number);
}