generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix typos * update `PortableDID` to reflect changes discussed for all web5 sdks
- Loading branch information
Showing
5 changed files
with
67 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package did | ||
|
||
import ( | ||
"github.com/tbd54566975/web5-go/dids/didcore" | ||
"github.com/tbd54566975/web5-go/jwk" | ||
) | ||
|
||
// PortableDID is a serializable BearerDID. VerificationMethod contains the private key | ||
// of each verification method that the BearerDID's key manager contains | ||
type PortableDID struct { | ||
// URI is the DID string as per https://www.w3.org/TR/did-core/#did-syntax | ||
URI string `json:"uri"` | ||
// PrivateKeys is an array of private keys associated to the BearerDID's verification methods | ||
// Note: PrivateKeys will be empty if the BearerDID was created using a KeyManager that does not | ||
// support exporting private keys (e.g. HSM based KeyManagers) | ||
PrivateKeys []jwk.JWK `json:"privateKeys"` | ||
// Document is the DID Document associated to the BearerDID | ||
Document didcore.Document `json:"document"` | ||
// Metadata is a map that can be used to store additional method specific data | ||
// that is necessary to inflate a BearerDID from a PortableDID | ||
Metadata map[string]interface{} `json:"metadata"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters