[][src]Struct sunshine_bounty_client::Client

pub struct Client<T, P, I> where
    T: Runtime + Org + Vote + Donate + Bank + Bounty,
    <<T::Extra as SignedExtra<T>>::Extra as SignedExtension>::AdditionalSigned: Send + Sync,
    P: Pair,
    I: Store
{ pub cache: Mutex<BlockBuilder<I, Codec>>, // some fields omitted }

Fields

cache: Mutex<BlockBuilder<I, Codec>>

Implementations

impl<T, P, I> Client<T, P, I> where
    T: Runtime + Org + Vote + Donate + Bank + Bounty,
    <T as System>::AccountId: Into<<T as System>::Address> + Ss58Codec,
    T::Signature: Decode + From<P::Signature>,
    <T::Signature as Verify>::Signer: From<P::Public> + IdentifyAccount<AccountId = <T as System>::AccountId>,
    <<T::Extra as SignedExtra<T>>::Extra as SignedExtension>::AdditionalSigned: Send + Sync,
    P: Pair,
    <P as Pair>::Public: Into<<T as System>::AccountId>,
    <P as Pair>::Seed: From<[u8; 32]>,
    I: Store
[src]

pub fn new(keystore: KeyStore, subxt: Client<T>, store: I) -> Self[src]

pub async fn has_device_key<'_>(&'_ self) -> bool[src]

Set device key, directly from substrate-identity to use with keystore

pub async fn set_device_key<'_, '_, '_>(
    &'_ self,
    dk: &'_ DeviceKey,
    password: &'_ Password,
    force: bool
) -> Result<<T as System>::AccountId, Error>
[src]

Set device key, directly from substrate-identity to use with keystore

pub async fn signer<'_>(&'_ self) -> Result<PairSigner<T, P>, Error>[src]

Returns a signer for alice

pub async fn register_flat_org<'_, '_>(
    &'_ self,
    sudo: Option<<T as System>::AccountId>,
    parent_org: Option<<T as Org>::OrgId>,
    constitution: <T as Org>::IpfsReference,
    members: &'_ [<T as System>::AccountId]
) -> Result<NewFlatOrganizationRegisteredEvent<T>, Error>
[src]

pub async fn register_weighted_org<'_, '_>(
    &'_ self,
    sudo: Option<<T as System>::AccountId>,
    parent_org: Option<<T as Org>::OrgId>,
    constitution: <T as Org>::IpfsReference,
    weighted_members: &'_ [(<T as System>::AccountId, <T as Org>::Shares)]
) -> Result<NewWeightedOrganizationRegisteredEvent<T>, Error>
[src]

pub async fn issue_shares<'_>(
    &'_ self,
    organization: <T as Org>::OrgId,
    who: <T as System>::AccountId,
    shares: <T as Org>::Shares
) -> Result<SharesIssuedEvent<T>, Error>
[src]

pub async fn burn_shares<'_>(
    &'_ self,
    organization: <T as Org>::OrgId,
    who: <T as System>::AccountId,
    shares: <T as Org>::Shares
) -> Result<SharesBurnedEvent<T>, Error>
[src]

pub async fn batch_issue_shares<'_, '_>(
    &'_ self,
    organization: <T as Org>::OrgId,
    new_accounts: &'_ [(<T as System>::AccountId, <T as Org>::Shares)]
) -> Result<SharesBatchIssuedEvent<T>, Error>
[src]

pub async fn batch_burn_shares<'_, '_>(
    &'_ self,
    organization: <T as Org>::OrgId,
    old_accounts: &'_ [(<T as System>::AccountId, <T as Org>::Shares)]
) -> Result<SharesBatchBurnedEvent<T>, Error>
[src]

pub async fn reserve_shares<'_, '_>(
    &'_ self,
    org: <T as Org>::OrgId,
    who: &'_ <T as System>::AccountId
) -> Result<SharesReservedEvent<T>, Error>
[src]

pub async fn unreserve_shares<'_, '_>(
    &'_ self,
    org: <T as Org>::OrgId,
    who: &'_ <T as System>::AccountId
) -> Result<SharesUnReservedEvent<T>, Error>
[src]

pub async fn lock_shares<'_, '_>(
    &'_ self,
    org: <T as Org>::OrgId,
    who: &'_ <T as System>::AccountId
) -> Result<SharesLockedEvent<T>, Error>
[src]

pub async fn unlock_shares<'_, '_>(
    &'_ self,
    org: <T as Org>::OrgId,
    who: &'_ <T as System>::AccountId
) -> Result<SharesUnlockedEvent<T>, Error>
[src]

pub async fn create_threshold_approval_vote<'_>(
    &'_ self,
    topic: Option<<T as Org>::IpfsReference>,
    organization: T::OrgId,
    support_requirement: T::Signal,
    turnout_requirement: Option<T::Signal>,
    duration: Option<<T as System>::BlockNumber>
) -> Result<NewVoteStartedEvent<T>, Error>
[src]

pub async fn submit_vote<'_>(
    &'_ self,
    vote_id: <T as Vote>::VoteId,
    direction: VoterView,
    justification: Option<<T as Org>::IpfsReference>
) -> Result<VotedEvent<T>, Error>
[src]

