0.5.3 • Published 6 months ago

@siafoundation/sia-central-js v0.5.3

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

sia-central-js

Methods and types for interacting with the Sia Central API.

Installation

npm install @siafoundation/sia-central-js

Usage

import { SiaCentral } from '@siafoundation/sia-central-js'

export async function example() {
  const siaCentral = SiaCentral()
  const latestBlock = await siaCentral.blockLatest()
  const metrics = await siaCentral.hostsNetworkMetrics()
  const averages = await siaCentral.hostsNetworkAverages()
  const exchangeRates = await siaCentral.exchangeRates({
    params: {
      currencies: 'sc',
    },
  })
  console.log({ latestBlock, metrics, averages, exchangeRates })
}
0.5.3

6 months ago

0.5.2

1 year ago

0.5.0

1 year ago

0.5.1

1 year ago

0.4.0

1 year ago