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

@radixdlt/alphanet-gateway-api-v0-sdk

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radixdlt/alphanet-gateway-api-v0-sdk

This SDK is a thin wrapper around the Babylon V0 Gateway API, detailed in [the Open API schema](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/radixdlt/babylon-alphanet/main/gateway-api-v0/gateway-api-v0-schema.yaml).

  • 0.1.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
4
Weekly downloads
 
Created
Source

Alphanet Gateway v0 SDK

This SDK is a thin wrapper around the Babylon V0 Gateway API, detailed in the Open API schema.

Usage

Behind the scenes, this library uses the fetch API.

If in an environment where this is not available, a polyfill must be used.

An example using this with node is provided here in the github repo.

import "./node-fetch-polyfill" // Polyfill for fetch required if running in node-js
import { TransactionApi, StateApi } from "@radixdlt/alphanet-gateway-api-v0-sdk";

const transactionApi = new TransactionApi();
const stateApi = new StateApi();

async function getEpoch() {
    let response = await stateApi.stateEpochPost();
    return response.epoch;
}

async function getTransactionStatus(transactionIntentHashHex: string) {
    let response = await transactionApi.transactionStatusPost({
        v0TransactionStatusRequest: {
            intent_hash: transactionIntentHashHex
        }
    });
    return response.intent_status;
}

FAQs

Package last updated on 13 Oct 2022

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