From 304b0ee3a3274a6c913d9e15025c6281ff08eb82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Lenksj=C3=B6?= <5889538+lenkan@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:59:45 +0200 Subject: [PATCH] fix: export hab state types from main export (#263) * fix: export hab state types from main export * fix build --- .../multisig-vlei-issuance.test.ts | 2 +- examples/integration-scripts/utils/test-setup.ts | 11 +++++++---- src/exports.ts | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/examples/integration-scripts/multisig-vlei-issuance.test.ts b/examples/integration-scripts/multisig-vlei-issuance.test.ts index e429940a..3e1daeb7 100644 --- a/examples/integration-scripts/multisig-vlei-issuance.test.ts +++ b/examples/integration-scripts/multisig-vlei-issuance.test.ts @@ -9,6 +9,7 @@ import signify, { EventResult, randomNonce, Salter, + HabState, } from 'signify-ts'; import { resolveEnvironment } from './utils/resolve-env'; import { @@ -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(); diff --git a/examples/integration-scripts/utils/test-setup.ts b/examples/integration-scripts/utils/test-setup.ts index ea9760f1..ac8a7219 100644 --- a/examples/integration-scripts/utils/test-setup.ts +++ b/examples/integration-scripts/utils/test-setup.ts @@ -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); @@ -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'); diff --git a/src/exports.ts b/src/exports.ts index 839f508a..a5093c3d 100644 --- a/src/exports.ts +++ b/src/exports.ts @@ -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';