"""
Represent a cosmos address as [Betch32](https://en.bitcoin.it/wiki/Bech32) format prefixed by the blockchain prefix.
e.i. `cosmos1jse8senm9hcvydhl8v9x47kfe5z82zmwtw8jvj`
"""
scalar Address

"""Represent a signed 64-bit integer"""
scalar Long

"""An unsigned 64-bit integer"""
scalar UInt64

"""Represent a void return type, representing no value"""
scalar Void

"""All inputs needed to send token to a given address"""
input SendInput {
    """Captcha token"""
    captchaToken: String
    """Address where to send token(s)"""
    toAddress: Address!
}

"""Represent a transaction response"""
type TxResponse {
    """
    Return the result code of transaction.
    See code correspondence error : https://github.com/cosmos/cosmos-sdk/blob/main/types/errors/errors.go
    """
    code: Int!
    """Transaction gas used"""
    gasUsed: Long!
    """Transaction gas wanted"""
    gasWanted: Long!
    """Corresponding to the transaction hash."""
    hash: String!
    """Description of error if available."""
    rawLog: String
}

"""List of all subscriptions"""
type Subscription {
    """
    Send the configured amount of token to the given address.

    By opening the subscription the send message is added to a queue, once the transaction is successfully submitted
    with all the queued messages it'll return the corresponding before closing the stream. A successful submission does
    not mean it has been successfully written in a block, it is the client's responsibility to make additional checks
    through the transaction's code and hash.
    """
    send(input: SendInput!): TxResponse!
}

"""List of all mutations"""
type Mutation {
    """
    Send the configured amount of token to the given address, returning nothing as the transaction is made
    asynchronously. A successful invocation means that the send operation is queued and will be processed, but it'll
    does not necessary lead to a successful transaction.

    For clients needing information on the underlying transaction state, consider using the `send` subscription.
    """
    send(input: SendInput!): Void
}

"""Represent the actual server configuration"""
type Configuration {
    """Amount value of token to send"""
    amountSend: Long!
    """The network chain ID"""
    chainId: String!
    """Token denom"""
    denom: String!
    """Fee amount allowed"""
    feeAmount: Long!
    """Gas limit allowed on transaction"""
    gasLimit: UInt64!
    """Memo used when send transaction"""
    memo: String!
    """Address prefix"""
    prefix: String!
}

"""List of all queries"""
type Query {
    """
    This query allow to get the actual server configuration.
    """
    configuration: Configuration!
}
