diff --git a/pages/module-sdk/accounts/encodeValidatorNonce.mdx b/pages/module-sdk/accounts/encodeValidatorNonce.mdx index 10e1694..bc67e1e 100644 --- a/pages/module-sdk/accounts/encodeValidatorNonce.mdx +++ b/pages/module-sdk/accounts/encodeValidatorNonce.mdx @@ -22,9 +22,9 @@ The account object. ### validator -- Type: [`Module`](/module-sdk/glossary/types.mdx#module) +- Type: [`Module | Address`](/module-sdk/glossary/types.mdx#module) -The validator module object. +The validator module object or simply the address of the module. ## Returns diff --git a/pages/module-sdk/modules/smart-sessions/getSessionNonce.mdx b/pages/module-sdk/modules/smart-sessions/getSessionNonce.mdx index 1e32fcd..c4865ac 100644 --- a/pages/module-sdk/modules/smart-sessions/getSessionNonce.mdx +++ b/pages/module-sdk/modules/smart-sessions/getSessionNonce.mdx @@ -28,9 +28,9 @@ The rpc client to use for the chain you want. ### account -- Type: [`Account`](/module-sdk/glossary/types.mdx#account) +- Type: [`Account | Address`](/module-sdk/glossary/types.mdx#account) -The account object. +The account object or simply the account address. ## Returns diff --git a/pages/module-sdk/modules/smart-sessions/isSessionEnabled.mdx b/pages/module-sdk/modules/smart-sessions/isSessionEnabled.mdx index a877ebc..ae7e9dc 100644 --- a/pages/module-sdk/modules/smart-sessions/isSessionEnabled.mdx +++ b/pages/module-sdk/modules/smart-sessions/isSessionEnabled.mdx @@ -28,9 +28,9 @@ The rpc client to use for the chain you want to install the module on. ### account -- Type: [`Account`](/module-sdk/glossary/types.mdx#account) +- Type: [`Account | Address`](/module-sdk/glossary/types.mdx#account) -The account object. +The account object or simply the account address. ## Returns diff --git a/pages/module-sdk/modules/webauthn-validator/getWebAuthnValidator.mdx b/pages/module-sdk/modules/webauthn-validator/getWebAuthnValidator.mdx index 6095b40..ba74a44 100644 --- a/pages/module-sdk/modules/webauthn-validator/getWebAuthnValidator.mdx +++ b/pages/module-sdk/modules/webauthn-validator/getWebAuthnValidator.mdx @@ -16,17 +16,11 @@ const module = getWebAuthnValidator({ ## Parameters -### webAuthnCredential.pubKeyX +### webAuthnCredential.pubKey -- Type: `number` +- Type: `PublicKey | Hex | Uint8Array` -The x-coordinate of the public key. - -### webAuthnCredential.pubKeyY - -- Type: `number` - -The y-coordinate of the public key. +Either the hex string, a `Uint8Array` or the public key object, which consists of `x`, `y` and an optional `prefix`. ### webAuthnCredential.authenticatorId diff --git a/pages/module-sdk/modules/webauthn-validator/getWebauthnValidatorSignature.mdx b/pages/module-sdk/modules/webauthn-validator/getWebauthnValidatorSignature.mdx index 64422b0..269293d 100644 --- a/pages/module-sdk/modules/webauthn-validator/getWebauthnValidatorSignature.mdx +++ b/pages/module-sdk/modules/webauthn-validator/getWebauthnValidatorSignature.mdx @@ -5,49 +5,57 @@ Get the encoded signature for the WebAuthn validator. ## Usage ```typescript copy -const signature = getWebauthnValidatorSignature({ - authenticatorData: '0x123...', - clientDataJSON: '{data:...}', - responseTypeLocation: 0, - r: 10, - s: 5, +const webauthn = { + authenticatorData: toHex('authenticatorData'), + clientDataJSON: 'clientDataHash', + typeIndex: 0, +} + +const signature = { + r: 10n, + s: 5n, +} + +const validatorSignature = getWebauthnValidatorSignature({ + webauthn, + signature, usePrecompiled: true, }) ``` ## Parameters -### authenticatorData +### webauthn.authenticatorData - Type: [`Hex`](https://viem.sh/docs/glossary/types#hex) The authenticator data formatted as a hex string. -### clientDataJSON +### webauthn.clientDataJSON - Type: `string` The JSON object of the client data that was signed. -### responseTypeLocation +### webauthn.typeIndex - Type: `number` The location of the response type in the client data JSON. -### r +### signature.r - Type: `number` The `r` value of the signature. -### s +### signature.s - Type: `number` The `s` value of the signature. -### usePrecompiled +### usePrecompiled (optional) - Type: `boolean`