Skip to content

Commit

Permalink
feat: release v0.0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
joepegler committed Dec 9, 2024
1 parent 257ae3e commit ecee19b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @biconomy/sdk

## 0.0.16

### Patch Changes

- Add mock attestor and option to include attestors during createAccount

## 0.0.15

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@biconomy/sdk",
"version": "0.0.15",
"version": "0.0.16",
"author": "Biconomy",
"repository": "github:bcnmy/sdk",
"main": "./dist/_cjs/index.js",
Expand Down
11 changes: 9 additions & 2 deletions src/sdk/account/toNexusAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import {

import {
ENTRY_POINT_ADDRESS,
MOCK_ATTESTER_ADDRESS,
RHINESTONE_ATTESTER_ADDRESS,
k1ValidatorAddress as k1ValidatorAddress_,
k1ValidatorFactoryAddress
Expand Down Expand Up @@ -102,6 +103,10 @@ export type ToNexusSmartAccountParameters = {
k1ValidatorAddress?: Address
/** Optional account address override */
accountAddress?: Address
/** Attesters to add to the account */
attesters?: Address[]
/** Optional threshold for the account */
attesterThreshold?: number
} & Prettify<
Pick<
ClientConfig<Transport, Chain, Account, RpcSchema>,
Expand Down Expand Up @@ -174,7 +179,9 @@ export const toNexusAccount = async (
factoryAddress = k1ValidatorFactoryAddress,
k1ValidatorAddress = k1ValidatorAddress_,
key = "nexus account",
name = "Nexus Account"
name = "Nexus Account",
attesters = [RHINESTONE_ATTESTER_ADDRESS, MOCK_ATTESTER_ADDRESS],
attesterThreshold = 1
} = parameters

// @ts-ignore
Expand Down Expand Up @@ -211,7 +218,7 @@ export const toNexusAccount = async (
"function createAccount(address eoaOwner, uint256 index, address[] attesters, uint8 threshold) external returns (address)"
]),
functionName: "createAccount",
args: [signerAddress, index, [RHINESTONE_ATTESTER_ADDRESS], 1]
args: [signerAddress, index, attesters, attesterThreshold]
})

/**
Expand Down
8 changes: 1 addition & 7 deletions src/sdk/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,20 @@ export const TIMEFRAME_POLICY_ADDRESS: Hex =
export const NEXUS_BOOTSTRAP_ADDRESS: Hex =
"0x00000008c901d8871b6F6942De0B5D9cCf3873d3"

export const TEST_ADDRESS_NEXUS_IMPLEMENTATION_ADDRESS: Hex =
"0xB3F84591e997Fc6fe9Cd3b89603Dad28E0445CE0"
export const TEST_ADDRESS_K1_VALIDATOR_FACTORY_ADDRESS: Hex =
"0x704C800D313c6B184228B5b733bBd6BC3EA9832c"
export const TEST_ADDRESS_K1_VALIDATOR_ADDRESS: Hex =
"0xCfa6175DDC2eF918e527b2972D9AB8B149f151b7"

export const MAINNET_ADDRESS_NEXUS_IMPLEMENTATION_ADDRESS: Hex =
"0x000000F5b753Fdd20C5CA2D7c1210b3Ab1EA5903"
export const MAINNET_ADDRESS_K1_VALIDATOR_FACTORY_ADDRESS: Hex =
"0x00000024115AA990F0bAE0B6b0D5B8F68b684cd6"
export const MAINNET_ADDRESS_K1_VALIDATOR_ADDRESS: Hex =
"0x0000002D6DB27c52E3C11c1Cf24072004AC75cBa"

export const nexusImplementationAddress: Hex = isTesting()
? TEST_ADDRESS_NEXUS_IMPLEMENTATION_ADDRESS
: MAINNET_ADDRESS_NEXUS_IMPLEMENTATION_ADDRESS
export const k1ValidatorFactoryAddress: Hex = isTesting()
? TEST_ADDRESS_K1_VALIDATOR_FACTORY_ADDRESS
: MAINNET_ADDRESS_K1_VALIDATOR_FACTORY_ADDRESS

export const k1ValidatorAddress: Hex = isTesting()
? TEST_ADDRESS_K1_VALIDATOR_ADDRESS
: MAINNET_ADDRESS_K1_VALIDATOR_ADDRESS
Expand Down
2 changes: 1 addition & 1 deletion src/test/playground.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ describe.skipIf(!playgroundTrue())("playground", () => {
})

// Skipped because on base sepolia the attestations for smart sessions have not been created yet
test.skip("should test creating and using a session", async () => {
test("should test creating and using a session", async () => {
const sessionsModule = toSmartSessionsValidator({
account: nexusClient.account,
signer: eoaAccount
Expand Down

0 comments on commit ecee19b

Please sign in to comment.