Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename to SSI SDK #76

Merged
merged 4 commits into from
Apr 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# TBD Code of Conduct

TBD builds infrastructure for the next wave of innovation in financial services — which we believe will be decentralized, permissionless, and non-custodial. This means opening the global economy to everyone. We extend the same principles of inclusion to our developer ecosystem. We are excited to build with you. So we will ensure our community is truly open, transparent and inclusive. Because of the global nature of our project, diversity and inclusivity is paramount to our success. We not only welcome diverse perspectives, we **need** them!
TBD builds infrastructure for the next wave of innovation in financial services — which we believe will be decentralized,
permissionless, and non-custodial. This means opening the global economy to everyone. We extend the same principles of
inclusion to our developer ecosystem. We are excited to build with you. So we will ensure our community is truly open,
transparent and inclusive. Because of the global nature of our project, diversity and inclusivity is paramount to our
success. We not only welcome diverse perspectives, we **need** them!

The code of conduct below reflects the expectations for ourselves and for our community.


## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, physical appearance, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
community a harassment-free experience for everyone, regardless of age, physical appearance, visible or invisible
disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education,
socioeconomic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
Expand Down Expand Up @@ -54,7 +57,10 @@ decisions when appropriate.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event, or any space where the project is listed as part of your profile.
This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the
project or its community in public spaces. Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting as an appointed representative at an
online or offline event, or any space where the project is listed as part of your profile.

## Enforcement

Expand Down Expand Up @@ -91,7 +97,10 @@ those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media and forums.

Although this list cannot be exhaustive, we explicitly honor diversity in age, culture, ethnicity, gender identity or expression, language, national origin, political beliefs, profession, race, religion, sexual orientation, socioeconomic status, and technical ability. We will not tolerate discrimination based on any of the protected characteristics above, including participants with disabilities.
Although this list cannot be exhaustive, we explicitly honor diversity in age, culture, ethnicity, gender identity or
expression, language, national origin, political beliefs, profession, race, religion, sexual orientation, socioeconomic
status, and technical ability. We will not tolerate discrimination based on any of the protected characteristics above,
including participants with disabilities.

Violating these terms may lead to a temporary or permanent ban.

Expand Down
20 changes: 10 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

There are many ways to be an open source contributor, and we're here to help you on your way! You may:

