Skip to content

Commit

Permalink
fix: export hab state types from main export (#263)
Browse files Browse the repository at this point in the history
* fix: export hab state types from main export

* fix build
  • Loading branch information
lenkan authored Jun 24, 2024
1 parent fcebfa0 commit 304b0ee
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import signify, {
EventResult,
randomNonce,
Salter,
HabState,
} from 'signify-ts';
import { resolveEnvironment } from './utils/resolve-env';
import {
Expand All @@ -17,7 +18,6 @@ import {
waitForNotifications,
} from './utils/test-util';
import { getOrCreateClients, getOrCreateContact } from './utils/test-setup';
import { HabState } from '../../src/keri/core/state';

const { vleiServerUrl, witnessIds } = resolveEnvironment();

Expand Down
11 changes: 7 additions & 4 deletions examples/integration-scripts/utils/test-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export async function getOrCreateIdentifier(
name: string,
kargs: CreateIdentiferArgs | undefined = undefined
): Promise<[string, string]> {
let id: any = undefined;
let id: string;
try {
const identfier = await client.identifiers().get(name);
// console.log("identifiers.get", identfier);
Expand All @@ -96,13 +96,16 @@ export async function getOrCreateIdentifier(
// console.log("identifiers.create", op);
id = op.response.i;
}
const eid = client.agent?.pre!;
const eid = client.agent?.pre;
if (!eid) {
throw new Error('No agent on client');
}
if (!(await hasEndRole(client, name, 'agent', eid))) {
const result: EventResult = await client
.identifiers()
.addEndRole(name, 'agent', eid);
let op = await result.op();
op = await waitOperation(client, op);
const op = await result.op();
await waitOperation(client, op);
// console.log("identifiers.addEndRole", op);
}
const oobi = await client.oobis().get(name, 'agent');
Expand Down
1 change: 1 addition & 0 deletions src/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ export * from './keri/core/signer';
export * from './keri/core/tholder';
export * from './keri/core/utils';
export * from './keri/core/verfer';
export * from './keri/core/state';

export * from './keri/end/ending';

0 comments on commit 304b0ee

Please sign in to comment.