Package com.algorand.algosdk.templates
Class Split
java.lang.Object
com.algorand.algosdk.templates.Split
@Deprecated
public class Split
extends java.lang.Object
Deprecated.
-
Constructor Summary
Constructors Constructor Description Split()
Deprecated. -
Method Summary
Modifier and Type Method Description static byte[]
GetSplitTransactions(ContractTemplate contract, int amount, int firstValid, int lastValid, int feePerByte, Digest genesisHash)
Deprecated.Generate group transactions to transfer funds according to the contract's ratio.static ContractTemplate
MakeSplit(Address owner, Address receiver1, Address receiver2, int rat1, int rat2, int expiryRound, int minPay, int maxFee)
Deprecated.Split allows locking algos in an account which allows transfering to two predefined addresses in a specified ratio such that for the given ratn and ratd parameters we have: first_recipient_amount * rat_2 == second_recipient_amount * rat_1 Split also has an expiry round, after which the owner can transfer back the funds.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Split
public Split()Deprecated.
-
-
Method Details
-
MakeSplit
public static ContractTemplate MakeSplit(Address owner, Address receiver1, Address receiver2, int rat1, int rat2, int expiryRound, int minPay, int maxFee) throws java.security.NoSuchAlgorithmExceptionDeprecated.Split allows locking algos in an account which allows transfering to two predefined addresses in a specified ratio such that for the given ratn and ratd parameters we have: first_recipient_amount * rat_2 == second_recipient_amount * rat_1 Split also has an expiry round, after which the owner can transfer back the funds.- Parameters:
owner
- the address to refund funds to on timeoutreceiver1
- the first recipient in the split accountreceiver2
- the second recipient in the split accountrat1
- how much receiver1 receives (proportionally)rat2
- how much receiver2 receives (proportionally)expiryRound
- the round at which the account expiresminPay
- minimum amount to be paid out of the account to receiver1maxFee
- half of the maximum fee used by each split forwarding group transaction- Returns:
- ContractTemplate with the address and the program with the given parameter values
- Throws:
java.security.NoSuchAlgorithmException
-
GetSplitTransactions
public static byte[] GetSplitTransactions(ContractTemplate contract, int amount, int firstValid, int lastValid, int feePerByte, Digest genesisHash) throws java.security.NoSuchAlgorithmException, java.io.IOExceptionDeprecated.Generate group transactions to transfer funds according to the contract's ratio.- Parameters:
contract
- the contract created with Split.MakeSplitamount
- amount to be transferred from the contract to the receivers according to the contract ratio.firstValid
- first round where the transactions are validgenesisHash
- genesis hashfeePerByte
- fee per byte multiplier- Returns:
- Throws:
java.security.NoSuchAlgorithmException
java.io.IOException
-