Skip to content

Commit

Permalink
fix: properly name authSigs and remove old now unsupported authMethods
Browse files Browse the repository at this point in the history
  • Loading branch information
FedericoAmura committed Dec 30, 2024
1 parent fb2e99a commit 2916a14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
16 changes: 5 additions & 11 deletions packages/lit-node-client-nodejs/src/lib/lit-node-client-nodejs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -858,14 +858,14 @@ export class LitNodeClientNodeJs
requestId: string
) {
// -- choose the right signature
const sessionSig = this.getSessionSigByUrl({
const authSig = this.getSessionSigByUrl({
sessionSigs: formattedParams.sessionSigs,
url,
});

const reqBody: JsonExecutionRequest = {
...formattedParams,
authSig: sessionSig,
authSig,
};

const urlWithPath = composeLitUrl({
Expand Down Expand Up @@ -1136,21 +1136,15 @@ export class LitNodeClientNodeJs

const nodePromises = this.getNodePromises((url: string) => {
// -- get the session sig from the url key
const sessionSig = this.getSessionSigByUrl({
sessionSigs: params.sessionSigs,
const authSig = this.getSessionSigByUrl({
sessionSigs,
url,
});

const reqBody: JsonPkpSignRequest = {
toSign: normalizeArray(params.toSign),
pubkey: hexPrefixed(params.pubKey),
authSig: sessionSig,

// -- optional params
...(params.authMethods &&
params.authMethods.length > 0 && {
authMethods: params.authMethods,
}),
authSig,
};

logWithRequestId(requestId, 'reqBody:', reqBody);
Expand Down
1 change: 0 additions & 1 deletion packages/types/src/lib/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ pub struct JsonExecutionRequest {
*/

export interface BaseJsonPkpSignRequest {
authMethods?: AuthMethod[];
toSign: ArrayLike<number>;
}

Expand Down

0 comments on commit 2916a14

Please sign in to comment.