Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/TorusUtilsExtraParams.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
export interface TorusUtilsExtraParams {
nonce?: string; // farcaster

message?: string; // farcaster

export interface TorusUtilsPasskeyExtraParams {
signature?: string; // farcaster, passkey, webauthn

clientDataJson?: string; // passkey, webauthn
Expand All @@ -16,6 +12,13 @@ export interface TorusUtilsExtraParams {
rpOrigin?: string; // passkey, webauthn

rpId?: string; // passkey, webauthn
}
export interface TorusUtilsExtraParams extends TorusUtilsPasskeyExtraParams {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just question,
can we use just add TorusUtilsPasskeyExtraParams as a field in TorusUtilsExtraParams ?

Suggested change
export interface TorusUtilsExtraParams extends TorusUtilsPasskeyExtraParams {
export interface TorusUtilsExtraParams {
passkeyParams: TorusUtilsPasskeyExtraParams

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a good idea, we can do it in next breaking version. This change is not related to passkey linking. These are params for existing passkey/webauthn verifiers. I just divided it in seperate interface. We can do the change you are suggesting in next breaking version.

nonce?: string; // farcaster

message?: string; // farcaster

signature?: string; // farcaster, passkey, webauthn

session_token_exp_second?: number;

Expand Down
5 changes: 5 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ export const JRPC_METHODS = {
COMMITMENT_REQUEST: "CommitmentRequest",
IMPORT_SHARES: "ImportShares",
GET_SHARE_OR_KEY_ASSIGN: "GetShareOrKeyAssign",
RETRIEVE_SHARES_WITH_LINKED_PASSKEY: "RetrieveSharesWithLinkedPasskey",
GENERATE_AUTH_MESSAGE: "GenerateAuthMessage",
LINK_PASSKEY: "LinkPasskey",
UNLINK_PASSKEY: "UnlinkPasskey",
GET_LINKED_PASSKEYS: "GetLinkedPasskeys",
};

export const SAPPHIRE_METADATA_URL = "https://node-1.node.web3auth.io/metadata";
Expand Down
1 change: 1 addition & 0 deletions src/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export * from "./keyUtils";
export * from "./langrangeInterpolatePoly";
export * from "./metadataUtils";
export * from "./nodeUtils";
export * from "./passkeyConnectorUtils";
export * from "./tssPubKeyUtils";
Loading
Loading