Skip to content
LogoLogo

removeCredentialAddresses

Used to set access control via allow and deny lists for specified addresses.

To add addresses to an allow or deny list refer to addCredentialAddresses()

Usage

allow
import { , ,  } from '@deltadao/nautilus'
import {  } from 'ethers'
 
const  = await .(new ('0x1234'))
const  =new ()
    
.(., [  
    '0x0000000000000000000000000000000000000000'
]) 
const  = .() 
 
await .() 
ddo:
{
credentials: {
allow: [
{
type: 'address'
values: []
}
]
}
}

Addresses are compared case-insensitively and removed from every address entry of the list, since the policy server reads them as one list. An entry keeps its stored form (bare strings, or { address } objects). A '*' wildcard is an address of its own: removing an address does not remove it, so a list that holds '*' still lets that address in.

Removing the last address from the ALLOW list keeps the entry as values: [], which the node and the policy server read as "deny everyone". Removing the last address from the DENY list drops its entry.

Returns

The asset builder instance, to chain further calls with.

Parameters

list

  • Type: CredentialListTypes

The list type you want to remove from for the asset to be built.

import {  } from '@deltadao/nautilus'
 
.(
    .,  
    ['0x0000000000000000000000000000000000000000']
)

Supported list types

  • ALLOW
  • DENY

addresses

  • Type: string[]

The addresses you want to remove from the specified list for the asset to be built.

.(
    .,
    ['0x0000000000000000000000000000000000000000'] 
)