Skip to main content

Function Signature

Future<YieldXyzGetTransactionResponse> getTransaction(
  String transactionId,
)

Description

Retrieve full details about a specific yield transaction, including its status, hash, and metadata.

Parameters

ParameterTypeRequiredDescription
transactionIdStringYesThe ID of the transaction to retrieve

Returns

YieldXyzGetTransactionResponse - An object containing:
PropertyTypeDescription
transactionYieldXyzActionTransactionFull transaction details including status, hash, and metadata
metadataYieldXyzGetTransactionMetadata?Response metadata
errorString?Error message, if any

Example

import 'package:portal_flutter/portal_flutter.dart';

final portal = Portal();

final response = await portal.yieldIntegrations.yieldxyz.getTransaction(
  'transaction-id-123',
);

print('Status: ${response.transaction.status}');
print('Hash: ${response.transaction.hash}');

Errors

CodeDescription
NOT_INITIALIZEDPortal was not initialized
YIELD_FAILEDFailed to get yield transaction