Skip to content

Commit

Permalink
chore: backmerge nexus
Browse files Browse the repository at this point in the history
  • Loading branch information
joepegler committed Sep 16, 2024
2 parents 96a840b + 08365da commit 3d093c9
Show file tree
Hide file tree
Showing 60 changed files with 2,071 additions and 364 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
json-summary-path: ./coverage/coverage-summary.json
json-final-path: "./coverage/coverage-final.json"
vite-config-path: ./tests/vitest.config.ts
vite-config-path: ./test/vitest.config.ts
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload coverage reports to Codecov
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Particle Auth Fix
- E2E tests for session validation modules ([4ad7ea7](https://github.com/bcnmy/biconomy-client-sdk/pull/401/commits/4ad7ea7f8eb6a28854dcce83834b2b7ff9ad3287))
- Added [TSDoc](https://bcnmy.github.io/biconomy-client-sdk) ([638dae](https://github.com/bcnmy/biconomy-client-sdk/pull/401/commits/638daee0ed6924f67c5151a2d0e5a02d32e4bf23))
- Make txs more typesafe and default with valueOrData ([b1e5b5e](https://github.com/bcnmy/biconomy-client-sdk/pull/401/commits/b1e5b5e02ab3a7fb99faa1d45b55e3cbe8d6bc93))
- Added toNexusClient alias ([232472](https://github.com/bcnmy/biconomy-client-sdk/pull/401/commits/232472c788bed0619cf6295ade076b6ec3a9e0f8))
- Added createNexusClient alias ([232472](https://github.com/bcnmy/biconomy-client-sdk/pull/401/commits/232472c788bed0619cf6295ade076b6ec3a9e0f8))
- Improve dx of using paymster to build userOps ([bb54888](https://github.com/bcnmy/biconomy-client-sdk/pull/401/commits/bb548884e76a94a20329e49b18994503de9e3888))
- Add ethers v6 signer support ([9727fd](https://github.com/bcnmy/biconomy-client-sdk/pull/401/commits/9727fd51e47d62904399d17d48f5c9d6b9e591e5))
- Improved dx of using gas payments with erc20 ([741806](https://github.com/bcnmy/biconomy-client-sdk/pull/401/commits/741806da68457eba262e1a49be77fcc24360ba36))
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ bun i
```

```typescript
import { toNexusClient } from "@biconomy/account";
import { createNexusClient } from "@biconomy/account";

const smartAccount = await toNexusClient({
const smartAccount = await createNexusClient({
signer: viemWalletOrEthersSigner,
bundlerUrl: "", // From dashboard.biconomy.io
paymasterUrl: "", // From dashboard.biconomy.io
Expand Down
Binary file modified bun.lockb
Binary file not shown.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
"dev": "bun link && concurrently \"bun run esm:watch\" \"bun run cjs:watch\" \"bun run esm:watch:aliases\" \"bun run cjs:watch:aliases\"",
"build": "bun run clean && bun run build:cjs && bun run build:esm && bun run build:types",
"clean": "rimraf ./dist/_esm ./dist/_cjs ./dist/_types ./dist/tsconfig",
"test": "vitest -c ./packages/tests/vitest.config.ts",
"test": "vitest -c ./packages/test/vitest.config.ts",
"test:watch": "bun run test dev",
"playground": "RUN_PLAYGROUND=true vitest -c ./packages/tests/vitest.config.ts -t=playground",
"playground": "RUN_PLAYGROUND=true vitest -c ./packages/test/vitest.config.ts -t=playground",
"playground:watch": "RUN_PLAYGROUND=true bun run test -t=playground --watch",
"size": "size-limit",
"docs": "typedoc --tsconfig ./tsconfig/tsconfig.esm.json",
Expand Down Expand Up @@ -98,7 +98,7 @@
"execa": "^9.3.1",
"get-port": "^7.1.0",
"gh-pages": "^6.1.1",
"nexus": "git@github.com:bcnmy/nexus.git#b8085a3d688afb9149c129a34b4bb9cefb93ae38",
"nexus": "github:bcnmy/nexus#7f8410d6f8037b698b9dd08e6da9008cbd30418a",
"prool": "^0.0.16",
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.9.0",
Expand Down Expand Up @@ -126,4 +126,4 @@
"dependencies": {
"merkletreejs": "^0.3.11"
}
}
}
27 changes: 27 additions & 0 deletions packages/sdk/__contracts/abi/EIP1271Abi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
export const EIP1271Abi = [
{
type: "function",
name: "eip712Domain",
inputs: [],
outputs: [
{ name: "fields", type: "bytes1", internalType: "bytes1" },
{ name: "name", type: "string", internalType: "string" },
{ name: "version", type: "string", internalType: "string" },
{ name: "chainId", type: "uint256", internalType: "uint256" },
{ name: "verifyingContract", type: "address", internalType: "address" },
{ name: "salt", type: "bytes32", internalType: "bytes32" },
{ name: "extensions", type: "uint256[]", internalType: "uint256[]" }
],
stateMutability: "view"
},
{
type: "function",
name: "isValidSignature",
inputs: [
{ name: "data", type: "bytes32", internalType: "bytes32" },
{ name: "signature", type: "bytes", internalType: "bytes" }
],
outputs: [{ name: "magicValue", type: "bytes4", internalType: "bytes4" }],
stateMutability: "view"
}
] as const
76 changes: 76 additions & 0 deletions packages/sdk/__contracts/abi/K1ValidatorAbi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
export const K1ValidatorAbi = [
{
inputs: [],
name: "InvalidDataLength",
type: "error"
},
{
inputs: [],
name: "ModuleAlreadyInitialized",
Expand Down Expand Up @@ -86,6 +91,35 @@ export const K1ValidatorAbi = [
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address"
},
{
internalType: "bytes32",
name: "hash",
type: "bytes32"
},
{
internalType: "bytes",
name: "signature",
type: "bytes"
}
],
name: "isValidSignatureWithSenderLegacy",
outputs: [
{
internalType: "bytes4",
name: "",
type: "bytes4"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "name",
Expand Down Expand Up @@ -144,6 +178,19 @@ export const K1ValidatorAbi = [
stateMutability: "view",
type: "function"
},
{
inputs: [],
name: "supportsNestedTypedDataSign",
outputs: [
{
internalType: "bytes32",
name: "result",
type: "bytes32"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
Expand All @@ -157,6 +204,35 @@ export const K1ValidatorAbi = [
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "bytes32",
name: "hash",
type: "bytes32"
},
{
internalType: "bytes",
name: "sig",
type: "bytes"
},
{
internalType: "bytes",
name: "data",
type: "bytes"
}
],
name: "validateSignatureWithData",
outputs: [
{
internalType: "bool",
name: "validSig",
type: "bool"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
Expand Down
67 changes: 64 additions & 3 deletions packages/sdk/__contracts/abi/NexusAbi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ export const NexusAbi = [
name: "CanNotRemoveLastValidator",
type: "error"
},
{
inputs: [],
name: "EmergencyTimeLockNotExpired",
type: "error"
},
{
inputs: [],
name: "EnableModeSigError",
Expand Down Expand Up @@ -309,6 +314,25 @@ export const NexusAbi = [
name: "ERC7484RegistryConfigured",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "hook",
type: "address"
},
{
indexed: false,
internalType: "uint256",
name: "timestamp",
type: "uint256"
}
],
name: "EmergencyHookUninstallRequest",
type: "event"
},
{
anonymous: false,
inputs: [
Expand Down Expand Up @@ -544,6 +568,24 @@ export const NexusAbi = [
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "hook",
type: "address"
},
{
internalType: "bytes",
name: "deInitData",
type: "bytes"
}
],
name: "emergencyUninstallHook",
outputs: [],
stateMutability: "payable",
type: "function"
},
{
inputs: [],
name: "entryPoint",
Expand Down Expand Up @@ -878,7 +920,7 @@ export const NexusAbi = [
},
{
internalType: "bytes",
name: "data",
name: "signature",
type: "bytes"
}
],
Expand Down Expand Up @@ -1005,11 +1047,30 @@ export const NexusAbi = [
outputs: [
{
internalType: "bytes32",
name: "result",
name: "",
type: "bytes32"
}
],
stateMutability: "pure",
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "validator",
type: "address"
}
],
name: "supportsNestedTypedDataSignWithValidator",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32"
}
],
stateMutability: "view",
type: "function"
},
{
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/__contracts/abi/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * from "./UniActionPolicyAbi"
export * from "./EntryPointABI"
export * from "./EIP1271Abi"
export * from "./NexusAbi"
export * from "./K1ValidatorAbi"
export * from "./K1ValidatorFactoryAbi"
9 changes: 4 additions & 5 deletions packages/sdk/__contracts/addresses.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// The contents of this folder is auto-generated. Please do not edit as your changes are likely to be overwritten

import type { Hex } from "viem"
export const addresses: Record<string, Hex> = {
Nexus: "0x776d63154D2aa9256D72C420416c930F3B735464",
K1Validator: "0xd98238BBAeA4f91683d250003799EAd31d7F5c55",
K1ValidatorFactory: "0x8025afaD10209b8bEF3A3C94684AaE4D309c9996",
export const addresses = {
Nexus: "0x21f4C007C9f091B93B7C1C6911E13ACcd3DAd403",
K1Validator: "0x6854688d3D9A87a33Addd5f4deB5cea1B97fa5b7",
K1ValidatorFactory: "0x976869CF9c5Dd5046b41963EF1bBcE62b5366869",
UniActionPolicy: "0x28120dC008C36d95DE5fa0603526f219c1Ba80f6"
} as const
export default addresses
Loading

0 comments on commit 3d093c9

Please sign in to comment.