Skip to main content
Defined in: app-sdk/src/abilityClient/types.ts:27 The Vincent Ability Client is used to interact with Vincent abilities.
  • Precheck ability parameters and policies
  • Execute abilities remotely

Type Parameters

AbilityParamsSchema

AbilityParamsSchema extends z.ZodType

PoliciesByPackageName

PoliciesByPackageName extends Record<string, any>

ExecuteSuccessSchema

ExecuteSuccessSchema extends z.ZodType = z.ZodUndefined

ExecuteFailSchema

ExecuteFailSchema extends z.ZodType = z.ZodUndefined

PrecheckSuccessSchema

PrecheckSuccessSchema extends z.ZodType = z.ZodUndefined

PrecheckFailSchema

PrecheckFailSchema extends z.ZodType = z.ZodUndefined

Methods

execute()

execute(rawAbilityParams, context): Promise<AbilityExecuteResponse<ExecuteSuccessSchema, ExecuteFailSchema, PoliciesByPackageName>>
Defined in: app-sdk/src/abilityClient/types.ts:63 Executes the ability with the given parameters. This method validates the ability parameters, executes the ability remotely, and returns the result.

Parameters

rawAbilityParams
TypeOf<AbilityParamsSchema> The parameters to be passed to the ability
context
AbilityClientContext The context for the ability execution, including the delegator PKP Ethereum address

Returns

Promise<AbilityExecuteResponse<ExecuteSuccessSchema, ExecuteFailSchema, PoliciesByPackageName>> A promise that resolves to a AbilityResponse containing the execution result

precheck()

precheck(rawAbilityParams, context): Promise<AbilityPrecheckResponse<PrecheckSuccessSchema, PrecheckFailSchema, PoliciesByPackageName>>
Defined in: app-sdk/src/abilityClient/types.ts:44 Performs a precheck of the ability parameters and policies. This method validates the ability parameters and checks if the policies allow the ability to be executed.

Parameters

rawAbilityParams
TypeOf<AbilityParamsSchema> The parameters to be passed to the ability
context
AbilityClientContext & object The context for the ability execution, including the delegator PKP Ethereum address

Returns

Promise<AbilityPrecheckResponse<PrecheckSuccessSchema, PrecheckFailSchema, PoliciesByPackageName>> A promise that resolves to a AbilityResponse containing the precheck result
I