changed 4 months ago
Published Linked with GitHub

RFC001: VirtoSDK

Audiences

  1. High-order components (insights by Dani <3): No need to customize. Low/no-code. Provide web components.

    Note: Maybe a separate library for components??

    • Virto Connect
    • Checkout
  2. "Web2" APIs (insights by Dani/David <3): Used to construct higher-order components.

    Built using VOS, using zInk! Programs.

    • Don't expose blockchain concepts (e.g. expose Authn via OAuth 2.0).
    • Store programs that execute in a hybrid environment.
    • REST-ish interface for handling APIs.
    • Uses SSEs to emit events.

    Built-in APIs to include:

    • Authentication / Authorization
    • Memberships
    • Marketplace
    • Payments
    • Roles
    • Organization (on the Federated Server)

    Questions for ink! Alliance.

    • Are chain extensions (proposal to rename as ink! Extensions) being maintained in the future? If so, we can abstract KreivoSDK through VOS via ink! Extensions.
  3. Internal KreivoSDK/Core (insights by Pablo): An internal SDK. Used to connect with APIs, and internal applications.

    Follow the rest of the document.

Homework

  • Implement the Authentication/Authorization APIs with the proposed levels of abstraction.

Design Goals

  1. APIs should be an abstraction of the calls to the runtime, to complete a task.
    • Alternatively, they can be mere CQRS for the resources, and let the developers handle the data.
  2. Split definition and implementation. An SDK client should be able to plug-and-play with signers and backend options.

Overall architecture

block-beta
    columns 8

    APIs:1
    
    block:g1:7
        columns 2
        
        Assets
        Listings
        Payments
        AssetsConversion
        Identities
        e1("...")
    end

    Signers:1

    block:g2:7
        pass
        wallet
    end
    
    Backend:1

    block:g3:7
        polkadot.js
        PAPI
        sube
        e2("...")
    end

    classDef id fill: transparent, stroke: transparent;
    class APIs,Signers,Backend id

Implementation Details

TODO: Add implementation details here

Programming Languages

Libraries

Bindings

Select a repo