@acala-network/txwrapper-acala
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

About

Acala Txwrapper is a library for generating offline transactions for the Acala chain.

Get Started

yarn add @acala-network/txwrapper-acala
import {
  construct,
  methods,
} from '@acala-network/txwrapper-acala';

const unsigned = methods.currencies.transfer(
  {
    dest: '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty',
    value: 100,
  },
  {
    // Additional information needed to construct the transaction offline.
  }
);

const signingPayload = construct.signingPayload(unsigned, { registry });

// On your offline device, sign the payload.
const signature = myOfflineSigning(signingPayload);

// Construct signed transaction ready to be broadcasted.
const tx = construct.signedTx(unsigned, signature, { metadataRpc, registry });

See examples of how to use txwrapper-acala

/@acala-network/txwrapper-acala/

    Package Sidebar

    Install

    npm i @acala-network/txwrapper-acala

    Weekly Downloads

    0

    Version

    0.4.0

    License

    Apache-2.0

    Unpacked Size

    19.8 kB

    Total Files

    11

    Last publish

    Collaborators

    • shunjizhan
    • xlc
    • aniiantt
    • ermal.kaleci
    • qwer951123