Class: BoopClient
Defined in: packages/boop-sdk/lib/client.ts:32
Constructors
Constructor
new BoopClient(config?: Partial<BoopClientConfig>): BoopClient;Defined in: packages/boop-sdk/lib/client.ts:35
Parameters
config?
Returns
BoopClient
Methods
createAccount()
createAccount(data: CreateAccountInput): Promise<CreateAccountOutput>;Defined in: packages/boop-sdk/lib/client.ts:55
Create a new HappyAccount. If the account already exists, it will be returned.
Parameters
data
User Creation Options
Returns
execute()
execute(data: ExecuteInput): Promise<ExecuteOutput>;Defined in: packages/boop-sdk/lib/client.ts:113
Given a boop, submits it onchain to be executed, waits for and returns the result of execution.
Unless data.boop.account === data.boop.payer, the gas limit fields
and fee fields can be omitted and will be filled by the submitter.
If the gas limits are provided, the submitter is free to perform or not perform simulation before submitting.
The submitter is nonce-aware and will buffer up to a certain amount of boop per nonce track, depending on its configuration. It will submit boop whenever their nonces becomes eligible. *
Parameters
data
Returns
getNonce()
getNonce(data: GetNonceInput): Promise<GetNonceOutput>;Defined in: packages/boop-sdk/lib/client.ts:66
Fetches an accounts nonce.
Parameters
data
Nonce Fetch Options
Returns
pending()
pending(data: GetPendingInput): Promise<GetPendingOutput>;Defined in: packages/boop-sdk/lib/client.ts:170
Returns a list of pending (not yet included on chain) boops for the given account, identified by their hash and nonce.
Parameters
data
Returns
receipt()
receipt(__namedParameters: WaitForReceiptInput): Promise<WaitForReceiptOutput>;Defined in: packages/boop-sdk/lib/client.ts:159
Instructs the return the receipt of the boop whose hash is provided, waiting if needed.
It may also return earlier if a user-specified or submitter-mandated timeout is reached.
The submitter can return without a receipt if the Boop submission failed for other reasons.
Parameters
__namedParameters
Returns
simulate()
simulate(data: SimulateInput): Promise<SimulateOutput>;Defined in: packages/boop-sdk/lib/client.ts:135
Given a boop possibly missing some gas limits or gas fee parameters, returns estimates for these limits and parameters, and the result of simulation.
Note that the boop is also allowed to be different in some way than the one for which the gas values will be used, e.g. for accounts that validate a signature, the validationData could be empty or include a dummy value.
If any gas limit is specified, it is passed along as-is during simulation and not filled in by the submitter.
Calling this endpoint does not create a state for the Boop on the submitter. *
Parameters
data
Returns
state()
state(__namedParameters: GetStateInput): Promise<GetStateOutput>;Defined in: packages/boop-sdk/lib/client.ts:147
Returns the state of the Boop as known by the submitter.
Depending on the submitter's state retention policies, he might not be able to answer this query, even if he did see the Boop before. In this case he should answer with a status of GetState.UnknownBoop.
Parameters
__namedParameters
Returns
submit()
submit(data: SubmitInput): Promise<SubmitOutput>;Defined in: packages/boop-sdk/lib/client.ts:91