blockfrost / blockfrost-websocket-link

WebSocket link for Blockfrost.io API.
Apache License 2.0
8 stars 2 forks source link

feat: drepId in GET_ACCOUNT_INFO #239

Closed slowbackspace closed 3 days ago

slowbackspace commented 1 month ago

close https://github.com/blockfrost/blockfrost-websocket-link/issues/238 prereq: https://github.com/blockfrost/blockfrost-js/pull/301

drep can be seen on account pubkey ff6ccc3097ca79fc29fe92a9639c47644746780c63acae10a9e6f03bf5c919dd27d985feabf40d83a30aa4645ff008c068187559dd224ba59e26d0d2dc3598ce via https://websocket-link.blockfrost.dev/

export interface AccountInfo {
  balance: string;
  addresses?: {
    change: AddressData[];
    used: AddressData[];
    unused: AddressData[];
  };
  empty: boolean;
  availableBalance: string;
  descriptor: string;
  tokens?: AssetBalance[];
  history: {
    total: number; // total transactions
    tokens?: number; // tokens transactions
    unconfirmed: number; // unconfirmed transactions
    transactions?: Transactions; // list of transactions
    txids?: string[];
  };
  page: {
    size: number;
    total: number;
    index: number;
  };
  misc: {
    staking: {
      address: string;
      isActive: boolean;
      rewards: string;
      poolId: string | null;
      drep: {
        drep_id: string;
        hex: string;
        amount: string;
        active: boolean;
        active_epoch: number | null;
        has_script: boolean;
      } | null;
    };
  };
}