Skip to content

Instantly share code, notes, and snippets.

View jimscarver's full-sized avatar

Jim Whitescarver jimscarver

View GitHub Profile
@jimscarver
jimscarver / Node.rho
Last active August 4, 2021 09:41
Rholang graph node contract (for graphql)
new Node, ret1, ret2, ret3, ret4, ret5, stdout(`rho:io:stdout`) in {
// Rholang Abstract Graph Node Object having properties and links, a contract, super, and public key
// Nodes can be used for hierarchical directories with loops suitable for use with graphql
// node data is a map of maps
// TODO encryption, inheritance, typing
contract Node(@"new", // class method to create a new node
@super, // node to query for links not found in current nde
@propsMap, // property map of node attributes
@linkMap, // map of named links from node
@pubKey, // TODO encryption TBD
new makeKVStore, stdout(`rho:io:stdout`) in {
// User call to make a new key-value store
contract makeKVStore(return) = {
new storeCh, this in {
// Give back reference to the created KVstore
return!(*this) |
### Keybase proof
I hereby claim:
* I am jimscarver on github.
* I am jimscarver (https://keybase.io/jimscarver) on keybase.
* I have a public key whose fingerprint is E837 62E5 0699 A10B F1D5 7563 0305 761F 4BC4 90ED
To claim this, I am signing this object:
@jimscarver
jimscarver / gist:df30648c2e999d0e8cf9
Created March 6, 2015 00:47
Verifying that +jimscarver is my openname (Bitcoin username). https://onename.com/jimscarver
Verifying that +jimscarver is my openname (Bitcoin username). https://onename.com/jimscarver