Struct flow_sdk::multi::PartyBuilder [−][src]
pub struct PartyBuilder { /* fields omitted */ }
Expand description
A builder that makes it easy to create new SigningParty
instances.
let party = PartyBuilder::new()
.script("s")
.reference_block([0])
.gas_limit(123)
.proposer_address([1])
.proposal_key_id(2)
.proposal_key_sequence_number(3)
.payer([4])
.authorizer([5])
.build();
let party2 = SigningParty::new("s".into(), [].into(), [0].into(), 123, [1].into(), 2, 3, [4].into(), [[5].into()].into());
assert_eq!(party, party2);
Implementations
Appends arguments.
Appends a new UTF-8 encoded argument in Cadence JSON interchange format.
Appends raw UTF-8 encoded arguments in Cadence JSON interchange format.
Sets the reference block for this transaction.
pub async fn latest_block_as_reference<C: GrpcClient<GetLatestBlockHeaderRequest, BlockHeaderResponse>>(
self,
client: &mut C
) -> Result<Self, C::Error>
pub async fn latest_block_as_reference<C: GrpcClient<GetLatestBlockHeaderRequest, BlockHeaderResponse>>(
self,
client: &mut C
) -> Result<Self, C::Error>
Uses the latest block as the reference block for this transaction.
Sets the address of the account that proposes this transaction.
Sets the key id of the proposal key of this transaction.
Sets the sequence number of the proposal key of this transaction.
pub async fn proposer_account<'a, C, Sk, Sign, Hash>(
self,
acc: &'a mut Account<C, Sk, Sign, Hash>
) -> Result<Self, BoxError> where
C: GrpcClient<GetAccountAtLatestBlockRequest<&'a [u8]>, AccountResponse>,
Sign: FlowSigner<SecretKey = Sk>,
Hash: FlowHasher,
pub async fn proposer_account<'a, C, Sk, Sign, Hash>(
self,
acc: &'a mut Account<C, Sk, Sign, Hash>
) -> Result<Self, BoxError> where
C: GrpcClient<GetAccountAtLatestBlockRequest<&'a [u8]>, AccountResponse>,
Sign: FlowSigner<SecretKey = Sk>,
Hash: FlowHasher,
Sets the address, key id and the sequence number by querying on the network about a logged-in account.
Sets the address of the account that will pay for this transaction.
Records the address of the account that will pay for this transaction.
Appends the address of an account which authorizes this transaction.
Appends the addresses of accounts that authorizes this transaction.
Appends the address of an account which authorizers this transaction.
Appends the addresses of accounts that authorizes this transaction.
Builds a SigningParty
from this builder, assuming all fields have been set.
Builds a PreHashedParty
from this builder, assuming all fields have been set.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PartyBuilder
impl Send for PartyBuilder
impl Sync for PartyBuilder
impl Unpin for PartyBuilder
impl UnwindSafe for PartyBuilder
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more