Package: react-wallet-kit
Overview
Fetches each requested policy if it exists, or creates it if it does not.- This function is idempotent: multiple calls with the same policies will not create duplicates.
- For every policy in the request:
- If it already exists, it is returned with its
policyId
. - If it does not exist, it is created and returned with its new
policyId
.
Parameters
Response
A successful response returns the following fields:A promise that resolves to an array of objects, each containing:
policyId
: the unique identifier of the policy.policyName
: human-readable name of the policy.effect
: the instruction to DENY or ALLOW an activity.condition
: (optional) the condition expression that triggers the effect.consensus
: (optional) the consensus expression that triggers the effect.notes
: (optional) developer notes or description for the policy.