Deployment
Preview Asset Data
Compute the asset data bundle and hash a market deployment would attest
GET
Returns the asset data bundle a market deployment would attest for a collateral token, and its hash, before anything is built or signed. Show both to the issuer beside the deployment form. The hash is what the deployment signature commits to, and the bundle is the text behind it.
A market deployed through Deploy Market is born attested. The hash travels inside the deployment transaction, so the wallet that deploys the market attests the bundle in the same signature. The factory stores only the hash. The bundle stays off chain, and no asset or counterparty data reaches the chain.
No market exists yet, so there is no market access check. The token must be one this instance imported and holds as active, with a published profile. Otherwise the call is refused with
TOKEN_PROFILE_REQUIRED, the same refusal a deployment gets. Import the token with Import Token and fill its profile with Update Profile.
The preview stores nothing. Pass the same mode, priceSource and borrowAssetAddress the deployment will use, because each of them is part of the bundle. The deployment response carries its own assetData.contentHash, so compare the two before the issuer signs.
Query Parameters
string
required
The collateral token, as a
0x-prefixed 40-character hex address. It must be imported by this instance.string
default:"FREEZE"
Collateral mode of the planned market:
FREEZE or CUSTODY.string
default:"NAV"
Price source of the planned market:
MARKET, NAV or ORACLE.string
Settlement token (stablecoin) of the planned market. Omit it to use the USDC address configured for this instance’s network, which is also the deployment’s default. When given, it must be a deployed ERC-20 contract with 6 to 18 decimals.
What the bundle contains
The bundle follows schema1.0.0 and has four members. Its rules are fixed per schema version, so a stored bundle re-hashes to the same value for as long as it is kept.
The market’s own address is not a member. The first attestation travels inside the transaction that creates that address, and the factory’s own record binds the hash to the market.
canonicalJson is the bundle serialized under RFC 8785 (JSON Canonicalization Scheme): members sorted, no whitespace, addresses in lowercase, and empty members left out. contentHash is keccak256 over the UTF-8 bytes of canonicalJson. Anyone holding the bytes can recompute it with one hash call.
Response Fields
object
Error Codes
The asset data routes report a validation failure with the first failing rule asmessage and no details list.
