All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.provenance.client.protobuf.extensions.Governance.kt Maven / Gradle / Ivy

There is a newer version: 1.20.1
Show newest version
package io.provenance.client.protobuf.extensions

import cosmos.gov.v1beta1.Gov
import cosmos.gov.v1beta1.QueryGrpc.QueryBlockingStub as BlockingGovernance
import cosmos.gov.v1beta1.QueryGrpcKt.QueryCoroutineStub as CoroutineGovernance

/**
 * Get a coin balance in the account at the supplied address.
 *
 * @return A list of [Gov.Proposal]
 */
fun BlockingGovernance.getAllProposals(): List =
    proposals(cosmos.gov.v1beta1.QueryOuterClass.QueryProposalsRequest.getDefaultInstance()).proposalsList

/**
 * Get a coin balance in the account at the supplied address.
 *
 * @return A list of [Gov.Proposal]
 */
suspend fun CoroutineGovernance.getAllProposals(): List =
    proposals(cosmos.gov.v1beta1.QueryOuterClass.QueryProposalsRequest.getDefaultInstance()).proposalsList




© 2015 - 2024 Weber Informatics LLC | Privacy Policy