{-# LANGUAGE InstanceSigs #-}
module Cardano.Wasm.Api.Info
( apiInfo
, ApiInfo (..)
, VirtualObjectInfo (..)
, MethodHierarchy (..)
, MethodGroup (..)
, MethodInfo (..)
, ParamInfo (..)
, MethodReturnTypeInfo (..)
, dashCaseName
, tsTypeAsString
)
where
import Cardano.Api (pretty)
import Cardano.Api.Experimental.Era qualified as Exp
import Cardano.Wasm.Internal.Api.Era (currentEra, upcomingEra)
import Data.Aeson qualified as Aeson
import Data.Maybe (fromMaybe)
import Data.Text qualified as Text
import Text.Casing (fromHumps, toKebab)
data TSType
= TSString
| TSNumber
| TSBigInt
| TSAny
| TSUtxoList
| TSUtxosForAddressList
deriving (Int -> TSType -> ShowS
[TSType] -> ShowS
TSType -> [Char]
(Int -> TSType -> ShowS)
-> (TSType -> [Char]) -> ([TSType] -> ShowS) -> Show TSType
forall a.
(Int -> a -> ShowS) -> (a -> [Char]) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TSType -> ShowS
showsPrec :: Int -> TSType -> ShowS
$cshow :: TSType -> [Char]
show :: TSType -> [Char]
$cshowList :: [TSType] -> ShowS
showList :: [TSType] -> ShowS
Show, TSType -> TSType -> Bool
(TSType -> TSType -> Bool)
-> (TSType -> TSType -> Bool) -> Eq TSType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TSType -> TSType -> Bool
== :: TSType -> TSType -> Bool
$c/= :: TSType -> TSType -> Bool
/= :: TSType -> TSType -> Bool
Eq)
tsTypeAsString :: TSType -> String
tsTypeAsString :: TSType -> [Char]
tsTypeAsString TSType
TSString = [Char]
"string"
tsTypeAsString TSType
TSNumber = [Char]
"number"
tsTypeAsString TSType
TSBigInt = [Char]
"bigint"
tsTypeAsString TSType
TSAny = [Char]
"any"
tsTypeAsString TSType
TSUtxoList =
[Char]
"{ address: string, txId: string, txIndex: number, lovelace: bigint, assets: any[], datum?: any, script?: any }[]"
tsTypeAsString TSType
TSUtxosForAddressList =
[Char]
"{ txId: string, txIndex: number, lovelace: bigint, assets: any[], datum?: any, script?: any }[]"
instance Aeson.ToJSON TSType where
toJSON :: TSType -> Aeson.Value
toJSON :: TSType -> Value
toJSON = Text -> Value
Aeson.String (Text -> Value) -> (TSType -> Text) -> TSType -> Value
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Text
Text.pack ([Char] -> Text) -> (TSType -> [Char]) -> TSType -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. TSType -> [Char]
tsTypeAsString
data MethodReturnTypeInfo
=
Fluent
|
NewObject String
|
OtherType TSType
deriving (Int -> MethodReturnTypeInfo -> ShowS
[MethodReturnTypeInfo] -> ShowS
MethodReturnTypeInfo -> [Char]
(Int -> MethodReturnTypeInfo -> ShowS)
-> (MethodReturnTypeInfo -> [Char])
-> ([MethodReturnTypeInfo] -> ShowS)
-> Show MethodReturnTypeInfo
forall a.
(Int -> a -> ShowS) -> (a -> [Char]) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MethodReturnTypeInfo -> ShowS
showsPrec :: Int -> MethodReturnTypeInfo -> ShowS
$cshow :: MethodReturnTypeInfo -> [Char]
show :: MethodReturnTypeInfo -> [Char]
$cshowList :: [MethodReturnTypeInfo] -> ShowS
showList :: [MethodReturnTypeInfo] -> ShowS
Show, MethodReturnTypeInfo -> MethodReturnTypeInfo -> Bool
(MethodReturnTypeInfo -> MethodReturnTypeInfo -> Bool)
-> (MethodReturnTypeInfo -> MethodReturnTypeInfo -> Bool)
-> Eq MethodReturnTypeInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MethodReturnTypeInfo -> MethodReturnTypeInfo -> Bool
== :: MethodReturnTypeInfo -> MethodReturnTypeInfo -> Bool
$c/= :: MethodReturnTypeInfo -> MethodReturnTypeInfo -> Bool
/= :: MethodReturnTypeInfo -> MethodReturnTypeInfo -> Bool
Eq)
instance Aeson.ToJSON MethodReturnTypeInfo where
toJSON :: MethodReturnTypeInfo -> Aeson.Value
toJSON :: MethodReturnTypeInfo -> Value
toJSON MethodReturnTypeInfo
Fluent = [(Key, Value)] -> Value
Aeson.object [Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Char] -> Text
Text.pack [Char]
"fluent"]
toJSON (NewObject [Char]
objTypeName) = [(Key, Value)] -> Value
Aeson.object [Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Char] -> Text
Text.pack [Char]
"newObject", Key
"objectType" Key -> [Char] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Char]
objTypeName]
toJSON (OtherType TSType
typeName) = [(Key, Value)] -> Value
Aeson.object [Key
"type" Key -> Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Char] -> Text
Text.pack [Char]
"other", Key
"typeName" Key -> TSType -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= TSType
typeName]
data ParamInfo = ParamInfo
{ ParamInfo -> [Char]
paramName :: String
, ParamInfo -> TSType
paramType :: TSType
, ParamInfo -> [Char]
paramDoc :: String
}
deriving (Int -> ParamInfo -> ShowS
[ParamInfo] -> ShowS
ParamInfo -> [Char]
(Int -> ParamInfo -> ShowS)
-> (ParamInfo -> [Char])
-> ([ParamInfo] -> ShowS)
-> Show ParamInfo
forall a.
(Int -> a -> ShowS) -> (a -> [Char]) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ParamInfo -> ShowS
showsPrec :: Int -> ParamInfo -> ShowS
$cshow :: ParamInfo -> [Char]
show :: ParamInfo -> [Char]
$cshowList :: [ParamInfo] -> ShowS
showList :: [ParamInfo] -> ShowS
Show, ParamInfo -> ParamInfo -> Bool
(ParamInfo -> ParamInfo -> Bool)
-> (ParamInfo -> ParamInfo -> Bool) -> Eq ParamInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ParamInfo -> ParamInfo -> Bool
== :: ParamInfo -> ParamInfo -> Bool
$c/= :: ParamInfo -> ParamInfo -> Bool
/= :: ParamInfo -> ParamInfo -> Bool
Eq)
instance Aeson.ToJSON ParamInfo where
toJSON :: ParamInfo -> Aeson.Value
toJSON :: ParamInfo -> Value
toJSON (ParamInfo [Char]
name TSType
pType [Char]
doc) =
[(Key, Value)] -> Value
Aeson.object
[ Key
"name" Key -> [Char] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Char]
name
, Key
"type" Key -> TSType -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= TSType
pType
, Key
"doc" Key -> [Char] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Char]
doc
]
data MethodHierarchy
= MethodGroupEntry MethodGroup
| MethodInfoEntry MethodInfo
deriving (Int -> MethodHierarchy -> ShowS
[MethodHierarchy] -> ShowS
MethodHierarchy -> [Char]
(Int -> MethodHierarchy -> ShowS)
-> (MethodHierarchy -> [Char])
-> ([MethodHierarchy] -> ShowS)
-> Show MethodHierarchy
forall a.
(Int -> a -> ShowS) -> (a -> [Char]) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MethodHierarchy -> ShowS
showsPrec :: Int -> MethodHierarchy -> ShowS
$cshow :: MethodHierarchy -> [Char]
show :: MethodHierarchy -> [Char]
$cshowList :: [MethodHierarchy] -> ShowS
showList :: [MethodHierarchy] -> ShowS
Show, MethodHierarchy -> MethodHierarchy -> Bool
(MethodHierarchy -> MethodHierarchy -> Bool)
-> (MethodHierarchy -> MethodHierarchy -> Bool)
-> Eq MethodHierarchy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MethodHierarchy -> MethodHierarchy -> Bool
== :: MethodHierarchy -> MethodHierarchy -> Bool
$c/= :: MethodHierarchy -> MethodHierarchy -> Bool
/= :: MethodHierarchy -> MethodHierarchy -> Bool
Eq)
instance Aeson.ToJSON MethodHierarchy where
toJSON :: MethodHierarchy -> Aeson.Value
toJSON :: MethodHierarchy -> Value
toJSON (MethodGroupEntry MethodGroup
group) =
[(Key, Value)] -> Value
Aeson.object
[ Key
"type" Key -> [Char] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= ([Char]
"group" :: String)
, Key
"group" Key -> MethodGroup -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= MethodGroup
group
]
toJSON (MethodInfoEntry MethodInfo
info) =
[(Key, Value)] -> Value
Aeson.object
[ Key
"type" Key -> [Char] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= ([Char]
"method" :: String)
, Key
"method" Key -> MethodInfo -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= MethodInfo
info
]
data MethodGroup = MethodGroup
{ MethodGroup -> [Char]
groupName :: String
, MethodGroup -> [[Char]]
groupDoc :: [String]
, MethodGroup -> [MethodHierarchy]
groupMethods :: [MethodHierarchy]
}
deriving (Int -> MethodGroup -> ShowS
[MethodGroup] -> ShowS
MethodGroup -> [Char]
(Int -> MethodGroup -> ShowS)
-> (MethodGroup -> [Char])
-> ([MethodGroup] -> ShowS)
-> Show MethodGroup
forall a.
(Int -> a -> ShowS) -> (a -> [Char]) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MethodGroup -> ShowS
showsPrec :: Int -> MethodGroup -> ShowS
$cshow :: MethodGroup -> [Char]
show :: MethodGroup -> [Char]
$cshowList :: [MethodGroup] -> ShowS
showList :: [MethodGroup] -> ShowS
Show, MethodGroup -> MethodGroup -> Bool
(MethodGroup -> MethodGroup -> Bool)
-> (MethodGroup -> MethodGroup -> Bool) -> Eq MethodGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MethodGroup -> MethodGroup -> Bool
== :: MethodGroup -> MethodGroup -> Bool
$c/= :: MethodGroup -> MethodGroup -> Bool
/= :: MethodGroup -> MethodGroup -> Bool
Eq)
instance Aeson.ToJSON MethodGroup where
toJSON :: MethodGroup -> Aeson.Value
toJSON :: MethodGroup -> Value
toJSON (MethodGroup [Char]
name [[Char]]
doc [MethodHierarchy]
methods) =
[(Key, Value)] -> Value
Aeson.object
[ Key
"name" Key -> [Char] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Char]
name
, Key
"doc" Key -> [[Char]] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [[Char]]
doc
, Key
"methods" Key -> [MethodHierarchy] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [MethodHierarchy]
methods
]
data MethodInfo = MethodInfo
{ MethodInfo -> [Char]
methodName :: String
, MethodInfo -> Maybe [Char]
methodSimpleName :: Maybe String
, MethodInfo -> [Char]
methodDoc :: String
, MethodInfo -> [ParamInfo]
methodParams :: [ParamInfo]
, MethodInfo -> MethodReturnTypeInfo
methodReturnType :: MethodReturnTypeInfo
, MethodInfo -> [Char]
methodReturnDoc :: String
}
deriving (Int -> MethodInfo -> ShowS
[MethodInfo] -> ShowS
MethodInfo -> [Char]
(Int -> MethodInfo -> ShowS)
-> (MethodInfo -> [Char])
-> ([MethodInfo] -> ShowS)
-> Show MethodInfo
forall a.
(Int -> a -> ShowS) -> (a -> [Char]) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MethodInfo -> ShowS
showsPrec :: Int -> MethodInfo -> ShowS
$cshow :: MethodInfo -> [Char]
show :: MethodInfo -> [Char]
$cshowList :: [MethodInfo] -> ShowS
showList :: [MethodInfo] -> ShowS
Show, MethodInfo -> MethodInfo -> Bool
(MethodInfo -> MethodInfo -> Bool)
-> (MethodInfo -> MethodInfo -> Bool) -> Eq MethodInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MethodInfo -> MethodInfo -> Bool
== :: MethodInfo -> MethodInfo -> Bool
$c/= :: MethodInfo -> MethodInfo -> Bool
/= :: MethodInfo -> MethodInfo -> Bool
Eq)
instance Aeson.ToJSON MethodInfo where
toJSON :: MethodInfo -> Aeson.Value
toJSON :: MethodInfo -> Value
toJSON (MethodInfo [Char]
name Maybe [Char]
simpleName [Char]
doc [ParamInfo]
params MethodReturnTypeInfo
retType [Char]
retDoc) =
[(Key, Value)] -> Value
Aeson.object
[ Key
"name" Key -> [Char] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Char]
name
, Key
"simpleName" Key -> [Char] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Char] -> Maybe [Char] -> [Char]
forall a. a -> Maybe a -> a
fromMaybe [Char]
name Maybe [Char]
simpleName
, Key
"doc" Key -> [Char] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Char]
doc
, Key
"params" Key -> [ParamInfo] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [ParamInfo]
params
, Key
"return" Key -> MethodReturnTypeInfo -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= MethodReturnTypeInfo
retType
, Key
"returnDoc" Key -> [Char] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Char]
retDoc
]
data VirtualObjectInfo = VirtualObjectInfo
{ VirtualObjectInfo -> [Char]
virtualObjectName :: String
, VirtualObjectInfo -> [Char]
virtualObjectDoc :: String
, VirtualObjectInfo -> [MethodHierarchy]
virtualObjectMethods :: [MethodHierarchy]
}
deriving (Int -> VirtualObjectInfo -> ShowS
[VirtualObjectInfo] -> ShowS
VirtualObjectInfo -> [Char]
(Int -> VirtualObjectInfo -> ShowS)
-> (VirtualObjectInfo -> [Char])
-> ([VirtualObjectInfo] -> ShowS)
-> Show VirtualObjectInfo
forall a.
(Int -> a -> ShowS) -> (a -> [Char]) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VirtualObjectInfo -> ShowS
showsPrec :: Int -> VirtualObjectInfo -> ShowS
$cshow :: VirtualObjectInfo -> [Char]
show :: VirtualObjectInfo -> [Char]
$cshowList :: [VirtualObjectInfo] -> ShowS
showList :: [VirtualObjectInfo] -> ShowS
Show, VirtualObjectInfo -> VirtualObjectInfo -> Bool
(VirtualObjectInfo -> VirtualObjectInfo -> Bool)
-> (VirtualObjectInfo -> VirtualObjectInfo -> Bool)
-> Eq VirtualObjectInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VirtualObjectInfo -> VirtualObjectInfo -> Bool
== :: VirtualObjectInfo -> VirtualObjectInfo -> Bool
$c/= :: VirtualObjectInfo -> VirtualObjectInfo -> Bool
/= :: VirtualObjectInfo -> VirtualObjectInfo -> Bool
Eq)
dashCaseName :: VirtualObjectInfo -> String
dashCaseName :: VirtualObjectInfo -> [Char]
dashCaseName = Identifier [Char] -> [Char]
toKebab (Identifier [Char] -> [Char])
-> (VirtualObjectInfo -> Identifier [Char])
-> VirtualObjectInfo
-> [Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [Char] -> Identifier [Char]
fromHumps ([Char] -> Identifier [Char])
-> (VirtualObjectInfo -> [Char])
-> VirtualObjectInfo
-> Identifier [Char]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. VirtualObjectInfo -> [Char]
virtualObjectName
instance Aeson.ToJSON VirtualObjectInfo where
toJSON :: VirtualObjectInfo -> Aeson.Value
toJSON :: VirtualObjectInfo -> Value
toJSON (VirtualObjectInfo [Char]
name [Char]
doc [MethodHierarchy]
methods) =
[(Key, Value)] -> Value
Aeson.object
[ Key
"objectName" Key -> [Char] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Char]
name
, Key
"doc" Key -> [Char] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Char]
doc
, Key
"methods" Key -> [MethodHierarchy] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [MethodHierarchy]
methods
]
data ApiInfo = ApiInfo
{ ApiInfo -> VirtualObjectInfo
mainObject :: VirtualObjectInfo
, ApiInfo -> [VirtualObjectInfo]
virtualObjects :: [VirtualObjectInfo]
, ApiInfo -> [Char]
initialiseFunctionDoc :: String
, ApiInfo -> [Char]
initialiseFunctionReturnDoc :: String
}
deriving (Int -> ApiInfo -> ShowS
[ApiInfo] -> ShowS
ApiInfo -> [Char]
(Int -> ApiInfo -> ShowS)
-> (ApiInfo -> [Char]) -> ([ApiInfo] -> ShowS) -> Show ApiInfo
forall a.
(Int -> a -> ShowS) -> (a -> [Char]) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ApiInfo -> ShowS
showsPrec :: Int -> ApiInfo -> ShowS
$cshow :: ApiInfo -> [Char]
show :: ApiInfo -> [Char]
$cshowList :: [ApiInfo] -> ShowS
showList :: [ApiInfo] -> ShowS
Show, ApiInfo -> ApiInfo -> Bool
(ApiInfo -> ApiInfo -> Bool)
-> (ApiInfo -> ApiInfo -> Bool) -> Eq ApiInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ApiInfo -> ApiInfo -> Bool
== :: ApiInfo -> ApiInfo -> Bool
$c/= :: ApiInfo -> ApiInfo -> Bool
/= :: ApiInfo -> ApiInfo -> Bool
Eq)
instance Aeson.ToJSON ApiInfo where
toJSON :: ApiInfo -> Aeson.Value
toJSON :: ApiInfo -> Value
toJSON (ApiInfo VirtualObjectInfo
mainObj [VirtualObjectInfo]
virtualObjs [Char]
initDoc [Char]
initRetDoc) =
[(Key, Value)] -> Value
Aeson.object
[ Key
"mainObject" Key -> VirtualObjectInfo -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= VirtualObjectInfo
mainObj
, Key
"virtualObjects" Key -> [VirtualObjectInfo] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [VirtualObjectInfo]
virtualObjs
, Key
"initialiseFunctionDoc" Key -> [Char] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Char]
initDoc
, Key
"initialiseFunctionReturnDoc" Key -> [Char] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
Aeson..= [Char]
initRetDoc
]
getEraCommentFor :: Maybe (Exp.Era era) -> String
Maybe (Era era)
era =
case Maybe (Era era)
era of
Just Era era
era' -> [Char]
"(currently " [Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ Doc (ZonkAny 0) -> [Char]
forall a. Show a => a -> [Char]
show (Era era -> Doc (ZonkAny 0)
forall a ann. Pretty a => a -> Doc ann
forall ann. Era era -> Doc ann
pretty Era era
era') [Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ [Char]
")"
Maybe (Era era)
Nothing ->
[Char]
"(currently unavailable, upcoming era will only be available during late development and testing phases)"
apiInfo :: ApiInfo
apiInfo :: ApiInfo
apiInfo =
let walletObj :: VirtualObjectInfo
walletObj =
VirtualObjectInfo
{ virtualObjectName :: [Char]
virtualObjectName = [Char]
"Wallet"
, virtualObjectDoc :: [Char]
virtualObjectDoc = [Char]
"Represents a wallet."
, virtualObjectMethods :: [MethodHierarchy]
virtualObjectMethods =
[ MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"getAddressBech32"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Get the Bech32 representation of the address. (Can be shared for receiving funds.)"
, methodParams :: [ParamInfo]
methodParams = []
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSString
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"The Bech32 representation of the address."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"getBech32ForPaymentVerificationKey"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc =
[Char]
"Get the Bech32 representation of the payment verification key of the wallet. (Can be shared for verification.)"
, methodParams :: [ParamInfo]
methodParams = []
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSString
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"The Bech32 representation of the payment verification key."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"getBech32ForPaymentSigningKey"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc =
[Char]
"Get the Bech32 representation of the payment signing key of the wallet. (Must be kept secret.)"
, methodParams :: [ParamInfo]
methodParams = []
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSString
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"The Bech32 representation of the payment signing key."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"getBech32ForStakeVerificationKey"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc =
[Char]
"Get the Bech32 representation of the stake verification key of the wallet. (Can be shared for verification.)"
, methodParams :: [ParamInfo]
methodParams = []
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSString
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"The Bech32 representation of the stake verification key."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"getBech32ForStakeSigningKey"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc =
[Char]
"Get the Bech32 representation of the stake signing key of the wallet. (Must be kept secret.)"
, methodParams :: [ParamInfo]
methodParams = []
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSString
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"The Bech32 representation of the stake signing key."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"getBase16ForPaymentVerificationKeyHash"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc =
[Char]
"Get the base16 representation of the hash of the payment verification key of the wallet."
, methodParams :: [ParamInfo]
methodParams = []
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSString
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"The base16 representation of the payment verification key hash."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"getBase16ForStakeVerificationKeyHash"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Get the base16 representation of the hash of the stake verification key of the wallet."
, methodParams :: [ParamInfo]
methodParams = []
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSString
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"The base16 representation of the stake verification key hash."
}
]
}
unsignedTxObj :: VirtualObjectInfo
unsignedTxObj =
VirtualObjectInfo
{ virtualObjectName :: [Char]
virtualObjectName = [Char]
"UnsignedTx"
, virtualObjectDoc :: [Char]
virtualObjectDoc = [Char]
"Represents an unsigned transaction."
, virtualObjectMethods :: [MethodHierarchy]
virtualObjectMethods =
[ MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"addTxInput"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Adds a simple transaction input to the transaction."
, methodParams :: [ParamInfo]
methodParams =
[ [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"txId" TSType
TSString [Char]
"The transaction ID of the input UTxO."
, [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"txIx" TSType
TSNumber [Char]
"The index of the input within the UTxO."
]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = MethodReturnTypeInfo
Fluent
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"The `UnsignedTx` object with the added input."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"addSimpleTxOut"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Adds a simple transaction output to the transaction."
, methodParams :: [ParamInfo]
methodParams =
[ [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"destAddr" TSType
TSString [Char]
"The destination address."
, [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"lovelaceAmount" TSType
TSBigInt [Char]
"The amount in lovelaces to output."
]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = MethodReturnTypeInfo
Fluent
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"The `UnsignedTx` object with the added output."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"appendCertificateToTx"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Appends a certificate (in CBOR hex string format) to the transaction."
, methodParams :: [ParamInfo]
methodParams =
[ [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"certCbor" TSType
TSString [Char]
"The certificate in CBOR hex string format."
]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = MethodReturnTypeInfo
Fluent
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"The `UnsignedTx` object with the added certificate."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"setFee"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Sets the fee for the transaction."
, methodParams :: [ParamInfo]
methodParams = [[Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"lovelaceAmount" TSType
TSBigInt [Char]
"The fee amount in lovelaces."]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = MethodReturnTypeInfo
Fluent
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"The `UnsignedTx` object with the set fee."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"estimateMinFee"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Estimates the minimum fee for the transaction."
, methodParams :: [ParamInfo]
methodParams =
[ [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"protocolParams" TSType
TSAny [Char]
"The protocol parameters."
, [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo
[Char]
"numKeyWitnesses"
TSType
TSNumber
[Char]
"The number of key witnesses."
, [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"numByronKeyWitnesses" TSType
TSNumber [Char]
"The number of Byron key witnesses."
, [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"totalRefScriptSize" TSType
TSNumber [Char]
"The total size of reference scripts in bytes."
]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSBigInt
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to the estimated minimum fee in lovelaces."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"signWithPaymentKey"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Signs the transaction with a payment key."
, methodParams :: [ParamInfo]
methodParams = [[Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"signingKey" TSType
TSString [Char]
"The signing key to witness the transaction."]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = [Char] -> MethodReturnTypeInfo
NewObject (VirtualObjectInfo -> [Char]
virtualObjectName VirtualObjectInfo
signedTxObj)
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to a `SignedTx` object."
}
]
}
signedTxObj :: VirtualObjectInfo
signedTxObj =
VirtualObjectInfo
{ virtualObjectName :: [Char]
virtualObjectName = [Char]
"SignedTx"
, virtualObjectDoc :: [Char]
virtualObjectDoc = [Char]
"Represents a signed transaction."
, virtualObjectMethods :: [MethodHierarchy]
virtualObjectMethods =
[ MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"alsoSignWithPaymentKey"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Adds an extra signature to the transaction with a payment key."
, methodParams :: [ParamInfo]
methodParams = [[Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"signingKey" TSType
TSString [Char]
"The signing key to witness the transaction."]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = MethodReturnTypeInfo
Fluent
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"The `SignedTx` object with the additional signature."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"txToCbor"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Converts the signed transaction to its CBOR representation."
, methodParams :: [ParamInfo]
methodParams = []
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSString
, methodReturnDoc :: [Char]
methodReturnDoc =
[Char]
"A promise that resolves to the CBOR representation of the transaction as a hex string."
}
]
}
grpcConnection :: VirtualObjectInfo
grpcConnection =
VirtualObjectInfo
{ virtualObjectName :: [Char]
virtualObjectName = [Char]
"GrpcConnection"
, virtualObjectDoc :: [Char]
virtualObjectDoc = [Char]
"Represents a gRPC-web client connection to a Cardano node."
, virtualObjectMethods :: [MethodHierarchy]
virtualObjectMethods =
[ MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"getEra"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Get the era from the Cardano Node using a GRPC-web client."
, methodParams :: [ParamInfo]
methodParams = []
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSNumber
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to the current mainnet era number."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"submitTx"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Submit a signed and CBOR-encoded transaction to the Cardano node."
, methodParams :: [ParamInfo]
methodParams = [[Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"txCbor" TSType
TSString [Char]
"The CBOR-encoded transaction as a hex string."]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSString
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to the transaction ID."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"getProtocolParams"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc =
[Char]
"Get the protocol parameters in the cardano-ledger format from the Cardano Node using a GRPC-web client."
, methodParams :: [ParamInfo]
methodParams = []
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSAny
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to the current protocol parameters."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"getAllUtxos"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc =
[Char]
"Get all UTXOs from the node using a GRPC-web client."
, methodParams :: [ParamInfo]
methodParams = []
, methodReturnType :: MethodReturnTypeInfo
methodReturnType =
TSType -> MethodReturnTypeInfo
OtherType
TSType
TSUtxoList
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to the current UTXO set."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"getUtxosForAddress"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Get UTXOs for a given address using a GRPC-web client."
, methodParams :: [ParamInfo]
methodParams = [[Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"address" TSType
TSString [Char]
"The address to get UTXOs for."]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType =
TSType -> MethodReturnTypeInfo
OtherType
TSType
TSUtxosForAddressList
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to the UTXOs for the given address."
}
]
}
in ApiInfo
{ mainObject :: VirtualObjectInfo
mainObject =
VirtualObjectInfo
{ virtualObjectName :: [Char]
virtualObjectName = [Char]
"CardanoApi"
, virtualObjectDoc :: [Char]
virtualObjectDoc = [Char]
"The main Cardano API object with static methods."
, virtualObjectMethods :: [MethodHierarchy]
virtualObjectMethods =
[ MethodGroup -> MethodHierarchy
MethodGroupEntry (MethodGroup -> MethodHierarchy) -> MethodGroup -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodGroup
{ groupName :: [Char]
groupName = [Char]
"tx"
, groupDoc :: [[Char]]
groupDoc = [[Char]
"Methods for creating unsigned transactions."]
, groupMethods :: [MethodHierarchy]
groupMethods =
[ MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"newTx"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc =
[Char]
"Create a new unsigned transaction in the current mainnet era "
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ Maybe (Era ConwayEra) -> [Char]
forall era. Maybe (Era era) -> [Char]
getEraCommentFor (Era ConwayEra -> Maybe (Era ConwayEra)
forall a. a -> Maybe a
Just Era ConwayEra
currentEra)
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ [Char]
"."
, methodParams :: [ParamInfo]
methodParams = []
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = [Char] -> MethodReturnTypeInfo
NewObject (VirtualObjectInfo -> [Char]
virtualObjectName VirtualObjectInfo
unsignedTxObj)
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to a new `UnsignedTx` object."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"newUpcomingEraTx"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc =
[Char]
"Create a new unsigned transaction in the upcoming mainnet era "
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ Maybe (Era DijkstraEra) -> [Char]
forall era. Maybe (Era era) -> [Char]
getEraCommentFor Maybe (Era DijkstraEra)
upcomingEra
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ [Char]
"."
, methodParams :: [ParamInfo]
methodParams = []
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = [Char] -> MethodReturnTypeInfo
NewObject (VirtualObjectInfo -> [Char]
virtualObjectName VirtualObjectInfo
unsignedTxObj)
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to a new `UnsignedTx` object."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"newConwayTx"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Create a new unsigned transaction in the Conway era."
, methodParams :: [ParamInfo]
methodParams = []
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = [Char] -> MethodReturnTypeInfo
NewObject (VirtualObjectInfo -> [Char]
virtualObjectName VirtualObjectInfo
unsignedTxObj)
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to a new `UnsignedTx` object."
}
]
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"newGrpcConnection"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Create a new client connection for communicating with a Cardano node through gRPC-web."
, methodParams :: [ParamInfo]
methodParams = [[Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"webGrpcUrl" TSType
TSString [Char]
"The URL of the gRPC-web server."]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = [Char] -> MethodReturnTypeInfo
NewObject (VirtualObjectInfo -> [Char]
virtualObjectName VirtualObjectInfo
grpcConnection)
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to a new `GrpcConnection`."
}
, MethodGroup -> MethodHierarchy
MethodGroupEntry (MethodGroup -> MethodHierarchy) -> MethodGroup -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodGroup
{ groupName :: [Char]
groupName = [Char]
"certificate"
, groupDoc :: [[Char]]
groupDoc = [[Char]
"Methods for creating certificates."]
, groupMethods :: [MethodHierarchy]
groupMethods =
[ MethodGroup -> MethodHierarchy
MethodGroupEntry (MethodGroup -> MethodHierarchy) -> MethodGroup -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodGroup
{ groupName :: [Char]
groupName = [Char]
"mainnetEra"
, groupDoc :: [[Char]]
groupDoc =
[ [Char]
"Methods for creating certificates in the current mainnet era "
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ Maybe (Era ConwayEra) -> [Char]
forall era. Maybe (Era era) -> [Char]
getEraCommentFor (Era ConwayEra -> Maybe (Era ConwayEra)
forall a. a -> Maybe a
Just Era ConwayEra
currentEra)
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ [Char]
"."
]
, groupMethods :: [MethodHierarchy]
groupMethods =
[ MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"makeStakeAddressStakeDelegationCertificate"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc =
[Char]
"Make a certificate that delegates a stake address to a stake pool in the current mainnet era "
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ Maybe (Era ConwayEra) -> [Char]
forall era. Maybe (Era era) -> [Char]
getEraCommentFor (Era ConwayEra -> Maybe (Era ConwayEra)
forall a. a -> Maybe a
Just Era ConwayEra
currentEra)
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ [Char]
"."
, methodParams :: [ParamInfo]
methodParams =
[ [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"stakeKeyHash" TSType
TSString [Char]
"The stake key hash in base16 format."
, [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"poolId" TSType
TSString [Char]
"The pool ID in base16 format."
]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSString
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to the CBOR-encoded certificate as a hex string."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"makeStakeAddressRegistrationCertificate"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc =
[Char]
"Make a stake address registration certificate in the current mainnet era "
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ Maybe (Era ConwayEra) -> [Char]
forall era. Maybe (Era era) -> [Char]
getEraCommentFor (Era ConwayEra -> Maybe (Era ConwayEra)
forall a. a -> Maybe a
Just Era ConwayEra
currentEra)
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ [Char]
"."
, methodParams :: [ParamInfo]
methodParams =
[ [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"stakeKeyHash" TSType
TSString [Char]
"The stake key hash in base16 format."
, [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"deposit" TSType
TSBigInt [Char]
"The deposit amount in lovelaces."
]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSString
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to the CBOR-encoded certificate as a hex string."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"makeStakeAddressUnregistrationCertificate"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc =
[Char]
"Make a stake address unregistration certificate in the current mainnet era "
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ Maybe (Era ConwayEra) -> [Char]
forall era. Maybe (Era era) -> [Char]
getEraCommentFor (Era ConwayEra -> Maybe (Era ConwayEra)
forall a. a -> Maybe a
Just Era ConwayEra
currentEra)
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ [Char]
"."
, methodParams :: [ParamInfo]
methodParams =
[ [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"stakeKeyHash" TSType
TSString [Char]
"The stake key hash in base16 format."
, [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"deposit" TSType
TSBigInt [Char]
"The deposit amount in lovelaces."
]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSString
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to the CBOR-encoded certificate as a hex string."
}
]
}
, MethodGroup -> MethodHierarchy
MethodGroupEntry (MethodGroup -> MethodHierarchy) -> MethodGroup -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodGroup
{ groupName :: [Char]
groupName = [Char]
"upcomingEra"
, groupDoc :: [[Char]]
groupDoc =
[ [Char]
"Methods for creating certificates in the current upcoming era "
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ Maybe (Era DijkstraEra) -> [Char]
forall era. Maybe (Era era) -> [Char]
getEraCommentFor Maybe (Era DijkstraEra)
upcomingEra
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ [Char]
"."
]
, groupMethods :: [MethodHierarchy]
groupMethods =
[ MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"makeStakeAddressStakeDelegationCertificateUpcomingEra"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc =
[Char]
"Make a certificate that delegates a stake address to a stake pool in the current upcoming era "
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ Maybe (Era DijkstraEra) -> [Char]
forall era. Maybe (Era era) -> [Char]
getEraCommentFor Maybe (Era DijkstraEra)
upcomingEra
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ [Char]
"."
, methodParams :: [ParamInfo]
methodParams =
[ [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"stakeKeyHash" TSType
TSString [Char]
"The stake key hash in base16 format."
, [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"poolId" TSType
TSString [Char]
"The pool ID in base16 format."
]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSString
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to the CBOR-encoded certificate as a hex string."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"makeStakeAddressRegistrationCertificateUpcomingEra"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc =
[Char]
"Make a stake address registration certificate in the current upcoming era "
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ Maybe (Era DijkstraEra) -> [Char]
forall era. Maybe (Era era) -> [Char]
getEraCommentFor Maybe (Era DijkstraEra)
upcomingEra
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ [Char]
"."
, methodParams :: [ParamInfo]
methodParams =
[ [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"stakeKeyHash" TSType
TSString [Char]
"The stake key hash in base16 format."
, [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"deposit" TSType
TSBigInt [Char]
"The deposit amount in lovelaces."
]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSString
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to the CBOR-encoded certificate as a hex string."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"makeStakeAddressUnregistrationCertificateUpcomingEra"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc =
[Char]
"Make a stake address unregistration certificate in the current upcoming era "
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ Maybe (Era DijkstraEra) -> [Char]
forall era. Maybe (Era era) -> [Char]
getEraCommentFor Maybe (Era DijkstraEra)
upcomingEra
[Char] -> ShowS
forall a. [a] -> [a] -> [a]
++ [Char]
"."
, methodParams :: [ParamInfo]
methodParams =
[ [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"stakeKeyHash" TSType
TSString [Char]
"The stake key hash in base16 format."
, [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"deposit" TSType
TSBigInt [Char]
"The deposit amount in lovelaces."
]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = TSType -> MethodReturnTypeInfo
OtherType TSType
TSString
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to the CBOR-encoded certificate as a hex string."
}
]
}
]
}
, MethodGroup -> MethodHierarchy
MethodGroupEntry (MethodGroup -> MethodHierarchy) -> MethodGroup -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodGroup
{ groupName :: [Char]
groupName = [Char]
"wallet"
, groupDoc :: [[Char]]
groupDoc = [[Char]
"Methods for generating and restoring wallets."]
, groupMethods :: [MethodHierarchy]
groupMethods =
[ MethodGroup -> MethodHierarchy
MethodGroupEntry (MethodGroup -> MethodHierarchy) -> MethodGroup -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodGroup
{ groupName :: [Char]
groupName = [Char]
"mainnet"
, groupDoc :: [[Char]]
groupDoc = [[Char]
"Methods for mainnet wallets."]
, groupMethods :: [MethodHierarchy]
groupMethods =
[ MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"generatePaymentWallet"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Generate a simple payment wallet for mainnet."
, methodParams :: [ParamInfo]
methodParams = []
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = [Char] -> MethodReturnTypeInfo
NewObject (VirtualObjectInfo -> [Char]
virtualObjectName VirtualObjectInfo
walletObj)
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to a new `Wallet` object."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"generateStakeWallet"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Generate a stake wallet for mainnet."
, methodParams :: [ParamInfo]
methodParams = []
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = [Char] -> MethodReturnTypeInfo
NewObject (VirtualObjectInfo -> [Char]
virtualObjectName VirtualObjectInfo
walletObj)
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to a new `Wallet` object."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"restorePaymentWalletFromSigningKeyBech32"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Restore a mainnet payment wallet from a Bech32 encoded signing key."
, methodParams :: [ParamInfo]
methodParams = [[Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"signingKeyBech32" TSType
TSString [Char]
"The Bech32 encoded signing key."]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = [Char] -> MethodReturnTypeInfo
NewObject (VirtualObjectInfo -> [Char]
virtualObjectName VirtualObjectInfo
walletObj)
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to a new `Wallet` object."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"restoreStakeWalletFromSigningKeyBech32"
, methodSimpleName :: Maybe [Char]
methodSimpleName = Maybe [Char]
forall a. Maybe a
Nothing
, methodDoc :: [Char]
methodDoc = [Char]
"Restore a mainnet stake wallet from Bech32 encoded signing keys."
, methodParams :: [ParamInfo]
methodParams =
[ [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"paymentSigningKeyBech32" TSType
TSString [Char]
"The Bech32 encoded payment signing key."
, [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"stakeSigningKeyBech32" TSType
TSString [Char]
"The Bech32 encoded stake signing key."
]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = [Char] -> MethodReturnTypeInfo
NewObject (VirtualObjectInfo -> [Char]
virtualObjectName VirtualObjectInfo
walletObj)
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to a new `Wallet` object."
}
]
}
, MethodGroup -> MethodHierarchy
MethodGroupEntry (MethodGroup -> MethodHierarchy) -> MethodGroup -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodGroup
{ groupName :: [Char]
groupName = [Char]
"testnet"
, groupDoc :: [[Char]]
groupDoc = [[Char]
"Methods for wallets in other networks."]
, groupMethods :: [MethodHierarchy]
groupMethods =
[ MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"generateTestnetPaymentWallet"
, methodSimpleName :: Maybe [Char]
methodSimpleName = [Char] -> Maybe [Char]
forall a. a -> Maybe a
Just [Char]
"generatePaymentWallet"
, methodDoc :: [Char]
methodDoc = [Char]
"Generate a simple payment wallet for testnet, given the testnet's network magic."
, methodParams :: [ParamInfo]
methodParams = [[Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"networkMagic" TSType
TSNumber [Char]
"The network magic for the testnet."]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = [Char] -> MethodReturnTypeInfo
NewObject (VirtualObjectInfo -> [Char]
virtualObjectName VirtualObjectInfo
walletObj)
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to a new `Wallet` object."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"generateTestnetStakeWallet"
, methodSimpleName :: Maybe [Char]
methodSimpleName = [Char] -> Maybe [Char]
forall a. a -> Maybe a
Just [Char]
"generateStakeWallet"
, methodDoc :: [Char]
methodDoc = [Char]
"Generate a stake wallet for testnet, given the testnet's network magic."
, methodParams :: [ParamInfo]
methodParams = [[Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"networkMagic" TSType
TSNumber [Char]
"The network magic for the testnet."]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = [Char] -> MethodReturnTypeInfo
NewObject (VirtualObjectInfo -> [Char]
virtualObjectName VirtualObjectInfo
walletObj)
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to a new `Wallet` object."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"restoreTestnetPaymentWalletFromSigningKeyBech32"
, methodSimpleName :: Maybe [Char]
methodSimpleName = [Char] -> Maybe [Char]
forall a. a -> Maybe a
Just [Char]
"restorePaymentWalletFromSigningKeyBech32"
, methodDoc :: [Char]
methodDoc = [Char]
"Restore a testnet payment wallet from a Bech32 encoded signing key."
, methodParams :: [ParamInfo]
methodParams =
[ [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"networkMagic" TSType
TSNumber [Char]
"The network magic for the testnet."
, [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"signingKeyBech32" TSType
TSString [Char]
"The Bech32 encoded signing key."
]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = [Char] -> MethodReturnTypeInfo
NewObject (VirtualObjectInfo -> [Char]
virtualObjectName VirtualObjectInfo
walletObj)
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to a new `Wallet` object."
}
, MethodInfo -> MethodHierarchy
MethodInfoEntry (MethodInfo -> MethodHierarchy) -> MethodInfo -> MethodHierarchy
forall a b. (a -> b) -> a -> b
$
MethodInfo
{ methodName :: [Char]
methodName = [Char]
"restoreTestnetStakeWalletFromSigningKeyBech32"
, methodSimpleName :: Maybe [Char]
methodSimpleName = [Char] -> Maybe [Char]
forall a. a -> Maybe a
Just [Char]
"restoreStakeWalletFromSigningKeyBech32"
, methodDoc :: [Char]
methodDoc = [Char]
"Restore a testnet stake wallet from Bech32 encoded signing keys."
, methodParams :: [ParamInfo]
methodParams =
[ [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"networkMagic" TSType
TSNumber [Char]
"The network magic for the testnet."
, [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"paymentSigningKeyBech32" TSType
TSString [Char]
"The Bech32 encoded payment signing key."
, [Char] -> TSType -> [Char] -> ParamInfo
ParamInfo [Char]
"stakeSigningKeyBech32" TSType
TSString [Char]
"The Bech32 encoded stake signing key."
]
, methodReturnType :: MethodReturnTypeInfo
methodReturnType = [Char] -> MethodReturnTypeInfo
NewObject (VirtualObjectInfo -> [Char]
virtualObjectName VirtualObjectInfo
walletObj)
, methodReturnDoc :: [Char]
methodReturnDoc = [Char]
"A promise that resolves to a new `Wallet` object."
}
]
}
]
}
]
}
, virtualObjects :: [VirtualObjectInfo]
virtualObjects = [VirtualObjectInfo
unsignedTxObj, VirtualObjectInfo
signedTxObj, VirtualObjectInfo
grpcConnection, VirtualObjectInfo
walletObj]
, initialiseFunctionDoc :: [Char]
initialiseFunctionDoc = [Char]
"Initialises the Cardano API."
, initialiseFunctionReturnDoc :: [Char]
initialiseFunctionReturnDoc = [Char]
"A promise that resolves to the main `CardanoApi` object."
}