@fairmint/canton-node-sdk
Version:
Canton Node SDK
46 lines • 1.59 kB
TypeScript
import { type LedgerJsonApiClient } from '../../clients/ledger-json-api';
export interface AmuletForTransfer {
contractId: string;
templateId: string;
effectiveAmount: string;
owner: string;
}
export type TransferInputForTransfer = {
tag: 'InputAmulet';
contractId: string;
templateId: string;
effectiveAmount: string;
owner: string;
} | {
tag: 'InputAppRewardCoupon';
contractId: string;
templateId: string;
effectiveAmount: string;
beneficiary: string;
} | {
tag: 'InputValidatorRewardCoupon';
contractId: string;
templateId: string;
effectiveAmount: string;
beneficiary: string;
};
export interface GetAmuletsForTransferParams {
/** Ledger JSON API client for querying active contracts */
jsonApiClient: LedgerJsonApiClient;
/** Party IDs to read as (first one is used as sender) */
readAs?: string[];
/**
* If true, returns all valid transfer inputs (Amulet, AppRewardCoupon, ValidatorRewardCoupon). Defaults to false
* (only Amulet).
*/
includeAllTransferInputs?: boolean;
}
/**
* Gets unlocked amulets owned by the sender party that can be used for transfers. Optionally returns all valid transfer
* inputs (Amulet, AppRewardCoupon, ValidatorRewardCoupon).
*
* @param params - Parameters for getting transfer inputs
* @returns Promise resolving to array of transfer inputs suitable for transfer
*/
export declare function getAmuletsForTransfer(params: GetAmuletsForTransferParams): Promise<AmuletForTransfer[]>;
//# sourceMappingURL=get-amulets-for-transfer.d.ts.map