Providers Package
Provider API Reference
Types
Transaction

Type: Transactions

Transaction

This type represents a transaction object. It is composed by types CefiInfoTx and DefiInfoTx.

type Transaction = {
  from: CefiInfoTx | DefiInfoTx;
  to: CefiInfoTx | DefiInfoTx;
  type: "transfer" | "swap" | "trade" | "deposit" | "withdrawal";
};

CefiInfoTx

This type represents a CeFi transaction. It is composed by types WalletType and Fee.

type CefiInfoTx = {
  account: {
    exchangeId: string;
    accountName: string;
  };
  wallet: {
    depositAddress: string;
    walletType: WalletType;
  };
  transaction: {
    amount: string;
    tokenSymbol: string;
    transactionId: string;
    fee: Fee;
    status: TxStatus;
    timestamp: number;
  };
};

DefiInfoTx

This type represents DeFi transaction. It is composed by types DepositAddress and Fee.

type DefiInfoTx = {
  account: DepositAddress;
  transaction: {
    transactionHash: string;
    fee: Fee;
    status: "pending" | "ok" | "cancelled" | "failed";
    timestamp: number;
    tokens: {
      amount: number;
      tokenSymbol: string;
      address: string;
    }[];
  };
};

Fee

This type represents a fee.

type Fee = {
  amount: number;
  tokenSymbol: string;
};