cardano-wasm:cardano-wasi-lib
Safe HaskellNone
LanguageHaskell2010

Cardano.Wasm.Api.Info

Synopsis

Documentation

apiInfo :: ApiInfo Source #

Provides metadata about the "virtual objects" and their methods. This is intended to help generate JavaScript wrappers.

data ApiInfo Source #

Aggregate type for all API information.

Constructors

ApiInfo 

Fields

Instances

Instances details
ToJSON ApiInfo Source # 
Instance details

Defined in Cardano.Wasm.Api.Info

Methods

toJSON :: ApiInfo -> Value #

toEncoding :: ApiInfo -> Encoding #

toJSONList :: [ApiInfo] -> Value #

toEncodingList :: [ApiInfo] -> Encoding #

omitField :: ApiInfo -> Bool #

Show ApiInfo Source # 
Instance details

Defined in Cardano.Wasm.Api.Info

Eq ApiInfo Source # 
Instance details

Defined in Cardano.Wasm.Api.Info

data VirtualObjectInfo Source #

Information about a virtual object and its methods.

Constructors

VirtualObjectInfo 

Fields

data MethodHierarchy Source #

Method hierarchy. Allows grouping methods in sub-groups.

data MethodGroup Source #

Method group. groups several methods under a common name.

Constructors

MethodGroup 

Fields

Instances

Instances details
ToJSON MethodGroup Source # 
Instance details

Defined in Cardano.Wasm.Api.Info

Methods

toJSON :: MethodGroup -> Value #

toEncoding :: MethodGroup -> Encoding #

toJSONList :: [MethodGroup] -> Value #

toEncodingList :: [MethodGroup] -> Encoding #

omitField :: MethodGroup -> Bool #

Show MethodGroup Source # 
Instance details

Defined in Cardano.Wasm.Api.Info

Eq MethodGroup Source # 
Instance details

Defined in Cardano.Wasm.Api.Info

data MethodInfo Source #

Information about a single method of a virtual object.

Constructors

MethodInfo 

Fields

  • methodName :: String

    Name of the global method name in the API (which should match the exported function and it must be unique globally).

  • methodSimpleName :: Maybe String

    Name of the method in the virtual object of the API when accessed via JS (used for re-exporting to JS, may be shorter than methodName and does not need to be globally unique unlike methodName, but it does need to be unique within its containing virtual object). It defaults to methodName when Nothing.

  • methodDoc :: String

    General documentation for the method.

  • methodParams :: [ParamInfo]

    Info about parameters, excluding this.

  • methodReturnType :: MethodReturnTypeInfo

    Return type of the method.

  • methodReturnDoc :: String

    Documentation for the return value of the method.

Instances

Instances details
ToJSON MethodInfo Source # 
Instance details

Defined in Cardano.Wasm.Api.Info

Methods

toJSON :: MethodInfo -> Value #

toEncoding :: MethodInfo -> Encoding #

toJSONList :: [MethodInfo] -> Value #

toEncodingList :: [MethodInfo] -> Encoding #

omitField :: MethodInfo -> Bool #

Show MethodInfo Source # 
Instance details

Defined in Cardano.Wasm.Api.Info

Eq MethodInfo Source # 
Instance details

Defined in Cardano.Wasm.Api.Info

data ParamInfo Source #

Information about a single parameter of a method.

Constructors

ParamInfo 

Fields

Instances

Instances details
ToJSON ParamInfo Source # 
Instance details

Defined in Cardano.Wasm.Api.Info

Methods

toJSON :: ParamInfo -> Value #

toEncoding :: ParamInfo -> Encoding #

toJSONList :: [ParamInfo] -> Value #

toEncodingList :: [ParamInfo] -> Encoding #

omitField :: ParamInfo -> Bool #

Show ParamInfo Source # 
Instance details

Defined in Cardano.Wasm.Api.Info

Eq ParamInfo Source # 
Instance details

Defined in Cardano.Wasm.Api.Info

data MethodReturnTypeInfo Source #

Describes the return type of a method.

Constructors

Fluent

Returns an instance of the same object type (fluent interface).

NewObject String

Returns a new instance of a specified virtual object type.

OtherType TSType

Returns a non-virtual-object type (e.g., JSString, number).