StaticmarketConverts a raw Sui object view into an NftAmmMarketObject.
Top-level NFT AMM market object view with raw fields.
The market object with bigint balances, table data, and Move types.
Error when the top-level object type is missing or nested pool and
supply type information cannot be read by the current caster.
⚠️ Two of this caster's reads need a nested Move struct's own
type, which neither protocol supplies — so it throws, exactly as it did
before the gRPC port. It is kept source-compatible (same signature, same
NftAmmMarketObject shape) rather than deleted, and the blocked reads are
marked inline.
fields.pool is a nested Pool<L> handed to
PoolsApiCasting.poolObjectFromSuiObject, which needs the pool's
Move type for objectType and lpCoinType.fields.supply is a nested Supply<F> whose type gave
fractionalizedCoinType.Under JSON-RPC a nested struct arrived as { type, fields }, which is not
a SuiObjectResponse, so the pre-port code already threw
no object id found on undefined at its first nested read (verified
against the source at d4706127). Under gRPC nested structs lose type
outright, so the lp_supply recovery that fixed the top-level pool
caster does not apply: the market's own type parameters do not name the
pool's package. Recovering it needs the Move type layouts this SDK does not
carry, and guessing a generic's position would produce a silently wrong
lpCoinType, so the failure is left to surface.
NftAmm is also not deployed on mainnet — getAddresses() returns empty
strings for every nftAmm package and object — which is why there is no
captured fixture for it. Fix the nested reads by fetching the pool as a
top-level object by id.
Converts raw NFT AMM Sui object views into SDK market objects.
These methods are local casts only. They do not fetch missing nested objects or recover Move type information that is absent from the input response.