New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mintbase-js/rpc

Package Overview
Dependencies
Maintainers
0
Versions
1273
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mintbase-js/rpc

NEAR RPC interactions for Mintbase JS SDK

  • 0.6.5
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

[//]: # { "title": "@mintbase-js/rpc", "order": "5" }

Installing

npm install @mintbase-js/rpc

Interacting with the NEAR RPC

This module provides a wrapper around common RPC calls used to fetch on-chain data to supplement, or in some cases substitute data provided by the indexer (data module).

Available Modules & Methods

We now accepts rpcUrl on each method, so you can pass your own RPC regarding one of those on the list: https://docs.near.org/api/rpc/providers

getBalance({account: string, rpcUrl: string}): BN

Fetches the balance of a NEAR account (in yocto) by address.

getBlockHeight({rpcUrl: string}): number

Returns the current block height for the configured network.

getTxnStatus({txnHash: string, senderId: string,rpcUrl: string}): TxnStatus

For a transaction hash, determine the status of a transaction on the configured network: pending, success, or failure

payouts({ contractId, tokenId, rpcUrl }): Promise<UiPayout>

Calls a token contract in order to determine the percentage amounts paid out to royalty accounts.

getAccessKeys({accountId: string,rpcUrl: string}): Promise<AccessKey>

Gets all access keys (public key and permissions object) for a given account.

Future

We will be adding more contract view methods here as needs arise.

FAQs

Package last updated on 19 Sep 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc