stellar-plus
Version:
beta version of stellar-plus, an all-in-one sdk for the Stellar blockchain
40 lines (39 loc) • 964 B
TypeScript
import { rpc as SorobanRpc } from '@stellar/stellar-sdk';
export type RequestPayload = {
jsonrpc: string;
id?: string;
method: string;
params?: object;
};
export type ApiResponse = {
jsonrpc: string;
id: number;
result?: object;
};
export type SimulateTransactionAPIResponse = ApiResponse & {
result?: {
transactionData?: string;
events: string[];
minResourceFee: string;
results?: Array<{
auth: string[];
xdr: string;
}>;
cost?: {
cpuInsns: string;
memBytes: string;
};
latestLedger: string;
error?: string;
restorePreamble?: object;
};
};
export type SendTransactionAPIResponse = ApiResponse & {
result: {
hash: string;
status: SorobanRpc.Api.SendTransactionStatus;
latestLedger: number;
latestLedgerCloseTime: number;
errorResultXdr?: string;
};
};