Skip to main content

GetTransactionState

Retrieves a single Transaction state by the unique identifier of the transaction

Method Options​

Authorisation specification of the GetTransactionState method.

TypeMETHOD_TYPE_READ
Access LevelMETHOD_ACCESS_LEVEL_AUTHORISED
Roles
  • ROLE_LEDGER_ADMIN
  • ROLE_LEDGER_VIEWER
  • ROLE_LEDGER_TRANSACTION_ADMIN
  • ROLE_LEDGER_TRANSACTION_VIEWER

Parameters​

Request and response parameter message overview:

Input: GetTransactionStateRequest Message​

FieldTypeRequiredDescription
Name

string

True

Name of the Transaction whose state is to be retrieved. Format: transactions/{ULIDv2}

Returns: GetTransactionStateResponse Message​

FieldTypeDescription
State

meshtrade.ledger.transaction.v1.TransactionState

Code Examples​

Select supported SDK in the language of your choice for a full example of how to invoke the this method:

package main

import (
"context"
"log"

transactionv1 "github.com/meshtrade/api/go/ledger/transaction/v1"
)

func main() {
ctx := context.Background()

// Default configuration is used and credentials come from MESH_API_CREDENTIALS
// environment variable or default discovery methods. Zero config required
// unless you want custom configuration.
service, err := transactionv1.NewTransactionService()
if err != nil {
log.Fatalf("Failed to create service: %v", err)
}
defer service.Close()

// Create request with service-specific parameters
request := &transactionv1.GetTransactionStateRequest{
// FIXME: Populate service-specific request fields
}

// Call the GetTransactionState method
response, err := service.GetTransactionState(ctx, request)
if err != nil {
log.Fatalf("GetTransactionState failed: %v", err)
}

// FIXME: Add relevant response object usage
log.Printf("GetTransactionState successful: %+v", response)
}

Advanced Configuration​

For advanced client configuration options (custom endpoints, TLS settings, timeouts), see the SDK Configuration Guide.

Other Methods​