4

I need to integrate the multisignature wallet on my website. But the multisignature option only provided on the mist process so how i can integrate with site. I need the API

2

Both JS api and RPC methods are possible.

Creating a contract using the web3 JS api:

You only need a running node to connect your web3 and the contract source code.

Then you could have a look at the web3 api wiki and use the Ethereum Wallet Dapp multisig contract source code.

First, compile the source code (using solc is nice or from an RPC call) then use the compiled EVM bytecode in web3.eth.contract(abi).new function.

var MyContract = web3.eth.contract(abiArray);

// instantiate by address
var contractInstance = MyContract.at([address]);

// deploy new contract
var contractInstance = MyContract.new([contructorParam1] [, contructorParam2], {data: '0x12345...', from: myAccount, gas:1000000});

Create a contract using an RPC node:

First generate the contract data instead of directly creating it (use of getData() instead of the new() shown above):

// Get the data to deploy the contract manually
var contractData = MyContract.new.getData([contructorParam1] [, contructorParam2], {data: '0x12345...'});
// contractData = '0x12345643213456000000000023434234'

Then use this data to generate a transaction using RPC on a node. Just put the evm bytecode data in the transaction data field and the EVM will create the contract.

  • thanks for your reply. I tried this i complete the compiling process and get the bytecode but i can't create contract can you give one example for this. at the same time i tried this process in testnet that is any problem? – Veera Sarma Jul 8 '16 at 13:38
  • No, testnet is fine and you should always try on testnet first. Can you provide the code of what you tried? – Nicolas Massart Jul 8 '16 at 13:58
  • Hi, Now i got the result from the contract process and i thing its working fine after complete this process what i need to do. sorry i didn't have idea about this but i am using bitcoin multisignature process. can you explain after creating the contract what i will need to do – Veera Sarma Jul 11 '16 at 7:48
  • Once your contract is created, simply send ether to it using its address and call its methods. First you have to create at least two addresses to set them as contract co-owners. Then you can set the daily limit beyond which you'll need multiple validations to send founds to another account. Have a look at the wallet source code, it's full of comments. If you want to know exactly how to use the multisig contract, I suggest that you ends this question by marking it as solved and you ask a new question only about using the contract. Thanks. – Nicolas Massart Jul 11 '16 at 8:26
  • Ok thanks. if you have any link for this process pls share it thanks once again – Veera Sarma Jul 11 '16 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.