@somnia-chain/markets-sdk / index / MarketTypePlugin
Interface: MarketTypePlugin<TParams>
Defined in: marketTypes/types.ts:27
A market-type plugin: the fee-param codec + machinery descriptor for one
bytes4 marketType. TParams is the type's plain fee-param shape (e.g.
BinaryVenueParams for BINARY_V1).
Type Parameters
TParams
TParams = unknown
Properties
marketType
marketType:
`0x${string}`
Defined in: marketTypes/types.ts:29
The bytes4 market-type id (e.g. MARKET_TYPE_BINARY_V1).
label
label:
string
Defined in: marketTypes/types.ts:31
Human label for the type.
machinerySteps
machinerySteps: readonly
MachineryStep[]
Defined in: marketTypes/types.ts:33
The type-specific machinery onboarding steps, in order.
Methods
encodeVenueFeeParams()
encodeVenueFeeParams(
params,client,moduleAddress):Promise<`0x${string}`>
Defined in: marketTypes/types.ts:37
Encode plain fee params into a venue's opaque feeParams bytes — for
binary this defers to the module's on-chain encoder (needs a client +
the module address), so it is async.
Parameters
params
TParams
client
moduleAddress
`0x${string}` | undefined
Returns
Promise<`0x${string}`>
decodeVenueFeeParams()
decodeVenueFeeParams(
feeParams):TParams|null
Defined in: marketTypes/types.ts:40
Decode a venue's feeParams bytes back into plain params for display, or
null if the bytes aren't this type's shape. Pure/local.
Parameters
feeParams
`0x${string}`
Returns
TParams | null