@wgb5445/aptos-client
v2.0.3
Published
Client package for accessing the Aptos network API.
Readme
@wgb5445/aptos-client
This package implements a client with which you can interact with the Aptos network. It can be used standalone, and it is the client package used by the Aptos TypeScript SDK.
fork from @aptos-labs/aptos-client
Implementation
The @aptos-labs/aptos-client package supports http2 protocol and implements 2 clients environment based:
- fetch - implemented in
index.tsto use inAllenvironment (in a browser env it is up to the browser and the server to negotiate http2 connection)
Function signature
async function aptosClient<Req, Res>(
options: ClientRequest<Req>,
): Promise<ClientResponse<Res>>;Usage
import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
import { aptosClient } from "@wgb5445/aptos-client";
const aptos = new Aptos( new AptosConfig({
network: Network.MAINNET,
client:{
provider: aptosClient,
}
}));