Skip to content

removeCredentialAddresses

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

Official OceanProtocol documentation: DDO Specification

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

Usage

allow
import { AssetBuilder, CredentialListTypes, Nautilus } from '@deltadao/nautilus'
import { Wallet } from 'ethers'
 
const nautilus = await Nautilus.create(new Wallet('0x1234'))
const assetBuilder =new AssetBuilder()
    
assetBuilder.removeCredentialAddresses(CredentialListTypes.ALLOW, [  
    '0x0000000000000000000000000000000000000000'
]) 
const asset = assetBuilder.build() 
 
await nautilus.edit(asset) 
ddo:
{
credentials: {
allow: [
{
type: 'address'
values: []
}
]
}
}

Returns

The asset builder instance to chain building calls with.

Parameter

list

  • Type: CredentialListTypes

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

import { CredentialListTypes } from '@deltadao/nautilus'
 
assetBuilder.removeCredentialAddresses(
    CredentialListTypes.DENY,  
    ['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.

assetBuilder.removeCredentialAddresses(
    CredentialListTypes.ALLOW,
    ['0x0000000000000000000000000000000000000000'] 
)