Skip to content
LogoLogo

setVpPolicies

Set the checks applied to the presentation as a whole.

Where VC policies check individual credentials, these check the presentation: that the holder is bound to it, that it satisfies the definition, that it carries enough credentials.

Each policy is an object: { policy }, or { policy, args } for a parameterised one. An asset whose vp_policies mixed names and objects was not indexed by ocean-node 4.2.x, so nautilus writes objects only, as the enterprise market does. args is a string; the policy server parses it as JSON when it can ('1' reaches the verifier as 1), so pass structured arguments through JSON.stringify.

Usage

import {  } from '@deltadao/nautilus'
 
.(., [ 
  { : 'holder-binding' }, 
  { : 'presentation-definition' }, 
  { : 'minimum-credentials', : '1' } 
]) 

Returns

The asset builder instance, to chain further calls with.