docs: Fix wrong method name for order signature generation (#128)

Co-authored-by: Lawrence Forman <me@merklejerk.com>
This commit is contained in:
Lawrence Forman 2021-02-02 23:30:26 -05:00 committed by GitHub
parent f4e5b6e38d
commit 48f8bea460
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,15 +123,23 @@ In both cases, the ``@0x/protocol-utils`` package simplifies generating these si
takerToken: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH
... // Other fields
});
// Generate an EIP712 signature
const signature = await order.eip712SignTypedDataWithProviderAsync(
// Generate an EthSign signature with a provider.
const signature = await order.getSignatureWithProviderAsync(
web3.currentProvider,
makerAddress,
);
// Generate an EthSign signature
const signature = await order.ethSignHashWithProviderAsync(
// Generate an EthSign signature with a private key.
const signature = await order.getSignatureWithKey(
'0x123456...', // Maker's 32-byte private key, in hex.
);
// Generate an EIP712 signature with a provider (e.g., metamask).
const signature = await order.getSignatureWithProviderAsync(
web3.currentProvider,
makerAddress,
utils.SignatureType.EIP712,
);
// Generate an EIP712 signature with a private key.
const signature = await order.getSignatureWithKey(
'0x123456...', // Maker's 32-byte private key, in hex.
utils.SignatureType.EIP712,
);