@transia/xrpl
Version:
A TypeScript/JavaScript API for interacting with the XRP Ledger in Node.js and the browser
36 lines (28 loc) • 777 B
text/typescript
import { Amount } from '../common'
import {
BaseTransaction,
// isAmount,
// isString,
validateBaseTransaction,
// validateOptionalField,
// validateRequiredField,
} from './common'
/**
* @category Transaction Models
*/
export interface ContractClawback extends BaseTransaction {
TransactionType: 'ContractClawback'
Amount: Amount
ContractAccount?: string
}
/**
* Verify the form and type of a ContractClawback at runtime.
*
* @param tx - A ContractClawback Transaction.
* @throws When the ContractClawback is malformed.
*/
export function validateContractClawback(tx: Record<string, unknown>): void {
validateBaseTransaction(tx)
// validateRequiredField(tx, 'Amount', isAmount)
// validateOptionalField(tx, 'ContractAccount', isString)
}