ptokens-pbtc
TypeScript icon, indicating that this package has built-in type declarations

0.15.0 • Public • Published

ptokens-pbtc

Module for interacting only with pBTC.

 


 

Installation:

npm install ptokens-pbtc

 


 

Usage:

import { pBTC } from 'ptokens-pbtc'
import { HttpProvider } from 'ptokens-providers' 
import { Node } from 'ptokens-node'

const pbtc = new pBTC({
  blockchain: 'ETH', // or EOS
  network: 'testnet', // 'testnet' or 'mainnet', default 'testnet'

  // if you want to be more detailed
  hostBlockchain: 'ETH',
  hostNetwork: 'testnet_ropsten', // possible values are testnet_jungle2, testnet_ropsten and mainnet
  nativeBlockchain: 'BTC'
  nativeNetwork: 'testnet'

  // optionals
  ethPrivateKey: 'Eth private key',
  ethProvider: 'Eth provider', // or instance of Web3 provider
  eosPrivateKey: 'Eos Private Key',
  eosRpc: 'https:/...' // or also an instance of JsonRpc
  eosSignatureProvider: '....' // instance of JsSignatureProvider
  defaultNode: new Node({
    pToken: 'pBTC',
    blockchain: 'ETH',
    provider: new HttpProvider(
      'node endpoint',
      {
        'Access-Control-Allow-Origin': '*',
        ...
      }
    )
  })
})

Package Sidebar

Install

npm i ptokens-pbtc

Weekly Downloads

0

Version

0.15.0

License

LGPL-3.0

Unpacked Size

52.5 kB

Total Files

6

Last publish

Collaborators

  • pnetwork