New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dfns/sdk

Package Overview
Dependencies
Maintainers
12
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dfns/sdk - npm Package Compare versions

Comparing version 0.4.0-alpha.1 to 0.4.0-alpha.2

18

baseAuthApi.d.ts
import { FirstFactorAttestation, RecoveryFactorAttestation, SecondFactorAttestation, UserRegistrationChallenge } from './store';
import { AllowCredential, CredentialKind, FirstFactorAssertion, RecoveryKeyAssertion, SecondFactorAssertion } from './signer';
import { CredentialKind, FirstFactorAssertion, RecoveryKeyAssertion, SecondFactorAssertion, UserActionChallenge } from './signer';
import { HttpMethod } from './utils/fetch';

@@ -16,17 +16,3 @@ export type DfnsBaseApiOptions = {

};
export type CredentialFactor = 'first' | 'second' | 'either';
export type UserActionChallengeResponse = {
supportedCredentialKinds: {
kind: CredentialKind;
factor: CredentialFactor;
requiresSecondFactor: boolean;
}[];
challenge: string;
challengeIdentifier: string;
externalAuthenticationUrl: string;
allowCredentials: {
key: AllowCredential[];
webauthn: AllowCredential[];
};
};
export type UserActionChallengeResponse = UserActionChallenge;
export type SignUserActionChallengeRequest = {

@@ -33,0 +19,0 @@ challengeIdentifier: string;

6

dfnsAuthenticator.js

@@ -10,6 +10,6 @@ "use strict";

async login(request) {
const { challenge, challengeIdentifier, allowCredentials } = await baseAuthApi_1.BaseAuthApi.createUserLoginChallenge(request, this.apiOptions);
const assertion = await this.apiOptions.signer.sign(challenge, allowCredentials);
const challenge = await baseAuthApi_1.BaseAuthApi.createUserLoginChallenge(request, this.apiOptions);
const assertion = await this.apiOptions.signer.sign(challenge);
return baseAuthApi_1.BaseAuthApi.createUserLogin({
challengeIdentifier,
challengeIdentifier: challenge.challengeIdentifier,
firstFactor: assertion,

@@ -16,0 +16,0 @@ }, this.apiOptions);

@@ -6,17 +6,12 @@ export type ArchivePolicyParams = {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Assign";

@@ -34,17 +29,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Modify";

@@ -62,17 +52,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Policies:Modify";

@@ -90,17 +75,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Wallets:Sign";

@@ -111,7 +91,2 @@ rule: {

} | {
kind: "TransactionRecipientWhitelist";
configuration: {
addresses: string[];
};
} | {
kind: "TransactionAmountLimit";

@@ -163,3 +138,3 @@ configuration: {

};
status: "Pending" | "Approved" | "Denied" | "AutoApproved" | "AutoDenied" | "Expired";
status: "Pending" | "Approved" | "Denied" | "AutoApproved" | "Expired";
expirationDate?: string | undefined;

@@ -186,17 +161,12 @@ dateCreated?: string | undefined;

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Assign";

@@ -214,17 +184,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Modify";

@@ -242,17 +207,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Policies:Modify";

@@ -270,17 +230,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Wallets:Sign";

@@ -291,7 +246,2 @@ rule: {

} | {
kind: "TransactionRecipientWhitelist";
configuration: {
addresses: string[];
};
} | {
kind: "TransactionAmountLimit";

@@ -324,17 +274,12 @@ configuration: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Assign";

@@ -352,17 +297,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Modify";

@@ -380,17 +320,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Policies:Modify";

@@ -408,17 +343,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Wallets:Sign";

@@ -429,7 +359,2 @@ rule: {

} | {
kind: "TransactionRecipientWhitelist";
configuration: {
addresses: string[];
};
} | {
kind: "TransactionAmountLimit";

@@ -473,17 +398,12 @@ configuration: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Assign";

@@ -501,17 +421,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Modify";

@@ -529,17 +444,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Policies:Modify";

@@ -557,17 +467,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Wallets:Sign";

@@ -578,7 +483,2 @@ rule: {

} | {
kind: "TransactionRecipientWhitelist";
configuration: {
addresses: string[];
};
} | {
kind: "TransactionAmountLimit";

@@ -627,17 +527,12 @@ configuration: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Assign";

@@ -655,17 +550,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Modify";

@@ -683,17 +573,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Policies:Modify";

@@ -711,17 +596,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Wallets:Sign";

@@ -732,7 +612,2 @@ rule: {

} | {
kind: "TransactionRecipientWhitelist";
configuration: {
addresses: string[];
};
} | {
kind: "TransactionAmountLimit";

@@ -776,3 +651,3 @@ configuration: {

paginationToken?: string | undefined;
status?: ("Pending" | "Approved" | "Denied" | "AutoApproved" | "AutoDenied" | "Expired") | undefined;
status?: ("Pending" | "Approved" | "Denied" | "AutoApproved" | "Expired") | undefined;
triggerStatus?: ("Triggered" | "Skipped") | undefined;

@@ -791,3 +666,3 @@ initiatorId?: string | undefined;

};
status: "Pending" | "Approved" | "Denied" | "AutoApproved" | "AutoDenied" | "Expired";
status: "Pending" | "Approved" | "Denied" | "AutoApproved" | "Expired";
expirationDate?: string | undefined;

@@ -822,17 +697,12 @@ dateCreated?: string | undefined;

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Assign";

@@ -850,17 +720,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Modify";

@@ -878,17 +743,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Policies:Modify";

@@ -906,17 +766,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Wallets:Sign";

@@ -927,7 +782,2 @@ rule: {

} | {
kind: "TransactionRecipientWhitelist";
configuration: {
addresses: string[];
};
} | {
kind: "TransactionAmountLimit";

@@ -976,17 +826,12 @@ configuration: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Assign";

@@ -1004,17 +849,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Modify";

@@ -1032,17 +872,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Policies:Modify";

@@ -1060,17 +895,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Wallets:Sign";

@@ -1081,7 +911,2 @@ rule: {

} | {
kind: "TransactionRecipientWhitelist";
configuration: {
addresses: string[];
};
} | {
kind: "TransactionAmountLimit";

@@ -1128,17 +953,12 @@ configuration: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Assign";

@@ -1156,17 +976,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Modify";

@@ -1184,17 +999,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Policies:Modify";

@@ -1212,17 +1022,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Wallets:Sign";

@@ -1233,7 +1038,2 @@ rule: {

} | {
kind: "TransactionRecipientWhitelist";
configuration: {
addresses: string[];
};
} | {
kind: "TransactionAmountLimit";

@@ -1269,17 +1069,12 @@ configuration: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Assign";

@@ -1297,17 +1092,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Permissions:Modify";

@@ -1325,17 +1115,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Policies:Modify";

@@ -1353,17 +1138,12 @@ rule: {

name: string;
action: {
kind: "RequestApproval";
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
approvalGroups: {
name?: string | undefined;
quorum: number;
approvers: {
[x: string]: {
[x: string]: string[];
};
}[];
autoRejectTimeout?: (number | undefined) | null;
} | {
kind: "Block";
};
};
}[];
autoRejectTimeout?: (number | undefined) | null;
activityKind: "Wallets:Sign";

@@ -1374,7 +1154,2 @@ rule: {

} | {
kind: "TransactionRecipientWhitelist";
configuration: {
addresses: string[];
};
} | {
kind: "TransactionAmountLimit";

@@ -1381,0 +1156,0 @@ configuration: {

{
"name": "@dfns/sdk",
"version": "0.4.0-alpha.1",
"version": "0.4.0-alpha.2",
"dependencies": {

@@ -5,0 +5,0 @@ "buffer": "6.0.3",

@@ -0,1 +1,2 @@

export type CredentialFactor = 'first' | 'second' | 'either';
export type CredentialKind = 'Key' | 'Fido2' | 'Password' | 'Totp' | 'RecoveryKey';

@@ -8,2 +9,21 @@ export type CredentialTransport = 'usb' | 'nfc' | 'ble' | 'internal';

};
export type SupportedCredential = {
kind: CredentialKind;
factor: CredentialFactor;
requiresSecondFactor: boolean;
};
export type UserActionChallenge = {
supportedCredentialKinds: SupportedCredential[];
rp: {
id: string;
name: string;
};
challenge: string;
challengeIdentifier: string;
externalAuthenticationUrl: string;
allowCredentials: {
key: AllowCredential[];
webauthn: AllowCredential[];
};
};
export type KeyAssertion = {

@@ -49,6 +69,3 @@ kind: 'Key';

export interface CredentialSigner<T extends CredentialAssertion = FirstFactorAssertion> {
sign(challenge: string, allowCredentials: {
key: AllowCredential[];
webauthn: AllowCredential[];
}): Promise<T>;
sign(challenge: UserActionChallenge): Promise<T>;
}

@@ -86,3 +86,3 @@ "use strict";

};
const { challenge, challengeIdentifier, allowCredentials } = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
userActionPayload: options.body ?? '',

@@ -93,5 +93,5 @@ userActionHttpMethod: options.method,

}, apiOptions);
const assertion = await apiOptions.signer.sign(challenge, allowCredentials);
const assertion = await apiOptions.signer.sign(challenge);
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge({
challengeIdentifier,
challengeIdentifier: challenge.challengeIdentifier,
firstFactor: assertion,

@@ -98,0 +98,0 @@ }, apiOptions);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc