Class OPNetLimitedProvider

Allows to fetch UTXO data from any OPNET node

Constructors

Methods

  • Broadcasts a transaction to the OPNET node

    Parameters

    • transaction: string

      The transaction to broadcast

    • psbt: boolean

      Whether the transaction is a PSBT

    Returns Promise<undefined | BroadcastResponse>

    • The response from the OPNET node
  • Fetches the wrap parameters from the OPNET node

    Parameters

    • amount: bigint

      The amount to wrap

    • receiver: Address

      The receiver address

    Returns Promise<undefined | UnwrapGeneration>

    • The wrap parameters fetched
    • If wrap parameters could not be fetched
  • Fetches to the OPNET node

    Parameters

    • method: string
    • paramsMethod: unknown[]

    Returns Promise<unknown>

  • Splits UTXOs into smaller UTXOs

    Parameters

    • wallet: Wallet

      The wallet to split UTXOs

    • network: Network

      The network to split UTXOs

    • splitInputsInto: number

      The number of UTXOs to split into

    • amountPerUTXO: bigint

      The amount per UTXO

    Returns Promise<BroadcastResponse | {
        error: string;
    }>

    • The response from the OPNET node or an error