Package com.algorand.algosdk.templates
Class DynamicFee
java.lang.Object
com.algorand.algosdk.templates.DynamicFee
@Deprecated
public class DynamicFee
extends java.lang.Object
Deprecated.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DynamicFee.SignedDynamicFee
Deprecated.Container class for the signed dynamic fee data returned by SignDynamicFee. -
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
referenceProgram
Deprecated. -
Constructor Summary
Constructors Constructor Description DynamicFee()
Deprecated. -
Method Summary
Modifier and Type Method Description static ContractTemplate
MakeDynamicFee(Address receiver, java.lang.Integer amount, java.lang.Integer firstValid, java.lang.Integer lastValid, Address closeRemainderAddress)
Deprecated.DynamicFee contract allows you to create a transaction without specifying the fee.protected static ContractTemplate
MakeDynamicFee(Address receiver, java.lang.Integer amount, java.lang.Integer firstValid, java.lang.Integer lastValid, Address closeRemainderAddress, Lease lease)
Deprecated.static byte[]
MakeReimbursementTransactions(Transaction txn, LogicsigSignature lsig, Account account, int feePerByte)
Deprecated.Create and sign the secondary dynamic fee transaction, update transaction fields, and sign as the fee payer; return both transactions ready to be sent.static DynamicFee.SignedDynamicFee
SignDynamicFee(ContractTemplate contract, Account senderAccount, Digest genesisHash)
Deprecated.Return the main transaction and signed logic needed to complete the transfer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
referenceProgram
protected static java.lang.String referenceProgramDeprecated.
-
-
Constructor Details
-
DynamicFee
public DynamicFee()Deprecated.
-
-
Method Details
-
MakeDynamicFee
public static ContractTemplate MakeDynamicFee(Address receiver, java.lang.Integer amount, java.lang.Integer firstValid, java.lang.Integer lastValid, Address closeRemainderAddress) throws java.security.NoSuchAlgorithmExceptionDeprecated.DynamicFee contract allows you to create a transaction without specifying the fee. The fee will be determined at the moment of transfer.- Parameters:
receiver
- (str): address to receive the assetsamount
- (int): amount of assets to transferfirstValid
- (int): first valid round for the transactionlastValid
- (int, optional): last valid round for the transaction (default to first_valid + 1000)closeRemainderAddress
- (str, optional): if you would like to close the account after the transfer, specify the address that would recieve the remainder- Throws:
java.security.NoSuchAlgorithmException
-
MakeDynamicFee
protected static ContractTemplate MakeDynamicFee(Address receiver, java.lang.Integer amount, java.lang.Integer firstValid, java.lang.Integer lastValid, Address closeRemainderAddress, Lease lease) throws java.security.NoSuchAlgorithmExceptionDeprecated.- Throws:
java.security.NoSuchAlgorithmException
-
SignDynamicFee
public static DynamicFee.SignedDynamicFee SignDynamicFee(ContractTemplate contract, Account senderAccount, Digest genesisHash) throws java.io.IOExceptionDeprecated.Return the main transaction and signed logic needed to complete the transfer. These should be sent to the fee payer, who can use get_transactions() to update fields and create the auxiliary transaction. The transaction and logicsig should be sent to the other party as base64 encoded objects: SignedDynamicFee sdf = DynamicFee.SignDynamicFee(...); String encodedLsig = Encoder.encodeToBase64(Encoder.encodeToMsgPack(sdf.lsig)); String encodedTxn = Encoder.encodeToBase64(Encoder.encodeToMsgPack(sdf.txn));- Parameters:
contract
- DynamicFee contract created with MakeDynamicFee.senderAccount
- sender account to sign the transaction.genesisHash
- Genesis hash for the network where the transaction will be submitted.- Returns:
- Throws:
java.io.IOException
-
MakeReimbursementTransactions
public static byte[] MakeReimbursementTransactions(Transaction txn, LogicsigSignature lsig, Account account, int feePerByte) throws java.security.NoSuchAlgorithmException, java.io.IOExceptionDeprecated.Create and sign the secondary dynamic fee transaction, update transaction fields, and sign as the fee payer; return both transactions ready to be sent. Create the Transaction and LogicsigSignature objects from base64 encoded objects: Encoder.decodeFromMsgPack(encodedTxn, Transaction.class), Encoder.decodeFromMsgPack(encodedLsig, LogicsigSignature.class),- Parameters:
txn
- main transaction from payerlsig
- signed logic received from payeraccount
- an account initialized with a signing key.feePerByte
- fee per byte, for both transactions- Throws:
java.security.NoSuchAlgorithmException
java.io.IOException
-