CCC Docs
    Preparing search index...
    • A class decorator to add methods implementation on the Entity.Base class

      Type Parameters

      • Encodable
      • TypeLike
      • Decoded

      Parameters

      Returns <
          Type,
          ConstructorType extends
              Constructor<Type> & {
                  from(decoded: TypeLike): Type;
                  byteLength?: number;
                  encode(encodable: TypeLike): Bytes;
                  decode(bytesLike: BytesLike): Type;
                  fromBytes(bytes: BytesLike): Type;
              },
      >(
          Constructor: ConstructorType,
          ..._: unknown[],
      ) => ConstructorType

      @mol.codec(
      mol.table({
      codeHash: mol.Byte32,
      hashType: HashTypeCodec,
      args: mol.Bytes,
      }),
      )
      export class Script extends mol.Entity.Base<ScriptLike, Script>() {
      from(scriptLike: ScriptLike): Script {}
      }