Skip to content

aea.helpers.acn.agent_record

This module contains types and helpers for ACN Proof-of-Representation.

AgentRecord Objects

class AgentRecord()

Agent Proof-of-Representation to representative.

__init__

 | __init__(address: str, representative_public_key: str, identifier: SimpleIdOrStr, ledger_id: SimpleIdOrStr, not_before: str, not_after: str, message_format: str, signature: str) -> None

Initialize the AgentRecord

Arguments:

  • address: agent address
  • representative_public_key: representative's public key
  • identifier: certificate identifier.
  • ledger_id: ledger identifier the request is referring to.
  • not_before: specify the lower bound for certificate validity. If it is a string, it must follow the format: 'YYYY-MM-DD'. It will be interpreted as timezone UTC-0.
  • not_before: specify the lower bound for certificate validity. if it is a string, it must follow the format: 'YYYY-MM-DD' It will be interpreted as timezone UTC-0.
  • message_format: message format used for signing
  • signature: proof-of-representation of this AgentRecord

address

 | @property
 | address() -> str

Get agent address

public_key

 | @property
 | public_key() -> str

Get agent public key

representative_public_key

 | @property
 | representative_public_key() -> str

Get agent representative's public key

signature

 | @property
 | signature() -> str

Get record signature

message

 | @property
 | message() -> bytes

Get the message.

identifier

 | @property
 | identifier() -> SimpleIdOrStr

Get the identifier.

ledger_id

 | @property
 | ledger_id() -> SimpleIdOrStr

Get ledger id.

not_before

 | @property
 | not_before() -> str

Get the not_before field.

not_after

 | @property
 | not_after() -> str

Get the not_after field.

message_format

 | @property
 | message_format() -> str

Get the message format.

__str__

 | __str__() -> str

Get string representation.

from_cert_request

 | @classmethod
 | from_cert_request(cls, cert_request: CertRequest, address: str, representative_public_key: str, data_dir: Optional[PathLike] = None) -> "AgentRecord"

Get agent record from cert request.