@bobanetwork/aa-hc-sdk-client
v1.0.0
Published
Hybrid Compute SDK for the frontend.
Downloads
17
Readme
Hybrid Compute Client SDK
This SDK provides client-side functionality for Hybrid Compute operations in React applications.
Installation
npm install hybrid-compute-client-sdk
Usage
import { HybridComputeClientSDK } from 'hybrid-compute-client-sdk';
const sdk = new HybridComputeClientSDK('chainId', 'accountId');
// Build an invoke transaction
const transaction = await sdk.buildInvokeTransaction({
// ... transaction parameters
});
// Invoke a snap
const result = await sdk.invokeSnap({
// ... invoke options
});
API Documentation
HybridComputeClientSDK
Constructor
constructor(chain: string, accountIdConnected: string)
Methods
buildInvokeTransaction(params: CreateInvokeTransaction): Promise<InvokeTransaction>
invokeSnap(invokeOptions: InvokeTransactionOptions): Promise<any>
setConnectedAccount(accountId: string): void
setChain(chain: string): void
For more detailed information about the types and interfaces, please refer to the source code.
License
ISC