markets.setIdentityGates, or as a vault’s depositor gate, it decides who passes.
A whitelist is a lighter gate than a verification profile, because nothing records why a wallet is on it. It cannot be the borrower gate of a market priced from a MARKET source. It gates liquidity providers and vault depositors only on the word of the instance that curates it. See Whitelists as gates for the full rules.
Who signs
Every change to a whitelist is a transaction a wallet you control signs. Each write takes the three call shapes of the signing model: no options returns the unsigned transaction,{ signer } signs and confirms, { txHash } confirms a transaction you broadcast yourself.
With a signer, the SDK fills
signerAddress from the signer’s wallet. It refuses a signerAddress that names a different wallet before any request, because the API checks ownership and management against that address.
Create a whitelist
The signing wallet becomes the owner.purpose is BORROWER, DEPOSITOR or ANY, and defaults to ANY. A list kept for BORROWER is refused as a provider or depositor gate, and one kept for DEPOSITOR as a borrower gate.
name and purpose live on your instance’s record, not on chain: the contract holds only its owner, managers and members.
created.list.id is the id every other call on this page takes. created.created is false when the transaction was already recorded, and recordMoved: true means the record moved to your instance because your instance now holds the owner wallet. The API refuses a list another instance recorded first with ACCESS_LIST_ALREADY_REGISTERED.
To confirm a creation you broadcast yourself, send the same name and purpose the build used, with the hash:
List or remove wallets
Prepare a removal first to read what it reaches. The prepared response names inwarnings the open loans whose borrower or payee is being removed (AFFECTS_OPEN_LOANS), and every market, vault and vault group the list gates (LIST_SCOPE). The signed result does not carry these warnings.
listed: true lists the wallets, listed: false removes them.
confirmations holds one confirmed result per transaction, and transactions every hash.
When a later transaction fails after earlier ones were confirmed, the SDK throws ConfirmationError with every hash it sent. The earlier batches are on chain and recorded. Confirm an unrecorded hash with setMembers(listId, undefined, { txHash }), or catch the record up with a rescan.
A wallet that is neither the owner nor a manager on chain is refused with NOT_ACCESS_LIST_MANAGER. A manager of a list another instance keeps can list and remove wallets on it too; the prepared response then carries managed: true.
Add or remove a manager
A manager lists and removes wallets with the same reach as the owner. It cannot add or remove managers or transfer the list. Adding the market’s lender of record as a manager is how a whitelist gate comes to be maintained by the lender of record itself.NOT_ACCESS_LIST_OWNER. updated.applied lists each manager the transaction changed with its state after the block.
Transfer ownership
Ownership moves in two steps. The owner proposes a new owner, and the proposed wallet accepts. Until it accepts, the current owner keeps every right over the list, and a later proposal replaces a pending one.NOT_PENDING_OWNER.
OWNER_LEAVES_INSTANCE, and names the managers that stay in MANAGERS_KEEP_LISTING. recordHeldByThisInstance on the result says where the record stands afterwards.
Read whitelists
list returns the whitelists your instance keeps under lists, and under managed the lists of other instances that one of your verified wallets owns, manages or is named to take over.
{ includeArchived: true }. A list under managed carries own: false and name: null, because the name belongs to the instance that keeps it.
get returns one list with the members its record holds. Pass up to 200 wallets to also read, live from the chain, whether the list admits each of them right now.
live.verified before acting on one wallet. It is keyed by the lowercased address. A value of null there, or live.readFailed: true, means the chain could not be read, not that the wallet is refused.
Catch the record up with the chain
rescan reads the list’s events from the last block its record saw and records every member, manager and owner change, confirmed or not. Use it after a change signed outside these calls, or when a confirm was never sent. Nothing is signed.
complete: false means the record has not reached the chain head yet, so call it again until complete reads true.
Rename, re-purpose or archive the record
update changes only your instance’s record. Nothing is signed, and only the instance that keeps the record can update it. Send at least one of name, purpose and archived.
ACCESS_LIST_IN_USE and names those gates in details.usedBy. A purpose that contradicts a gate the list already fills is refused with ACCESS_LIST_PURPOSE_MISMATCH. ANY is always accepted.
