Private Data API: your organization's own address overrides, an allowlist and a denylist, applied when CipherOwl screens for you.
Overrides are scoped to the organization of the credentials: another
organization's entries are invisible (404). They are recorded on a
network (e.g. ethereum_mainnet) but applied per chain, so an entry
on ethereum_mainnet covers every EVM network. Allowlisting an
address on one network of a chain while it is denylisted on another
is rejected.
Writes use optimistic concurrency: expectedVersion is "0" for a
new entry, or the entry's current version to change it; a 409
means the entry exists or changed since you read it.
Values
ALLOWLIST
ALLOWLIST: Str "LIST_TYPE_ALLOWLIST"
DENYLIST
DENYLIST: Str "LIST_TYPE_DENYLIST"
LIST_TYPES
LIST_TYPES: Vec [
"LIST_TYPE_UNSPECIFIED",
"LIST_TYPE_ALLOWLIST",
"LIST_TYPE_DENYLIST"
]
Functions
allowlist-address
fn (network: Str, address: Str, notes: Str?): Map
fn (network: Str, address: Str, notes: Str?, opts: Map): Map
Add a new address to the allowlist (expectedVersion "0"), with
optional notes.
Example
out ::cipherowl::private-data/allowlist-address("ethereum_mainnet", "0x0000000000000000000000000000000000000001", "treasury cold wallet")
out.entry.version
delete-override
fn (network: Str, address: Str): Map
fn (network: Str, address: Str, opts: Map): Map
Remove the override for an address. Returns {success}; a 404 Err when
there is none.
Example
out ::cipherowl::private-data/delete-override("ethereum_mainnet", "0x0000000000000000000000000000000000000001")
out.success
denylist-address
fn (network: Str, address: Str, notes: Str?): Map
fn (network: Str, address: Str, notes: Str?, opts: Map): Map
Add a new address to the denylist (expectedVersion "0"), with
optional notes.
Example
out ::cipherowl::private-data/denylist-address("ethereum_mainnet", "0x0000000000000000000000000000000000000001", "confirmed fraud report")
out.created
get-override
fn (network: Str, address: Str): Map
fn (network: Str, address: Str, opts: Map): Map
The override for one address: {entry}; a 404 Err when there is none
(::cipherowl::api/is-status(e, 404)).
Example
out ::cipherowl::private-data/get-override("ethereum_mainnet", "0x0000000000000000000000000000000000000001")
out.entry.listType
out.entry.version
list-all-overrides
fn (network: Str, options: Map, limit: Int): Vec
fn (network: Str, options: Map, limit: Int, opts: Map): Vec
Collect up to limit overrides on a network across pages (same
options as list-overrides).
Example
entries ::cipherowl::private-data/list-all-overrides("ethereum_mainnet", {listType: "allowlist"}, 1000)
length(entries)
list-overrides
fn (network: Str, options: Map): Map
fn (network: Str, options: Map, opts: Map): Map
One page of overrides: {entries: [{listType, network, chain, address, addLabels, removeLabels, notes, version, createdAt, updatedAt, createdBy, updatedBy, deletedAt?}], nextPageToken}.
Example
page ::cipherowl::private-data/list-overrides("ethereum_mainnet", {listType: "denylist", pageSize: 100})
map(page.entries, (e) { e.address })
page.nextPageToken
list-request
fn (network: Str, options: Map): Map
The spec for one page of overrides on a network. options takes
listType ("allowlist", "denylist", "both"), pageSize,
pageToken, includeDeleted and sinceTimestamp (RFC 3339). Exposed
for testing.
Example
::cipherowl::private-data/list-request("ethereum_mainnet", {listType: "denylist"}).path
// "/api/private-data/v2/overrides/networks/ethereum_mainnet/addresses?listType=LIST_TYPE_DENYLIST"
list-type
fn (value: Str): Str
The wire listType for "allowlist", "denylist" or "both" (or a
wire value as is); an Err for anything else. Exposed for testing.
Example
::cipherowl::private-data/list-type("allowlist") // "LIST_TYPE_ALLOWLIST"
::cipherowl::private-data/list-type("both") // "LIST_TYPE_UNSPECIFIED"
is-err(::cipherowl::private-data/list-type("blocklist")) // true
upsert-override
fn (network: Str, entry: Map): Map
fn (network: Str, entry: Map, opts: Map): Map
Create or update an override. Returns {entry, created}.
Example
::cipherowl::private-data/upsert-override("ethereum_mainnet", {
listType: "allowlist",
address: "0x0000000000000000000000000000000000000001",
notes: "treasury cold wallet",
addLabels: ["internal"]
})
upsert-request
fn (network: Str, entry: Map): Map
The spec for creating or updating an override. entry takes listType
("allowlist"/"denylist" or the wire value, required), address
(required), addLabels, removeLabels, notes and expectedVersion
(default "0", a new entry; int64 is sent as a string). Exposed for
testing.
Example
spec ::cipherowl::private-data/upsert-request("ethereum_mainnet", {listType: "allowlist", address: "0x0000000000000000000000000000000000000001"})
spec.body.listType // "LIST_TYPE_ALLOWLIST"
spec.body.expectedVersion // "0"