- Account setup: your organization ID and a root API keypair.
- Create a wallet: a wallet with an Ethereum account.
1
Create an API-only user
Generate a keypair for the new user and register its public key. The user starts with no permissions.
2
Create the policy
Allow only this user, and only transactions whose recipient is
<ALLOWED_ADDRESS> (lowercase).condition is required. A missing, empty, or whitespace-only condition is rejected with HTTP 400; use "true" to match every activity.3
Test the policy
Sign two transactions as the new user: one to the allowlisted address and one to any other address.The transaction to the allowlisted address is
ACTIVITY_STATUS_COMPLETED. The other one is ACTIVITY_STATUS_FAILED, because no policy allows it. You’ve set your first policy.4
Clean up
Delete the policy with the root key. A policy ID that does not exist in the organization returns HTTP 404. Use
deletePolicies takes a list of IDs; deletePolicy takes one.getPolicies to list the current IDs.Using plain HTTP
Every call above is a stampedPOST. For example, the policy in step 2 as a raw request:
$BODY is:
$STAMP is your root API key’s signature over the exact bytes of $BODY; see Stamps. The other steps use create_users (ACTIVITY_TYPE_CREATE_USERS_V3), sign_transaction (ACTIVITY_TYPE_SIGN_TRANSACTION_V2) and delete_policies (ACTIVITY_TYPE_DELETE_POLICIES).