-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable gas estimation and paymaster of user-op builder service for up…
…dated smart-session module (#705) * add getDummySignature impl * chore:run prettier * update @biconomy/permission-context-builder deps * use chain specific module address * add base-sepolia to supported chains data * chores: run prettier * update @rhinestone/module-kit deps * use SMART_SESSION_ADDRESS from module-sdk * impl ContextBuilderUtil using module-sdk * enable safeSmartAccount on sepolia and baseSepolia * added smart-session support on base-sepolia * attest and install modules in single userOp * chores: run prettier * update co-signer handling and url * chores: move constants to single source * return smartAccount on allowed chains * display smartAccount on requested chains only * chores:run prettier
- Loading branch information
1 parent
c062f18
commit 49eaccd
Showing
24 changed files
with
1,140 additions
and
615 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,82 @@ | ||
import { Address } from 'viem' | ||
|
||
/** | ||
* EIP7715Method | ||
*/ | ||
export const EIP7715_METHOD = { | ||
WALLET_GRANT_PERMISSIONS: 'wallet_grantPermissions' | ||
} | ||
|
||
// `data` is not necessary for this signer type as the wallet is both the signer and grantor of these permissions | ||
export type WalletSigner = { | ||
type: 'wallet' | ||
data: {} | ||
} | ||
|
||
// A signer representing a single key. | ||
// `id` is a did:key identifier and can therefore represent both Secp256k1 or Secp256r1 keys, among other key types. | ||
export type KeySigner = { | ||
type: 'key' | ||
data: { | ||
id: string | ||
} | ||
} | ||
|
||
// A signer representing a multisig signer. | ||
// Each element of `ids` is a did:key identifier just like the `key` signer. | ||
export type MultiKeySigner = { | ||
type: 'keys' | ||
data: { | ||
ids: string[] | ||
address?: Address | ||
} | ||
} | ||
|
||
// An account that can be granted with permissions as in ERC-7710. | ||
export type AccountSigner = { | ||
type: 'account' | ||
data: { | ||
id: `0x${string}` | ||
} | ||
} | ||
|
||
export enum SignerType { | ||
EOA, | ||
PASSKEY | ||
} | ||
|
||
export type Signer = { | ||
type: SignerType | ||
data: string | ||
} | ||
|
||
export type Permission = { | ||
type: PermissionType | ||
policies: Policy[] | ||
required: boolean | ||
data: any | ||
} | ||
export type Policy = { | ||
type: PolicyType | ||
data: any | ||
} | ||
export type PermissionType = | ||
| 'native-token-transfer' | ||
| 'erc20-token-transfer' | ||
| 'erc721-token-transfer' | ||
| 'erc1155-token-transfer' | ||
| { | ||
custom: any | ||
} | ||
export type PolicyType = | ||
| 'gas-limit' | ||
| 'call-limit' | ||
| 'rate-limit' | ||
| 'spent-limit' | ||
| 'value-limit' | ||
| 'time-frame' | ||
| 'uni-action' | ||
| 'simpler-signer' | ||
| { | ||
custom: any | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.