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

@ardrive/turbo-sdk

Package Overview
Dependencies
Maintainers
6
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ardrive/turbo-sdk

Welcome to the `@ardrive/turbo-sdk`! This SDK provides functionalities for interacting with the Turbo Upload and Payment Services. It is available in both NodeJS and Web environments.

  • 1.0.0-alpha.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
6
Created
Source

@ardriveapp/turbo-sdk 🚀

Welcome to the @ardrive/turbo-sdk! This SDK provides functionalities for interacting with the Turbo Upload and Payment Services. It is available in both NodeJS and Web environments.

Table of Contents

  • Installation

  • Usage:

  • Contributions

Installation

npm install @ardrive/turbo-sdk

or

yarn add @ardrive/turbo-sdk

Usage

The SDK is available in both CommonJS and ESM formats and is compatible with bundlers such as Webpack, Rollup, and ESbuild.

Web

Bundlers (Webpack, Rollup, ESbuild, etc.)
import { TurboFactory } from '@ardrive/turbo-sdk/web';

const turbo = TurboFactory.unauthenticated({});
const rates = await turbo.getFiatRates();
Browser
<script src="https://cdn.jsdelivr.net/npm/@ardrive/turbo-sdk"></script>
<script>
  const turbo = TurboFactory.unauthenticated({});
  const rates = await turbo.getFiatRates();
</script>

NodeJS

CommonJS
const { TurboFactory } = require('@ardrive/turbo-sdk/node');

const turbo = TurboFactory.unauthenticated({});
const rates = await turbo.getFiatRates();

ESM

import { TurboFactory } from '@ardrive/turbo-sdk/node';

const turbo = TurboFactory.unauthenticated({});
const rates = await turbo.getFiatRates();

Typescript

The SDK provides TypeScript typings. When you import the SDK in a TypeScript project:

import Ardrive from '@ardrive/turbo-sdk/web';

// or '@ardrive/turbo-sdk/node' for Node.js projects

The provided typings (./lib/types/index.d.ts) will be automatically recognized, offering type checking and autocompletion benefits.

APIs (WIP)

TurboFactory

  • public()
  • private()

TurboUnauthenticatedClient

  • getFiatRates()
  • getFiatToAR()
  • getSupportedCountries()
  • getSupportedCurrencies()
  • getWincForFiat()
  • getUploadCosts()
  • uploadSignedDataItem()

TurboAuthenticatedClient

  • getBalance()
  • uploadFile()

Contributions

If you encounter any issues or have feature requests, please file an issue on our GitHub repository. Contributions, pull requests, and feedback are welcome and encouraged.

FAQs

Package last updated on 18 Sep 2023

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