Legacy: the abstract_account path¶
An older way to send PTBs from an account that holds no key, kept in the code but no longer maintained. This page records what it was so you can recognise it. Use Track C for anything new.
Deprecated
The ENABLE_AA / /api/SendAAPTB / aa_init / AA_* path belongs to the older
abstract_account package. Its Move source is not in this repository, so it cannot be built or
audited here. It is replaced by BridgeAA (bridge_abstract_account) and Track C: start at
One-time bridge setup.
What it was¶
An abstract account is an on-chain object that can be the sender of a transaction without a private
key: a Move function, its authenticator, decides whether the transaction is allowed. The legacy path
put such an account behind a second endpoint of the backend: the same PTB request as SendPTB,
sent from the account instead of from a keystore address.
| Piece | What it is |
|---|---|
abstract_account package |
The Move package with the account and its authenticator. Not in this repository. It is a different package from bridge_abstract_account. |
ENABLE_AA |
Backend switch. true initialises the account at startup and registers POST /api/SendAAPTB. When false (the default) the endpoint does not exist. |
aa_init |
Binary that creates the account on devnet. |
AA_* variables |
AA_ACCOUNT_ID_DEVNET, AA_PACKAGE_ID_DEVNET, AA_MODULE_NAME, AA_FUNCTION_NAME and AA_CREATE_FUNCTION_NAME; with SPONSOR_ADDRESS and BENCH_OBJECT_IDS. All listed in Configuration. |
stealth_name_service/backend/testing_backend/src/aa_handler.rs |
The handler: account creation, the object-based authenticator call and the coin cache for the account. |
stealth_name_service/backend/agent/payloads/ptb_AA/ and get_timestamp_PTB_AA.json |
Sample payloads for it. |
How it was enabled¶
- Publish the
abstract_accountpackage on devnet. Its source is not here. - In
.env, setSPONSOR_ADDRESS,AA_PACKAGE_ID_DEVNET,AA_MODULE_NAME,AA_FUNCTION_NAMEandAA_CREATE_FUNCTION_NAME. The sample values areabstract_account,authenticate_max_args_125andcreate. -
Create the account.
aa_inittakes no flags, reads./iota.keystorefrom its working directory, connects to devnet and creates the account withSPONSOR_ADDRESSas sponsor:It prints
AA_ACCOUNT_ID_DEVNETandAA_PACKAGE_ID_DEVNETto add to.env. 4. SetBENCH_OBJECT_IDSto the frozen benchmark objects the authenticator takes (see below), setENABLE_AA=trueand redeploy.
At startup the backend then reads the account, caches its shared-object reference and loads the
benchmark objects. AA_FUNCTION_NAME must match authenticate_max_args_N; N - 3 is the number of
benchmark objects required (required_bench_object_args()). Fewer ids than that stops the backend at
startup; extra ids are trimmed. Only devnet has an account, so a request with
"network": "testnet" fails with AA account not initialized for testnet.
How a request worked¶
The body has the same shape as SendPTB (Writing a payload). The backend builds the
PTB the same way, then submits it differently:
- The transaction's sender is the account, not
auth.address. The code namesauth.addressthe sponsor. - No key signs it. The transaction carries a Move authenticator whose arguments are the account object and the frozen benchmark objects. The authenticator function receives them and approves the call.
- Gas comes from the account's own coins, through a coin cache loaded at startup.
The response has the same fields as SendPTB, so loadtest could aim at it with
--target-url http://localhost:5000/api/SendAAPTB.
Payload shape¶
get_timestamp_PTB_AA.json is an ordinary two-call payload on devnet:
{
"auth": {"address": "0xfc74…a275", "request_number": 0, "agent_number": 0, "gas_budget": 10000000},
"ptb": [{
"network": "devnet",
"calls": [
{"target": "0x2::clock::timestamp_ms", "type_args": [], "args": [["immutable", "0x6"]]},
{"target": "0x2::clock::timestamp_ms", "type_args": [], "args": [["immutable", "0x6"]]}
]
}]
}
The ptb_AA/ directory holds 41 files, ptb_0.json to ptb_40.json. ptb_0.json to
ptb_39.json each hold 25 abstract_account::add_controller calls and ptb_40.json holds one, all
on devnet. A call takes three arguments: an object, an address and a vector of bytes. The
gas_budget is 90000000. Their package and object ids belong to the authors' own deployment.
Why Track C replaces it¶
Legacy abstract_account |
Track C BridgeAA |
|
|---|---|---|
| Purpose | Send a PTB from a keyless account, authorised by benchmark objects | Execute a cross-chain request on the destination chain |
| Authentication | Satisfied by passing benchmark objects; no signature | A relayer signature over a CrossChainIntent, checked against an ACL and matched to the submitted PTB |
| Source in this repository | No | Yes (stealth_name_service/Move/bridge_abstract_account) |
| Setup | aa_init and AA_* |
bridge_aa_init and BRIDGE_AA_* |
| Driven by | An HTTP request to /api/SendAAPTB |
A CrossChainRequest event handled by the relayer |
BridgeAA is the account the rest of the book builds on: Account abstraction and
BridgeAA explains it, and One-time bridge
setup creates it.
Next¶
- One-time bridge setup: create a
BridgeAAinstead. - Writing a payload: the current payload format, shared by both endpoints.