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

@koibanx/gasstation-sdk

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@koibanx/gasstation-sdk

Gas Station SDK

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Koibanx GasStation SDK

GasStation SDK based in module GasStation

Description

The Module GasStation handles:

SDK Documentation

Feast yourself

Installation

npm install @koibanx/gasstation-sdk

NOTE: you must have the npm token in your .npmrc file


Initialization

Node

Using ES6 import

import GasStationSdk from '@koibanx/gasstation-sdk';

const gasstation = GasStationSdk({
  baseURL: 'http://your-url',
});

With require

exports.__esModule = true;
const GasStationSdk = require('@koibanx/gasstation-sdk')["default"];

const gasstation = GasStationSdk({
  baseURL: 'http://your-url',
});

Types

  • Typescript (@koibanx/gasstation-sdk/dist/index.d.ts)

Examples

Using ES6 import

import GasStationSdk from "@koibanx/gasstation-sdk";

const gasStationSDK = GasStationSdk({
    baseURL: 'http://your-url',
})

const catchError = (err, modulo) => {
  console.log('Modulo: ', modulo);
  console.log('details: ', err.details);
  console.log('shortMessage: ', err.message);
  console.log('errorCode: ', err.code);
}

gasStationSDK.fuelAddress({
  budgetAllowance: '632d473fd495d81a986aeb6b',
  amount: 1,
  callback: 'http://localhost:5000',
  address: 'T4BXW4H4Z6SVCCHDBQ7O3PUEYJYFQH4TXACJPJHCTSXKY2LJ6AFJ6UCKVU',
}).then((data) => {
  console.log('fuelAddress', JSON.stringify(data.status));
}).catch((e) => catchError(e, 'fuelAddress'));

gasStationSDK.getFuelReserve().then((data) => {
  console.log('getFuelReserve', JSON.stringify(data.balance));
}).catch((e) => catchError(e, 'getFuelReserve'));

gasStationSDK.fuelAddress({
  budgetAllowance: '632d473fd495d81a986aeb6b',
  amount: 1,
  callback: 'http://localhost:5000',
  address: 'T4BXW4H4Z6SVCCHDBQ7O3PUEYJYFQH4TXACJPJHCTSXKY2LJ6AFJ6UCKVU',
}).then((resFuel) => {
  gasStationSDK.getTransaction({ id: resFuel._id })
    .then((res) => console.log('getTransaction', JSON.stringify(res.status)))
    .catch((e) => catchError(e, 'getTransaction'));
}).catch((e) => catchError(e, 'fuelAddress'));

FAQs

Package last updated on 09 May 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