@xchainjs/xchain-cardano
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Cardano client

NPM Version NPM Downloads


Installation

yarn add @xchainjs/xchain-cardano

or

npm install @xchainjs/xchain-cardano

Initialization

Using the Cardano client you can initialize the main class of the module in consultation mode if you do not provide any parameters, this means you could retrieve information from the blockchain and prepare transactions to sign, but you will not be able to sign transactions, or generate addresses.

import { Client } from '@xchainjs/xchain-cardano'

const client = new Client()

// Make read operations with your client

Otherwise, if you want to sign transactions and get the addresses you own, you will need to initialize the main class of the protocol as follows

import { Client, defaultCardanoParams } from '@xchainjs/xchain-cardano'

const client = new Client({
  phrase: 'your secret phrase',
  ...defaultCardanoParams
})

// Make read or write operations with your client

Features

Thanks to the Cardano client you will be able to:

  • Get the Cardano and tokens balances that an address owns
  • Generate addresses given a secret phrase
  • Transfer Cardano and tokens to another address
  • Get details of a transaction
  • Get address transaction history

Examples

You can find examples using the Cardano package in the Cardano examples folder.

Documentation

More information about how to use the Cardano client can be found on documentation

Readme

Keywords

Package Sidebar

Install

npm i @xchainjs/xchain-cardano

Weekly Downloads

51

Version

0.0.1

License

MIT

Unpacked Size

113 kB

Total Files

11

Last publish

Collaborators

  • xchainjsadmin
  • thorchain_org
  • _stu
  • veado
  • thatstrangeguy
  • junkai121
  • sarawut11
  • thorswap
  • hodrthemediocre
  • polaris_9r
  • thorianite