Alias for a Solana slot number.
Modulesolana-haskell-sdk-1.3.0.0GHC2021
Network.Solana.RPC.HTTP.Types
This module defines shared types used in Solana RPC responses and configuration payloads. It includes generic RPC response envelopes, context metadata, and configuration options for request customization.
These types are reused across many Solana JSON-RPC methods and should be imported wherever Solana RPC requests or responses are constructed or parsed.
- 4 types
- 2 values
- Packagesolana-haskell-sdk-1.3.0.0
- Exports6
- LanguageGHC2021
- LicenceApache-2.0
- SourceTypes.hs
RPCResponse
3 declarationsContains contextual information returned with most Solana RPC responses.
Includes API version and the slot at which the response is valid.
Constructors
ContextapiVersion :: Maybe TextAPI version string reported by the node (e.g.
"2.1.16"); Nothing when the node omits it, as older nodes and some RPC proxies do.contextSlot :: SlotThe slot at which the data in the response is valid.
Instances4Show, Generic, FromJSON, Rep
Show ContextDefined in solana-haskell-sdk-1.3.0.0 · Network.Solana.RPC.HTTP.TypesGeneric ContextDefined in solana-haskell-sdk-1.3.0.0 · Network.Solana.RPC.HTTP.TypesFromJSON ContextDefined in solana-haskell-sdk-1.3.0.0 · Network.Solana.RPC.HTTP.Typestype Rep Context = D1 ('MetaDataDefined in solana-haskell-sdk-1.3.0.0 · Network.Solana.RPC.HTTP.Types"Context"
"Network.Solana.RPC.HTTP.Types"
"solana-haskell-sdk-1.3.0.0-JMJNnl7jmEh90dthY33ZzW"
'False) (C1 ('MetaCons"Context"
'PrefixI 'True) (S1 ('MetaSel ('Just"apiVersion"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just"contextSlot"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Slot)))
Generic wrapper for Solana RPC responses that include a context and a value.
Many Solana RPC methods return a response shaped like:
{ "context": { ... }, "value": <data> }Constructors
Instances2Show, FromJSON
Show a => Show (RPCResponse a)Defined in solana-haskell-sdk-1.3.0.0 · Network.Solana.RPC.HTTP.TypesFromJSON a => FromJSON (RPCResponse a)Defined in solana-haskell-sdk-1.3.0.0 · Network.Solana.RPC.HTTP.Types
ConfigurationObject
3 declarationsConfiguration options used to customize Solana RPC requests.
Many RPC methods accept a configuration object to control encoding, commitment level, preflight behavior, and more.
Constructors
ConfigurationObjectcommitment :: Maybe StringOptional commitment level (e.g.
"finalized","confirmed").encoding :: Maybe StringDesired encoding for returned data (e.g.
"base58","base64","jsonParsed"). Account data returned as"base64+zstd"is not decoded by AccountData and is rejected.dataSlice :: Maybe ObjectOptional partial data slice configuration.
skipPreflight :: Maybe BoolWhether to skip preflight checks (use with caution).
preflightCommitment :: Maybe StringCommitment level used during preflight simulation.
maxRetries :: Maybe IntMaximum number of retry attempts for transaction submission.
minContextSlot :: Maybe IntMinimum slot that the RPC response must be based on.
searchTransactionHistory :: Maybe BoolWhether to search older confirmed transaction history.
maxSupportedTransactionVersion :: Maybe IntThe maximum transaction version to return in responses. Required to fetch blocks or transactions containing versioned (v0) transactions; omitting it causes the RPC to reject them with error -32015.
Instances4Show, Generic, ToJSON, Rep
Show ConfigurationObjectDefined in solana-haskell-sdk-1.3.0.0 · Network.Solana.RPC.HTTP.TypesGeneric ConfigurationObjectDefined in solana-haskell-sdk-1.3.0.0 · Network.Solana.RPC.HTTP.TypesToJSON ConfigurationObjectDefined in solana-haskell-sdk-1.3.0.0 · Network.Solana.RPC.HTTP.Typestype Rep ConfigurationObject = D1 ('MetaDataDefined in solana-haskell-sdk-1.3.0.0 · Network.Solana.RPC.HTTP.Types"ConfigurationObject"
"Network.Solana.RPC.HTTP.Types"
"solana-haskell-sdk-1.3.0.0-JMJNnl7jmEh90dthY33ZzW"
'False) (C1 ('MetaCons"ConfigurationObject"
'PrefixI 'True) (((S1 ('MetaSel ('Just"commitment"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)) :*: S1 ('MetaSel ('Just"encoding"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String))) :*: (S1 ('MetaSel ('Just"dataSlice"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Object)) :*: S1 ('MetaSel ('Just"skipPreflight"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just"preflightCommitment"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)) :*: S1 ('MetaSel ('Just"maxRetries"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just"minContextSlot"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just"searchTransactionHistory"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just"maxSupportedTransactionVersion"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)))))))
A default configuration object with all fields set to Nothing.
Use this as a base and override fields selectively.
A basic configuration object that only sets the encoding to "base64".
Useful for methods that require base64-encoded input or output.