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

Escrow - send to non-members with valid ID code #12

Open
7 of 15 tasks
kaarmann opened this issue Dec 2, 2016 · 0 comments
Open
7 of 15 tasks

Escrow - send to non-members with valid ID code #12

kaarmann opened this issue Dec 2, 2016 · 0 comments

Comments

@kaarmann
Copy link
Contributor

kaarmann commented Dec 2, 2016

  1. New call GET /escrow/{idCode}
    returns address, e.g 0x67a8b88e...

    • verify that the idCode hasn't yet been approved
    • verify with LdapService that it is a valid ID code
    • if idCode is already present in local database, then return it. ADD-ON: also check if the eth address has been approved on chain. ADD-ON-2: should actually generate new key every time for privacy.
    • generate privKey, pubKey, address
    • store all three, encrypt(privKey) with a password stored on file system
    • approve on chain, mark as escrow in EthereumAccount domain object
    • return response with address and approval transactionHash
  2. Update call POST /authenticate/...

    • after approval check if this idCode has escrow accounts that have positive balance
    • create transfer(s) from the escrow account(s) to the new account
    • copy over original references from the escrow transfers to new
    • add a new field to response to return an array, e.g escrow: [ {amount_1, txHash_1}, {amount_2, txHash_2}]
  3. Update call GET /account/{idCode}

    • add an AuthorisationType.escrow to ethereum account
  4. New call GET /escrow/statistics

    • return some stats, like { balance: 203, idCodes: 32, addresses: 82 }
  5. Client

    • wait until the escrow creation is mined before push send
    • refresh keys / to show new balance after approval

Challenges

  • sending it twice through wallet-server will charge fees twice... So if I send 1.00EUR to escrow, the person eventuallly receives 0.99 EUR.
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