
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
@aptos-labs/aptos-client
Advanced tools
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.
The @aptos-labs/aptos-client
package supports http2 protocol and implements 2 clients environment based:
index.browser.ts
to use in browser
environment (in a browser env it is up to the browser and the server to negotiate http2 connection)index.node.ts
to use in node
environment (to support http2 in node environment, still the server must support http2 also)async function aptosClient<Res>(
requestOptions: AptosClientRequest,
): Promise<AptosClientResponse<Res>>;
type AptosClientResponse<Res> = {
status: number;
statusText: string;
data: Res;
config?: any;
request?: any;
response?: any;
headers?: any;
};
type AptosClientRequest = {
url: string;
method: "GET" | "POST";
body?: any;
params?: any;
headers?: any;
overrides?: any;
};
import aptosClient from "@aptos-labs/aptos-client";
const response = await aptosClient<Res>({
url,
method,
body,
params,
headers,
overrides,
});
return response;
2.0.0
axios
from browser implementation in favor of native fetch
FAQs
Client package for accessing the Aptos network API.
We found that @aptos-labs/aptos-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.