diff --git a/packages/agent/src/store-data.ts b/packages/agent/src/store-data.ts index 21060e558..376fdc68c 100644 --- a/packages/agent/src/store-data.ts +++ b/packages/agent/src/store-data.ts @@ -7,7 +7,7 @@ import type { Web5PlatformAgent } from './types/agent.js'; import { TENANT_SEPARATOR } from './utils-internal.js'; import { getDataStoreTenant } from './utils-internal.js'; -import { DwnInterface } from './types/dwn.js'; +import { DwnInterface, DwnMessageParams } from './types/dwn.js'; import { ProtocolDefinition } from '@tbd54566975/dwn-sdk-js'; export type DataStoreTenantParams = { @@ -74,9 +74,7 @@ export class DwnDataStore<TStoreObject extends Record<string, any> = Jwk> implem /** * Properties to use when writing and querying records with the DWN store. */ - protected _recordProperties = { - dataFormat: 'application/json', - }; + protected _recordProperties!: DwnMessageParams[DwnInterface.RecordsWrite]; public async delete({ id, agent, tenant }: DataStoreDeleteParams): Promise<boolean> { // Determine the tenant identifier (DID) for the delete operation. diff --git a/packages/agent/src/types/dwn.ts b/packages/agent/src/types/dwn.ts index a2a21d408..e27743d97 100644 --- a/packages/agent/src/types/dwn.ts +++ b/packages/agent/src/types/dwn.ts @@ -256,6 +256,7 @@ export { DwnConstant, Signer as DwnSigner, DateSort as DwnDateSort, + DataEncodedRecordsWriteMessage as DwnDataEncodedRecordsWriteMessage, PublicJwk as DwnPublicKeyJwk, // TODO: Remove once DWN SDK switches to Jwk from @web5/crypto PaginationCursor as DwnPaginationCursor, MessageSubscriptionHandler as DwnMessageSubscriptionHandler, diff --git a/packages/agent/src/types/identity.ts b/packages/agent/src/types/identity.ts index dbc429983..f553b4b9d 100644 --- a/packages/agent/src/types/identity.ts +++ b/packages/agent/src/types/identity.ts @@ -7,6 +7,8 @@ export interface IdentityMetadata { name: string; tenant: string; uri: string; + /** connectedDid is the DID which the identity acts on behalf of using permissions */ + connectedDid?: string; } export interface PortableIdentity {