Methods
addDelegatee()
addDelegatee(Defined in: types.ts:410 Add a new delegatee to an appparams
,overrides?
):Promise
<{txHash
:string
; }>
Parameters
params
AddDelegateeParams
overrides?
Overrides
Returns
Promise
<{ txHash
: string
; }>
The hash of the transaction that added the new delegatee
deleteApp()
deleteApp(Defined in: types.ts:432 Delete an application by setting its isDeleted flag to trueparams
,overrides?
):Promise
<{txHash
:string
; }>
Parameters
params
DeleteAppParams
overrides?
Overrides
Returns
Promise
<{ txHash
: string
; }>
The hash of the transaction that marked the app deleted
enableAppVersion()
enableAppVersion(Defined in: types.ts:401 Enable or disable a specific app versionparams
,overrides?
):Promise
<{txHash
:string
; }>
Parameters
params
EnableAppVersionParams
overrides?
Overrides
Returns
Promise
<{ txHash
: string
; }>
The hash of the transaction that set the app enabled state
getAllAbilitiesAndPoliciesForApp()
getAllAbilitiesAndPoliciesForApp(Defined in: types.ts:544 Get all permitted abilities, policies, and policy parameters for a specific app and PKP in a nested object structureparams
):Promise
<PermissionData
>
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(Defined in: types.ts:530 Get all app IDs that have permissions for a specific PKP token, excluding deleted appsparams
):Promise
<number
[]>
Parameters
params
GetAllPermittedAppIdsForPkpParams
Returns
Promise
<number
[]>
Array of app IDs that have permissions for the PKP token and haven’t been deleted
Deprecated
Use getPermittedAppsForPkps insteadgetAllRegisteredAgentPkpEthAddresses()
getAllRegisteredAgentPkpEthAddresses(Defined in: types.ts:513 Get all PKP tokens that are registered as agents for a specific user addressparams
):Promise
<string
[]>
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(Defined in: types.ts:470 Get the app associated with a delegatee addressparams
):Promise
<null
|App
>
Parameters
params
GetAppByDelegateeParams
Returns
Promise
<null
| App
>
Detailed view of the app the delegatee is associated with
getAppById()
getAppById(Defined in: types.ts:444 Get detailed information about an app by its IDparams
):Promise
<null
|App
>
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(Defined in: types.ts:450 Get the app ID for a specific delegatee addressparams
):Promise
<null
|number
>
Parameters
params
GetAppIdByDelegateeParams
Returns
Promise
<null
| number
>
The app ID for the specified delegatee address
getAppsByManagerAddress()
getAppsByManagerAddress(Defined in: types.ts:462 Get all apps managed by a specific address with all their versionsparams
):Promise
<object
[]>
Parameters
params
GetAppsByManagerParams
Returns
Promise
<object
[]>
Array of apps with all their versions managed by the specified address
getAppVersion()
getAppVersion(Defined in: types.ts:456 Get detailed information about a specific version of an appparams
):Promise
<null
| {appVersion
:AppVersion
; }>
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(Defined in: types.ts:482 Get delegated agent PKP token IDs for a specific app version with pagination Returns the first 100 PKP eth addresses. Provideparams
):Promise
<string
[]>
offset
to fetch paginated results.
Parameters
params
GetDelegatedPkpEthAddressesParams
Returns
Promise
<string
[]>
Array of delegated agent PKP token IDs
getLastPermittedAppVersionForPkp()
getLastPermittedAppVersionForPkp(Defined in: types.ts:574 Get the last permitted version for a specific app and PKPparams
):Promise
<null
|number
>
Parameters
params
GetLastPermittedAppVersionParams
Returns
Promise
<null
| number
>
The last permitted app version, or null if never permitted
getPermittedAppsForPkps()
getPermittedAppsForPkps(Defined in: types.ts:538 Get permitted apps for multiple PKPs with detailed information including versions and enabled statusparams
):Promise
<PkpPermittedApps
[]>
Parameters
params
GetPermittedAppsForPkpsParams
Returns
Promise
<PkpPermittedApps
[]>
Array of PkpPermittedApps containing permitted app details for each PKP
getPermittedAppVersionForPkp()
getPermittedAppVersionForPkp(Defined in: types.ts:521 Get the permitted app version for a specific PKP token and appparams
):Promise
<null
|number
>
Parameters
params
GetPermittedAppVersionForPkpParams
Returns
Promise
<null
| number
>
The permitted app version for the PKP token and app
getUnpermittedAppsForPkps()
getUnpermittedAppsForPkps(Defined in: types.ts:582 Get unpermitted apps for multiple PKPs with their last permitted versionsparams
):Promise
<PkpUnpermittedApps
[]>
Parameters
params
GetUnpermittedAppsForPkpsParams
Returns
Promise
<PkpUnpermittedApps
[]>
Array of PkpUnpermittedApps containing unpermitted app details for each PKP
isDelegateePermitted()
isDelegateePermitted(Defined in: types.ts:560 Check if a delegatee is permitted to execute an ability with a PKPparams
):Promise
<boolean
>
Parameters
params
IsDelegateePermittedParams
Returns
Promise
<boolean
>
Boolean indicating whether the delegatee has permission
permitApp()
permitApp(Defined in: types.ts:490 Permits an app version for an Agent Wallet PKP token and optionally sets ability policy parametersparams
,overrides?
):Promise
<{txHash
:string
; }>
Parameters
params
PermitAppParams
overrides?
Overrides
Returns
Promise
<{ txHash
: string
; }>
The transaction hash that permitted the app
registerApp()
registerApp(Defined in: types.ts:385 Registers a new app with its initial appVersion (v1)‘s permissionsparams
,overrides?
):Promise
<{txHash
:string
; }>
Parameters
params
RegisterAppParams
overrides?
Overrides
Returns
Promise
<{ txHash
: string
; }>
- The hash of the transaction that registered the app
registerNextVersion()
registerNextVersion(Defined in: types.ts:392 Register a new version on an existing applicationparams
,overrides?
):Promise
<{newAppVersion
:number
;txHash
:string
; }>
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(Defined in: types.ts:416 Remove a delegatee from an appparams
,overrides?
):Promise
<{txHash
:string
; }>
Parameters
params
RemoveDelegateeParams
overrides?
Overrides
Returns
Promise
<{ txHash
: string
; }>
The hash of the transaction that removed the existing delegatee
rePermitApp()
rePermitApp(Defined in: types.ts:568 Re-permits an app using the last permitted version for a PKPparams
,overrides?
):Promise
<{txHash
:string
; }>
Parameters
params
RePermitAppParams
overrides?
Overrides
Returns
Promise
<{ txHash
: string
; }>
The transaction hash that re-permitted the app
setAbilityPolicyParameters()
setAbilityPolicyParameters(Defined in: types.ts:504 Sets ability policy parameters for a specific app version Note that omitting parameters fromparams
,overrides?
):Promise
<{txHash
:string
; }>
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(Defined in: types.ts:425 Set delegatees for an app (replaces all existing delegatees)params
,overrides?
):Promise
<{txHash
:string
; }>
Parameters
params
SetDelegateeParams
overrides?
Overrides
Returns
Promise
<{ txHash
: string
; }>
The hash of the transaction that set the delegatees
undeleteApp()
undeleteApp(Defined in: types.ts:438 Undelete an app by setting its isDeleted flag to falseparams
,overrides?
):Promise
<{txHash
:string
; }>
Parameters
params
UndeleteAppParams
overrides?
Overrides
Returns
Promise
<{ txHash
: string
; }>
The hash of the transaction that undeleted the app
unPermitApp()
unPermitApp(Defined in: types.ts:496 Revokes permission for a PKP to use a specific app versionparams
,overrides?
):Promise
<{txHash
:string
; }>
Parameters
params
UnPermitAppParams
overrides?
Overrides
Returns
Promise
<{ txHash
: string
; }>
The transaction hash that remoked permission for the app
validateAbilityExecutionAndGetPolicies()
validateAbilityExecutionAndGetPolicies(Defined in: types.ts:552 Validates ability execution and gets policies for a specific abilityparams
):Promise
<ValidateAbilityExecutionAndGetPoliciesResult
>
Parameters
params
ValidateAbilityExecutionAndGetPoliciesParams
Returns
Promise
<ValidateAbilityExecutionAndGetPoliciesResult
>
Object containing validation result with isPermitted, appId, appVersion, and policies