Releases: stackup-wallet/userop.js
v0.3.3
v0.3.2
Release notes
This patch release adds 2 changes:
- Fix
verificationGasLimit
typo ineth_estimateUserOperationGas
(verificationGas
is still used as fallback to prevent breaking changes). - Add the ability to override the salt in preset builders so that a single signer can control multiple contract accounts.
Salt override
Below is an example for how to override the salt to generate new contract addresses using the same signing key.
export default async function main() {
const acc = await Presets.Builder.SimpleAccount.init(
new ethers.Wallet(SIGNING_KEY),
RPC_URL,
{ salt: NUMBER }
);
const address = acc.getSender();
console.log(`Address: ${address}`);
}
What's Changed
- Use the same node version range as ethers.js by @hazim-j in #61
- Add optional value to pass salt to presets by @hazim-j in #87
- Bump to v0.3.2 by @hazim-j in #88
- Fix verificationGasLimit typo by @hazim-j in #89
Full Changelog: v0.3.0...v0.3.2
v0.3.0
Release notes
TL;DR:
- Simplify interface for Preset builders and client.
- Add Preset for ZeroDev Kernel.
- Add
BundlerJsonRpcProvider
module. - Add
Constants
module.
Breaking changes
v0.3.0
requires minor updates to how we initialise presets and clients
Presets
If you're using the SimpleAccount preset, you'll need to make the following changes. Common entities such as entryPoint
and simpleAccountFactory
addresses have been moved to a Constants
module.
const simpleAccount = await Presets.Builder.SimpleAccount.init(
signer,
config.rpcUrl,
-- config.entryPoint,
-- config.simpleAccountFactory
);
Presets now also have an optional opts
argument for the init
method. This lets you still use non-canonical values and define a paymaster middleware.
interface IPresetBuilderOpts {
entryPoint?: string;
factory?: string;
paymasterMiddleware?: UserOperationMiddlewareFn;
overrideBundlerRpc?: string;
}
For example, if you want to include a paymaster middleware:
const simpleAccount = await Presets.Builder.SimpleAccount.init(
signer,
config.rpcUrl,
{ paymasterMiddleware }
);
Client
Similarly with clients, the entryPoint is not required when calling init
. It defaults to the canonical entryPoint address and can be overridden in an optional opts
argument.
const client = await Client.init(
config.rpcUrl,
-- config.entryPoint
);
An optional opts
argument can also be passed:
interface IClientOpts {
entryPoint?: string;
overrideBundlerRpc?: string;
}
For example, to override the bundler RPC:
const client = await Client.init(
config.rpcUrl,
{ overrideBundlerRpc }
);
Running into issues?
Check out the resources below:
What's Changed
- Add v0.3.0 updates by @hazim-j in #46
- Bump @typechain/ethers-v5 from 10.2.0 to 10.2.1 by @dependabot in #29
- Bump rimraf from 4.4.1 to 5.0.1 by @dependabot in #37
- Rename Kernel preset and add exec functions by @hazim-j in #49
- Bump eslint from 8.38.0 to 8.41.0 by @dependabot in #40
- Bump typechain from 8.1.1 to 8.2.0 by @dependabot in #41
- Bump @typescript-eslint/eslint-plugin from 5.57.1 to 5.59.8 by @dependabot in #42
- Bump @faker-js/faker from 7.6.0 to 8.0.2 by @dependabot in #44
- Bump typescript from 5.0.4 to 5.1.3 by @dependabot in #47
- Export Constants by @hazim-j in #54
- Bump prettier from 2.8.7 to 2.8.8 by @dependabot in #18
- Bump @types/jest from 29.5.0 to 29.5.2 by @dependabot in #45
- Bump @typescript-eslint/parser from 5.57.1 to 5.59.9 by @dependabot in #50
- Use deterministic Kernel V2 addresses by @hazim-j in #55
- Bump @typescript-eslint/eslint-plugin from 5.59.8 to 5.59.9 by @dependabot in #51
- Bump @typechain/ethers-v5 from 10.2.1 to 11.0.0 by @dependabot in #52
- Bump eslint from 8.41.0 to 8.42.0 by @dependabot in #53
- Remove promiseOrValue from generated types by @hazim-j in #56
- Bump version to 0.3 by @hazim-j in #57
New Contributors
- @dependabot made their first contribution in #29
Full Changelog: v0.2.0...v0.3.0
v0.2.0
Release notes
This release updates the SimpleAccount preset to accept an ethers.Signer
type rather then a raw private key string. This enables better integration with other tools that don't expose private keys.
Breaking changes
If you're using the SimpleAccount preset, you'll need to make the following changes:
const simpleAccount = await Presets.Builder.SimpleAccount.init(
-- config.signingKey,
++ signer,
config.rpcUrl,
config.entryPoint,
config.simpleAccountFactory
);
What's Changed
- Change to require a Signer so that it can be used with external wallets such as metamask by @serinuntius in #25
- Bump minor version to 0.2 by @hazim-j in #27
New Contributors
- @serinuntius made their first contribution in #25
Full Changelog: v0.1.6...v0.2.0
v0.1.6
Release notes
The initial release of userop.js.
What's Changed
- Initial setup by @hazim-j in #1
- Update License section by @hazim-j in #2
- Add UserOperationBuilder class by @hazim-j in #3
- Add client and presets by @hazim-j in #8
- SimpleAccount Preset: accept PM gas values rather then own estimates by @hazim-j in #11
- Remove chainID from pm_sponsorUserOperation middleware by @hazim-j in #12
- Patch export name for middleware presets by @hazim-j in #14
- Update link to userop.js docs by @hazim-j in #15
- Update link to userop.js docs by @hazim-j in #16
- Add dryRun to send opts by @hazim-j in #21
New Contributors
Full Changelog: https://github.com/stackup-wallet/userop.js/commits/v0.1.6