• Creates a "Transfer Currency" operation to transfer a specific amount of currency from one holder account to another holder account.

    Parameters

    • honeycomb: Honeycomb

      The Honeycomb instance.

    • args: CreateTransferCurrencyOperationArgs

      The arguments for creating the "Transfer Currency" operation.

    Returns Promise<{
        operation: Operation;
    }>

    An object containing the "Transfer Currency" operation.

    Example

    const honeycomb = new Honeycomb(...); // Initialize Honeycomb instance
    const senderHolderAccount = ...; // Sender's HplHolderAccount instance
    const receiverHolderAccount = ...; // Receiver's HplHolderAccount instance

    // Create a "Transfer Currency" operation to send 10 currency tokens from sender to receiver
    const operationArgs: CreateTransferCurrencyOperationArgs = {
    amount: 10, // Transfer amount
    holderAccount: senderHolderAccount, // Sender's HplHolderAccount instance
    receiver: receiverHolderAccount, // Receiver's HplHolderAccount instance
    };
    const { operation } = await createTransferCurrencyOperation(honeycomb, operationArgs);
    operation.send();

Generated using TypeDoc