v2.2.0
- Added NEAR RPC API Provider. Now it's possible to use the same Naxios setup to use NEAR RPC API. NEAR RPC Docs can be visited here: https://docs.near.org/api/rpc/introduction
Example of usage:
import naxios, { isClient } from "@wpdas/naxios";
const naxiosInstance = new naxios({
contractId: CONTRACT_ID,
network: 'mainnet',
});
/**
* NEAR RPC API
*/
const rpcApi = naxiosInstance.rpcApi();
rpcApi
.query({
request_type: "view_account",
finality: "final",
account_id: "wendersonpires.near",
})
.then((data) => console.log("Account data:", data))
.catch((err) => console.log(err));