public class ManagedToken
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
ManagedToken.MintingProtocol |
|
static class |
ManagedToken.MintingRoot |
Constructor | Description |
---|---|
ManagedToken(byte[] sealedBinary,
byte[] previousTransaction) |
Restore token object.
|
ManagedToken(byte[] sealedBinary,
byte[] packedMintingProtocol,
byte[] packedMintingRoot) |
Restore token object.
|
ManagedToken(byte[] sealedBinary,
ManagedToken.MintingProtocol protocol) |
Restore token object.
|
ManagedToken(java.math.BigDecimal amount,
com.icodici.crypto.KeyAddress owner,
byte[] previousTransaction) |
Create new token object ready to issue.
|
ManagedToken(java.math.BigDecimal amount,
com.icodici.crypto.KeyAddress owner,
byte[] packedMintingProtocol,
byte[] packedMintingRoot) |
Create new token object ready to issue.
|
ManagedToken(java.math.BigDecimal amount,
com.icodici.crypto.KeyAddress owner,
ManagedToken.MintingProtocol protocol) |
Create new token object ready to issue.
|
Modifier and Type | Method | Description |
---|---|---|
Contract |
getContract() |
Get token contract
|
ManagedToken.MintingProtocol |
getMintingProtocol() |
Get protocol object
|
TransactionPack |
getTransaction() |
Get transaction to be registered
|
void |
revoke() |
Revoke token
This method creates transaction to be registered
getTransaction() |
static void |
updateMintingRootReference(TransactionPack transactionPack,
byte[] packedMintingRoot) |
The last known root contract could become outdated due to multisig changes or issuing new protocol
In this case there is a way to updated root contract within already formed transaction by calling this method
|
static void |
updateMintingRootReference(TransactionPack transactionPack,
ManagedToken.MintingRoot mintingRoot) |
The last known root contract could become outdated due to multisig changes or issuing new protocol
In this case there is a way to updated root contract within already formed transaction by calling this method
|
public ManagedToken(java.math.BigDecimal amount, com.icodici.crypto.KeyAddress owner, byte[] previousTransaction) throws java.io.IOException
amount
- amount to issueowner
- owner addresspreviousTransaction
- packed transaction involving root contract and protocol contractjava.io.IOException
public ManagedToken(java.math.BigDecimal amount, com.icodici.crypto.KeyAddress owner, byte[] packedMintingProtocol, byte[] packedMintingRoot) throws java.io.IOException
amount
- amount to issueowner
- owner addresspackedMintingProtocol
- packed transaction involving protocol contract or its sealed binarypackedMintingRoot
- packed transaction involving root contract or its sealed binaryjava.io.IOException
public ManagedToken(java.math.BigDecimal amount, com.icodici.crypto.KeyAddress owner, ManagedToken.MintingProtocol protocol)
getTransaction()
amount
- amount to issueowner
- owner addressprotocol
- restored protocol objectjava.io.IOException
public ManagedToken(byte[] sealedBinary, byte[] previousTransaction) throws java.io.IOException
sealedBinary
- token sealed binarypreviousTransaction
- packed transaction involving root contract and protocol contractjava.io.IOException
public ManagedToken(byte[] sealedBinary, byte[] packedMintingProtocol, byte[] packedMintingRoot) throws java.io.IOException
sealedBinary
- token sealed binarypackedMintingProtocol
- packed transaction involving protocol contract or sealed binarypackedMintingRoot
- packed transaction involving root contract or sealed binaryjava.io.IOException
public ManagedToken(byte[] sealedBinary, ManagedToken.MintingProtocol protocol) throws java.io.IOException
sealedBinary
- token sealed binaryprotocol
- protocol objectjava.io.IOException
public static void updateMintingRootReference(TransactionPack transactionPack, ManagedToken.MintingRoot mintingRoot)
transactionPack
- transaction to updatedmintingRoot
- root object containing an updated contractpublic static void updateMintingRootReference(TransactionPack transactionPack, byte[] packedMintingRoot) throws java.io.IOException
transactionPack
- transaction to updatedpackedMintingRoot
- packed transaction involving root contract or sealed binaryjava.io.IOException
public Contract getContract()
public ManagedToken.MintingProtocol getMintingProtocol()
public TransactionPack getTransaction()
public void revoke()
getTransaction()