Skip to content

Instantly share code, notes, and snippets.

View OR13's full-sized avatar
💭
Building tools for Self Sovereign Identity and Decentralized App Devs

Orie Steele OR13

💭
Building tools for Self Sovereign Identity and Decentralized App Devs
View GitHub Profile
@OR13
OR13 / id-link.txt
Last active December 4, 2022 14:58
Rebase Demo
@OR13
OR13 / spicy-hpke.js
Created September 30, 2022 19:35
opacity: 1;
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
});
🌱 Seedling
🌲 Evergreen Tree
🌳 Deciduous Tree
🌴 Palm Tree
🌵 Cactus
🌾 Sheaf of Rice
🌿 Herb
🍀 Four Leaf Clover
🌻 Sunflower
🌷 Tulip
@OR13
OR13 / zstd.js
Created July 3, 2022 21:49
zstd streams, buffers, promises
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);
@OR13
OR13 / documentLoader.js
Created January 6, 2022 01:11
example document loader
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 {
@OR13
OR13 / scopes.md
Last active July 21, 2021 19:57
vc-http-api scopes
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://example.com/oauth/authorize
          tokenUrl: https://example.com/oauth/token
 scopes:
@OR13
OR13 / webcrypto-examples.md
Created March 6, 2021 22:44 — forked from pedrouid/webcrypto-examples.md
Web Cryptography API Examples
@OR13
OR13 / producer.js
Created October 2, 2020 16:16
JSON-LD Context Processing
console.log('hello');
@OR13
OR13 / example.json
Created August 6, 2020 20:17
example jwe
{
"protected": "eyJlbmMiOiJYQzIwUCJ9",
"recipients": [
{
"header": {
"kid": "did:key:z6Mkf8unjmyqsnDtZAjZkdNhw3LZWm5x9u3bbHCEdenD1Agq#z6LShX3PmBwYHGh8JL82zm3x8uT3bWEbLmfos66McREoEfvo",
"alg": "ECDH-ES+A256KW",
"epk": {
"kty": "OKP",
"crv": "X25519",
@OR13
OR13 / example-method-meta-data.json
Created June 18, 2020 16:50
DID Method Meta Data Example from Universal Resolver
{
"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\"}",