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
fn get_entry_type_index(entry_type: String) -> ExternResult<EntryDefIndex> { | |
match entry_type.as_str() { | |
"association" => Ok(EntryDefIndex::from(0)), | |
"encrypted_data_wrapper" => Ok(EntryDefIndex::from(1)), | |
"bid_commitment" => Ok(EntryDefIndex::from(2)), | |
"market_plan" => Ok(EntryDefIndex::from(3)), | |
_ => Err(crate::err("Wrong entry type")), | |
} | |
} |
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
[[agents]] | |
id = "test_agent" | |
name = "HoloTester2" | |
public_address = "<PUBLIC ADDRESS>" | |
keystore_file = "/home/ubuntu/.config/holochain/keys/<NAME OF KEYSTORE FILE>" | |
[[dnas]] | |
id = "<APP NAME>" | |
file = "/home/ubuntu/app.dna.json" |
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
#!/bin/bash | |
APP_NAME=$1 | |
MODULE_NAME=$2 | |
ENTITY_NAME=$3 | |
ng new $APP_NAME | |
cd $APP_NAME |
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 { Injectable } from '@angular/core'; | |
import { Client } from 'rpc-websockets'; | |
export const connect = url => | |
new Promise((fulfill, reject) => { | |
const ws = new Client(url); | |
ws.on('open', () => { | |
const call = (dnaHash, zome, capability, func) => params => { | |
return ws.call(`${dnaHash}/${zome}/${capability}/${func}`, params); | |
}; |
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
FROM ubuntu:18.04 | |
RUN apt-get update | |
RUN apt-get install golang-go -y | |
RUN wget https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-386.tar.gz | |
RUN tar xvfz go-ipfs_v0.4.10_linux-386.tar.gz | |
RUN sh go-ipfs/install.sh | |
RUN go get -d -v github.com/holochain/holochain-proto | |
RUN cd $GOPATH/src/github.com/holochain/holochain-proto |