Static ReadonlyMIN_Minimum seed length in bytes (matches Rust MIN_SEED_LENGTH).
StaticnewCreate a new random seed with default length (16 bytes).
Rust equivalent: Seed::new()
StaticnewCreate a new random seed with a specified length.
Rust equivalent: Seed::new_with_len(count)
Number of bytes (must be >= 16)
StaticnewCreate a new random seed with a specified length using provided RNG.
Rust equivalent: Seed::new_with_len_using(count, rng)
Number of bytes (must be >= 16)
Random number generator
StaticnewCreate a new seed from data and optional metadata.
Rust equivalent: Seed::new_opt(data, name, note, creation_date)
Seed bytes (must be >= 16 bytes)
Optional name for the seed
Optional note for the seed
Optional creation date
StaticfromCreate a Seed from raw bytes with optional metadata.
Note: The input data is copied to prevent external mutation of the seed's internal state.
Seed bytes (must be >= 16 bytes)
Optionalmetadata: SeedMetadataOptional metadata object
StaticfromCreate a Seed from hex string with optional metadata.
Hex string representing seed bytes
Optionalmetadata: SeedMetadataOptional metadata object
StaticrandomGenerate a random seed with specified size (default 32 bytes).
Convenience method that wraps newWithLen().
Number of bytes (must be >= 16, default 32)
Optionalmetadata: SeedMetadataOptional metadata object
StaticrandomGenerate a random seed using provided RNG.
Convenience method that wraps newWithLenUsing().
Random number generator
Number of bytes (must be >= 16, default 32)
Optionalmetadata: SeedMetadataOptional metadata object
Return the data of the seed as a reference to the internal bytes.
Rust equivalent: seed.as_bytes()
Note: Returns a reference to internal data. For a copy, use toData().
Get the raw seed bytes (copy).
Note: Returns a copy to prevent external mutation of the seed's internal state.
Get hex string representation.
Get base64 representation.
Get seed size in bytes.
Return the name of the seed.
Rust equivalent: seed.name() - returns empty string if not set.
Set the name of the seed.
Rust equivalent: seed.set_name(name)
Return the note of the seed.
Rust equivalent: seed.note() - returns empty string if not set.
Set the note of the seed.
Rust equivalent: seed.set_note(note)
Return the creation date of the seed.
Rust equivalent: seed.creation_date()
Set the creation date of the seed.
Rust equivalent: seed.set_creation_date(date)
Get metadata as an object.
TypeScript convenience method - returns a snapshot of current metadata.
Get string representation.
Returns unique data from which cryptographic keys can be derived.
This implementation returns a copy of the seed data, which can be used as entropy for deriving private keys in various cryptographic schemes.
A Uint8Array containing the seed data
Returns the CBOR tags associated with Seed. Includes TAG_SEED (40300) and TAG_SEED_V1 (300) for backward compatibility.
Returns the untagged CBOR encoding (as a map). Map keys:
Returns the tagged CBOR encoding.
Returns the tagged value in CBOR binary representation.
StaticfromStaticfromStaticfromReturns the UR representation of the Seed. Note: URs use untagged CBOR since the type is conveyed by the UR type itself.
Returns the UR string representation.
StaticfromStaticfrom
Interface for types that can provide unique data for cryptographic key derivation.
The provided data should be sufficiently random and have enough entropy to serve as the basis for secure cryptographic key derivation.