Skip to content

Commit

Permalink
chore: release (#133)
Browse files Browse the repository at this point in the history
Co-authored-by: livingrockrises <[email protected]>
Co-authored-by: Vasile Gabriel Marian <[email protected]>
Co-authored-by: VGabriel45 <[email protected]>
  • Loading branch information
4 people authored Nov 25, 2024
1 parent b3f71e0 commit 16d7451
Show file tree
Hide file tree
Showing 120 changed files with 5,386 additions and 5,367 deletions.
8 changes: 4 additions & 4 deletions .size-limit.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
{
"name": "core (esm)",
"path": "./dist/_esm/index.js",
"limit": "30 kB",
"limit": "50 kB",
"import": "*",
"ignore": ["node:fs", "fs", "path", "os", "crypto"]
},
{
"name": "core (cjs)",
"path": "./dist/_cjs/index.js",
"limit": "50 kB",
"limit": "80 kB",
"ignore": ["node:fs", "fs", "path", "os", "crypto"]
},
{
"name": "bundler (tree-shaking)",
"path": "./dist/_esm/clients/createBicoBundlerClient.js",
"limit": "20 kB",
"limit": "30 kB",
"import": "{ createBicoBundlerClient }",
"ignore": ["node:fs", "fs", "path", "os", "crypto"]
},
{
"name": "paymaster (tree-shaking)",
"path": "./dist/_esm/clients/createBicoPaymasterClient.js",
"limit": "20 kB",
"limit": "30 kB",
"import": "{ createBicoPaymasterClient }",
"ignore": ["node:fs", "fs", "path", "os", "crypto"]
}
Expand Down
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
# @biconomy/sdk

## 0.0.10

### Patch Changes

- Added Distributed Session Keys w/ Ownable & Session examples

## 0.0.9

### Patch Changes

- Added DAN helpers, keyGen + sigGen

## 0.0.8

### Patch Changes

- Paymaster script fix

## 0.0.7

### Patch Changes

- Include missing deps

## 0.0.5

### Patch Changes

- Alter sessions terminology

## 0.0.4

### Patch Changes

- renamed validator modules

## 0.0.3

### Patch Changes

- modules dx improvements

## 0.0.0
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The Biconomy SDK is your all-in-one toolkit for building decentralized applicati
1. **Add the package and install dependencies:**

```bash
bun add @biconomy/sdk viem
bun add @biconomy/sdk viem @rhinestone/module-sdk
```

2. **Install dependencies:**
Expand All @@ -41,22 +41,17 @@ bun i

```typescript
import { createNexusClient } from "@biconomy/sdk";
import { http, publicClient } from "viem";

const publicClient = createPublicClient({
chain: mainnet,
transport: http(),
});
import { http } from "viem";

const nexusClient = await createNexusClient({
holder: account,
signer: account,
chain,
transport: http(),
bundlerTransport: http(bundlerUrl),
});

const hash = await nexusClient.sendTransaction({ calls: [to: "0x...", value: 1] });
const { status, transactionHash } = await publicClient.waitForTransactionReceipt({ hash });
const { status, transactionHash } = await nexusClient.waitForTransactionReceipt({ hash });

```

Expand Down
Binary file modified bun.lockb
Binary file not shown.
123 changes: 62 additions & 61 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,49 @@
{
"type": "module",
"main": "./dist/_cjs/index.js",
"module": "./dist/_esm/index.js",
"types": "./dist/_types/index.d.ts",
"typings": "./dist/_types/index.d.ts",
"homepage": "https://biconomy.io",
"sideEffects": false,
"name": "@biconomy/sdk",
"version": "0.0.10",
"author": "Biconomy",
"version": "0.0.0",
"description": "SDK for Biconomy integration with support for account abstraction, smart accounts, ERC-4337.",
"keywords": [
"erc-7579",
"modular smart account",
"account abstraction",
"biconomy",
"sdk"
],
"license": "MIT",
"repository": "github:bcnmy/sdk",
"main": "./dist/_cjs/index.js",
"module": "./dist/_esm/index.js",
"devDependencies": {
"@biomejs/biome": "1.6.0",
"@changesets/cli": "^2.27.1",
"@commitlint/cli": "^19.4.1",
"@commitlint/config-conventional": "^19.4.1",
"@ethersproject/abi": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@ethersproject/wallet": "^5.7.0",
"@pimlico/alto": "^0.0.4",
"@size-limit/esbuild-why": "^11",
"@size-limit/preset-small-lib": "^11",
"@types/bun": "latest",
"@types/yargs": "^17.0.33",
"@vitest/coverage-v8": "^1.3.1",
"buffer": "^6.0.3",
"concurrently": "^8.2.2",
"dotenv": "^16.4.5",
"ethers": "^6.13.2",
"execa": "^9.3.1",
"get-port": "^7.1.0",
"gh-pages": "^6.1.1",
"nexus": "github:bcnmy/nexus#773943fb7bf6cd14a0dc6dcb9f513db53213d1d5",
"prool": "^0.0.16",
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.9.0",
"size-limit": "^11.1.5",
"ts-node": "^10.9.2",
"tsc-alias": "^1.8.8",
"tslib": "^2.6.3",
"typedoc": "^0.25.9",
"viem": "2.21.6",
"vitest": "^1.3.1",
"yargs": "^17.7.2"
},
"peerDependencies": {
"typescript": "^5",
"viem": "^2.20.0",
"@rhinestone/module-sdk": "^0.1.25"
},
"exports": {
".": {
"types": "./dist/_types/index.d.ts",
Expand Down Expand Up @@ -46,10 +71,25 @@
"default": "./_cjs/modules/index.js"
}
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"description": "SDK for Biconomy integration with support for account abstraction, smart accounts, ERC-4337.",
"files": [
"dist/*",
"README.md"
],
"homepage": "https://biconomy.io",
"keywords": [
"erc-7579",
"modular smart account",
"account abstraction",
"biconomy",
"sdk"
],
"license": "MIT",
"scripts": {
"format": "biome format . --write",
"lint": "biome check .",
Expand Down Expand Up @@ -78,54 +118,15 @@
"fetch:deployment": "bun run ./scripts/fetch:deployment.ts && bun run lint --apply-unsafe",
"fetch:deployment:raw": "bun run ./scripts/fetch:deployment.ts"
},
"devDependencies": {
"@biomejs/biome": "1.6.0",
"@changesets/cli": "^2.27.1",
"@commitlint/cli": "^19.4.1",
"@commitlint/config-conventional": "^19.4.1",
"@ethersproject/abi": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@ethersproject/wallet": "^5.7.0",
"@pimlico/alto": "^0.0.4",
"@size-limit/esbuild-why": "^11",
"@size-limit/preset-small-lib": "^11",
"@types/bun": "latest",
"@types/yargs": "^17.0.33",
"@vitest/coverage-v8": "^1.3.1",
"buffer": "^6.0.3",
"concurrently": "^8.2.2",
"dotenv": "^16.4.5",
"ethers": "^6.13.2",
"execa": "^9.3.1",
"get-port": "^7.1.0",
"gh-pages": "^6.1.1",
"nexus": "github:bcnmy/nexus#87fc1ed2e9e91cd35ec2c9b2e5c40d311fcb28bb",
"prool": "^0.0.16",
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.9.0",
"size-limit": "^11.1.5",
"ts-node": "^10.9.2",
"tsc-alias": "^1.8.8",
"tslib": "^2.6.3",
"typedoc": "^0.25.9",
"viem": "2.21.6",
"vitest": "^1.3.1",
"yargs": "^17.7.2"
},
"peerDependencies": {
"typescript": "^5",
"viem": "^2.20.0"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"sideEffects": false,
"simple-git-hooks": {
"pre-commit": "bun run format && bun run lint:fix",
"commit-msg": "npx --no -- commitlint --edit ${1}"
},
"type": "module",
"types": "./dist/_types/index.d.ts",
"typings": "./dist/_types/index.d.ts",
"dependencies": {
"@rhinestone/module-sdk": "^0.1.17"
"@silencelaboratories/walletprovider-sdk": "^0.3.0"
}
}
2 changes: 1 addition & 1 deletion scripts/fetch:deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type FetchDetails = {
}
const {
nexusDeploymentPath = "../node_modules/nexus/deployments",
chainName = "anvil-50981",
chainName = "anvil-51502",
forSrc = ["K1ValidatorFactory", "Nexus", "K1Validator"]
} = yargs(hideBin(process.argv)).argv as unknown as FetchDetails

Expand Down
39 changes: 22 additions & 17 deletions scripts/send:userOp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ import { biconomyPaymasterContext } from "../src/sdk/clients/createBicoPaymaster

config()

const k1ValidatorAddress = "0x663E709f60477f07885230E213b8149a7027239B"
const factoryAddress = "0x887Ca6FaFD62737D0E79A2b8Da41f0B15A864778"

export const getConfig = () => {
const chainId = Number.parseInt(process.env.CHAIN_ID || "0")
const chain = getChain(chainId)
Expand Down Expand Up @@ -43,11 +40,17 @@ const main = async () => {
const nexusAccount = await toNexusAccount({
signer: account,
chain,
transport: http(),
k1ValidatorAddress,
factoryAddress
transport: http()
})

const nexusBalance = await publicClient.getBalance({
address: nexusAccount.address
})

if (nexusBalance === 0n) {
throw new Error(`Insufficient balance at address: ${nexusAccount.address}`)
}

const bicoBundler = createBicoBundlerClient({
chain,
bundlerUrl,
Expand All @@ -74,28 +77,30 @@ const main = async () => {
bicoBundler.getChainId(),
bicoBundler.getSupportedEntryPoints(),
bicoBundler.prepareUserOperation({
sender: account.address,
nonce: 0n,
data: "0x",
signature: "0x",
verificationGasLimit: 1n,
preVerificationGas: 1n,
callData: "0x",
callGasLimit: 1n,
maxFeePerGas: 1n,
maxPriorityFeePerGas: 1n,
calls: [
{
to: recipient,
value: 1n
}
],
account: nexusAccount
})
])
console.timeEnd("read methods")

const successCount = results.filter((result) => result.status === "fulfilled")
const failures = results.filter((result) => result.status === "rejected")
console.log(
`running the ${usesAltoBundler ? "Alto" : "Bico"} bundler with ${
successCount.length
} successful calls`
} successful calls and ${results.length - successCount.length} failed calls`
)

if (failures.length > 0) {
console.log({ failures })
process.exit(1)
}

console.time("write methods")
const hash = await bicoBundler.sendUserOperation({
calls: [
Expand Down
Loading

0 comments on commit 16d7451

Please sign in to comment.