@auranw/aurajs
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-alpha1 • Public • Published

AuraJs SDK

AuraJs a JavaScript SDK for writing applications that interact with the smart contract Aura blockchain from either Node.js or browser environments

Features

  • Written in TypeScript, with type definitions
  • Works in Node.js, in the browser

Installation

Grab the latest version off NPM:

npm install @auranw/aurajs

Usage

Terra.js can be use in Node.js

import {SigningCosmWasmClient} from './signingaurawasmclient';
import {DirectSecp256k1HdWallet} from '@cosmjs/proto-signing';

const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic, {prefix:'aura'});
const [firstAccount] = await wallet.getAccounts();

const mnemonic = 'xxx';
const rpcEndpoint = 'http://x.x.x.x:26657'; // rpc of testnet aura: http://18.138.28.51:26657
const client = await SigningCosmWasmClient.connectWithSigner(rpcEndpoint, wallet);

const contractAddress = 'aura14hj2tavq8fpesdwxxcu44rty3hh90vhurzxerr';
const mintMsg = {
  mint: {
    token_id: 'token1',
    owner: 'aura1mmsenr5nejugxqv6jtetlckwjhsmft7f8dqud4',
    token_uri: 'ANFT',
    extension: {}
  }
};
const fee = {
  amount: [
    {
      denom: 'uaura',
      amount: '16',
    },
  ],
  gas: '152375',
}
const result = await client.execute(firstAccount.address, contractAddress, mintMsg, fee);

License

This software is licensed under the MIT license

Readme

Keywords

Package Sidebar

Install

npm i @auranw/aurajs

Weekly Downloads

6

Version

1.0.0-alpha1

License

MIT

Unpacked Size

156 kB

Total Files

39

Last publish

Collaborators

  • yeshidolma