How to use the web3-core-helpers.formatters.inputSignFormatter function in web3-core-helpers

To help you get started, we’ve selected a few web3-core-helpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github citahub / cita-sdk-js / packages / cita-sdk / src / base / rpc.ts View on Github external
call: 'getFilterLogs',
  params: 1
}

export const deleteMessageFilter = {
  name: 'deleteMessageFilter',
  call: 'uninstallFilter',
  params: 1
}

export const sign = {
  name: 'sign',
  call: 'sign',
  params: 2,
  inputFormatter: [
    formatters.inputSignFormatter,
    formatters.inputAddressFormatter
    // signer
  ],
  transformPayload: function(payload: any) {
    payload.params.reverse()
    return payload
  }
}

export const call = {
  name: 'call',
  call: 'call',
  params: 2,
  inputFormatter: [
    formatters.inputCallFormatter,
    formatters.inputDefaultBlockNumberFormatter
github citahub / cita-sdk-js / packages / cita-sdk / lib / base / neuron.js View on Github external
params: 3,
    inputFormatter: [
        formatters.inputSignFormatter,
        formatters.inputAddressFormatter,
        null
    ],
    transformPayload: function (payload) {
        payload.params.reverse();
        return payload;
    }
};
exports.ecRecover = {
    name: 'ecRecover',
    call: 'personal_ecRecover',
    params: 2,
    inputFormatter: [formatters.inputSignFormatter, null]
};
github citahub / cita-sdk-js / packages / cita-sdk / src / base / neuron.ts View on Github external
params: 3,
  inputFormatter: [formatters.inputAddressFormatter, null, null]
}
export const lockAccount = {
  name: 'lockAccount',
  call: 'personal_lockAccount',
  params: 1,
  inputFormatter: [formatters.inputAddressFormatter]
}

export const sign = {
  name: 'neuron_sign',
  call: 'neuron_sign',
  params: 3,
  inputFormatter: [
    formatters.inputSignFormatter,
    formatters.inputAddressFormatter,
    null
  ],
  transformPayload: function(payload: any) {
    payload.params.reverse()
    return payload
  }
}

export const ecRecover = {
  name: 'ecRecover',
  call: 'personal_ecRecover',
  params: 2,
  inputFormatter: [formatters.inputSignFormatter, null]
}
github citahub / cita-sdk-js / packages / cita-sdk / lib / base / rpc.js View on Github external
exports.getFilterLogs = {
    name: 'getFilterLogs',
    call: 'getFilterLogs',
    params: 1
};
exports.deleteMessageFilter = {
    name: 'deleteMessageFilter',
    call: 'uninstallFilter',
    params: 1
};
exports.sign = {
    name: 'sign',
    call: 'sign',
    params: 2,
    inputFormatter: [
        formatters.inputSignFormatter,
        formatters.inputAddressFormatter
    ],
    transformPayload: function (payload) {
        payload.params.reverse();
        return payload;
    }
};
exports.call = {
    name: 'call',
    call: 'call',
    params: 2,
    inputFormatter: [
        formatters.inputCallFormatter,
        formatters.inputDefaultBlockNumberFormatter
    ]
};
github ethereum / web3.js / packages / web3-eth-personal / src / index.js View on Github external
name: 'signTransaction',
            call: 'personal_signTransaction',
            params: 2,
            inputFormatter: [formatters.inputTransactionFormatter, null]
        }),
        new Method({
            name: 'sign',
            call: 'personal_sign',
            params: 3,
            inputFormatter: [formatters.inputSignFormatter, formatters.inputAddressFormatter, null]
        }),
        new Method({
            name: 'ecRecover',
            call: 'personal_ecRecover',
            params: 2,
            inputFormatter: [formatters.inputSignFormatter, null]
        })
    ];
    methods.forEach(function(method) {
        method.attachToObject(_this);
        method.setRequestManager(_this._requestManager);
        method.defaultBlock = _this.defaultBlock;
        method.defaultAccount = _this.defaultAccount;
    });
};