diff --git a/src/agent/ICheqd.ts b/src/agent/ICheqd.ts index 635d0ac..529ca37 100644 --- a/src/agent/ICheqd.ts +++ b/src/agent/ICheqd.ts @@ -6650,7 +6650,7 @@ export class Cheqd implements IAgentPlugin { } // validate dkgOptions - if (!options?.topArgs?.dkgOptions || !options.topArgs?.dkgOptions?.capacityDelegationAuthSignature) { + if (!options?.topArgs?.dkgOptions) { throw new Error('[did-provider-cheqd]: dkgOptions is required'); } @@ -6827,7 +6827,7 @@ export class Cheqd implements IAgentPlugin { } // validate dkgOptions - if (!options?.topArgs?.dkgOptions || !options.topArgs?.dkgOptions?.capacityDelegationAuthSignature) { + if (!options?.topArgs?.dkgOptions) { throw new Error('[did-provider-cheqd]: dkgOptions is required'); } diff --git a/src/dkg-threshold/lit-protocol/v6.ts b/src/dkg-threshold/lit-protocol/v6.ts index 65870dd..0d49237 100644 --- a/src/dkg-threshold/lit-protocol/v6.ts +++ b/src/dkg-threshold/lit-protocol/v6.ts @@ -168,7 +168,7 @@ export class LitProtocol { encryptedString: string, stringHash: string, unifiedAccessControlConditions: NonNullable, - capacityDelegationAuthSig: GenericAuthSig + capacityDelegationAuthSig?: GenericAuthSig ): Promise { // generate session signatures const sessionSigs = await this.client.getSessionSigs({ @@ -179,7 +179,7 @@ export class LitProtocol { ability: LitAbility.AccessControlConditionDecryption, }, ], - capabilityAuthSigs: [capacityDelegationAuthSig], + capabilityAuthSigs: capacityDelegationAuthSig ? [capacityDelegationAuthSig] : undefined, authNeededCallback: async ({}) => { // generate auth signature const authSig = await LitProtocol.generateAuthSignature(this.cosmosAuthWallet);