Skip to content

Commit

Permalink
feat: init 7715
Browse files Browse the repository at this point in the history
  • Loading branch information
kopy-kat committed Oct 14, 2024
1 parent 6aedf16 commit 3c74e72
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export {
decodeSmartSessionSignature,
isSessionEnabled,
hashChainSessions,
getPermissions,
SmartSessionMode,
Session,
SessionEIP712,
Expand Down
1 change: 1 addition & 0 deletions src/module/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export {
decodeSmartSessionSignature,
isSessionEnabled,
hashChainSessions,
getPermissions,
SmartSessionMode,
Session,
SessionEIP712,
Expand Down
1 change: 1 addition & 0 deletions src/module/smart-sessions/policies/erc-7715/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { getPermissions } from './permissions'
27 changes: 27 additions & 0 deletions src/module/smart-sessions/policies/erc-7715/permissions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { ActionData, ERC7739Data, PolicyData } from '../../types'

type ERC7715Permissions = {
type: string
data: any
}

type Policies = {
userOpPolicies: PolicyData[]
erc7739Policies: ERC7739Data
actions: ActionData[]
}

export const getPermissions = ({
permissions,
}: {
permissions: ERC7715Permissions[]
}): Policies => {
return {
userOpPolicies: [],
erc7739Policies: {
allowedERC7739Content: [],
erc1271Policies: [],
},
actions: [],
}
}
1 change: 1 addition & 0 deletions src/module/smart-sessions/policies/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './spending-limits-policy'
export * from './sudo-policy'
export * from './universal-action-policy'
export * from './erc-7715'

0 comments on commit 3c74e72

Please sign in to comment.