d62e13c932
* Add spend credential endpoint to coconut bandwidth contract * Store spent credentials support * Add query endpoint for spent credentials * Proposals allowed only from special (contract) address * Include check for admin in tests * Create proposal from CBC * Refactor into coconut integration tests * Create proposal with spend credential integration test * Resolve mixnet warnings * Refactor to re-enable build * Call CBC from gateway and remove validator-api workaround * Include migration for the first deployment of multisig * Fix bug in proposal id parsing * Remove more validator-api create proposal code * Check for InProgress status of credential * Check the proposed voucher value * Unwrapping cosmos msg from gateway * Improve error message * More nit fixing * Test getting validator api cosmos address endpoint * Refactor to prepare for distributed comm channel * Refactor coconut e2e test for reuse * Verification of cred endpoint test * Update CHANGELOG
21 lines
794 B
Rust
21 lines
794 B
Rust
// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
use crate::coconut::error::Result;
|
|
use coconut_bandwidth_contract_common::spend_credential::SpendCredentialResponse;
|
|
use multisig_contract_common::msg::ProposalResponse;
|
|
use validator_client::nymd::{AccountId, Fee, TxResponse};
|
|
|
|
#[async_trait]
|
|
pub trait Client {
|
|
async fn address(&self) -> AccountId;
|
|
async fn get_tx(&self, tx_hash: &str) -> Result<TxResponse>;
|
|
async fn get_proposal(&self, proposal_id: u64) -> Result<ProposalResponse>;
|
|
async fn get_spent_credential(
|
|
&self,
|
|
blinded_serial_number: String,
|
|
) -> Result<SpendCredentialResponse>;
|
|
async fn vote_proposal(&self, proposal_id: u64, vote_yes: bool, fee: Option<Fee>)
|
|
-> Result<()>;
|
|
}
|