Class CustomGenerator

Class to generate bitcoin script for interaction transactions

Hierarchy (view full)

Constructors

Properties

contractSaltPubKey?: Buffer

The public key of the contract salt

network: Network = networks.bitcoin

The network to use

senderPubKey: Buffer

The public key of the sender

xSenderPubKey: Buffer

The public key of the sender

DATA_CHUNK_SIZE: number = 512

The maximum size of a data chunk

MAGIC: Buffer = ...

The magic number of OPNet

Accessors

Methods

  • Protected

    Split a buffer into chunks

    Parameters

    • buffer: Buffer

      The buffer to split

    • chunkSize: number = Generator.DATA_CHUNK_SIZE

      The size of each chunk

    Returns Buffer[][]

    • The chunks