Transactions
All events that happen on the protocol are broadcasted on-chain to ensure validation and publically attest consent. The creation of users and organizations is also broadcasted to the chain, allowing the Gateway IDs to be publically verifiable yet privacy-preserving.
The transactions that are broadcasted are the following:
- Creation of users/organizations: This anchors the Gateway ID onchain.
- PDA issuance: This action anchors and timestamps the creation of a PDA, while broadcasting cryptographic artifacts for PDA validation.
- PDA status changes: This anchors any changes in the PDA status, such as when a PDA is revoked.
- Request creation: This anchors and timestamps the action of creating a request.
- Proof creation: This anchors and timestamps the action of creating a proof. This can be in response to a request, or as an independent sharing action, and it includes cryptographic artifacts for its validation.
Structure of a transaction
Transactions are currently anchored to Arweave. They include an action, cost, the entities that are a part of it, and metadata to give more context to the action.
On Arweave, the body of a transaction looks like this:
{
"action": "PDA_ISSUANCE",
"from": {
"type": "ORGANIZATION",
"id": "..."
},
"to": {
"type": "USER",
"id": "..."
},
"cost": {
"value": "<cost of transaction>",
"transaction": "<(optional) id of financial fulfillment>"
},
"metadata": {
"issuer": "<id of issuer>",
"pda": "<id of PDA>",
"status": "<status of PDA>",
"signedBy": "<(optional) id of signer>",
"dataModel": "<id of data model>",
"expirationDate": "<(optional) expiration date>"
},
"_id": "<id of transaction>"
}