Giter VIP home page Giter VIP logo

bskrksyp9 / affinidi-core-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from affinidi/affinidi-core-sdk

0.0 0.0 0.0 23.55 MB

Building blocks to empower individuals and organisations with ownership and control of their verifiable data. This SDK aims to help you enable Self Sovereign Identity (SSI) for your application.

License: Apache License 2.0

Shell 0.03% JavaScript 0.48% TypeScript 99.48% Dockerfile 0.01%

affinidi-core-sdk's Introduction

Affinidi SDK Monorepo

The open-source Affinidi Library provides easy-to-use Typescript packages that enable developers to create and manage true certificate-enabled Digital Identities (DID) on the Affinidi Network.

The Affinidi open source monorepo has the following structure

.
├── common-libs
│   ├── common
│   ├── tiny-lds-ecdsa-secp256k1-2019
│   ├── did-auth-lib
│   ├── internal-api-clients
│   ├── tools-common
│   ├── tools-openapi
│   ├── url-resolver
│   ├── user-management
│   └── vc-common
│
└── platform
│   ├── fetch
│   ├── fetch-native
│   └── fetch-node
│
└── sdk
    ├── browser
    ├── core
    ├── expo
    ├── issuer-kit
    ├── node
    ├── react-native
    └── vc-data

common-libs/common

The common folder contains the @affinidi/common npm package. This package implements DID, VC, and VP utilities that are used throughout Affinidi libraries and services. This package is considered more opinionated because it supports DID methods and VC proofs that Affinidi actively supports.

The main entry point to this package is a class called Affinity. In this class you will find utilities for handling JSON-LD, DIDs, VCs, VPs, JWTs, and legacy credential types from early MVPs.

common-libs/tiny-lds-ecdsa-secp256k1-2019

This packages is the same as https://github.com/decentralized-identity/lds-ecdsa-secp256k1-2019.js, but uses tiny-secp256k1 for signing.

common-libs/did-auth-lib

The did-auth-lib folder contains the @affinidi/affinidi-did-auth-lib npm package. This library allows proving that the client/user is the owner of provided DID. Based on this proof App builders can give the client/user access to the appropriate resources.

common-libs/vc-common

The vc-common folder contains the @affinidi/vc-common npm package. This package implements VC and VP types and utility functions that help with type-safe credential issuance and verification. It is considered less opinionated because it supports a wider variety of DIDs and VCs as long as they conform to the core data model.

Find more docs here.

sdk/core

The core folder contins the @affinidi/wallet-core-sdk npm package. This package implements the common logic for account registration & management, credential issuance & verification and more.

The main entry point is a class called CommonNetworkMember. This class can be initialized with specific service endpoints, or if left to it's defaults will use Affinidi's staging environment.

sdk/browser

The browser folder contains the @affinidi/wallet-browser-sdk npm package. This package extends the wallet-core-sdk logic with client specific implementations for crypto operations. As a result of crypto operations being platform specific, this package implements the logic to communicate with the encrypted data vault for VC storage.

The main entry point is a class called AffinidiWallet. Similar to CommonNetworkMember, the class can be initialized with specific service endpoints, or can be left to use Affinidi's staging environment by default.

sdk/expo

The expo folder contains the @affinidi/wallet-expo-sdk npm package. This package extends the wallet-core-sdk logic with client specific implementations for crypto operations. As a result of crypto operations being platform specific, this package implements the logic to communicate with the encrypted data vault for VC storage.

The main entry point is a class called AffinidiWallet. Similar to CommonNetworkMember, the class can be initialized with specific service endpoints, or can be left to use Affinidi's staging environment by default.

sdk/react-native

The react-native folder contains the @affinidi/wallet-react-native-sdk npm package. This package extends the wallet-core-sdk logic with client specific implementations for crypto operations. As a result of crypto operations being platform specific, this package implements the logic to communicate with the encrypted data vault for VC storage.

The main entry point is a class called AffinidiWallet. Similar to CommonNetworkMember, the class can be initialized with specific service endpoints, or can be left to use Affinidi's staging environment by default.

sdk/vc-data

The vc-data folder contains the @affinidi/vc-data npm package. This package contains schema helpers and building blocks to issue JSON-LD credentials. The vc-data utilities also specify a process through which developers can propose additions or request assistance in schema development.

sdk/issuer-kit

The issuer-kit folder contains the @affinidi/issuer-kit npm package. This package contains a framework for launching microservices to connect to external data providers & issue VCs.

Prerequisites

Before we begin, make sure you have the following installed:

  • Node.js v16.17.0 or later
  • npm v8.15.0 or later

API Key

You need to to use an API Key when you initialize the SDK. Here are the steps required to generate and start using the API Key: https://github.com/affinityproject/affinidi-core-sdk/tree/master/sdk/core#create-api-key

npm commands

The following commands should be supported by all projects in monorepo

  • build: should build package
  • lint: should run lint
  • checkLicenses: should check licenses
  • test:unit: should run unit tests, if any
  • test:integration: should run integration tests, if any
  • test: should run all tests
  • test:coverage: should run all tests with coverage
  • test:coverage:codeclimate: should run test:coverage and save codeclimate results

Workflow to publish npm packages is:

  1. npm run bootstrap in order to link and install all dependencies;
  2. npm run build in order to build all projects in this monorepo;
  3. npm run lint, npm run test, npm run checkLicenses etc;
  4. npm run publish.

Note that prepare command is not required as the projects are built on step 2 anyway, and prepare command is run for all projects during step 1, making it unnecessary long.

affinidi-core-sdk's People

Contributors

anton-iskryzhytskyi avatar chebotiuk avatar cosminm-affnd avatar dendavidov-affinidi avatar denispopov15 avatar dhuan-affinidi avatar dmfilipenko-affinidi avatar everdark avatar ezgi-affinidi avatar hiteshjoshi1 avatar inga-affinidi avatar ipatka avatar isaac-affinidi avatar jacehensley avatar linn-affinidi avatar narsail avatar nbafi avatar oleksiipiliugin avatar rbrazhnyk avatar robert-affinidi avatar snyk-bot avatar sridharan21994 avatar viliusaffinity avatar vitalyrudenko-affinidi avatar vladyslav-mitchenko avatar vresch avatar yaroslava-kurash avatar yengas avatar yuriiskrypnyk avatar zhanppp-huang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.