Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pay to Contract Protocol #1132

Open
7 of 13 tasks
githubsands opened this issue May 7, 2018 · 3 comments
Open
7 of 13 tasks

Pay to Contract Protocol #1132

githubsands opened this issue May 7, 2018 · 3 comments

Comments

@githubsands
Copy link
Contributor

githubsands commented May 7, 2018

Sequence to implement BIP175, pay to contract protocol as well as other utilities that will allow recipients and conferees to interact with the protocol under different circumstances.

See https://github.com/bitcoin/bips/blob/master/bip-0175.mediawiki & https://arxiv.org/pdf/1212.3257v1.pdf for more details.


  • Create CoinTypeKey function to grab coin type key (or basepayment hash) within the wallets clients local database. This is to be used within getPayToContractAddress.

  • Required additions to dcrd/dcrjson to allow RPCs from client to dcrd server.

  • CreatehashContracts, createContractArray, lexiSort functions for future use in functions within legacyrpc/methods.go.

  • Create getContractsHash and getPayToContractAddress methods within legacyrpc/methods.go

  • Refactor hashContracts to use blake256

  • Refactor lexiSort to use golang standard library - sort

  • Refactor getContractHash and getPayToContractAddress to utilize less of the heap

  • Implement required help messages in dcrwallet/internal for newly created RPC calls. Go Generate will also need to be ran in on legacyrpc/methods.go

  • Implement getContractHash & getPayToContractAddress as grpc

  • Create functions verifyContractHash and verifyContractHashAddress that allows the conferrer to verify the contract and P2PKH contract hash of the recipient.

  • Add createContract method within legacyrpc/methods.go. This will add ability to create "simple" contracts from the dcrwallet cli itself. And implement required help messages within dcrwallet/internal.

  • Refactor createContracyArray, hashContracts, getContractHash, getPayToContractAddress to include the createContract optionality.

  • Include P2PKH contract hashes in the wallets database. Work will have to be done in wallet.go
    i.e get:
    getaddressbycontract : registers addresses in the database not by account by by contracts.
    getaddressbyconferee : registers addressees with their respected conferees.

Other:

This leads me to the thought of registering addresses to conferrees.

i.e registeraddreswithconferree takes in a address and a conferree and links them together.

@githubsands
Copy link
Contributor Author

Got this going

@githubsands
Copy link
Contributor Author

githubsands commented Jun 4, 2018

Wallet function, CoinTypeKey created here: 276f0af

@githubsands
Copy link
Contributor Author

RPCs getcontracthash && getpaytocontracthash #1595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant