2.0.1 • Published 2 years ago
@wert-io/widget-sc-signer v2.0.1
WertWidget Smart Contract Signing Helper
Installation
npm i @wert-io/widget-sc-signeror
yarn add @wert-io/widget-sc-signerUsage
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.
2.0.1-beta.0
2 years ago
2.0.1
2 years ago
1.0.1-beta.2
3 years ago
1.0.1-beta.1
3 years ago
2.0.0
3 years ago
1.0.0
3 years ago
0.0.3
4 years ago
1.0.1-beta.0
3 years ago
0.0.4
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago