GwCertId

Python class corresponding to the GridWorks type gw.cert.id.000 (VersionedTypeName).

class gridworks.types.GwCertId(*, Type, Idx=None, Addr=None, TypeName='gw.cert.id', Version='000')

Clarifies whether cert id is an Algorand Standard Asset or SmartSig

Parameters:
  • Type (AlgoCertType) –

  • Idx (int | None) –

  • Addr (str | None) –

  • TypeName (Literal['gw.cert.id']) –

  • Version (str) –

classmethod check_axiom_1(v)

Axiom 1: Cert type consistency. If Type is ASA, then Id exists and Addr does not. Otherwise, Addr exists and Id does not.

Parameters:

v (dict) –

Return type:

dict

Type:
  • Description:

Idx:
  • Description: ASA Index

Addr:
  • Description: Algorand Smart Signature Address

  • Format: AlgoAddressStringFormat

class gridworks.types.gw_cert_id.check_is_algo_address_string_format(v)

AlgoAddressStringFormat format: The public key of a private/public Ed25519 key pair, transformed into an Algorand address, by adding a 4-byte checksum to the end of the public key and then encoding in base32.

Raises:

ValueError – if not AlgoAddressStringFormat format

Parameters:

v (str) –

class gridworks.types.GwCertId_Maker(type, idx, addr)
Parameters:
  • type (AlgoCertType) –

  • idx (int | None) –

  • addr (str | None) –

classmethod tuple_to_type(tuple)

Given a Python class object, returns the serialized JSON type object

Parameters:

tuple (GwCertId) –

Return type:

str

classmethod type_to_tuple(t)

Given a serialized JSON type object, returns the Python class object

Parameters:

t (str) –

Return type:

GwCertId