pub async fn make_prop_donation_with_fee<'_>(
    &'_ self,
    org: <T as Org>::OrgId,
    amt: <T as Donate>::DCurrency
) -> Result<DonationExecutedEvent<T>, Error>
[src]

pub async fn make_prop_donation_without_fee<'_>(
    &'_ self,
    org: <T as Org>::OrgId,
    amt: <T as Donate>::DCurrency
) -> Result<DonationExecutedEvent<T>, Error>
[src]

pub async fn open_org_bank_account<'_>(
    &'_ self,
    seed: <T as Bank>::Currency,
    hosting_org: <T as Org>::OrgId,
    bank_operator: Option<<T as System>::AccountId>
) -> Result<OrgBankAccountOpenedEvent<T>, Error>
[src]

pub async fn account_posts_bounty<'_>(
    &'_ self,
    description: <T as Org>::IpfsReference,
    amount_reserved_for_bounty: <T as Bank>::Currency,
    acceptance_committee: ResolutionMetadata<<T as Org>::OrgId, <T as Vote>::Signal, <T as System>::BlockNumber>,
    supervision_committee: Option<ResolutionMetadata<<T as Org>::OrgId, <T as Vote>::Signal, <T as System>::BlockNumber>>
) -> Result<BountyPostedEvent<T>, Error>
[src]

pub async fn account_applies_for_bounty<'_>(
    &'_ self,
    bounty_id: <T as Bounty>::BountyId,
    description: <T as Org>::IpfsReference,
    total_amount: <T as Bank>::Currency
) -> Result<BountyApplicationSubmittedEvent<T>, Error>
[src]

pub async fn account_triggers_application_review<'_>(
    &'_ self,
    bounty_id: <T as Bounty>::BountyId,
    new_grant_app_id: <T as Bounty>::BountyId
) -> Result<ApplicationReviewTriggeredEvent<T>, Error>
[src]

pub async fn account_sudo_approves_application<'_>(
    &'_ self,
    bounty_id: <T as Bounty>::BountyId,
    application_id: <T as Bounty>::BountyId
) -> Result<SudoApprovedApplicationEvent<T>, Error>
[src]

pub async fn poll_application<'_>(
    &'_ self,
    bounty_id: <T as Bounty>::BountyId,
    application_id: <T as Bounty>::BountyId
) -> Result<ApplicationPolledEvent<T>, Error>
[src]

pub async fn submit_milestone<'_>(
    &'_ self,
    bounty_id: <T as Bounty>::BountyId,
    application_id: <T as Bounty>::BountyId,
    submission_reference: <T as Org>::IpfsReference,
    amount_requested: <T as Bank>::Currency
) -> Result<MilestoneSubmittedEvent<T>, Error>
[src]

pub async fn trigger_milestone_review<'_>(
    &'_ self,
    bounty_id: <T as Bounty>::BountyId,
    milestone_id: <T as Bounty>::BountyId
) -> Result<MilestoneReviewTriggeredEvent<T>, Error>
[src]

pub async fn sudo_approves_milestone<'_>(
    &'_ self,
    bounty_id: <T as Bounty>::BountyId,
    milestone_id: <T as Bounty>::BountyId
) -> Result<MilestoneSudoApprovedEvent<T>, Error>
[src]

pub async fn poll_milestone<'_>(
    &'_ self,
    bounty_id: <T as Bounty>::BountyId,
    milestone_id: <T as Bounty>::BountyId
) -> Result<MilestonePolledEvent<T>, Error>
[src]

Trait Implementations

impl<T, P, I> AbstractClient<T, P> for Client<T, P, I> where
    T: Runtime + Org + Vote + Donate + Bank + Bounty,
    <T as System>::AccountId: Into<<T as System>::Address> + Ss58Codec,
    T::Signature: Decode + From<P::Signature>,
    <T::Signature as Verify>::Signer: From<P::Public> + IdentifyAccount<AccountId = <T as System>::AccountId>,
    <<T::Extra as SignedExtra<T>>::Extra as SignedExtension>::AdditionalSigned: Send + Sync,
    P: Pair,
    <P as Pair>::Public: Into<<T as System>::AccountId>,
    <P as Pair>::Seed: From<[u8; 32]>,
    I: Store + Send + Sync
[src]

Auto Trait Implementations

impl<T, P, I> !RefUnwindSafe for Client<T, P, I>

impl<T, P, I> Send for Client<T, P, I> where
    I: Send,
    <T as Runtime>::Extra: Send,
    <T as System>::Hash: Send

impl<T, P, I> Sync for Client<T, P, I> where
    I: Send,
    <T as Runtime>::Extra: Sync,
    <T as System>::Hash: Sync

impl<T, P, I> Unpin for Client<T, P, I> where
    I: Unpin,
    P: Unpin,
    T: Unpin,
    <T as Runtime>::Extra: Unpin,
    <T as System>::Hash: Unpin

impl<T, P, I> !UnwindSafe for Client<T, P, I>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IsType<T> for T[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>, 
[src]

fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    S: TryInto<T>,
    T: Bounded

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,