Skip to content

Version Packages #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 2, 2024
Merged
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
5 changes: 0 additions & 5 deletions .changeset/metal-ravens-mate.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/proud-rings-march.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/stale-roses-compare.md

This file was deleted.

8 changes: 8 additions & 0 deletions packages/permissionless/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# permissionless

## 0.2.4

### Patch Changes

- 7d4602c831430744916dda33983be0583d9b0662: Added utility functions to encode 7579 function calldata
- d23ee0d5b530134756ea098f6233910f79cba83e: Added support to send calls with 7579 functions and override paymaster props
- d23ee0d5b530134756ea098f6233910f79cba83e: Added support for initData & deInitData

## 0.2.3

### Patch Changes
Expand Down
64 changes: 46 additions & 18 deletions packages/permissionless/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,33 @@

![Node Version](https://img.shields.io/badge/node-20.x-green)

permissionless.js is a TypeScript library built on top of [viem](https://viem.sh) for deploying and managing [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337) smart accounts, interacting with bundlers and paymasters, and leveraging custom signers.
permissionless.js is a TypeScript library built on top of
[viem](https://viem.sh) for deploying and managing
[ERC-4337](https://eips.ethereum.org/EIPS/eip-4337) smart accounts, interacting
with bundlers and paymasters, and leveraging custom signers.

## Features

- **High-Level Smart Account Support**: We support a high-level API for deploying and managing smart accounts, including some of the most popular implementations ([Safe](https://safe.global), [Kernel](https://zerodev.app), [Biconomy](https://biconomy.io), etc.)
- **Bundler Support**: We support all bundler actions following [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace).
- **Gas Sponsorship**: We support paymaster actions to allow you to easily sponsor gas fees.
- **User Operation Utility Functions**: We provide many low-level utility functions useful for dealing with User Operations.
- **Modular and Extensible**: We allow you to easily create and plug in your own smart account systems, bundlers, paymasters, and signers.
- **Built on & for viem**: permissionless.js is designed to be a thin wrapper around viem, maintaining the same style and overall feel viem provides.
- **High-Level Smart Account Support**: We support a high-level API for
deploying and managing smart accounts, including some of the most popular
implementations ([Safe](https://safe.global), [Kernel](https://zerodev.app),
[Biconomy](https://biconomy.io), etc.)
- **Bundler Support**: We support all bundler actions following
[ERC-4337](https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace).
- **Gas Sponsorship**: We support paymaster actions to allow you to easily
sponsor gas fees.
- **User Operation Utility Functions**: We provide many low-level utility
functions useful for dealing with User Operations.
- **Modular and Extensible**: We allow you to easily create and plug in your own
smart account systems, bundlers, paymasters, and signers.
- **Built on & for viem**: permissionless.js is designed to be a thin wrapper
around viem, maintaining the same style and overall feel viem provides.
- and a lot more...

## Documentation

[Take a look at our documentation](https://docs.pimlico.io/permissionless) to learn more about permissionless.js.
[Take a look at our documentation](https://docs.pimlico.io/permissionless) to
learn more about permissionless.js.

## Installation

Expand All @@ -42,27 +54,43 @@ yarn add viem permissionless

```typescript
// Import the required modules.
import { createBundlerClient } from "permissionless"
import { sepolia } from "viem/chains"
import { http } from "viem"
import { createSmartAccountClient } from "permissionless";
import { createPaymasterClient } from "viem/account-abstraction";
import { sepolia } from "viem/chains";
import { http } from "viem";

// Create the required clients.
const bundlerClient = createBundlerClient({
chain: sepolia,
transport: http(`https://api.pimlico.io/v1/sepolia/rpc?apikey=${pimlicoApiKey}`) // Use any bundler url
const paymaster = createPaymasterClient({
transport: http(`https://api.pimlico.io/v2/sepolia/rpc?apikey=${pimlicoApiKey}`)
})

const account = toSimpleSmartAccount<entryPointVersion>({
client: getPublicClient(anvilRpc),
owner: privateKeyToAccount(generatePrivateKey())
})

// Create the required clients.
const bundlerClient = createSmartAccountClient({
account,
paymaster:
chain: sepolia,
bundlerTransport: http(
`https://api.pimlico.io/v2/sepolia/rpc?apikey=${pimlicoApiKey}`,
), // Use any bundler url
});

// Consume bundler, paymaster, and smart account actions!
const userOperationReceipt = await bundlerClient.getUserOperationReceipt({
hash: "0x5faea6a3af76292c2b23468bbea96ef63fb31360848be195748437f0a79106c8"
})
hash: "0x5faea6a3af76292c2b23468bbea96ef63fb31360848be195748437f0a79106c8",
});
```

## Contributors

For a full explanation of permissionless.js, please visit our [docs page](https://docs.pimlico.io/permissionless)
For a full explanation of permissionless.js, please visit our
[docs page](https://docs.pimlico.io/permissionless)

Build permissionless.js locally with:

```bash
bun run build
```
Expand Down
2 changes: 1 addition & 1 deletion packages/permissionless/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "permissionless",
"version": "0.2.3",
"version": "0.2.4",
"author": "Pimlico",
"homepage": "https://docs.pimlico.io/permissionless",
"repository": "github:pimlicolabs/permissionless.js",
Expand Down