Skip to content

Commit

Permalink
Merge pull request #97 from holochain/update-to-114
Browse files Browse the repository at this point in the history
Update to v114
  • Loading branch information
zippy authored Nov 12, 2021
2 parents 2ebeafe + dd1af75 commit 70bce77
Show file tree
Hide file tree
Showing 12 changed files with 217 additions and 96 deletions.
146 changes: 136 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions crates/trycp_server/src/configure_player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ pub(crate) fn configure_player(
---
environment_path: environment
use_dangerous_test_keystore: false
keystore_path: {}
passphrase_service:
type: danger_insecure_from_config
passphrase: password
keystore:
type: lair_server_legacy_deprecated
keystore_path: {}
danger_passphrase_insecure_from_config: test
admin_interfaces:
- driver:
type: websocket
Expand Down
26 changes: 6 additions & 20 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
let
holonixPath = builtins.fetchTarball https://github.com/holochain/holonix/archive/6ae8ffb8e5c1a1faa4f4e1af8a9f7139b2ce0f3c.tar.gz;
holonix = import (holonixPath) {
includeHolochainBinaries = true;
holochainVersionId = "custom";

holochainVersion = {
rev = "ab02f36c87999d42026b7429164ded503bb39853";
sha256 = "0bwyq34hn5s2rif5g83f8xnkwjk7wl71xj9bxqib9plzk8rc0dkp";
cargoSha256 = "0bxflwmdh785c99cjgpmynd0h70a5gm40pryzzrfd9xiypr29gi7";
bins = {
holochain = "holochain";
hc = "hc";
};
{
holonixPath ? builtins.fetchTarball { url = "https://github.com/holochain/holonix/archive/726694e2889a57a28b553541d2fabd8f1fbb52b2.tar.gz"; }
}:

lairKeystoreHashes = {
sha256 = "0khg5w5fgdp1sg22vqyzsb2ri7znbxiwl7vr2zx6bwn744wy2cyv";
cargoSha256 = "1lm8vrxh7fw7gcir9lq85frfd0rdcca9p7883nikjfbn21ac4sn4";
};
};
};
let
holonix = import (holonixPath) { };
nixpkgs = holonix.pkgs;
in nixpkgs.mkShell {
inputsFrom = [ holonix.main ];
buildInputs = with nixpkgs; [
binaryen
nodejs-16_x
];
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "git",
"url": "https://github.com/holochain/tryorama"
},
"version": "0.4.5",
"version": "0.4.6",
"description": "test framework for holochain hApps",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -25,7 +25,7 @@
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@holochain/conductor-api": "^0.2.1",
"@holochain/conductor-api": "^0.2.4",
"@holochain/hachiko": "^0.5.2",
"@iarna/toml": "^2.2.5",
"@msgpack/msgpack": "^2.1.0",
Expand Down
8 changes: 4 additions & 4 deletions src/cell.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { CellId, CellNick, HoloHash } from '@holochain/conductor-api'
import { CellId, RoleId, HoloHash } from '@holochain/conductor-api'
import { fakeCapSecret } from './common'
import { Player } from './player'

type CallZomeFunc = (zome: string, fn: string, params?: any) => Promise<any>

type CellConstructorParams = {
cellId: CellId,
cellNick: CellNick,
cellRole: RoleId,
player: Player
}

Expand All @@ -16,12 +16,12 @@ type CellConstructorParams = {
*/
export class Cell {
cellId: CellId
cellNick: CellNick
cellRole: RoleId
_player: Player

constructor(o: CellConstructorParams) {
this.cellId = o.cellId
this.cellNick = o.cellNick
this.cellRole = o.cellRole
this._player = o.player
}

Expand Down
8 changes: 4 additions & 4 deletions src/conductor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { delay } from './util'
import env from './env'
import * as T from './types'
import {
CellNick,
RoleId,
AdminWebsocket,
AppWebsocket,
AgentPubKey,
Expand Down Expand Up @@ -289,7 +289,7 @@ export class Conductor {

let dna = {
hash: await this.registerDna(source, this._player.scenarioUID),
nick: `${index}${src}-${uidGen()}`
role_id: `${index}${src}-${uidGen()}`
}
return dna
})
Expand Down Expand Up @@ -323,9 +323,9 @@ export class Conductor {
const agentPubKey = installedAppResponse.cell_data[0].cell_id[1]
const rawCells = Object.entries(installedAppResponse.cell_data)
// construct Cell instances which are the most useful class to the client
const cells = rawCells.map(([_, { cell_id, cell_nick }]) => new Cell({
const cells = rawCells.map(([_, { cell_id, role_id }]) => new Cell({
cellId: cell_id,
cellNick: cell_nick,
cellRole: role_id,
player: this._player
}))

Expand Down
Loading

0 comments on commit 70bce77

Please sign in to comment.