This package has been deprecated

Author message:

This package is no longer maintained or supported. Please install deso-protocol by running up to date, audited 1528 packages in 1s 264 packages are looking for funding run `npm fund` for details 7 high severity vulnerabilities To address issues that do not require attention, run: npm audit fix To address all issues (including breaking changes), run: npm audit fix --force Run `npm audit` for details.

@deso-core/data
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@deso-core/data

Simple, zero dependency api wrapper for deso backend api endpoints. Provides param and response types to provide editor assistance when making deso backend requests.

NOTE: You should only use this if you need to issue read-only api requests to the deso backend and do not require an authenticated user. If you also need login/logout or other deso identity support you should use the deso-protocol@beta package.

Install

npm install @deso-core/data

Configuration

import { api } from '@deso-core/data';

api.configure({
  // Sets the hostname for the node that will be used
  // for all subsequent requests. If not passed it will
  // default to https://node.deso.org
  nodeURI: 'https://myawesomenode.com',
});

Usage

import { getPostsStateless, getSinglePost } from '@deso-core/data';

// get 20 posts
const posts = await getPostsStateless({ NumToFetch: 20 });

// get a single post
const post = await getSinglePost({ PostHashHex: posts[0] });

Readme

Keywords

none

Package Sidebar

Install

npm i @deso-core/data

Weekly Downloads

0

Version

0.1.1

License

none

Unpacked Size

153 kB

Total Files

10

Last publish

Collaborators

  • lazynina
  • iamnotnader