2.0.1 • Published 4 months ago

@wert-io/widget-sc-signer v2.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

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

PropertyRequiredTypeDescription
addressrequiredStringUser’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
commodityrequiredStringList of supported currencies
networkoptionalStringList of supported currencies
commodity_amountrequiredNumberAn amount of crypto necessary for executing the given smart contract
sc_addressrequiredStringThe address of the smart contract
sc_input_datarequiredStringData 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.

2.0.1-beta.0

4 months ago

2.0.1

4 months ago

1.0.1-beta.2

1 year ago

1.0.1-beta.1

1 year ago

2.0.0

1 year ago

1.0.0

2 years ago

0.0.3

2 years ago

1.0.1-beta.0

1 year ago

0.0.4

2 years ago

0.0.2

2 years ago

0.0.1

3 years ago