* Propose ideas in our [discussion forums](https://github.com/TBD54566975/did-sdk/discussions)
* Raise an issue or feature request in our [issue tracker](https://github.com/TBD54566975/did-sdk/issues)
* Propose ideas in our [discussion forums](https://github.com/TBD54566975/ssi-sdk/discussions)
* Raise an issue or feature request in our [issue tracker](https://github.com/TBD54566975/ssi-sdk/issues)
* Help another contributor with one of their questions, or a code review
* Suggest improvements to our Getting Started documentation by supplying a Pull Request
* Evangelize our work together in conferences, podcasts, and social media spaces.
Expand All @@ -12,10 +12,10 @@ This guide is for you.

## Development Prerequisites

| Requirement | Tested Version | Installation Instructions |
|-------------|----------------|------------------------------------------------------|
| Go | 1.17.6 |[go.dev](https://go.dev/doc/tutorial/compile-install) |
| Mage | 1.12.1 |[magefile.org](https://magefile.org/) |
| Requirement | Tested Version | Installation Instructions |
|-------------|----------------|-------------------------------------------------------|
| Go | 1.17.6 | [go.dev](https://go.dev/doc/tutorial/compile-install) |
| Mage | 1.12.1 | [magefile.org](https://magefile.org/) |

### Go

Expand Down Expand Up @@ -78,24 +78,24 @@ $> mage test

### Issues

Anyone from the community is welcome (and encouraged!) to raise issues via [GitHub Issues](https://github.com/TBD54566975/did-sdk/issues).
Anyone from the community is welcome (and encouraged!) to raise issues via [GitHub Issues](https://github.com/TBD54566975/ssi-sdk/issues).

### Discussions

Design discussions and proposals take place on [GitHub Discussions](https://github.com/TBD54566975/did-sdk/discussions).
Design discussions and proposals take place on [GitHub Discussions](https://github.com/TBD54566975/ssi-sdk/discussions).

We advocate an asynchronous, written debate model - so write up your thoughts and invite the community to join in!

### Continuous Integration

Build and Test cycles are run on every commit to every branch on [CircleCI](https://app.circleci.com/pipelines/github/TBD54566975/did-sdk).
Build and Test cycles are run on every commit to every branch on [CircleCI](https://app.circleci.com/pipelines/github/TBD54566975/ssi-sdk).

## Contribution

We review contributions to the codebase via GitHub's Pull Request mechanism. We have the following guidelines to ease your experience and help our leads respond quickly to your valuable work:

* Start by proposing a change either in Issues (most appropriate for small change requests or bug fixes) or in Discussions (most appropriate for design and architecture considerations, proposing a new feature, or where you'd like insight and feedback)
* Cultivate consensus around your ideas; the project leads will help you pre-flight how beneficial the proposal might be to the project. Developing early buy-in will help others understand what you're looking to do, and give you a a greater chance of your contributions making it into the codebase! No one wants to see work done in an area that's unlikely to be incorporated into the codebase.
* Cultivate consensus around your ideas; the project leads will help you pre-flight how beneficial the proposal might be to the project. Developing early buy-in will help others understand what you're looking to do, and give you a greater chance of your contributions making it into the codebase! No one wants to see work done in an area that's unlikely to be incorporated into the codebase.
* Fork the repo into your own namespace/remote
* Work in a dedicated feature branch. Atlassian wrote a great [description of this workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow)
* When you're ready to offer your work to the project, first:
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[![godoc](https://img.shields.io/badge/godoc-did--sdk-blue)](https://pkg.go.dev/github.com/TBD54566975/did-sdk)
[![godoc](https://img.shields.io/badge/godoc-ssi--sdk-blue)](https://pkg.go.dev/github.com/TBD54566975/ssi-sdk)
[![goversion](https://img.shields.io/badge/go_version-1.17.6-brightgreen)](https://golang.org/)
[![license](https://img.shields.io/badge/license-Apache%202-black)](https://github.com/TBD54566975/did-sdk/blob/main/LICENSE)
[![issues](https://img.shields.io/github/issues/TBD54566975/did-sdk)](https://github.com/TBD54566975/did-sdk/issues)
[![Go Report Card](https://goreportcard.com/badge/github.com/TBD54566975/ssi-sdk)](https://goreportcard.com/report/github.com/TBD54566975/ssi-sdk)
[![license](https://img.shields.io/badge/license-Apache%202-black)](https://github.com/TBD54566975/ssi-sdk/blob/main/LICENSE)
[![issues](https://img.shields.io/github/issues/TBD54566975/ssi-sdk)](https://github.com/TBD54566975/ssi-sdk/issues)

# did-sdk
# ssi-sdk

# Introduction

Named `did-sdk`, this SDK refers to "DID" as **D**ecentralized **ID**entity, not specifically the
[did-core specification](https://www.w3.org/TR/did-core/). The `did-sdk` intends to provide a set of standards-based
primitives for building decentralized identity applications in a modular manner: with limited dependencies between
components.
Named `ssi-sdk`, this SDK encapsulates a set of standards related to [Self Sovereign Identity](http://www.lifewithalacrity.com/2016/04/the-path-to-self-soverereign-identity.html).
The `ssi-sdk` intends to provide flexible functionality based on a set of standards-based primitives for building
decentralized identity applications in a modular manner: with limited dependencies between components.

![did-sdk](docs/did-sdk.png)
![ssi-sdk](docs/ssi-sdk.png)

The image above outlines the SDK's vision. Standards may be added and/or removed. The standards themselves are under
active development, and as such, are subject to change. When possible we aim to call out which versions or revisions of
Expand All @@ -24,7 +24,7 @@ The SDK has not undergone any formal security review or audit, so please use wit

This project is fully open source, and we welcome contributions! For more information please see
[CONTRIBUTING](CONTRIBUTING.md). Our current thinking about the development of the library is captured in
[GitHub Issues](https://github.com/TBD54566975/did-sdk/issues).
[GitHub Issues](https://github.com/TBD54566975/ssi-sdk/issues).

# Specifications

Expand All @@ -39,9 +39,9 @@ change as the library evolves.
- Supports [VC-JWT and VP-JWT](https://www.w3.org/TR/vc-data-model/#json-web-token) formats.
- [Verifiable Credentials JSON Schema Specification](https://w3c-ccg.github.io/vc-json-schemas/v2/index.html) _Draft
Community Group Report, 21 September 2021_
- **WIP** [Credential Manifest](https://identity.foundation/credential-manifest/) _Strawman, March 2022_
- **WIP** [Presentation Exchange 2.0.0](https://identity.foundation/presentation-exchange/) _Working Group Draft, March 2022_
- [Presentation Exchange 2.0.0](https://identity.foundation/presentation-exchange/) _Working Group Draft, March 2022_
- [Wallet Rendering](https://identity.foundation/wallet-rendering) _Strawman, March 2022_
- **WIP** [Credential Manifest](https://identity.foundation/credential-manifest/) _Strawman, March 2022_

## signature suites

Expand Down
2 changes: 1 addition & 1 deletion credential/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/google/uuid"

"github.com/TBD54566975/did-sdk/util"
"github.com/TBD54566975/ssi-sdk/util"

"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion credential/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package credential
import (
"testing"

"github.com/TBD54566975/did-sdk/util"
"github.com/TBD54566975/ssi-sdk/util"

"github.com/stretchr/testify/assert"
)
Expand Down
6 changes: 3 additions & 3 deletions credential/exchange/model.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package exchange

import (
"github.com/TBD54566975/did-sdk/crypto"
"github.com/TBD54566975/did-sdk/cryptosuite"
"github.com/TBD54566975/did-sdk/util"
"github.com/TBD54566975/ssi-sdk/crypto"
"github.com/TBD54566975/ssi-sdk/cryptosuite"
"github.com/TBD54566975/ssi-sdk/util"
"github.com/pkg/errors"
"reflect"
)
Expand Down
4 changes: 2 additions & 2 deletions credential/exchange/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package exchange

import (
"fmt"
"github.com/TBD54566975/did-sdk/cryptosuite"
"github.com/TBD54566975/ssi-sdk/cryptosuite"
"github.com/goccy/go-json"
"github.com/google/uuid"
"github.com/lestrrat-go/jwx/jwt"
Expand All @@ -24,7 +24,7 @@ const (

// BuildPresentationRequest https://identity.foundation/presentation-exchange/#presentation-request
// used for transmitting a Presentation Definition from a holder to a verifier. Target is who the request is intended for.
// TODO(gabe) expand to other presentation types and signers https://github.com/TBD54566975/did-sdk/issues/57
// TODO(gabe) expand to other presentation types and signers https://github.com/TBD54566975/ssi-sdk/issues/57
func BuildPresentationRequest(signer cryptosuite.Signer, pt PresentationRequestType, def PresentationDefinition, target string) ([]byte, error) {
if !IsSupportedPresentationRequestType(pt) {
return nil, fmt.Errorf("unsupported presentation request type: %s", pt)
Expand Down
4 changes: 2 additions & 2 deletions credential/exchange/request_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package exchange

import (
"github.com/TBD54566975/did-sdk/crypto"
"github.com/TBD54566975/did-sdk/cryptosuite"
"github.com/TBD54566975/ssi-sdk/crypto"
"github.com/TBD54566975/ssi-sdk/cryptosuite"
"github.com/goccy/go-json"
"github.com/stretchr/testify/assert"
"testing"
Expand Down
2 changes: 1 addition & 1 deletion credential/exchange/schema.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package exchange

import (
"github.com/TBD54566975/did-sdk/schema"
"github.com/TBD54566975/ssi-sdk/schema"
"github.com/gobuffalo/packr/v2"
"github.com/goccy/go-json"
"github.com/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion credential/exchange/schema_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package exchange

import (
"github.com/TBD54566975/did-sdk/schema"
"github.com/TBD54566975/ssi-sdk/schema"
"github.com/stretchr/testify/assert"
"testing"
)
Expand Down
10 changes: 5 additions & 5 deletions credential/exchange/submission.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package exchange

import (
"fmt"
"github.com/TBD54566975/did-sdk/credential"
"github.com/TBD54566975/did-sdk/credential/signing"
"github.com/TBD54566975/did-sdk/cryptosuite"
"github.com/TBD54566975/did-sdk/util"
"github.com/TBD54566975/ssi-sdk/credential"
"github.com/TBD54566975/ssi-sdk/credential/signing"
"github.com/TBD54566975/ssi-sdk/cryptosuite"
"github.com/TBD54566975/ssi-sdk/util"
"github.com/goccy/go-json"
"github.com/google/uuid"
"github.com/oliveagle/jsonpath"
Expand Down Expand Up @@ -451,7 +451,7 @@ func processInputDescriptorField(field Field, claimData map[string]interface{})
return nil, false
}

// TODO(gabe) https://github.com/TBD54566975/did-sdk/issues/56
// TODO(gabe) https://github.com/TBD54566975/ssi-sdk/issues/56
// check for certain features we may not support yet: submission requirements, predicates, relational constraints,
// credential status, JSON-LD framing from https://identity.foundation/presentation-exchange/#features
func canProcessDefinition(def PresentationDefinition) error {
Expand Down
8 changes: 4 additions & 4 deletions credential/exchange/submission_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package exchange

import (
"github.com/TBD54566975/did-sdk/credential"
"github.com/TBD54566975/did-sdk/credential/signing"
"github.com/TBD54566975/did-sdk/crypto"
"github.com/TBD54566975/did-sdk/cryptosuite"
"github.com/TBD54566975/ssi-sdk/credential"
"github.com/TBD54566975/ssi-sdk/credential/signing"
"github.com/TBD54566975/ssi-sdk/crypto"
"github.com/TBD54566975/ssi-sdk/cryptosuite"
"github.com/goccy/go-json"
"github.com/oliveagle/jsonpath"
"github.com/stretchr/testify/assert"
Expand Down
12 changes: 6 additions & 6 deletions credential/exchange/verification.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package exchange

import (
"fmt"
"github.com/TBD54566975/did-sdk/credential"
"github.com/TBD54566975/did-sdk/credential/signing"
"github.com/TBD54566975/did-sdk/cryptosuite"
"github.com/TBD54566975/did-sdk/util"
"github.com/TBD54566975/ssi-sdk/credential"
"github.com/TBD54566975/ssi-sdk/credential/signing"
"github.com/TBD54566975/ssi-sdk/cryptosuite"
"github.com/TBD54566975/ssi-sdk/util"
"github.com/goccy/go-json"
"github.com/oliveagle/jsonpath"
"github.com/pkg/errors"
Expand Down Expand Up @@ -40,7 +40,7 @@ func VerifyPresentationSubmission(verifier cryptosuite.Verifier, et EmbedTarget,

// VerifyPresentationSubmissionVP verifies whether a verifiable presentation is a valid presentation submission
// for a given presentation definition.
// TODO(gabe) handle signature validation of submission claims https://github.com/TBD54566975/did-sdk/issues/71
// TODO(gabe) handle signature validation of submission claims https://github.com/TBD54566975/ssi-sdk/issues/71
func VerifyPresentationSubmissionVP(def PresentationDefinition, vp credential.VerifiablePresentation) error {
if err := vp.IsValid(); err != nil {
return errors.Wrap(err, "presentation submission does not contain a valid VP")
Expand Down Expand Up @@ -86,7 +86,7 @@ func VerifyPresentationSubmissionVP(def PresentationDefinition, vp credential.Ve
}

// TODO(gabe) support nested paths in presentation submissions
// https://github.com/TBD54566975/did-sdk/issues/73
// https://github.com/TBD54566975/ssi-sdk/issues/73
if submissionDescriptor.PathNested != nil {
return fmt.Errorf("submission with nested paths not supported: %s", submissionDescriptor.ID)
}
Expand Down
6 changes: 3 additions & 3 deletions credential/exchange/verification_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package exchange

import (
"github.com/TBD54566975/did-sdk/credential"
"github.com/TBD54566975/did-sdk/credential/signing"
"github.com/TBD54566975/did-sdk/cryptosuite"
"github.com/TBD54566975/ssi-sdk/credential"
"github.com/TBD54566975/ssi-sdk/credential/signing"
"github.com/TBD54566975/ssi-sdk/cryptosuite"
"github.com/stretchr/testify/assert"
"testing"
)
Expand Down
10 changes: 5 additions & 5 deletions credential/manifest/model.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package manifest

import (
"github.com/TBD54566975/did-sdk/credential/exchange"
"github.com/TBD54566975/did-sdk/util"
"github.com/TBD54566975/ssi-sdk/credential/exchange"
"github.com/TBD54566975/ssi-sdk/util"
"github.com/pkg/errors"
"reflect"
)
Expand Down Expand Up @@ -41,7 +41,7 @@ type Issuer struct {
Name string `json:"name,omitempty"`
// an object or URI as defined by the DIF Entity Styles specification
// https://identity.foundation/wallet-rendering/#entity-styles
// TODO(gabe) https://github.com/TBD54566975/did-sdk/issues/52
// TODO(gabe) https://github.com/TBD54566975/ssi-sdk/issues/52
Styles interface{} `json:"styles,omitempty"`
}

Expand All @@ -54,7 +54,7 @@ type OutputDescriptor struct {
Description string `json:"description,omitempty"`
// both below: an object or URI as defined by the DIF Entity Styles specification
// https://identity.foundation/wallet-rendering/#entity-styles
// TODO(gabe) https://github.com/TBD54566975/did-sdk/issues/52
// TODO(gabe) https://github.com/TBD54566975/ssi-sdk/issues/52
Styles interface{} `json:"styles,omitempty"`
Display interface{} `json:"display,omitempty"`
}
Expand Down Expand Up @@ -129,4 +129,4 @@ func (cf *CredentialFulfillment) IsValid() error {
return util.NewValidator().Struct(cf)
}

// TODO(gabe) support multiple embed targets https://github.com/TBD54566975/did-sdk/issues/57
// TODO(gabe) support multiple embed targets https://github.com/TBD54566975/ssi-sdk/issues/57
2 changes: 1 addition & 1 deletion credential/manifest/schema.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package manifest

import (
"github.com/TBD54566975/did-sdk/schema"
"github.com/TBD54566975/ssi-sdk/schema"
"github.com/gobuffalo/packr/v2"
"github.com/goccy/go-json"
"github.com/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion credential/manifest/schema_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package manifest

import (
"github.com/TBD54566975/did-sdk/schema"
"github.com/TBD54566975/ssi-sdk/schema"
"github.com/stretchr/testify/assert"
"testing"
)
Expand Down
4 changes: 2 additions & 2 deletions credential/model.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package credential

import (
"github.com/TBD54566975/did-sdk/crypto"
"github.com/TBD54566975/ssi-sdk/crypto"
"reflect"

"github.com/TBD54566975/did-sdk/util"
"github.com/TBD54566975/ssi-sdk/util"
)

// VerifiableCredential is the verifiable credential model outlined in the
Expand Down
2 changes: 1 addition & 1 deletion credential/rendering/model.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package rendering

import (
"github.com/TBD54566975/did-sdk/util"
"github.com/TBD54566975/ssi-sdk/util"
"github.com/pkg/errors"
"reflect"
)
Expand Down
Loading