AptosJSProClient
The AptosJSProClient is a client for the Aptos blockchain that is used to manage your networks and account connections. This is a layer on top of the @aptos-labs/ts-sdk client.
Usage
import {
AptosJSProClient,
convertAptosAccountToAccountInfo,
convertAptosAccountToSigner,
} from "@aptos-labs/js-pro";
import { Network } from "@aptos-labs/ts-sdk";
const account = Account.generate();
const client = new AptosJSProClient({
network: { network: Network.DEVNET },
account: convertAptosAccountToAccountInfo(account),
signer: convertAptosAccountToSigner(account),
});Parameters
| Name | Type | Default |
|---|---|---|
account | AccountInfo | |
config | ClientConfigs | |
network | NetworkInfo | |
signer | SignerClient |
AccountInfo
| Name | Type | Default |
|---|---|---|
address | AccountAddress | |
publicKey | PublicKey |
ClientConfigs
NetworkInfo
The configurations for the current network.
| Name | Type | Default |
|---|---|---|
network | Network |
SignerClient
A SignerClient can be of two types: CustomSignerClient and AdapterSignerClient.
CustomSignerClient
This client is typically used with an Account object.
AdapterSignerClient
This client is typically used with the @aptos-labs/wallet-adapter-react.
Methods
Last updated on