add getInterchain: trace a transaction/block to validator blocks + interchain anchors
All checks were successful
Build and Test / build (20.x) (push) Successful in 45s
Build and Test / build (18.x) (push) Successful in 48s
Build and Test / build (16.x) (push) Successful in 52s

New transaction.getInterchain and block.getInterchain call the prime-node
/api/v1/{transaction,block}/{id}/interchain endpoints, returning an
InterchainTrace { blockId, validatorBlocks, interchainTransactions }. Adds
VerificationBlock / InterchainTransaction / InterchainTrace interfaces and
method-existence assertions.
This commit is contained in:
2026-06-02 14:12:59 -04:00
parent e4430ae27c
commit 2ffa63df41
4 changed files with 63 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ import {
TransactionBulkResponse,
Transaction,
ListTransactionsResponse,
InterchainTrace,
} from './types';
export class TransactionClient {
@@ -49,6 +50,16 @@ export class TransactionClient {
return this.client.get<Transaction>(`/api/v1/transaction/${transactionId}`);
}
/**
* Traces a transaction to the validator (verification) blocks that validated
* its prime block and the public-chain interchain anchors those validator
* blocks were bundled into. If the transaction is still pending (not yet in a
* block) the trace's arrays are empty.
*/
async getInterchain(transactionId: string): Promise<InterchainTrace> {
return this.client.get<InterchainTrace>(`/api/v1/transaction/${transactionId}/interchain`);
}
/**
* Lists all transactions
*/