1.0.0-prod • Published 2 years ago
cnio-dinogo v1.0.0-prod
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
2 years ago
0.0.6-test
2 years ago
0.0.3-test
2 years ago
1.0.2-dev
2 years ago
0.0.5-test
2 years ago
0.0.8-test
2 years ago
1.0.0-prod
2 years ago
0.0.2-test
2 years ago
0.0.1-test
2 years ago
0.0.10
2 years ago
0.0.7-test
2 years ago
0.0.4-test
2 years ago
1.0.0-dev
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago
0.0.0
2 years ago
0.0.0-unspecified
2 years ago