cosmpy.auth package — cosmpy documentation

# cosmpy.auth package

## Submodules

## cosmpy.auth.interface module

Interface for the Auth functionality of CosmosSDK.

class cosmpy.auth.interface.Auth

  Bases: `abc.ABC`

  Auth abstract class.

  abstract Account(request: cosmos.auth.v1beta1.query_pb2.QueryAccountRequest) → cosmos.auth.v1beta1.query_pb2.QueryAccountResponse

    Queries account data - sequence, account_id, etc.

    Parameters

      request – QueryAccountRequest that contains account address

    Returns

      QueryAccountResponse

  abstract Params(request: cosmos.auth.v1beta1.query_pb2.QueryParamsRequest) → cosmos.auth.v1beta1.query_pb2.QueryParamsResponse

    Queries all parameters

    Parameters

      request – QueryParamsRequest

    Returns

      QueryParamsResponse

## cosmpy.auth.rest_client module

Implementation of Auth interface using REST.

class cosmpy.auth.rest_client.AuthRestClient(rest_api: cosmpy.common.rest_client.RestClient)

  Bases: `cosmpy.auth.interface.Auth`

  Auth REST client.

  API_URL = '/cosmos/auth/v1beta1'
  Account(request: cosmos.auth.v1beta1.query_pb2.QueryAccountRequest) → cosmos.auth.v1beta1.query_pb2.QueryAccountResponse

    Queries account data - sequence, account_id, etc.

    Parameters

      request – QueryAccountRequest that contains account address

    Returns

      QueryAccountResponse

  Params(request: cosmos.auth.v1beta1.query_pb2.QueryParamsRequest) → cosmos.auth.v1beta1.query_pb2.QueryParamsResponse

    Queries all parameters

    Parameters

      request – QueryParamsRequest

    Returns

      QueryParamsResponse

## Module contents

This package contains the Auth modules.