BC-Seedtool-CLI TypeScript Library - v1.0.0-alpha.16
    Preparing search index...

    Class Seed

    Seed with optional metadata. Matches Rust Seed struct in seed.rs.

    Index

    Constructors

    • Create a new Seed with the given data. Matches Rust Seed::new function.

      Parameters

      • data: Uint8Array

      Returns Seed

    Methods

    • Create a new Seed with data and optional metadata. Matches Rust Seed::new_opt function.

      Parameters

      • data: Uint8Array
      • name: string
      • note: string
      • OptionalcreationDate: Date

      Returns Seed

    • Create a new Seed from raw data. Convenience factory method.

      Parameters

      • data: Uint8Array

      Returns Seed

    • Get the seed data. Matches Rust seed.data() method.

      Returns Uint8Array

    • Get the seed name. Matches Rust seed.name() method. Returns empty string if not set.

      Returns string

    • Set the seed name. Matches Rust seed.set_name() method.

      Parameters

      • name: string

      Returns void

    • Get the seed note. Matches Rust seed.note() method. Returns empty string if not set.

      Returns string

    • Set the seed note. Matches Rust seed.set_note() method.

      Parameters

      • note: string

      Returns void

    • Get the creation date. Matches Rust seed.creation_date() method.

      Returns Date | undefined

    • Set the creation date. Matches Rust seed.set_creation_date() method.

      Parameters

      • date: Date | undefined

      Returns void

    • Convert to Envelope. Matches Rust impl From for Envelope.

      Creates an envelope with:

      • Subject: byte string of seed data
      • Type assertion: 'Seed'
      • Optional date assertion
      • Optional name assertion (if not empty)
      • Optional note assertion (if not empty)

      Returns Envelope$1

    • Create a Seed from an Envelope. Matches Rust impl TryFrom for Seed.

      Parameters

      • envelope: Envelope$1

      Returns Seed

    • Convert to @bcts/components Seed. Matches Rust impl TryFrom<&Seed> for ComponentsSeed.

      Returns Seed

    • Create from @bcts/components Seed. Matches Rust impl From for Seed.

      Parameters

      • seed: Seed

      Returns Seed

    • Get string representation.

      Returns string

    • Check equality with another Seed.

      Parameters

      Returns boolean