@arkade-os/sdk Documentation - v0.4.54
    Preparing search index...

    Class ArkadeProgramScript

    A VtxoScript compiled from an Arkade Program, its constructor args and the signer keys.

    This is the single compilation path shared by the high-level ArkadeContract client and the "arkade" contract handler: both produce byte-identical taproot trees for the same (program, args, keys), so a contract registered through the src/contracts pipeline re-derives the exact script it was created with.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    args: Record<string, ArkadeParamValue>

    Spending paths in declaration order.

    leaves: TapLeafScript[]
    pkScript: Bytes
    program: Program
    scripts: Bytes[]

    Raw tapscript bytes for each leaf

    tweakedPublicKey: Bytes

    Methods

    • Build the Arkade address corresponding to this virtual output script.

      Parameters

      • prefix: string = DEFAULT_NETWORK.hrp

        Bech32 human-readable prefix

      • serverPubKey: Bytes

        32-byte Arkade server public key

      Returns ArkAddress

      Arkade address for this script

      ArkAddress

    • Encode the virtual output script to a TapTree byte representation.

      Returns Bytes

      Encoded TapTree bytes

      decode

    • Look up a tapleaf script by its hex-encoded tapscript body.

      Parameters

      • scriptHex: string

        Hex-encoded tapscript body without the leaf version byte

      Returns TapLeafScript

      Matching tapleaf script

      Error if no matching leaf exists

    • Build the Taproot onchain address corresponding to this virtual output script.

      Parameters

      • network: BTC_NETWORK = DEFAULT_NETWORK

        Bitcoin network descriptor

      Returns string

      Taproot onchain address

      address

    • Decode a virtual output script from an encoded TapTree.

      Parameters

      • tapTree: Bytes

        Encoded TapTree bytes

      Returns VtxoScript

      Decoded virtual output script

      Error if the TapTree cannot be decoded into a valid script set

      encode