trusset.lending.operators covers the queue, the adoption and the roles. Every write takes the three call shapes of the signing model, except the nominations, which have no confirm leg.
Find markets to take
queued returns your instance’s queue: markets one of your wallets is nominated on (NOMINATED), markets offered beyond their candidates (OPEN), and markets your instance deployed that still wait (OWN). canAccept says whether the lender of record can take a row, and acceptBlock says why not.
truncated. A nomination made a moment ago can take up to 30 seconds to appear. pending lists every market the factory publishes as seeking a lender of record on your network, including other issuers’ markets. It reports what the factory publishes, not what your instance may act on.
Review a market before adopting it
queuedMarket returns everything the lender of record underwrites: the instrument, the offering, the fee split, the asset data status and the published terms. disagreements lists every field where two sources state different values, each value with its provenance. The queue takes the market’s contract address, because a market waiting for a lender of record has no record on the adopting instance yet.
Take the lender-of-record role
accept builds the factory transaction that takes the role, signs it with the nominated wallet and records the adoption. The terms name seven parties, declare how seized collateral is realized and approve the asset data version the lender of record reviewed. One wallet may hold several parties. The signing wallet also becomes the market’s operator wallet, which receives the fixed operator share of repaid interest.
Prepare first to read what the adoption will do before any wallet signs. With a signer, the confirmed adoption also carries the build’s warnings and requiredFollowUp.
adopted.market.id is your instance’s marketId for the market from here on. requiredFollowUp: { action: 'SET_IDENTITY_GATES' } means the deployer installed a borrower register that does not qualify as a professional gate. Replace it with setIdentityGates right after adoption, because until then the API opens no loan on the market.
realizationMode is EXCHANGE_SALE, ISSUER_REDEMPTION or AUCTION, limited by the price source. assetDataHash must equal the issuer’s standing attestation, or the build is refused with ASSET_DATA_STALE. A market that carries an attestation cannot be adopted without one unless the terms send acknowledgeAssetData: false. The parameters and refusals are on Accept Lender Role.
Claim an open market
A market can be open to any approved lender of record. When no wallet of your instance is nominated on it,accept with a signer first broadcasts a commitCuratorClaim announcing a hash of the terms. It returns status: 'CLAIM_COMMITTED' with a claimSalt. After claimDelaySeconds, the same terms with that claimSalt complete the adoption. A backend stores the salt and schedules the second call.
claimWindowSeconds, and any change to the terms, including a newly attested asset data version, starts the wait again. A market with no borrower register cannot be claimed without a nomination.
Complete the handover
On a market from the current factory, the oracle, the interest model and the insurance fund pass to their named owners inside the adoption, andhandover reads COMPLETE. A market from an earlier generation needs each nominee to accept ownership itself. Until then the lender of record cannot set price signers, tune the rate model or upgrade either satellite.
acceptOwnershipCalldata entry names the wallet that signs it in signer. Broadcast it from that wallet. readable: false means the chain could not be read, not that nothing is pending. operator reconciles the deploying instance’s record with the factory, which is how the deploying issuer learns its market was adopted.
Nominate candidates
Nominating is the deploying side’s act. The factory accepts a nomination only from the wallet that deployed the market, or from the factory owner. The SDK checks the signer against that wallet before signing. A nomination has no confirm leg: the factory records it, andnominations reads it back live.
withdrawNomination removes one candidate while the market still seeks a lender of record. A withdrawn wallet can still claim an open market like any claimant nobody nominated.
Grant and revoke market roles
setAccessRole grants or revokes one of six roles across the market, its liquidation router and its oracle. The wallet that administers the role signs:
accessRole reads whether an address holds a role. granted: null with failed: true means the chain could not answer, which is not a refusal.
unchanged: true and nothing is signed. Before signing a change, the SDK reads whether the signer holds MARKET_ADMIN for a market role or ROUTER_ADMIN for a router role. For ORACLE_SIGNER it compares the signer with the oracle owner. A signer without the authority is refused before anything is sent.
setLiquidatorRole is the same change for MARKET_LIQUIDATOR alone. Revoking it from every holder leaves the market with no liquidator: loans still become liquidatable, but no liquidation can start.
