@@ -10,29 +10,34 @@ use dpp::identity::IdentityPublicKey;
1010use dpp:: state_transition:: batch_transition:: methods:: v0:: DocumentsBatchTransitionMethodsV0 ;
1111use dpp:: state_transition:: batch_transition:: BatchTransition ;
1212use dpp:: state_transition:: StateTransition ;
13+ use dpp:: tokens:: token_payment_info:: TokenPaymentInfo ;
1314
1415#[ async_trait:: async_trait]
1516/// A trait for putting a document to platform
1617pub trait PutDocument < S : Signer > : Waitable {
1718 /// Puts a document on platform
1819 /// setting settings to `None` sets default connection behavior
20+ #[ allow( clippy:: too_many_arguments) ]
1921 async fn put_to_platform (
2022 & self ,
2123 sdk : & Sdk ,
2224 document_type : DocumentType ,
2325 document_state_transition_entropy : [ u8 ; 32 ] ,
2426 identity_public_key : IdentityPublicKey ,
27+ token_payment_info : Option < TokenPaymentInfo > ,
2528 signer : & S ,
2629 settings : Option < PutSettings > ,
2730 ) -> Result < StateTransition , Error > ;
2831
2932 /// Puts an identity on platform and waits for the confirmation proof
33+ #[ allow( clippy:: too_many_arguments) ]
3034 async fn put_to_platform_and_wait_for_response (
3135 & self ,
3236 sdk : & Sdk ,
3337 document_type : DocumentType ,
3438 document_state_transition_entropy : [ u8 ; 32 ] ,
3539 identity_public_key : IdentityPublicKey ,
40+ token_payment_info : Option < TokenPaymentInfo > ,
3641 signer : & S ,
3742 settings : Option < PutSettings > ,
3843 ) -> Result < Document , Error > ;
@@ -46,6 +51,7 @@ impl<S: Signer> PutDocument<S> for Document {
4651 document_type : DocumentType ,
4752 document_state_transition_entropy : [ u8 ; 32 ] ,
4853 identity_public_key : IdentityPublicKey ,
54+ token_payment_info : Option < TokenPaymentInfo > ,
4955 signer : & S ,
5056 settings : Option < PutSettings > ,
5157 ) -> Result < StateTransition , Error > {
@@ -67,7 +73,7 @@ impl<S: Signer> PutDocument<S> for Document {
6773 & identity_public_key,
6874 new_identity_contract_nonce,
6975 settings. user_fee_increase . unwrap_or_default ( ) ,
70- None ,
76+ token_payment_info ,
7177 signer,
7278 sdk. version ( ) ,
7379 settings. state_transition_creation_options ,
@@ -84,6 +90,7 @@ impl<S: Signer> PutDocument<S> for Document {
8490 document_type : DocumentType ,
8591 document_state_transition_entropy : [ u8 ; 32 ] ,
8692 identity_public_key : IdentityPublicKey ,
93+ token_payment_info : Option < TokenPaymentInfo > ,
8794 signer : & S ,
8895 settings : Option < PutSettings > ,
8996 ) -> Result < Document , Error > {
@@ -93,6 +100,7 @@ impl<S: Signer> PutDocument<S> for Document {
93100 document_type,
94101 document_state_transition_entropy,
95102 identity_public_key,
103+ token_payment_info,
96104 signer,
97105 settings,
98106 )
0 commit comments