Skip to main contentDefined in: types.ts:382
Methods
addDelegatee()
addDelegatee(params, overrides?): Promise<{ txHash: string; }>
Defined in: types.ts:412
Add a new delegatee to an app
Parameters
params
AddDelegateeParams
overrides?
Overrides
Returns
Promise<{ txHash: string; }>
The hash of the transaction that added the new delegatee
deleteApp()
deleteApp(params, overrides?): Promise<{ txHash: string; }>
Defined in: types.ts:434
Delete an application by setting its isDeleted flag to true
Parameters
params
DeleteAppParams
overrides?
Overrides
Returns
Promise<{ txHash: string; }>
The hash of the transaction that marked the app deleted
enableAppVersion()
enableAppVersion(params, overrides?): Promise<{ txHash: string; }>
Defined in: types.ts:403
Enable or disable a specific app version
Parameters
params
EnableAppVersionParams
overrides?
Overrides
Returns
Promise<{ txHash: string; }>
The hash of the transaction that set the app enabled state
getAllAbilitiesAndPoliciesForApp()
getAllAbilitiesAndPoliciesForApp(params): Promise<PermissionData>
Defined in: types.ts:546
Get all permitted abilities, policies, and policy parameters for a specific app and PKP in a nested object structure
Parameters
params
GetAllAbilitiesAndPoliciesForAppParams
Returns
Promise<PermissionData>
Nested object structure where keys are ability IPFS CIDs and values are objects with policy IPFS CIDs as keys
getAllPermittedAppIdsForPkp()
getAllPermittedAppIdsForPkp(params): Promise<number[]>
Defined in: types.ts:532
Get all app IDs that have permissions for a specific PKP token, including deleted apps
Parameters
params
GetAllPermittedAppIdsForPkpParams
Returns
Promise<number[]>
Array of app IDs that have permissions for the PKP token (including deleted apps)
Deprecated
Use getPermittedAppsForPkps instead
getAllRegisteredAgentPkpEthAddresses()
getAllRegisteredAgentPkpEthAddresses(params): Promise<string[]>
Defined in: types.ts:515
Get all PKP tokens that are registered as agents for a specific user address
Parameters
params
GetAllRegisteredAgentPkpsParams
Returns
Promise<string[]>
Array of PKP eth addresses that are registered as agents for the user. Empty array if none found.
getAppByDelegateeAddress()
getAppByDelegateeAddress(params): Promise<null | App>
Defined in: types.ts:472
Get the app associated with a delegatee address
Parameters
params
GetAppByDelegateeParams
Returns
Promise<null | App>
Detailed view of the app the delegatee is associated with
getAppById()
getAppById(params): Promise<null | App>
Defined in: types.ts:446
Get detailed information about an app by its ID
Parameters
params
GetAppByIdParams
Returns
Promise<null | App>
Detailed view of the app containing its metadata and relationships, or null if the app is not registered
getAppIdByDelegatee()
getAppIdByDelegatee(params): Promise<null | number>
Defined in: types.ts:452
Get the app ID for a specific delegatee address
Parameters
params
GetAppIdByDelegateeParams
Returns
Promise<null | number>
The app ID for the specified delegatee address
getAppsByManagerAddress()
getAppsByManagerAddress(params): Promise<object[]>
Defined in: types.ts:464
Get all apps managed by a specific address with all their versions
Parameters
params
GetAppsByManagerParams
Returns
Promise<object[]>
Array of apps with all their versions managed by the specified address
getAppVersion()
getAppVersion(params): Promise<null | { appVersion: AppVersion; }>
Defined in: types.ts:458
Get detailed information about a specific version of an app
Parameters
params
GetAppVersionParams
Returns
Promise<null | { appVersion: AppVersion; }>
Object containing basic app information and version-specific information including abilities and policies, or null if the app version is not registered
getDelegatedPkpEthAddresses()
getDelegatedPkpEthAddresses(params): Promise<string[]>
Defined in: types.ts:484
Get delegated agent PKP token IDs for a specific app version with pagination
Returns the first 100 PKP eth addresses.
Provide offset to fetch paginated results.
Parameters
params
GetDelegatedPkpEthAddressesParams
Returns
Promise<string[]>
Array of delegated agent PKP token IDs
getLastPermittedAppVersionForPkp()
getLastPermittedAppVersionForPkp(params): Promise<null | number>
Defined in: types.ts:576
Get the last permitted version for a specific app and PKP
Parameters
params
GetLastPermittedAppVersionParams
Returns
Promise<null | number>
The last permitted app version, or null if never permitted
getPermittedAppsForPkps()
getPermittedAppsForPkps(params): Promise<PkpPermittedApps[]>
Defined in: types.ts:540
Get permitted apps for multiple PKPs with detailed information including versions and enabled status
Parameters
params
GetPermittedAppsForPkpsParams
Returns
Promise<PkpPermittedApps[]>
Array of PkpPermittedApps containing permitted app details for each PKP
getPermittedAppVersionForPkp()
getPermittedAppVersionForPkp(params): Promise<null | number>
Defined in: types.ts:523
Get the permitted app version for a specific PKP token and app, even if the app has been deleted
Parameters
params
GetPermittedAppVersionForPkpParams
Returns
Promise<null | number>
The permitted app version for the PKP token and app
getUnpermittedAppsForPkps()
getUnpermittedAppsForPkps(params): Promise<PkpUnpermittedApps[]>
Defined in: types.ts:584
Get unpermitted apps for multiple PKPs with their last permitted versions
Parameters
params
GetUnpermittedAppsForPkpsParams
Returns
Promise<PkpUnpermittedApps[]>
Array of PkpUnpermittedApps containing unpermitted app details for each PKP
isDelegateePermitted()
isDelegateePermitted(params): Promise<boolean>
Defined in: types.ts:562
Check if a delegatee is permitted to execute an ability with a PKP
Parameters
params
IsDelegateePermittedParams
Returns
Promise<boolean>
Boolean indicating whether the delegatee has permission
permitApp()
permitApp(params, overrides?): Promise<{ txHash: string; }>
Defined in: types.ts:492
Permits an app version for an Agent Wallet PKP token and optionally sets ability policy parameters
Parameters
params
PermitAppParams
overrides?
Overrides
Returns
Promise<{ txHash: string; }>
The transaction hash that permitted the app
registerApp()
registerApp(params, overrides?): Promise<{ txHash: string; }>
Defined in: types.ts:387
Registers a new app with its initial appVersion (v1)‘s permissions
Parameters
params
RegisterAppParams
overrides?
Overrides
Returns
Promise<{ txHash: string; }>
- The hash of the transaction that registered the app
registerNextVersion()
registerNextVersion(params, overrides?): Promise<{ newAppVersion: number; txHash: string; }>
Defined in: types.ts:394
Register a new version on an existing application
Parameters
params
RegisterNextVersionParams
overrides?
Overrides
Returns
Promise<{ newAppVersion: number; txHash: string; }>
The transaction hash and the new app version incremented on-chain.
Throws
- If for some reason the new app creation event is not found after a successful transaction, this method will throw an error.
removeDelegatee()
removeDelegatee(params, overrides?): Promise<{ txHash: string; }>
Defined in: types.ts:418
Remove a delegatee from an app
Parameters
params
RemoveDelegateeParams
overrides?
Overrides
Returns
Promise<{ txHash: string; }>
The hash of the transaction that removed the existing delegatee
rePermitApp()
rePermitApp(params, overrides?): Promise<{ txHash: string; }>
Defined in: types.ts:570
Re-permits an app using the last permitted version for a PKP
Parameters
params
RePermitAppParams
overrides?
Overrides
Returns
Promise<{ txHash: string; }>
The transaction hash that re-permitted the app
setAbilityPolicyParameters()
setAbilityPolicyParameters(params, overrides?): Promise<{ txHash: string; }>
Defined in: types.ts:506
Sets ability policy parameters for a specific app version
Note that omitting parameters from policyParams does not remove any existing values; this function allows atomic/sparse updates.
To remove existing policy parameters, provide their IPFS CIDs in the deletePermissionData param.
Parameters
params
SetAbilityPolicyParametersParams
overrides?
Overrides
Returns
Promise<{ txHash: string; }>
The transaction hash that set the policy parameters
setDelegatee()
setDelegatee(params, overrides?): Promise<{ txHash: string; }>
Defined in: types.ts:427
Set delegatees for an app (replaces all existing delegatees)
Parameters
params
SetDelegateeParams
overrides?
Overrides
Returns
Promise<{ txHash: string; }>
The hash of the transaction that set the delegatees
undeleteApp()
undeleteApp(params, overrides?): Promise<{ txHash: string; }>
Defined in: types.ts:440
Undelete an app by setting its isDeleted flag to false
Parameters
params
UndeleteAppParams
overrides?
Overrides
Returns
Promise<{ txHash: string; }>
The hash of the transaction that undeleted the app
unPermitApp()
unPermitApp(params, overrides?): Promise<{ txHash: string; }>
Defined in: types.ts:498
Revokes permission for a PKP to use a specific app version
Parameters
params
UnPermitAppParams
overrides?
Overrides
Returns
Promise<{ txHash: string; }>
The transaction hash that remoked permission for the app
validateAbilityExecutionAndGetPolicies()
validateAbilityExecutionAndGetPolicies(params): Promise<ValidateAbilityExecutionAndGetPoliciesResult>
Defined in: types.ts:554
Validates ability execution and gets policies for a specific ability
Parameters
params
ValidateAbilityExecutionAndGetPoliciesParams
Returns
Promise<ValidateAbilityExecutionAndGetPoliciesResult>
Object containing validation result with isPermitted, appId, appVersion, and policies