sphinx-kotlin
sphinx-kotlin copied to clipboard
Adding new Contact
Task
Parent Ticket for Account Creation.
Adding new contact:
- [ ] Generate new child pub key for the new contact: rust:
pubkeyFromSeed(will be store on contact recordchildPubKey) - [ ] Subscribe to the topics for this contact
${child_pubkey}/${index}/res/# - [ ] Publish to register child pub key with LSP
${child_pubkey}/${index}/req/register - [ ] Get identity back:
lspPubkey,scid - [ ] Form to set
alias,pubkeyandrouteHint(contact ok pubkey and contact ok key route hint) - [ ] Generate contact record with:
alias,pubkey,routeHint,index,scid,childPubKey. - [ ] Send key_exchange msg (use relay as reference). Fields to send on key_exchange:
- okKey: your own
okKey - routeHint:
routeHintof your ok key - contactKey:
childPubKeygenerated for that contact - contactRouteHint: build on this way -> lspPubKey_scid (
lspPubKeyfrom server record,scidfrom contact record)
- okKey: your own
- [ ] Update contact with
contactKeyandcontactRouteHintcoming on exchange_key_confirmation messsage - [ ] On key_exchange message received: do same process described above and send back key_exchange_confirmation message with:
- okKey
- routeHint
- contactKey
- contactRouteHint