FUZD / @fuzd/client / createClient
Function: createClient()
createClient(
config):object
Parameters
config
Returns
object
assignRemoteAccount()
assignRemoteAccount: (
chainId) =>Promise<RemoteAccountInfo>
Parameters
chainId
string
Returns
Promise<RemoteAccountInfo>
broadcastExecution()
broadcastExecution: (
execution) =>Promise<{info:ExecutionResponse<EthereumTransactionData|StarknetTransactionData>;success:true; } | {error:unknown;success:false; }>
Parameters
execution
Returns
Promise<{ info: ExecutionResponse<EthereumTransactionData | StarknetTransactionData>; success: true; } | { error: unknown; success: false; }>
computeBalanceRequired()
computeBalanceRequired: (
params) =>Promise<{amountReserved:bigint;balanceRequired:bigint;totalMaxCost:bigint; }>
Parameters
params
MaxCostParameters & object
Returns
Promise<{ amountReserved: bigint; balanceRequired: bigint; totalMaxCost: bigint; }>
computeTotalMaxCost()
computeTotalMaxCost: (
params) =>bigint
The most a submission may cost the remote account: for each transaction, its gas at maxFeePerGasAuthorized, the service's fees on that (fixed and proportional, charged per transaction, as the executor does when it broadcasts each one) and its value; summed over a batch.
Parameters
params
Returns
bigint
getRemoteAccount()
getRemoteAccount: () =>
undefined| `0x${string}`
Returns
undefined | `0x${string}`
scheduleExecution()
scheduleExecution: (
execution,options?) =>Promise<{info:ScheduleInfo;success:true; } | {error:unknown;success:false; }>
Schedule one transaction (transaction) or several in one submission (transactions, broadcast in that order). Timing, price, payment reserve and encryption are the submission's, shared by all.
Parameters
execution
options?
fakeEncrypt
boolean
Returns
Promise<{ info: ScheduleInfo; success: true; } | { error: unknown; success: false; }>
Defined in
client/src/index.ts:145