1.0.5 • Published 3 months ago

oreos v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
3 months ago

The Oreos Project

An ironfish provider implementation and utilities in TypeScript.

Features:

  • Ironfish rpc over http
  • Fully TypeScript ready, with definition files and full TypeScript source

Methods:

  • getBalance
  • getBalances
  • mintAsset
  • burnAsset
  • createTransaction
  • sendTransaction
  • getAccountTransaction
  • getAccountTransactions
  • getAsset
  • broadcastTransaction
  • getBlock
  • getChainInfo
  • getTransaction
  • getNoteWitness

Rpc Usage:

import { RpcService } from 'oreos';

const provider = new RpcService(baseUrl);

type GetBalanceRequest = {
  account?: string;
  assetId?: string;
  confirmations?: number;
};

type AssetVerification = {
  status: 'verified' | 'unverified' | 'unknown';
};

type GetBalanceResponse = {
  account: string;
  assetId: string;
  assetVerification: AssetVerification;
  confirmed: string;
  unconfirmed: string;
  unconfirmedCount: number;
  pending: string;
  pendingCount: number;
  available: string;
  confirmations: number;
  blockHash: string | null;
  sequence: number | null;
};

const getBalanceRequest: GetBalanceRequest = {
  account: 'default',
  confirmations: 2,
};

const response: GetBalanceResponse = await provider.getBalance(getBalanceRequest);

Advanced Usage:

import { RpcService } from 'oreos';

const provider = new RpcService(baseUrl);

const route = 'chain';
const method = 'getNetworkInfo';
const response: T = await provider.request<T>(`${route}/${method}`, params); 
1.0.5

3 months ago

1.0.4

3 months ago

1.0.3

8 months ago

1.0.2

9 months ago

1.0.1

9 months ago

0.2.13

1 year ago

0.2.1-0.2

1 year ago

0.2.1-0.1

1 year ago

0.2.12

1 year ago

0.2.11

1 year ago

0.2.10

1 year ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.2.5

1 year ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.2.3

1 year ago

0.2.2

2 years ago

0.2.4

1 year ago

0.1.0

2 years ago