0

I have an order in the form of a js object:

let order = {
    chainId: '56',
    exchangeAddress: '0x',
    makerAddress: wallet,
    takerAddress: '0x0000000000000000000000000000000000000000',       
    senderAddress: '0x0000000000000000000000000000000000000000',
    feeRecipientAddress: '0x0000000000000000000000000000000000000000',
    expirationTimeSeconds: '1640816586504',                                    
    salt: '123',
    makerAssetAmount: '60000000000000',
    takerAssetAmount: '1',
    makerAssetData: '0x...', 
    takerAssetData: '0x...', 
    makerFeeAssetData: '0x...',
    takerFeeAssetData: '0x...',
    makerFee: '0',
    takerFee: '0'
}

I have a hash of this order signed through the Metamask extension. Can I somehow repeat the signature of this object using the web3.js library to get a hash similar to the hash from the Metamask? Thank you in advance

5
  • What kind of hash? Dec 26, 2021 at 8:04
  • For what platform or application to you use this hash?
    – Richard
    Dec 26, 2021 at 9:57
  • @MadeInDreams the hash that I get when I sign a message to the Metamask with my secret key. I would like to get such a hash programmatically, not through an extension. How to do this in js with such an object?
    – Mod diller
    Dec 26, 2021 at 12:11
  • You might want to look at the message signing method. Dec 27, 2021 at 17:30
  • @MadeInDreams hah, if I knew how to do it
    – Mod diller
    Dec 28, 2021 at 11:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.