Service Methods
- Table of Methods
- Protobuf
The Ledger Transaction Service has the following methods:
syntax = "proto3";
package meshtrade.ledger.transaction.v1;
import "buf/validate/validate.proto";
import "meshtrade/iam/role/v1/role.proto";
import "meshtrade/option/v1/method_type.proto";
import "meshtrade/ledger/transaction/v1/transaction_state.proto";
option go_package = "github.com/meshtrade/api/go/ledger/transaction/v1;transaction_v1";
option java_package = "co.meshtrade.api.ledger.transaction.v1";
/*
TransactionService manages Transaction lifecycle.
*/
service TransactionService {
/*
Retrieves a single Transaction state by the unique identifier of the transaction
*/
rpc GetTransactionState(GetTransactionStateRequest) returns (GetTransactionStateResponse) {
option (meshtrade.option.v1.method_type) = METHOD_TYPE_READ;
option (meshtrade.iam.role.v1.roles) = {
roles: [
ROLE_LEDGER_ADMIN,
ROLE_LEDGER_VIEWER,
ROLE_LEDGER_TRANSACTION_ADMIN,
ROLE_LEDGER_TRANSACTION_VIEWER
]
};
}
/*
Monitor Transaction state changes by the unique identifier of the transaction.
Server-side streaming method that sends state updates as the transaction progresses.
*/
rpc MonitorTransactionState(MonitorTransactionStateRequest) returns (stream MonitorTransactionStateResponse) {
option (meshtrade.option.v1.method_type) = METHOD_TYPE_READ;
option (meshtrade.iam.role.v1.roles) = {
roles: [
ROLE_LEDGER_ADMIN,
ROLE_LEDGER_VIEWER,
ROLE_LEDGER_TRANSACTION_ADMIN,
ROLE_LEDGER_TRANSACTION_VIEWER
]
};
}
}
message GetTransactionStateRequest {
/*
Name of the Transaction whose state is to be retrieved.
Format: transactions/{ULIDv2}
*/
string name = 1 [(buf.validate.field) = {
required: true,
string: {
len: 39,
pattern: "^transactions/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}$"
}
}];
}
message GetTransactionStateResponse {
meshtrade.ledger.transaction.v1.TransactionState state = 1;
}
message MonitorTransactionStateRequest {
/*
Name of the Transaction whose state is to be retrieved.
Format: transactions/{ULIDv2}
*/
string name = 1 [(buf.validate.field) = {
required: true,
string: {
len: 39,
pattern: "^transactions/[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{26}$"
}
}];
}
message MonitorTransactionStateResponse {
meshtrade.ledger.transaction.v1.TransactionState state = 1;
}