• Deserializes an OracleJob from on-chain buffer data

    Parameters

    • data: Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>

      Serialized OracleJob data as Buffer or Uint8Array

    Returns OracleJob

    A decoded OracleJob instance

    If deserialization fails or data is invalid

    // From Buffer
    const buffer = Buffer.from('...'); // serialized job data
    const job1 = decodeOracleJob(buffer);

    // From Uint8Array
    const uint8Array = new Uint8Array([...]); // serialized job data
    const job2 = decodeOracleJob(uint8Array);
    • Uses Protocol Buffers delimited format decoding
    • Accepts both Node.js Buffer and Uint8Array formats
    • Commonly used when reading OracleJobs from blockchain data