Skip to main content

Module testing

Module testing 

Source
Available on crate feature test-dependencies only.

Functionsยง

arb_known_shielded_typecode
A strategy to generate a known shielded typecode (Sapling or Orchard only). Unlike arb_shielded_typecode, this excludes unknown typecodes which are not recognized as shielded for zu address validation.
arb_metadata_items
Generates an arbitrary set of metadata items.
arb_r2_shielded_address
Generates an arbitrary R2 shielded-only (zu) Unified address: at least one known shielded receiver (Sapling or Orchard), no transparent receivers, with optional metadata.
arb_r2_transparent_including_address
Generates an arbitrary R2 transparent-including (tu) Unified address: at least one shielded receiver plus a transparent receiver, with optional metadata.
arb_shielded_typecode
A strategy to generate an arbitrary shielded (Sapling, Orchard, or unknown) data typecode.
arb_transparent_typecode
A strategy to generate an arbitrary transparent data typecode.
arb_typecodes
A strategy to generate an arbitrary valid set of data typecodes containing at most one of the P2SH and P2PKH transparent typecodes.
arb_unified_address
Generates an arbitrary R0 Unified address (shielded with optional transparent).
arb_unified_address_for_typecodes
Generates an arbitrary sequence of Unified address items containing receivers corresponding to the provided set of typecodes, in canonical encoding order. The receivers of this address are likely to not represent valid protocol receivers, and should only be used for testing parsing and/or encoding functions that do not concern themselves with the validity of the underlying receivers.