Skip to content

@lelantos-org/sdk / internal / genericCall

Function: genericCall() ​

ts
function genericCall(
   wallet, 
   request, 
   options?
): Promise<GenericCallResult>;

Defined in: @lelantos-org/sdk/dist/wallet/surface/generic.d.ts:44

Unshield amount to GenericCallWrapper, run calls from its single-use clone, and re-shield outputs. If the calls fail the input is re-shielded as the refund note instead.

Resolves once the relayer has landed the execution. The output notes, or the refund note, appear after the relayer's next flush: await outputCommitments and refundCommitment together with wallet.awaitCommitments and see which arrives.

Parameters ​

ParameterType
walletWalletApi
requestGenericCallRequest
options?Omit<SpendOptions<SpendPhase>, "onPhase" | "opId">

Returns ​

Promise<GenericCallResult>

Throws ​

when wallet was not built by connect() or createWallet().