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__
def __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 addressrepresentative_public_key
: representative's public keyidentifier
: 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_after
: 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 signingsignature
: proof-of-representation of this AgentRecord
address
@property
def address() -> str
Get agent address
public_
key
@property
def public_key() -> str
Get agent public key
representative_
public_
key
@property
def representative_public_key() -> str
Get agent representative's public key
signature
@property
def signature() -> str
Get record signature
message
@property
def message() -> bytes
Get the message.
identifier
@property
def identifier() -> SimpleIdOrStr
Get the identifier.
ledger_
id
@property
def ledger_id() -> SimpleIdOrStr
Get ledger id.
not_
before
@property
def not_before() -> str
Get the not_before field.
not_
after
@property
def not_after() -> str
Get the not_after field.
message_
format
@property
def message_format() -> str
Get the message format.
__
str__
def __str__() -> str
Get string representation.
from_
cert_
request
@classmethod
def 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.