Transactions⚓︎
REST API⚓︎
Transactions are processed and stored in the NS and can be manipulated through the Transactions REST API.
| Property | Description |
|---|---|
| transactionid | Identifier for the transaction, assigned by the NS. |
| transactiondata | Data to be signed, set through the REST API. |
| clientadditionaldata | Additional data set through the Mobile SDk, included in the signed data. |
| serveradditionaldata | Additional data set through the REST API, included in the signed data. |
| clientstate | Application state set through the Mobile SDK. Not included in the signed data. |
| serverstate | Application state set through the REST API. Not included in the signed data. |
| sfconstraint | Allowed second factors. Set through the REST API. |
| signature | Signature. This contains all data necessary to guarantee non-repudiation. |
Please refer to the model description for the full list of properties.
Creating a Transaction⚓︎
REST API⚓︎
The createTransaction call can be used to create an unsigned transaction in the NS. The call allows setting the transactiondata and serveradditionaldata as data to be signed.
A transaction must be associated with either a user or a list of accounts. Only this user (these accounts) will be able to retrieve and sign the transaction.
Mobile App Transaction Creation⚓︎
The Mobile SDK can also directly create a transaction. Only when the signing is completed, the transaction will be persisted in the NS. In this case transactiondata and serveradditionaldata will be empty. The Mobile SDK can only use clientadditionaldata to store data to be signed.
Manipulating Transactions⚓︎
Locking⚓︎
While a signature is in progress, the Mobile SDK will lock a transaction. When locked, updating or deleting a transaction is not possible.
Retrieving and Updating Transactions⚓︎
getTransaction, updateTransaction and deleteTransaction allow retrieving, updating and deleting transactions.
Locked transaction and transactions that are already signed cannot be updated or deleted.
Signing⚓︎
Signing a transaction is performed by the Mobile SDK. The Mobile SDK can retrieve transactions for a given account and also search them. Note that the Mobile SDK is not notified of new transactions being created at the server side.
Validation⚓︎
Using the getTransaction call will return a transaction, including the signature. The NS will however not perform an explicit validation of the content of the signature. Using verifyTransaction the NS will also verify the full evidence of the signature (including the attestation), before returning the signature. An unsigned transaction or an invalid signature will result in an error.