@wert-io/widget-sc-signer
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

WertWidget Smart Contract Signing Helper

Installation

npm i @wert-io/widget-sc-signer

or

yarn add @wert-io/widget-sc-signer

Usage

const { signSmartContractData } = require('@wert-io/widget-sc-signer');

or

import { signSmartContractData } from '@wert-io/widget-sc-signer';
const signedData = signSmartContractData(options, privateKey);

Function signSmartContractData returns the given options object with an addition of a "signature" property. You can pass the result directly to WertWidget initializer:

const wertWidget = new WertWidget({
    ...signedData,
    ...otherWidgetOptions,
});

Options

Property Required Type Description
address required String User’s address that will act as a fallback address if a smart contract can't be executed. In case of fallback, Wert will transfer commodity_amount to this address
commodity required String List of supported currencies
network optional String List of supported currencies
commodity_amount required Number An amount of crypto necessary for executing the given smart contract
sc_address required String The address of the smart contract
sc_input_data required String Data that will be used for smart contract execution, in the hex format

Private key

Was given to you during your registration in the Wert system as a partner. If you don't have one, contact us.

Readme

Keywords

none

Package Sidebar

Install

npm i @wert-io/widget-sc-signer

Weekly Downloads

928

Version

2.0.1

License

ISC

Unpacked Size

13.5 kB

Total Files

9

Last publish

Collaborators

  • victoriafilileeva
  • kense1
  • alex-wert
  • apples-father-wert