Skip to content

Instantly share code, notes, and snippets.

import * as u8a from 'uint8arrays'
import sha3 from 'js-sha3'
const { keccak256 } = sha3
import HttpProvider from 'ethjs-provider-http'
import { DefaultStateManager } from '@ethereumjs/statemanager'
import { Trie } from '@ethereumjs/trie'
import { Address } from '@ethereumjs/util'
import { EVM } from '@ethereumjs/evm'
import { RLP } from '@ethereumjs/rlp'
import { Block, BlockHeader } from '@ethereumjs/block'
import * as u8a from 'uint8arrays'
import sha3 from 'js-sha3'
const { keccak256 } = sha3
import HttpProvider from 'ethjs-provider-http'
import { DefaultStateManager } from '@ethereumjs/statemanager'
import { Trie } from '@ethereumjs/trie'
import { Address, toBuffer } from '@ethereumjs/util'
import { Blockchain } from '@ethereumjs/blockchain'
import { Chain, Common, Hardfork } from '@ethereumjs/common'
import { EEI } from '@ethereumjs/vm'
@oed
oed / recap.md
Created November 25, 2022 16:51

This document describes how ReCap can adopt the capability format that is used by UCAN. Note that the design of UCANs structure is still in discussion, and if it changes we would want to adopt those changes (for v1 of UCAN).

Going to demonstrate by example. Here is what the ReCap json structure should look like.

{
  "att": {
    "http://example.com/public/photos/": {
        "crud/delete": []
 },

Exploreing the differences between how capabilities are represetned between UCAN and ReCap.

Comparison

UCAN ReCap
$RESOURSE Needs to be a URI Any String
$ABILITY One ability per resource ref Any nymber of abilities per resource ref
$EXTENSION Additional caveats for a specific resource Additional information, relevant for all resources
All resources Not possible In def property
did:3:kjzl6cwe1jw149tlplc4bgnpn1v4uwk9rg9jkvijx0u0zmfa97t69dnqibqa2as
did:key:z6Mkqi6drzRN1raNjLcA8cQL4LvW6UWnHSti9DbfyJyZqr2T
did:key:z6MkkHCY8s5AL7fLT8J6QcjkWzF8rHAsKuSKZ2hNRCYCjmUb
<!doctype html>
<html>
<head>
<title>Webrtc Demo</title>
<script src="https://cdn.jsdelivr.net/npm/ipfs/dist/index.js"></script>
</head>
<body>
<script type="text/javascript">
@oed
oed / asf
Created February 15, 2020 17:45
fdsfd
3Box is a social profiles network for web3. This post links my 3Box profile to my Github account!
✅ did:muport:QmbSeUC1a9eAyfD9asmkBGv3nNfGq2RAPqBRXMgZ35uJhh ✅
Create your profile today to start building social connection and trust online. https://3box.io/