massalabs / massa-web3

Web3 libraries for Massa
MIT License
29 stars 74 forks source link

interface IBlockInfo definition is outdated #627

Closed icegriffinguru closed 2 months ago

icegriffinguru commented 2 months ago
export interface IBlockInfo {
  id: string // BlockId
  content: null | {
    is_final: boolean
    is_stale: boolean
    block: {
      header: {
        content: {
          endorsed_block: string // Block ID
          index: number
          sender_public_key: string
          slot: ISlot // Endorsed block slot: different from block's slot
        }
        signature: string
      }
      operation_merkle_root: string // Hash of all operations
      parents: string[] // Block IDs, as many as thread count
      slot: ISlot
    }
    signature: string
    operations: [
      {
        content: {
          expire_period: number
          fee: string // Represents an Amount in coins
          op: OpType
          sender_public_key: string
        }
        signature: string
      },
    ]
  }
  is_final: boolean
  is_in_blockclique: boolean
  is_stale: boolean
}

operations is a child of block instead of content.

peterjah commented 2 months ago

Hey, the fix has been merged. To benefit from it, you can update massa-web3 using the npm @dev tag! npm add @massalabs/massa-web3@dev