3.0.1 • Published 3 years ago

eth-sig-util v3.0.1

Weekly downloads
110,605
License
ISC
Repository
github
Last release
3 years ago

Eth-Sig-Util CircleCI

A small collection of ethereum signing functions.

You can find usage examples here

Available on NPM

Installation

npm install eth-sig-util --save

Methods

concatSig(v, r, s)

All three arguments should be provided as buffers.

Returns a continuous, hex-prefixed hex value for the signature, suitable for inclusion in a JSON transaction's data field.

normalize(address)

Takes an address of either upper or lower case, with or without a hex prefix, and returns an all-lowercase, hex-prefixed address, suitable for submitting to an ethereum provider.

personalSign (privateKeyBuffer, msgParams)

msgParams should have a data key that is hex-encoded data to sign.

Returns the prefixed signature expected for calls to eth.personalSign.

recoverPersonalSignature (msgParams)

msgParams should have a data key that is hex-encoded data unsigned, and a sig key that is hex-encoded and already signed.

Returns a hex-encoded sender address.

signTypedData (privateKeyBuffer, msgParams)

Signs typed data as per an early draft of EIP 712.

Data should be under data key of msgParams. The method returns prefixed signature.

signTypedData_v3 (privateKeyBuffer, msgParams)

Signs typed data as per the published version of EIP 712.

Data should be under data key of msgParams. The method returns prefixed signature.

signTypedData_v4 (privateKeyBuffer, msgParams)

Signs typed data as per an extension of the published version of EIP 712.

This extension adds support for arrays and recursive data types.

Data should be under data key of msgParams. The method returns prefixed signature.

recoverTypedSignature ({data, sig})

Return address of a signer that did signTypedData.

Expects the same data that were used for signing. sig is a prefixed signature.

recoverTypedSignature_V4 ({data, sig})

Return address of a signer that did signTypedData as per an extension of the published version of EIP 712.

This extension adds support for arrays and recursive data types.

Expects the same data that were used for signing. sig is a prefixed signature.

typedSignatureHash (typedData)

Return hex-encoded hash of typed data params according to EIP712 schema.

extractPublicKey (msgParams)

msgParams should have a data key that is hex-encoded data unsigned, and a sig key that is hex-encoded and already signed.

Returns a hex-encoded public key.

@poofcash/poof-core@poofcash/poof-kit@poofcash/poof-token@poofcash/poof-v2-kit@dojimanetwork/dojimajs@jdutchak/argosidinblox-handlename@opiumteam/oex-sdk@minden-matic/maticjs@thesis-co/mechamittens-extension@iqprotocolmock/eip155bnc-onboard-metamask@castframework/chain-auth@tumakot/orion-trading-sdk@3web/contracts@fairlyhonest/eip712-utils@xyo-network/sdk-diviner-nodejstest-zdk-dev@mazarine-sea/maz-keyring@steakwallet/chainscompass-eth-db@sotatek-vuongluu/alphaquark-offer-development@alias-earth/coreopensea-wallet-providereth-keyring-controller-qbck@infinitebrahmanuniverse/nolb-eth-poof-token@everything-registry/sub-chunk-1618@d-protocol/d-lib@dicether/eip712@didux-io/didux-hd-keyring@didux-io/didux-keyring-controllerembark-web3-provider-enginesigntypeddata-v5-snapeth-keychain-controllereth-keyfort-bridge-keyringeth-ledger-bridge-keyringeth-ledger-keyringeth-hd-keyringeth-hd-walleteth-opts-keyring-controllereth-passthrough-keyringeth-permit-etherseth-external-account-keyringethercore-trezor-keyringextrawallet-controllerdroplinked-polygondroplinked-web3-evmedge-currency-accountbasedeth-bidirectional-qr-keyringeth-contract-wallet-keyringeth-controlled-keyringeth-autheth-authentrend-keyringeth-simple-keyringsquarelink-provider-enginestc-onekey-keyringstc-lib-onekey-keyringexpress-eauthtor-web3-provider-enginetorn-tokentornadio-sdktornado-anonymity-miningtornado-cash-anonymity-miningfuel-web3-providertron-keyring-controllertruffle-anduschain-providerskogard-protocol-ethereum-sdksparrow-controllersgsnnelotweedentityuniversal-loign-wallet-keyringubq-ledger-bridge-keyringfireblocks-defi-sdkth-keyfort-bridge-keyringtest-omg-jsganache-coreganache-core-scganache-core-tempgabatestdevbridgehdwalletproviderhazama-coreviralata-hd-keyringviralata-keyring-controllerh-token-stakinggo23-provider-enginetradehub-api-jstribute-contracts-clitv-eth-libflex-connet-sdk-changedfdao-controllersfork1-polymathnetwork-polymesh-sdkforked-bnc-onboardharmony-jenya-bnc-onboardvocdoni-ethereum-libpollenium-wallflowerplutus-app-backendplatform934ribus-sdk
3.0.1

3 years ago

2.5.4

3 years ago

3.0.0

3 years ago

2.5.3

4 years ago

2.5.2

4 years ago

2.5.1

4 years ago

2.5.0

4 years ago

2.4.4

4 years ago

2.4.3

4 years ago

2.4.2

4 years ago

2.4.1

4 years ago

2.4.0

4 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago