Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/connect/src/routes/authenticate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ function AuthenticateComponent() {

const privateSpacesInput = privateSpacesData
? privateSpacesData
.filter((space) => selectedPrivateSpaces.has(space.id))
// .filter((space) => selectedPrivateSpaces.has(space.id))
.map((space) => {
// TODO: currently without checking we assume all keyboxes exists and we don't create any - we should check if the keyboxes exist and create them if they don't
if (space.appIdentities.some((spaceAppIdentity) => spaceAppIdentity.address === appIdentity.address))
Expand Down
4 changes: 2 additions & 2 deletions packages/hypergraph-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
},
"dependencies": {
"@automerge/automerge": "^2.2.9",
"@automerge/automerge-repo": "=2.0.0-beta.5",
"@automerge/automerge-repo-react-hooks": "=2.0.0-beta.5",
"@automerge/automerge-repo": "^2.0.6",
"@automerge/automerge-repo-react-hooks": "^2.0.6",
"@graphprotocol/grc-20": "^0.21.2",
"@noble/hashes": "^1.8.0",
"@tanstack/react-query": "^5.75.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/hypergraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"dependencies": {
"@automerge/automerge": "^2.2.9",
"@automerge/automerge-repo": "=2.0.0-beta.5",
"@automerge/automerge-repo": "^2.0.6",
"@effect/experimental": "^0.44.20",
"@graphprotocol/grc-20": "^0.21.2",
"@noble/ciphers": "^1.3.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/hypergraph/src/identity/prove-ownership.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ export const verifyIdentityOwnership = async (
chain,
transport: http(rpcUrl),
});
console.log('publicClient', publicClient);
console.log('rpcUrl', rpcUrl);
console.log('chain', chain);
// console.log('publicClient', publicClient);
// console.log('rpcUrl', rpcUrl);
// console.log('chain', chain);

console.log('accountProof', accountProof);
console.log('accountAddress', accountAddress);
console.log('publicKey', publicKey);
// console.log('accountProof', accountProof);
// console.log('accountAddress', accountAddress);
// console.log('publicKey', publicKey);

const accountProofMessage = getAccountProofMessage(accountAddress, publicKey);
const validAccountProof = await publicClient.verifyTypedData({
Expand Down
9 changes: 4 additions & 5 deletions packages/hypergraph/src/store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { AnyDocumentId, DocHandle, Repo } from '@automerge/automerge-repo';
import { type Store, createStore } from '@xstate/store';
import type { PrivateAppIdentity } from './connect/types.js';
import type { DocumentContent } from './entity/types.js';
import { mergeMessages } from './inboxes/merge-messages.js';
import type { InboxSenderAuthPolicy } from './inboxes/types.js';
import type { Invitation, Updates } from './messages/index.js';
Expand Down Expand Up @@ -47,7 +48,7 @@ export type SpaceStorageEntry = {
events: SpaceEvent[];
state: SpaceState | undefined;
keys: { id: string; key: string }[];
automergeDocHandle: DocHandle<unknown> | undefined;
automergeDocHandle: DocHandle<DocumentContent>;
inboxes: SpaceInboxStorageEntry[];
};

Expand Down Expand Up @@ -194,7 +195,7 @@ export const store: Store<StoreContext, StoreEvent, GenericEventObject> = create
for (const space of event.spaces) {
const existingSpace = context.spaces.find((s) => s.id === space.id);
const lastUpdateClock = context.lastUpdateClock[space.id] ?? -1;
const result = context.repo.findWithProgress(idToAutomergeId(space.id) as AnyDocumentId);
const result = context.repo.findWithProgress<DocumentContent>(idToAutomergeId(space.id) as AnyDocumentId);

// set it to ready to interact with the document
result.handle.doneLoading();
Expand Down Expand Up @@ -245,8 +246,6 @@ export const store: Store<StoreContext, StoreEvent, GenericEventObject> = create
}
}

console.log('storecontext', storeContext);

return storeContext;
},
applyEvent: (context, event: { spaceId: string; event: SpaceEvent; state: SpaceState }) => {
Expand Down Expand Up @@ -439,7 +438,7 @@ export const store: Store<StoreContext, StoreEvent, GenericEventObject> = create
) => {
const existingSpace = context.spaces.find((s) => s.id === event.spaceId);
if (!existingSpace && context.repo) {
const result = context.repo.findWithProgress(idToAutomergeId(event.spaceId) as AnyDocumentId);
const result = context.repo.findWithProgress<DocumentContent>(idToAutomergeId(event.spaceId) as AnyDocumentId);
// set it to ready to interact with the document
result.handle.doneLoading();

Expand Down
Loading
Loading