1.0.0-prod • Published 8 months ago

cnio-dinogo v1.0.0-prod

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

INSTALL

npm install cnio-dinogo

USAGE

Import package

import * as cnio from 'cnio-dinogo';

Enable your preferred wallet

let wallet = await (window as any).cardano.[YOUR WALLET EXTENSION].enable()

Example:

let enabledWallet = await (window as any).cardano.eternl.enable()

Create Dinogo object

let dinogo = new cnio.nioblockchain.dinogo.DinogoJs();

Register wallet to Dinogo

dinogo.registerWallet(enabledWallet);

Build and submit a payment transaction

pay(amount: String, policyId: String, assetName: String, toAddress: String): Promise<string>

  • amount: a string number represent the amount in Lovelace unit to transfer
  • policyID: policyID of the token, leave empty if you want to transfer ADA, otherwise must have length 56
  • assetName: assetName of the token, leave empty if you want to transfer ADA, length must not exceed 64
  • toAddress: the destination address you want to transfer funds to

Example:

const txId = await dinogoJS.pay(
      '1000000', 
      '648823ffdad1610b4162f4dbc87bd47f6f9cf45d772ddef661eff198',
      '55534454',
      'addr_test1qp86gj4n7j7u38j72yxkage4vl878znhjjk5g0xjfnjjjc6m0ptkv7scap7cjfax7qzqsey4uz46g9trnhq5xn94jq8q47yely'
)

Example output

91e9b62996c3528af836d3137a7b7780e585eeb78b63181d1abcf34684e36122
1.0.1-dev

8 months ago

0.0.6-test

8 months ago

0.0.3-test

8 months ago

1.0.2-dev

8 months ago

0.0.5-test

8 months ago

0.0.8-test

8 months ago

1.0.0-prod

8 months ago

0.0.2-test

8 months ago

0.0.1-test

8 months ago

0.0.10

8 months ago

0.0.7-test

8 months ago

0.0.4-test

8 months ago

1.0.0-dev

8 months ago

0.0.9

8 months ago

0.0.8

9 months ago

0.0.7

12 months ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago