Skip to content

algopy_testing.op.crypto

ECDSACreate a collection of name/value pairs.
VrfVerifyCreate a collection of name/value pairs.
ECAvailable values for the EC enum.
EllipticCurve
MiMCConfigurationsEnum where members are also (and must be) strings
sha256(→ algopy_testing.primitives.Bytes)
sha3_256(→ algopy_testing.primitives.Bytes)
sumhash512(→ algopy_testing.primitives.Bytes)
keccak256(→ algopy_testing.primitives.Bytes)
sha512_256(→ algopy_testing.primitives.Bytes)
ed25519verify_bare(→ bool)
ed25519verify(→ bool)
ecdsa_verify(→ bool)
ecdsa_pk_recover(…)
ecdsa_pk_decompress(…)
falcon_verify(→ bool)
vrf_verify(→ tuple[algopy_testing.primitives.Bytes, bool])
mimc(→ algopy_testing.primitives.Bytes)

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

class Color(Enum):
RED = 1
BLUE = 2
GREEN = 3

Access them by:

  • attribute access:
    Color.RED
    <Color.RED: 1>
  • value lookup:
    Color(1)
    <Color.RED: 1>
  • name lookup:
    Color['RED']
    <Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

len(Color)
3
list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

class Color(Enum):
RED = 1
BLUE = 2
GREEN = 3

Access them by:

  • attribute access:
    Color.RED
    <Color.RED: 1>
  • value lookup:
    Color(1)
    <Color.RED: 1>
  • name lookup:
    Color['RED']
    <Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

len(Color)
3
list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

ed25519verify_bare(a: Bytes | bytes, b: Bytes | bytes, c: Bytes | bytes) → bool

Section titled “ed25519verify_bare(a: Bytes | bytes, b: Bytes | bytes, c: Bytes | bytes) → bool”

ed25519verify(a: Bytes | bytes, b: Bytes | bytes, c: Bytes | bytes) → bool

Section titled “ed25519verify(a: Bytes | bytes, b: Bytes | bytes, c: Bytes | bytes) → bool”

ecdsa_verify(v: ECDSA, a: Bytes | bytes, b: Bytes | bytes, c: Bytes | bytes, d: Bytes | bytes, e: Bytes | bytes) → bool

Section titled “ecdsa_verify(v: ECDSA, a: Bytes | bytes, b: Bytes | bytes, c: Bytes | bytes, d: Bytes | bytes, e: Bytes | bytes) → bool”

ecdsa_pk_recover(v: ECDSA, a: Bytes | bytes, b: UInt64 | int, c: Bytes | bytes, d: Bytes | bytes) → tuple[algopy_testing.primitives.Bytes, Bytes]

Section titled “ecdsa_pk_recover(v: ECDSA, a: Bytes | bytes, b: UInt64 | int, c: Bytes | bytes, d: Bytes | bytes) → tuple[algopy_testing.primitives.Bytes, Bytes]”

ecdsa_pk_decompress(v: ECDSA, a: Bytes | bytes) → tuple[algopy_testing.primitives.Bytes, Bytes]

Section titled “ecdsa_pk_decompress(v: ECDSA, a: Bytes | bytes) → tuple[algopy_testing.primitives.Bytes, Bytes]”

falcon_verify(_a: Bytes | bytes, _b: Bytes | bytes, _c: Bytes | bytes) → bool

Section titled “falcon_verify(_a: Bytes | bytes, _b: Bytes | bytes, _c: Bytes | bytes) → bool”

vrf_verify(_s: VrfVerify, _a: Bytes | bytes, _b: Bytes | bytes, _c: Bytes | bytes) → tuple[algopy_testing.primitives.Bytes, bool]

Section titled “vrf_verify(_s: VrfVerify, _a: Bytes | bytes, _b: Bytes | bytes, _c: Bytes | bytes) → tuple[algopy_testing.primitives.Bytes, bool]”

Bases: enum.StrEnum

Available values for the EC enum.

Bases: enum.StrEnum

Enum where members are also (and must be) strings