• Creates an "Approve Delegate" operation for the given holder account, approving a delegate to spend a certain amount of tokens on behalf of the holder account.

    Parameters

    • honeycomb: Honeycomb

      The Honeycomb instance.

    • args: CreateApproveDelegateOperationArgs

      The arguments for creating the "Approve Delegate" operation.

    Returns Promise<{
        operation: Operation;
    }>

    An object containing the "Approve Delegate" operation.

    Example

    const honeycomb = new Honeycomb(...); // Initialize Honeycomb instance
    const holderAccount = ...; // HplHolderAccount instance
    const delegatePublicKey = ...; // Delegate public key
    const amountToApprove = 100; // Number of tokens to approve

    // Create an "Approve Delegate" operation for the holder account
    const operationArgs: CreateApproveDelegateOperationArgs = {
    amount: amountToApprove,
    holderAccount,
    delegate: delegatePublicKey,
    };
    const { operation } = await createApproveDelegateOperation(honeycomb, operationArgs);
    operation.send();

Generated using TypeDoc