Transaction delegation signatures

The Sophia language for smart contracts allow to delegate the transaction execution to a contract by providing delegation signatures.

Delegate signatures for AENS

The following code snippet shows how to generate signatures for name transactions delegation to a contract

# import the required libraries
from aeternity.node import NodeClient, Config
from aeternity.signing import Account

# initialize the node client
node_cli = NodeClient(Config(external_url=""))

# get an account
account = Account.from_keystore("/path/to/keystore", "keystore password")

# an example name
name = "example.chain"

# name preclaim signature delegation
sig = node_cli.delegate_name_preclaim_signature(account, contract_id)

# name claim signature delegation
sig = node_cli.delegate_name_claim_signature(account, contract_id, name)

# name revoke signature delegation
sig = node_cli.delegate_name_revoke_signature(account, contract_id, name)

# name revoke signature delegation
sig = node_cli.delegate_name_transfer_signature(account, contract_id, name)