-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #169 from zerodevapp/fix/wallet-permission
Fix/wallet permission
- Loading branch information
Showing
7 changed files
with
86 additions
and
32 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,4 +1,5 @@ | ||
export type { | ||
Permission, | ||
PaymasterServiceCapability, | ||
SendCallsParams, | ||
SendCallsResult, | ||
|
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { OneOf } from "viem" | ||
|
||
/** @internal */ | ||
export type GasLimitPolicy<uint256 = bigint> = { | ||
type: "gas-limit" | ||
data: { | ||
/** Gas limit (in wei). */ | ||
limit: uint256 | ||
} | ||
} | ||
|
||
/** @internal */ | ||
export type RateLimitPolicy = { | ||
type: "rate-limit" | ||
data: { | ||
/** Number of times during each interval. */ | ||
count: number | ||
/** Interval (in seconds). */ | ||
interval: number | ||
} | ||
} | ||
|
||
export type Policy<amount = bigint> = OneOf< | ||
GasLimitPolicy<amount> | RateLimitPolicy | ||
> |
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