When checking signatureUtils i noticed the function ecSignOrderHashAsync don't exist anymore, i can only find on the 0x Async Documentation but i guess that's for v1.
I found a couple related functions on the code, but none of them seems to have the 4th parameter we use to set type to "METAMASK" when signing with MetaMask.
When trying to replace the function by ecSignOrderAsync, i got the following error:
(node:51191) UnhandledPromiseRejectionWarning: Error: Expected order to conform to schema /orderSchema
Encountered: "0xaca93d76964c178a0078ef06ca4d2b7a08c8a7fa78d50754544588ee0da8ba68"
Validation errors: instance is not of a type(s) object
at Object.assert (/Users/h/git/efx/efx-api-node/node_modules/@0x/assert/lib/src/index.js:77:19)
at Object.doesConformToSchema (/Users/h/git/efx/efx-api-node/node_modules/@0x/assert/lib/src/index.js:65:24)
at Object.<anonymous> (/Users/h/git/efx/efx-api-node/node_modules/@0x/order-utils/lib/src/signature_utils.js:262:41)
at step (/Users/h/git/efx/efx-api-node/node_modules/@0x/order-utils/lib/src/signature_utils.js:43:23)
at Object.next (/Users/h/git/efx/efx-api-node/node_modules/@0x/order-utils/lib/src/signature_utils.js:24:53)
at /Users/h/git/efx/efx-api-node/node_modules/@0x/order-utils/lib/src/signature_utils.js:18:71
at new Promise (<anonymous>)
at __awaiter (/Users/h/git/efx/efx-api-node/node_modules/@0x/order-utils/lib/src/signature_utils.js:14:12)
at Object.ecSignOrderAsync (/Users/h/git/efx/efx-api-node/node_modules/@0x/order-utils/lib/src/signature_utils.js:257:16)
at Function.module.exports (/Users/h/git/efx/efx-api-node/src/api/sign/order.js:10:42)
When using ecSignOrderAsync, i got the following error:
(node:51245) UnhandledPromiseRejectionWarning: TypeError: jsSHA3.keccak256 is not a function
at Object.isChecksumAddress (/Users/h/git/efx/efx-api-node/node_modules/@0x/utils/lib/src/address_utils.js:14:34)
at Object.isAddress (/Users/h/git/efx/efx-api-node/node_modules/@0x/utils/lib/src/address_utils.js:39:66)
at Object.isETHAddressHex (/Users/h/git/efx/efx-api-node/node_modules/@0x/assert/lib/src/index.js:31:52)
at Object.<anonymous> (/Users/h/git/efx/efx-api-node/node_modules/@0x/order-utils/lib/src/signature_utils.js:360:41)
at step (/Users/h/git/efx/efx-api-node/node_modules/@0x/order-utils/lib/src/signature_utils.js:43:23)
at Object.next (/Users/h/git/efx/efx-api-node/node_modules/@0x/order-utils/lib/src/signature_utils.js:24:53)
at /Users/h/git/efx/efx-api-node/node_modules/@0x/order-utils/lib/src/signature_utils.js:18:71
at new Promise (<anonymous>)
at __awaiter (/Users/h/git/efx/efx-api-node/node_modules/@0x/order-utils/lib/src/signature_utils.js:14:12)
at Object.ecSignHashAsync (/Users/h/git/efx/efx-api-node/node_modules/@0x/order-utils/lib/src/signature_utils.js:353:16)
at Function.module.exports (/Users/h/git/efx/efx-api-node/src/api/sign/order.js:10:42)
When trying the new version on the console i got the following error:
node:51080) UnhandledPromiseRejectionWarning: TypeError: signatureUtils.ecSignOrderHashAsync is not a function
Triggered here: https://github.com/ethfinex/efx-api-node/blob/master/src/api/sign/order.js#L8
When checking
signatureUtils
i noticed the functionecSignOrderHashAsync
don't exist anymore, i can only find on the 0x Async Documentation but i guess that's for v1.I found a couple related functions on the code, but none of them seems to have the 4th parameter we use to set type to "METAMASK" when signing with MetaMask.
When trying to replace the function by
ecSignOrderAsync
, i got the following error:When using
ecSignOrderAsync
, i got the following error:This is the hash i was trying to sign: