Skip to content

Commit

Permalink
docs: sign user op hash doc and fix navigation links in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
denniswon committed Dec 1, 2023
1 parent ea6a9bf commit 1fc4495
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 13 deletions.
6 changes: 5 additions & 1 deletion site/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,10 @@ export default defineConfig({
text: "signTypedDataWith6492",
link: "/signTypedDataWith6492",
},
{
text: "signUserOperationHash",
link: "/signUserOperationHash",
},
],
},
{
Expand Down Expand Up @@ -681,7 +685,7 @@ export default defineConfig({
{ text: "getAddress", link: "/getAddress" },
{ text: "signMessage", link: "/signMessage" },
{ text: "signTypedData", link: "/signTypedData" },
{ text: "getAuthDetails", link: "/getDgetAuthDetailsetails" },
{ text: "getAuthDetails", link: "/getAuthDetails" },
],
},
{ text: "Contributing", link: "/contributing" },
Expand Down
2 changes: 1 addition & 1 deletion site/packages/aa-accounts/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ head:
- property: og:description
content: How to add your own Account Implementation to aa-accounts
next:
text: aa-ethers
text: aa-signers
---

# Contributing to `aa-accounts`
Expand Down
2 changes: 0 additions & 2 deletions site/packages/aa-alchemy/middleware/withAlchemyGasManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ head:
- - meta
- property: og:description
content: Overview of the withAlchemyGasManager method in aa-alchemy
next:
text: Utils
---

# withAlchemyGasManager
Expand Down
2 changes: 2 additions & 0 deletions site/packages/aa-alchemy/provider/withAlchemyEnhancedApis.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ head:
- - meta
- property: og:description
content: Overview of the withAlchemyEnhancedApis method on Alchemy Provider in aa-alchemy
next:
text: Middleware
---

# withAlchemyEnhancedApis
Expand Down
2 changes: 0 additions & 2 deletions site/packages/aa-alchemy/provider/withAlchemyGasManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ head:
- - meta
- property: og:description
content: Overview of the withAlchemyGasManager method on Alchemy Provider in aa-alchemy
next:
text: Middleware
---

# withAlchemyGasManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ head:
- - meta
- property: og:description
content: Overview of the withAlchemyUserOpSimulation method on Alchemy Provider in aa-alchemy
next:
text: Middleware
---

# withAlchemyUserOpSimulation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ head:
- - meta
- property: og:description
content: Overview of the signTypedDataWith6492 method on BaseSmartContractAccount
next:
text: Other Methods
---

# signTypedDataWith6492
Expand Down
49 changes: 49 additions & 0 deletions site/packages/aa-core/accounts/optional/signUserOperationHash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
outline: deep
head:
- - meta
- property: og:title
content: signUserOperationHash
- - meta
- name: description
content: Overview of the signUserOperationHash method on BaseSmartContractAccount
- - meta
- property: og:description
content: Overview of the signUserOperationHash method on BaseSmartContractAccount
next:
text: Other Methods
---

# signUserOperationHash

If your account handles [ERC-1271 signatures](https://eips.ethereum.org/EIPS/eip-1271) of `personal_sign` differently than it does user operations, you can implement your additional way to sign the user operation.

**Note**: This method is already implemented on `BaseSmartContractAccount` defaulting to using the [`signMessage`](/packages/aa-core/accounts/required/signMessage.md) method. So any class that extends and implements `BaseSmartContractAccount` may call this method.

## Usage

::: code-group

```ts [example.ts]
import { provider } from "./provider";
// [!code focus:99]
const signature = await provider.account.signUserOperationHash(
`<SOME_UO_HASH>`
);
```

<<< @/snippets/provider.ts

:::

## Returns

### `Promise<Hash>`

The signature of the UserOperation

## Parameters

### `uoHash: Hash`

The hash of the UserOperation to sign
3 changes: 1 addition & 2 deletions site/packages/aa-core/provider/extend.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ head:
- - meta
- property: og:description
content: Overview of the extend method on ISmartAccountProvider
next:
text: SmartContractAccount
next: Types
---

# extend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ head:
- - meta
- property: og:description
content: Overview of the UserOperationOverrides type in aa-core types
next:
text: SmartContractAccount
---

# UserOperationOverrides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ head:
- - meta
- property: og:description
content: Overview of the convertEthersSignerToAccountSigner method in aa-ethers
next:
text: Glossary
---

# Utils
Expand Down
2 changes: 2 additions & 0 deletions site/packages/aa-signers/magic/getAuthDetails.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ head:
- - meta
- property: og:description
content: Overview of the getAuthDetails method on MagicSigner
next:
text: Web3auth
---

# getAuthDetails
Expand Down
2 changes: 1 addition & 1 deletion site/packages/aa-signers/web3auth/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ head:
content: Overview of the Web3AuthSigner class in aa-signers
---

# web3auth Signer
# Web3auth Signer

`Web3AuthSigner` is a signer implementation which extends `SmartAccountAuthenticator` to leverage the [web3auth web modal SDK](https://web3auth.io/docs/sdk/pnp/web/modal). It supports features such as authentication, message and typed data signing, and authentication details retrieval.

Expand Down

0 comments on commit 1fc4495

Please sign in to comment.