Resources
Identity and Access Management (IAM)
User
is the fundamental resource. They can behuman
ormachine
. Each request to Treasury must be signed with aCredential
, which comes in multiple variants:k256
is suitable for programmatic or CLI requests,webauthn
(and the time-limitedsession
) is used for UI request.Role
can be attached to users. One user may have multiple roles.AccessRule
s consitute the Access Policy, determining whichOperation
s may be initiated, approved or canceled by which users or roles
Note that an Operation
cannot be directly created. Instead, each user request for a CRUD operation (if valid according the the access policy)
creates an Operation
.
If an operation is authorizing
, it requires approving requests; ultimately an operation will have succeeded
or failed
.
In the successful case, the originally requested operation (CRUD on some other resource) will be executed.
Transfers
Chain
is the parent resource of bothAddress
, which isinternal
(if Treasury controls the key) orexternal
, andAsset
, which is thenative
(gas) asset or a contract-basedtoken
asset.Account
is an optional grouping mechanism for addresses (each address can be in at most one account)TransferRule
s constitute the Transfer Policy, determining which from-to routes are allowed for which assetsTransfer
then is the core resource of Treasury, a semantic representation of sending an amount of an asset from one address to another.
Administrative
Treasury
is a singleton resource, with information such as its ID and current software version.Signer
corresponds to the off-chain worker process creating keys and signatures using MPC protocols.SoftwareUpdate
is a request to update the Treasury software at a given block (executed by the distributedsupervisor
processes)Feature
are opt-in features of the Treasury.
Raw MPC
Whereas Address
and Transfer
are also based on keys and signatures (with a dedicated transfer policy),
as an escape hatch users may still create
Key
s for any supported curve, and correspondingSignature
s in any supported format
Crucially, the access policy still applies to "Raw MPC", allowing for instance
- require access rules on the chosen key threshold, or
- required machine processes approving signature payloads