trusset.lending.assetData takes the market’s contract address, marketAddress, not its marketId. The writes take the three call shapes of the signing model.
Preview the asset data
preview returns the bundle a deployment would attest for a collateral token, and its hash, before anything is built. It stores nothing. Pass the same mode, priceSource and borrowAssetAddress the deployment will use, because each is part of the bundle. On a FIXED deployment pass the same initialPrice too, because the bundle commits to the fixed price itself.
TOKEN_PROFILE_REQUIRED, exactly as a deployment would be. The first attestation needs no call of its own: it travels inside the deployment signature, and the prepared deployment carries the same assetData.contentHash to compare with the preview.
Read the asset data
get returns the record: the attested and the acknowledged hash, who may write each next, and whether one of your wallets can.
status is null when the factory record could not be read, which is not the same as NONE. DIVERGED is the signal a lender of record watches. Neither the market contracts nor the API act on a divergence: whether the new version still supports the credit already extended is the lender of record’s decision.
bundle returns the stored bytes behind a hash, the standing attestation by default. The API re-hashes them before they leave, and a lender of record can recompute the hash itself without trusting the response. The hash is keccak256 over the UTF-8 bytes of canonicalJson.
SNAPSHOT_NOT_FOUND, and get says ahead of time whether bytes exist in bundleAvailable. Pass { hash } to read an earlier version.
Re-attest after the records change
attest replaces the standing attestation with the bundle the token’s profile and instrument record produce now. Use it after either changed, or to move a version attested under schema 1.0.0 onto the current schema. profile.changedSinceAttestation on get reports both cases.
The attestor signs. While the market seeks a lender of record that is the wallet that deployed it. After adoption it is the issuer wallet the lender of record named. The SDK compares the signer with the attestor the build names and refuses a mismatch before anything is signed.
NOT_ATTESTOR.
Acknowledge a version
acknowledge records the lender of record’s approval of the version it reviewed. The lender of record or the admin it named signs. Name the hash that was actually read. The build refuses a hash that is not the standing attestation with ASSET_DATA_STALE. The factory also reverts the acknowledgement if the issuer re-attests before it mines. The SDK refuses the zero hash before any request.
NOT_ADOPTED. The adoption itself can carry the first acknowledgement through assetDataHash in the adoption terms.
To confirm an acknowledgement broadcast from your own infrastructure, pass null as the hash with { txHash }. The API records the hash, version and wallet from the event the mined transaction emitted, never from the request.
