CCC Docs
    Preparing search index...

    Type Alias CoinXUdtOptionsScript

    CoinXUdtOptionsScript: Omit<CoinOptionsScript, "script"> & {
        script?:
            | {
                codeHash?: ccc.HexLike
                | null;
                hashType?: ccc.HashTypeLike | null;
                args?: ccc.BytesLike | null;
            }
            | null;
        xUdtArgs?: CoinXUdtArgsLike
        | null;
    }

    Script configurations for CoinXUdt.

    CoinXUdt accepts either existing xUDT type args through script.args, or structured args through xUdtArgs. When both are provided, xUdtArgs is used to build the final script.args.

    A complete script with codeHash and hashType takes priority over knownScript. If the script is incomplete, knownScript is used as shorthand and defaults to ccc.KnownScript.XUdt.

    Type Declaration

    • Optionalscript?:
          | {
              codeHash?: ccc.HexLike
              | null;
              hashType?: ccc.HashTypeLike | null;
              args?: ccc.BytesLike | null;
          }
          | null

      Optional xUDT type script fields.

      Provide args to reuse existing xUDT args. Provide codeHash and hashType to use an explicit deployment instead of the known xUDT script shorthand.

    • OptionalxUdtArgs?: CoinXUdtArgsLike | null

      Structured xUDT args.

      When provided, this value is encoded with CoinXUdtArgs and overrides script.args.