components:
securitySchemes:
OAuth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://example.com/oauth/authorize
tokenUrl: https://example.com/oauth/token
scopes:
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
I am attesting that this GitHub handle @OR13 is linked to the Decentralized Identifier did:example:123 | |
eyJpc3MiOiJkaWQ6ZXhhbXBsZToxMjMiLCJraWQiOiIjVVplcEdING54dUg5c01TRzBqbXJlYzM4ZTB4dVlvZm1FX1hCWjROME83RSIsImFsZyI6IkVTMjU2IiwiY3R5IjoiYXBwbGljYXRpb24vdm5kLnJlYmFzZS1hdHRlc3RhdGlvbiJ9.SSBhbSBhdHRlc3RpbmcgdGhhdCB0aGlzIEdpdEh1YiBoYW5kbGUgQE9SMTMgaXMgbGlua2VkIHRvIHRoZSBEZWNlbnRyYWxpemVkIElkZW50aWZpZXIgZGlkOmV4YW1wbGU6MTIz.rcNs2_FoGRsJT2zWwdhNa2u6fX7LTC_E84guDStFQssTwW9qAEOGMz-Ir3JrdxSEuabSeuUBXdtHvraolWDCRw |
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
import crypto from 'crypto' | |
import assert from 'assert'; | |
import { Kem, Kdf, Aead, CipherSuite } from 'hpke-js' | |
const suite = new CipherSuite({ | |
kem: Kem.DhkemP256HkdfSha256, | |
kdf: Kdf.HkdfSha256, | |
aead: Aead.Aes128Gcm | |
}); |
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
🌱 Seedling | |
🌲 Evergreen Tree | |
🌳 Deciduous Tree | |
🌴 Palm Tree | |
🌵 Cactus | |
🌾 Sheaf of Rice | |
🌿 Herb | |
🍀 Four Leaf Clover | |
🌻 Sunflower | |
🌷 Tulip |
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
const { Readable } = require("stream"); | |
const { ZSTDCompress, ZSTDDecompress } = require("simple-zstd"); | |
const compress = (data) => { | |
return new Promise((resolve) => { | |
const stream = Readable.from(data); | |
const compressedStream = stream.pipe(ZSTDCompress(3)); | |
const bufs = []; | |
compressedStream.on("data", function (d) { | |
bufs.push(d); |
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
import { contexts } from "./contexts"; | |
import axios from "axios"; | |
import * as ed25519 from "@transmute/did-key-ed25519"; | |
import * as bls12381 from "@transmute/did-key-bls12381"; | |
export const documentLoader = async (iri) => { | |
if (contexts[iri]) { | |
return { |
Live Table: https://diafygi.github.io/webcrypto-examples/
I couldn't find anywhere that had clear examples of WebCryptoAPI, so I wrote examples and made a live table with them. Pull requests welcome!
- generateKey | importKey |
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
console.log('hello'); |
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
{ | |
"protected": "eyJlbmMiOiJYQzIwUCJ9", | |
"recipients": [ | |
{ | |
"header": { | |
"kid": "did:key:z6Mkf8unjmyqsnDtZAjZkdNhw3LZWm5x9u3bbHCEdenD1Agq#z6LShX3PmBwYHGh8JL82zm3x8uT3bWEbLmfos66McREoEfvo", | |
"alg": "ECDH-ES+A256KW", | |
"epk": { | |
"kty": "OKP", | |
"crv": "X25519", |
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
{ | |
"network": "_", | |
"poolVersion": 2, | |
"nymResponse": { | |
"op": "REPLY", | |
"result": { | |
"txnTime": 1541709495, | |
"seqNo": 104, | |
"type": "105", | |
"data": "{\"dest\":\"WRfXPg8dantKVubE3HX8pw\",\"identifier\":\"BrYDA5NubejDVHkCYBbpY5\",\"role\":null,\"seqNo\":104,\"txnTime\":1541709495,\"verkey\":\"~P7F3BNs5VmQ6eVpwkNKJ5D\"}", |
NewerOlder