Skip to content

Commit

Permalink
fix: update module-sdk docs to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
kopy-kat committed Jan 14, 2025
1 parent 15719e9 commit 9dc80af
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 27 deletions.
4 changes: 2 additions & 2 deletions pages/module-sdk/accounts/encodeValidatorNonce.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions pages/module-sdk/modules/smart-sessions/getSessionNonce.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions pages/module-sdk/modules/smart-sessions/isSessionEnabled.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down

0 comments on commit 9dc80af

Please sign in to comment.