Skip to content

uport-project/lambda-chasqui

Repository files navigation

lambda-chasqui

πŸƒ Messenger service πŸƒ

(Quechua) The chasquis were the messengers of the Inca empire

CircleCI

codecov

Description

Chasqui is a server that allows communication between dApps, mobile apps (like uPort Mobile) and servers

Diagrams

See Diagrams page.

API Description

Topics and Subscriptions

Chasqui can be used to send information from one point to another, this is done through topics. The recepient sets a new topic on chasqui, communicate the topic to the sender and suscribe to the topic. The sender can send data (json objects) to the topic and chasqui will relay the data to the suscribers of that topic.

In uPort this is used to send the uPortId from the mobile app to the dApp (running in a browser). This flow is known as uPort Connect. It is also used for requesting transaction signing when no two-way communication between the dApp and the mobile app is set. This flow is known as uPort Sign

Endpoint

GET /topic/:id

Response

Status Message
200 Ok. Message stored on topic
500 Internal Error Internal error

Response data

{
  status: 'success',
  message: {}
}

Endpoint

POST /topic/:id

Body

(any json)

Response

Status Message
200 Ok. Topic updated
404 Not found Topic not found
500 Internal Error Internal Error

Response data

{
  status: 'success',
  message: 'updated'
}

Endpoint

DELETE /topic/:id

Response

Status Message
200 Ok. Topic deleted
404 Not found Topic not found
500 Internal Error Internal Error

Response data

{
  status: 'success',
  message: 'deleted'
}