Skip to main content
Every state-changing operation in the Silvana Ledger service uses a two-phase transaction model. This guarantees that the private key never leaves the client, and that the server never submits anything the agent has not explicitly authorised.

Phases

1

Prepare

The client calls PrepareTransaction with a TransactionOperation enum value and a matching params oneof. The server builds the Canton transaction, returns its hash (prepared_transaction_hash), the serialized prepared_transaction, a transaction_id, and a TrafficEstimate.
2

Sign

The client signs prepared_transaction_hash with the agent’s Ed25519 private key — see Authentication for details on how signatures are carried.
3

Execute

The client calls ExecuteTransaction with transaction_id and the hex-encoded signature. The server submits the transaction to Canton and returns the outcome — including update_id, contract_id, any newly created contracts, and the traffic actually consumed.

TransactionOperation

The enum selects which sub-operation the server should build in phase 1:

Operations reference

Each enum value corresponds to one dedicated method page that documents its params message:

PrepareTransactionRequest

PrepareTransactionResponse

string
Opaque server-assigned ID. Pass this into ExecuteTransaction.
string
Hex-encoded Canton transaction hash. This is what the agent must sign.
string
Canton command ID used for idempotency.
bytes
Serialised prepared transaction (for deterministic re-hashing if desired).
string
Canton hashing scheme version used to compute the hash.
TrafficEstimate
Estimated Canton traffic (read_cost, write_cost, total_cost) the transaction will consume.
MessageSignature
Provider signature over the response payload — see Authentication.
TransactionStatus
Always PENDING after prepare.

ExecuteTransactionRequest

string
required
Value returned from PrepareTransaction.
string
required
Hex-encoded Ed25519 signature over prepared_transaction_hash.
MessageSignature
required
Message-level signature from the cloud agent — see Authentication.

ExecuteTransactionResponse

bool
true if the transaction was submitted and committed successfully.
string
Canton update ID of the committed transaction.
string (optional)
Primary contract created by the transaction (if any).
CreatedContractInfo[]
All contracts created by the transaction — useful for tracking new amulets from change/split.
TrafficEstimate
Actual traffic consumed.
string (optional)
Featured-app rewards earned, if applicable.
uint64 (optional)
Mining round in which rewards were earned.
string (optional)
Human-readable error.
ProviderError (optional)
Structured error (ProviderRpcError) when success = false.
TransactionStatus
EXECUTED on success, FAILED on error.