@@ -15,7 +15,7 @@ use iroha_config::{client::Configuration, torii::uri, GetConfiguration, PostConf
15
15
use iroha_crypto:: { HashOf , KeyPair } ;
16
16
use iroha_data_model:: {
17
17
block:: VersionedCommittedBlock , predicate:: PredicateBox , prelude:: * ,
18
- query:: error:: QueryExecutionFailure , transaction:: Payload ,
18
+ query:: error:: QueryExecutionFailure , transaction:: TransactionPayload ,
19
19
} ;
20
20
use iroha_logger:: prelude:: * ;
21
21
use iroha_primitives:: small:: SmallStr ;
@@ -329,7 +329,7 @@ impl Client {
329
329
instructions : impl Into < Executable > ,
330
330
metadata : UnlimitedMetadata ,
331
331
) -> Result < SignedTransaction > {
332
- let transaction = Transaction :: new (
332
+ let transaction = TransactionBuilder :: new (
333
333
self . account_id . clone ( ) ,
334
334
instructions,
335
335
self . proposed_transaction_ttl_ms ,
@@ -343,7 +343,9 @@ impl Client {
343
343
}
344
344
. with_metadata ( metadata) ;
345
345
346
- self . sign_transaction ( transaction_with_metadata)
346
+ transaction_with_metadata
347
+ . sign ( self . key_pair . clone ( ) )
348
+ . wrap_err ( "Failed to sign transaction" )
347
349
}
348
350
349
351
/// Signs transaction
@@ -360,7 +362,7 @@ impl Client {
360
362
///
361
363
/// # Errors
362
364
/// Fails if signature generation fails
363
- pub fn sign_query ( & self , query : QueryRequest ) -> Result < SignedQueryRequest > {
365
+ pub fn sign_query ( & self , query : QueryBuilder ) -> Result < SignedQuery > {
364
366
query
365
367
. sign ( self . key_pair . clone ( ) )
366
368
. wrap_err ( "Failed to sign query" )
@@ -392,7 +394,7 @@ impl Client {
392
394
}
393
395
394
396
/// Instructions API entry point. Submits one Iroha Special Instruction to `Iroha` peers.
395
- /// Allows to specify [`Metadata`] of [`Transaction `].
397
+ /// Allows to specify [`Metadata`] of [`TransactionBuilder `].
396
398
/// Returns submitted transaction's hash or error string.
397
399
///
398
400
/// # Errors
@@ -406,7 +408,7 @@ impl Client {
406
408
}
407
409
408
410
/// Instructions API entry point. Submits several Iroha Special Instructions to `Iroha` peers.
409
- /// Allows to specify [`Metadata`] of [`Transaction `].
411
+ /// Allows to specify [`Metadata`] of [`TransactionBuilder `].
410
412
/// Returns submitted transaction's hash or error string.
411
413
///
412
414
/// # Errors
@@ -591,7 +593,7 @@ impl Client {
591
593
}
592
594
593
595
/// Submits and waits until the transaction is either rejected or committed.
594
- /// Allows to specify [`Metadata`] of [`Transaction `].
596
+ /// Allows to specify [`Metadata`] of [`TransactionBuilder `].
595
597
/// Returns rejection reason if transaction was rejected.
596
598
///
597
599
/// # Errors
@@ -605,7 +607,7 @@ impl Client {
605
607
}
606
608
607
609
/// Submits and waits until the transaction is either rejected or committed.
608
- /// Allows to specify [`Metadata`] of [`Transaction `].
610
+ /// Allows to specify [`Metadata`] of [`TransactionBuilder `].
609
611
/// Returns rejection reason if transaction was rejected.
610
612
///
611
613
/// # Errors
@@ -693,8 +695,8 @@ impl Client {
693
695
{
694
696
let pagination: Vec < _ > = pagination. into ( ) ;
695
697
let sorting: Vec < _ > = sorting. into ( ) ;
696
- let request = QueryRequest :: new ( request. into ( ) , self . account_id . clone ( ) , filter) ;
697
- let request: VersionedSignedQueryRequest = self . sign_query ( request) ?. into ( ) ;
698
+ let request = QueryBuilder :: new ( request. into ( ) , self . account_id . clone ( ) , filter) ;
699
+ let request: VersionedSignedQuery = self . sign_query ( request) ?. into ( ) ;
698
700
699
701
Ok ( (
700
702
B :: new (
@@ -939,7 +941,10 @@ impl Client {
939
941
}
940
942
941
943
/// Check if two transactions are the same. Compare their contents excluding the creation time.
942
- fn equals_excluding_creation_time ( first : & Payload , second : & Payload ) -> bool {
944
+ fn equals_excluding_creation_time (
945
+ first : & TransactionPayload ,
946
+ second : & TransactionPayload ,
947
+ ) -> bool {
943
948
first. account_id ( ) == second. account_id ( )
944
949
&& first. instructions ( ) == second. instructions ( )
945
950
&& first. time_to_live_ms ( ) == second. time_to_live_ms ( )
0 commit comments