• Creates a "Fund Account" operation to add funds to the specified holder account for the given currency. If the receiver wallet does not have a holder account for the currency, a new holder account will be created.

    Parameters

    • honeycomb: Honeycomb

      The Honeycomb instance.

    • args: CreateFundAccountOperationArgs

      The arguments for creating the "Fund Account" operation.

    Returns Promise<{
        holderAccount: web3.PublicKey;
        operation: Operation;
    }>

    An object containing the "Fund Account" operation and the holder account address.

    Example

    const honeycomb = new Honeycomb(...); // Initialize Honeycomb instance
    const currency = ...; // HplCurrency instance
    const receiverWallet = ...; // Receiver's wallet public key
    const amount = 100; // Amount to fund

    // Create a "Fund Account" operation for the receiver and currency
    const operationArgs: CreateFundAccountOperationArgs = {
    currency,
    receiverWallet,
    amount,
    };
    const { operation } = await createFundAccountOperation(honeycomb, operationArgs);
    operation.send();

Generated using TypeDoc