Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@onflow/sdk-latest-block

Package Overview
Dependencies
Maintainers
8
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onflow/sdk-latest-block

Flow JS SDK -- Fetch the Latest Block from the Configured Access Node

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-92.86%
Maintainers
8
Weekly downloads
 
Created
Source

sdk-latest-block

Fetch the Latest Block from the configured Access Node

import {config} from "@onflow/config"
import {latestBlock} from "@onflow/sdk-latest-block"

config()
  .put("accessNode.api", "https://access-testnet.onflow.org") // point the sdk to the desired access node

var block = await latestBlock()

console.log("id", block.id)              // The blocks ID
console.log("height", block.height)      // The blocks Height
console.log("parent id", block.parentId) // ID of the blocks parent

FAQs

Package last updated on 11 Feb 2021

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