Kin SDK Milestone 2 Release

Kik Engineering
Kin Blog
3 min readAug 18, 2020

--

Earlier this summer we released the first version of the new mobile SDKs publicly and provided a roadmap of three followup milestones of related tooling that would follow. Today our team is proud to have reached the second milestone in that roadmap: we are releasing new tooling to unlock new functionality for our mobile SDKs (Android & iOS) powered by a new blockchain agnostic ‘frontend’ service that we call Agora.

Agora is at the center of everything we are releasing today. It is a full history collector, an off-chain reference of additional payment data, a submission gateway for payments, and will also become a pivotal part of how many client developers migrate their users to Kin on Solana Blockchain. It is important to note, however, that Agora is not a blockchain itself, but a ‘frontend’ service, similar to Horizon in a Stellar world, that sits between clients and the Blockchain. To find out more about how Agora fits into the overall picture, read our overview.

Agora introduces some new features and changes:

  1. A higher-order abstraction for payments via ‘Invoices’, which provides more meaningful data when sending, validating, and resolving history for all payment types. This means you can send a whole list of line items that each contain a title, description, amount, and an app-defined SKU to identify each item paid for by a single payment, be that an earn, spend, or p2p transfer.
  2. A new Memo format; which allows the use of trusted off-chain payment-related data. This critically addresses the limitation of how much “extra data” can be attached to a transaction (currently limited to 32 bytes). This is achieved by (optionally) submitting an Invoice alongside a transaction, and having the hash of the Invoice be part of the Memo.
  3. Configurable webhooks for apps to validate transactions before submission to the blockchain, as well as generating notifications when transactions complete.
  4. Brand new Server side SDKs in Go, Python, and Node.js to make it easier to implement the new webhooks and get notifications about their user’s transactions.
  5. A new registration process to get set up with an App Index (which replaces the old App Id system)

On the mobile client side, instead of the SDK submitting payments and retrieving history through a Horizon service, the Android and iOS SDKs will now do this through Agora. No longer are developers responsible for adding a second signature for whitelisting before making a call to the mobile SDK. By default, the new SDKs expect to work with an app-configured webhook (based on the App Index in the memo) to help ease the process of adding this signature. This helps to make the process of making a Kin payment easier, and less error prone.

Changes and additions to the mobile SDKs:

  1. Both Base and Base-Compat libraries support Agora by default. Just a few lines of mobile code to move from Horizon to Agora.
  2. Functionality to create and pay invoices
  3. A new Spend library that provides an easy to use modal UI flow to pay for invoices with a single function.
  4. A new Design library that provides basic UI widgets that are Kin-branded that are showcased in a Design-Showcase app that you can build and try them out in.
  5. An updated Demo app that lets developers and product managers alike walk through the functionality that is available in all of our SDK libraries.

With so much new stuff, it’s impossible to cover in just one medium post. We encourage both existing and new developers to check out all the new documentation (links below) published for each of the SDKs as well as the overview documentation about how all of it fits together. If they have any questions or concerns, they can ask questions in the developer Discord channel.

Links

Documentation

Agora

Server SDKs

Client SDKs

  • Android (0.2.x available today)
  • iOS (0.2.x available Aug 25)

--

--