-
Notifications
You must be signed in to change notification settings - Fork 466
Generate order for exchange using API #133
Comments
Hi,
This is how you get a plain
I'll also recommend to check out the tests for more examples. |
@support-somish Can this issue be closed? Did you successfully generate an order? |
Not yet. Working with Kovan ethers is a bit difficult. Is it possible to
use 0xproject on Rinkeby testnet?
…On Fri, Aug 25, 2017 at 2:36 PM, Leonid ***@***.***> wrote:
@support-somish <https://github.com/support-somish> Can this issue be
closed? Did you successfully generate an order?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#133 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Abtj5zxpCcdnJqMrJsnIoQ3fxzunRXBvks5sbo6NgaJpZM4PA-D8>
.
--
CONFIDENTIAL-
This email and any files transmitted with it are confidential, and may also
be legally privileged. If you are not the intended recipient, you may not
review, use, copy, or distribute this message. If you receive this email in
error, please notify the sender immediately by reply email and then delete
this email.
|
You can use 0x.js with Kovan or testrpc. We don't support Rinkeby yet. |
We tried creating an order through the ts file but we are unable to execute ZeroEx.generatePseudoRandomSalt as it says that generatePseudoRandomSalt is not a function. We are able to access all other functions of the ZeroEx object except this one. |
You can try printing the whole ZeroEx object and checking, that this function is there. |
generatePresudoRandomSalt is a static function. You're printing an instance, not a constructor. |
Many thanks, we were able to create an order hash. Just one more thing, we are trying to sign the order hash using the following: We get the error: Specified signerAddress 0x7266C50F1f461d2748e675B907eF22987F6B5358 isn't available through the supplied web3 provider. We are using Web3.providers.HttpProvider("https://kovan.infura.io/") as the Web3 Provider. Can you please help. |
Convert the address to lover case |
Newer versions of 0x.js throw a better error message in this case |
Actually - this will not help, cause in order to sign - you'll need a private key. |
You'll need a web3 instance that has access to your accounts. What's your use case? What do you plan to use for signing? |
We need to build a nodeJS API which will automatically(based on a few system checks), create orders for exchanging ERC20 tokens. Generally we use web3.eth.sendRawTransaction to send data on chain via infura.io. |
You can use the provider-engine with the |
Here is the example subprovider we wrote for a Ledger https://github.com/0xProject/website/blob/development/ts/subproviders/ledger_wallet_subprovider_factory.ts |
Here is an another example - that calls a signature server to sign transactions: https://github.com/Neufund/server-wallet-provider/blob/master/src/index.js |
Closing because of inactivity. Feel free to reopen if still valid. |
Hi, pardon for the inactivity. I'm still unable to solve this. Intend to use infura as I cannot run a local geth node. Here is the code I am using:
I have created an account with a private key and am able to sign the order hash with web3.eth.accounts.sign() but in that case my vrs signatures generated do not match. I intend to use the standard ZeroEx functions but the function zeroEx.getAvailableAddressesAsync() returns null value even though my web3 object has accounts json associated with it. Can you please provide a sample of using your standard method with infura please? |
@LogvinovLeon How can I go about signing an order using only a private key? If I need to add my private key to a provider, how can I do that programmatically so that I don't have to use something like MetaMask or a Ledger? I have order data and a private key, hash the order data, now I just want to sign it so I can submit it to a relayer. Edit: I've found a solution. I'm using the 0x node module to generate the hash, then signing it using the private key via the ecsign function from ethereumjs-util. |
@EeevilPopTart you can use a Web3 Provider Engine custom provider setup with the |
Hi, we have developed a project on Ethereum, currently on testnet. I have a requirement that would require integration with 0x.js. I have successfully fetched results from methods like getBalanceAsync but am unable to understand which API would be used to create an order. Can someone please help.
The text was updated successfully, but these errors were encountered: