@fairmint/canton-node-sdk
Version:
Canton Node SDK
37 lines • 1.53 kB
TypeScript
import { type LedgerJsonApiClient } from '../../clients/ledger-json-api';
import { type SubmitAndWaitForTransactionTreeResponse } from '../../clients/ledger-json-api/operations';
export interface CreateTransferOfferParams {
/** Ledger client for submitting commands */
ledgerClient: LedgerJsonApiClient;
/** Receiver party ID */
receiverPartyId: string;
/** Amount to transfer */
amount: string;
/** Description for the transfer */
description: string;
/** When the offer expires (optional, defaults to 24 hours from now) */
expiresAt?: Date;
}
export interface AcceptTransferOfferParams {
/** Ledger client for submitting commands */
ledgerClient: LedgerJsonApiClient;
/** Transfer offer contract ID to accept */
transferOfferContractId: string;
/** Party ID accepting the offer */
acceptingPartyId: string;
}
/**
* Creates a transfer offer using WalletAppInstall_CreateTransferOffer
*
* @param params - Parameters for creating the transfer offer
* @returns Promise resolving to the transfer offer contract ID
*/
export declare function createTransferOffer(params: CreateTransferOfferParams): Promise<string>;
/**
* Accepts a transfer offer using TransferOffer_Accept
*
* @param params - Parameters for accepting the transfer offer
* @returns Promise resolving when the offer is accepted
*/
export declare function acceptTransferOffer(params: AcceptTransferOfferParams): Promise<SubmitAndWaitForTransactionTreeResponse>;
//# sourceMappingURL=offers.d.ts.map