API Documentation

org.arkecosystem.crypto.configuration.Fee;

get()

1public static long get(Types type)

Get a fee for a given transaction type

Parameters

Type Name Required Description
Types type Yes Transaction type for which we wish to get a fee

Return Value

long

set()

1public static void set(Types type, long fee)

Set a fee

Parameters

Type Name Required Description
Types type Yes Transaction type for which we wish to set a fee
long fee Yes Fee for a given transaction type

Return Value

void

org.arkecosystem.crypto.configuration.Network;

set()

1public static void set(INetwork network)

Set what network you want to use in the crypto library

Parameters

Type Name Required Description
INetwork network Yes Testnet, Devnet, Mainnet

Return Value

void

get()

1public static INetwork get()

Get settings for a selected network, default network is devnet

Return Value

INetwork

org.arkecosystem.crypto.enums.Fees;

getValue()

1public Long getValue()

Get the fees value.

Return Value

Long

org.arkecosystem.crypto.enums.Types;

getValue()

1public int getValue()

Get the types value.

Return Value

int

org.arkecosystem.crypto.identities.Address;

fromPublicKey() (string, integer)

1public static String fromPublicKey(String publicKey, Integer networkVersion)

Derive the address from the given public key.

Parameters

Type Name Required Description
String publicKey Yes Public key
Integer networkVersion Yes Version of the network

Return Value

String

fromPublicKey() string

1public static String fromPublicKey(String publicKey)

Derive the address from the given public key.

Parameters

Type Name Required Description
String publicKey Yes Public key

Return Value

String

fromPrivateKey() (eckey, integer)

1public static String fromPrivateKey(ECKey privateKey, Integer networkVersion)

Derive the address from the given private key.

Parameters

Type Name Required Description
ECKey privateKey Yes Private key
Integer networkVersion No Version of the network

Return Value

String

fromPrivateKey() eckey

1public static String fromPrivateKey(ECKey privateKey)

Derive the address from the given private key.

Parameters

Type Name Required Description
ECKey privateKey Yes Private key

Return Value

String

fromPassphrase() (string, integer)

1public static String fromPassphrase(String passphrase, Integer networkVersion)

Derive the address from the given passphrase.

Parameters

Type Name Required Description
String passphrase Yes Passphrase
Integer networkVersion No Version of the network

Return Value

String

fromPassphrase() string

1public static String fromPassphrase(String passphrase)

Derive the address from the given passphrase.

Parameters

Type Name Required Description
String passphrase Yes Passphrase

Return Value

String

validate() (string, integer)

1public static Boolean validate(String address, Integer networkVersion)

Validate the given address.

Parameters

Type Name Required Description
String address Yes Address to validate
Integer networkVersion Yes Version of the network

Return Value

Boolean

validate() (string)

1public static Boolean validate(String address)

Validate the given address.

Parameters

Type Name Required Description
String address Yes Address to validate

Return Value

Boolean

org.arkecosystem.crypto.identities.PrivateKey;

fromPassphrase()

1public static ECKey fromPassphrase(String passphrase)

Derive the private key for the given passphrase.

Parameters

Type Name Required Description
String passphrase Yes Passphrase

Return Value

ECKey

fromHex()

1public static ECKey fromHex(String privateKey)

Create a private key instance from a hex String.

Parameters

Type Name Required Description
String privateKey Yes Hex string

Return Value

ECKey

org.arkecosystem.crypto.identities.PublicKey;

fromPassphrase()

1public static String fromPassphrase(String passphrase)

Derive the public from the given passphrase.

Parameters

Type Name Required Description
String passphrase Yes Passphrase

Return Value

String

org.arkecosystem.crypto.identities.WIF;

fromPassphrase()

1public static String fromPassphrase(String passphrase)

Derive the WIF from the given passphrase.

Parameters

Type Name Required Description
String passphrase Yes Passphrase

Return Value

String

org.arkecosystem.crypto.networks.Devnet;

version()

1public int version()

Get the epoch time of the start of the Network.

Return Value

int

wif()

1public int wif()

Get the epoch time of the start of the Network.

Return Value

int

epoch()

1public String epoch()

Get the epoch time of the start of the Network.

Return Value

String

org.arkecosystem.crypto.networks.Mainnet;

version()

1public int version()

Get the epoch time of the start of the Network.

Return Value

int

wif()

1public int wif()

Get the epoch time of the start of the Network.

Return Value

int

epoch()

1public String epoch()

Get the epoch time of the start of the Network.

Return Value

String

org.arkecosystem.crypto.networks.Testnet;

version()

1public int version()

Get the epoch time of the start of the Network.

Return Value

int

wif()

1public int wif()

Get the epoch time of the start of the Network.

Return Value

int

epoch()

1public String epoch()

Get the epoch time of the start of the Network.

Return Value

String

org.arkecosystem.crypto.transactions.builder.AbstractTransaction;

AbstractTransaction()

1public AbstractTransaction()

AbstractTransaction class constructor.

version()

1public TBuilder version(int version)

Sets the version of transaction.

Parameters

Type Name Required Description
int version Yes Version of a transaction

typeGroup()

1public TBuilder typeGroup(int typeGroup)

Sets the typeGroup of transaction.

Parameters

Type Name Required Description
int typeGroup Yes TypeGroup of transaction

nonce()

1public TBuilder nonce(long nonce)

Sets the nonce of transaction. To see how sequential nonces work, check this guide Understanding Transaction Nonce.

Parameters

Type Name Required Description
long nonce Yes Sequential Nonce of transaction

network()

1public TBuilder network(int network)

Sets the network of a transaction.

Parameters

Type Name Required Description
int network Yes Network of transaction

fee()

1public TBuilder fee(long fee)

Sets the fee of transaction.

Parameters

Type Name Required Description
long fee Yes Fee of transaction

amount()

1public TBuilder amount(long amount)

Sets the amount of transaction.

Parameters

Type Name Required Description
long amount Yes Amount of transaction

sign()

1public AbstractTransaction sign(String passphrase)

Sign the transaction using the given passphrase.

Parameters

Type Name Required Description
String passphrase Yes Passphrase associated with the account sending this transaction

Return Value

AbstractTransaction

secondSign()

1public AbstractTransaction secondSign(String passphrase)

Sign the transaction using the given second passphrase

Parameters

Type Name Required Description
String passphrase Yes Second passphrase associated with the account sending this transaction

Return Value

AbstractTransaction

getType()

1abstract int getType()

Get the type of the transaction.

instance()

1abstract TBuilder instance();

Get the instance of the builder.

org.arkecosystem.crypto.transactions.builder.DelegateRegistration;

getType()

1public int getType()

Get the type of the transaction.

Return Value

int

username()

1public DelegateRegistration username(String username)

Set the username to assign.

Parameters

Type Name Required Description
String username Yes Username

Return Value

DelegateRegistration

instance()

1public DelegateRegistration instance()

Return Value

DelegateRegistration

org.arkecosystem.crypto.transactions.builder.DelegateResignation;

getType()

1public int getType()

Get the type of the transaction.

Return Value

int

instance()

1public DelegateResignation instance()

Return Value

DelegateResignation

org.arkecosystem.crypto.transactions.builder.HtlcClaim;

getType()

1public int getType()

Get the type of the transaction.

Return Value

int

htlcClaimAsset()

1public HtlcClaim htlcClaimAsset(String lockTransactionId, String unlockSecret)

Sets the locks transaction id and unlock secret.

Parameters

Type Name Required Description
String lockTransactionId Yes Lock transaction id
String unlockSecret Yes Unlock secret

Return Value

HtlcClaim

instance()

1public HtlcClaim instance()

Return Value

HtlcClaim

org.arkecosystem.crypto.transactions.builder.HtlcLock

recipientId()

1public HtlcLock recipientId(String recipientId)

Sets the recipient id.

Parameters

Type Name Required Description
String recipientId Yes Recipient id

Return Value

HtlcLock

secretHash()

1public HtlcLock secretHash(String secretHash)

Sets secret hash.

Parameters

Type Name Required Description
String secretHash Yes Secret hash

Return Value

HtlcLock

ExpirationType()

1public HtlcLock expirationType(HtlcLockExpirationType expirationType, int expirationValue)

Sets the expiration type of htlc lock.

Parameters

Type Name Required Description
HtlcLockExpirationType expirationType Yes Expiration type

Return Value

HtlcLock

vendorField()

1public HtlcLock vendorField(String vendorField)

Sets the vendor field.

Parameters

Type Name Required Description
String vendorField Yes Transaction vendorfield

Return Value

HtlcLock

getType()

1public int getType()

Get the type of the transaction.

Return Value

int

instance()

1public HtlcLock instance()

Return Value

HtlcLock

org.arkecosystem.crypto.transactions.builder.HtlcRefund;

htlcRefundAsset()

1public HtlcRefund htlcRefundAsset(String lockTransactionId)

Sets the refund lock transaction id.

Parameters

Type Name Required Description
String lockTransactionId Yes Lock transaction id

Return Value

HtlcRefund

getType()

1public int getType()

Get the type of the transaction.

Return Value

int

instance()

1public HtlcRefund instance()

Return Value

HtlcRefund

org.arkecosystem.crypto.transactions.builder.Ipfs;

ipfsAsset()

1public AbstractTransactionBuilder ipfsAsset(String ipfsId)

Set the ipfs id.

Parameters

Type Name Required Description
String ipfsId Yes Ipfs id

Return Value

Ipfs

getType()

1public int getType()

Get the type of the transaction.

Return Value

int

instance()

1public Ipfs instance()

Return Value

Ipfs

org.arkecosystem.crypto.transactions.builder.MultiPayment;

addPayment()

1public MultiPayment addPayment(String recipientId, long amount)

Parameters

Type Name Required Description
String recipientId Yes Recipient id
long amount Yes Amount

Return value

MultiPayment

vendorField()

1public HtlcLock vendorField(String vendorField)

Sets the vendor field.

Parameters

Type Name Required Description
String vendorField Yes Transaction vendorfield

Return Value

MultiPayment

getType()

1public int getType()

Get the type of the transaction.

Return Value

int

instance()

1public MultiPayment instance()

Return Value

MultiPayment

org.arkecosystem.crypto.transactions.builder.MultiSignatureRegistration;

min() int

1public MultiSignatureRegistration min(int min)

Set the minimum required signatures.

Parameters

Type Name Required Description
int min Yes Minimum required signatures

Return Value

MultiSignatureRegistration

min() byte

1public MultiSignatureRegistration min(byte min)

Set the minimum required signatures.

Parameters

Type Name Required Description
int min Yes Minimum required signatures

Return Value

MultiSignatureRegistration

lifetime() int

1public MultiSignatureRegistration lifetime(int lifetime)

Set the transaction lifetime.

Parameters

Type Name Required Description
int lifetime Yes Transaction lifetime

Return Value

MultiSignatureRegistration

lifetime() byte

1public MultiSignatureRegistration lifetime(byte lifetime)

Set the transaction lifetime.

Parameters

Type Name Required Description
byte lifetime Yes Transaction lifetime

Return Value

MultiSignatureRegistration

keysGroup()

1public MultiSignatureRegistration keysgroup(List<String> keysgroup)

Set the keysgroup of signatures.

Parameters

Type Name Required Description
List keysgroup Yes Transaction keysgroup

Return Value

MultiSignatureRegistration

getType()

1public int getType()

Get the type of the transaction.

Return Value

int

instance()

1public MultiPayment instance()

Return Value

MultiPayment

org.arkecosystem.crypto.transactions.builder.SecondSignatureRegistration;

signature()

1public SecondSignatureRegistration signature(String signature)

Set the signature asset to register the second passphrase.

Parameters

Type Name Required Description
String signature Yes Signature

Return Value

SecondSignatureRegistration

getType()

1public int getType()

Get the type of the transaction.

Return Value

int

instance()

1public SecondSignatureRegistration instance()

Return Value

SecondSignatureRegistration

org.arkecosystem.crypto.transactions.builder.Transfer;

recipient()

1public Transfer recipient(String recipientId)

Set the recipient of the transfer.

Parameters

Type Name Required Description
String recipientId Yes Recipient identifier

Return Value

Transfer

amount() int

1public Transfer amount(int amount)

Set the amount to transfer.

Parameters

Type Name Required Description
int amount Yes Transaction amount

Return Value

Transfer

amount() long

1public Transfer amount(long amount)

Set the amount to transfer.

Parameters

Type Name Required Description
long amount Yes Transaction amount

Return Value

Transfer

vendorField()

1public Transfer vendorField(String vendorField)

Set the vendor field / smartbridge.

Parameters

Type Name Required Description
String vendorField Yes Transaction vendorfield

Return Value

Transfer

getType()

1public int getType()

Get the type of the transaction.

Return Value

int

instance()

1public Transfer instance()

Return Value

Transfer

org.arkecosystem.crypto.transactions.builder.Vote;

votes()

1public Vote votes(List votes)

Set the votes to cast.

Parameters

Type Name Required Description
List votes Yes Votes

Return Value

Vote

sign()

1public Vote sign(String passphrase)

Sign the transaction using the given passphrase.

Parameters

Type Name Required Description
String passphrase Yes Passphrase

Return Value

Vote

getType()

1public int getType()

Get the type of the transaction.

Return Value

int

instance()

1public Vote instance()

Return Value

Vote

org.arkecosystem.crypto.transactions.deserializers.AbstractDeserializer;

AbstractDeserializer()

1public AbstractDeserializer(String serialized, ByteBuffer buffer, Transaction transaction)

Create a new deserializer instance

Parameters

Type Name Required Description
String serialized Yes Serialized
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

Return Value

AbstractDeserializer

org.arkecosystem.crypto.transactions.deserializers.DelegateRegistration;

DelegateRegistration()

1public DelegateRegistration(String serialized, ByteBuffer buffer, Transaction transaction)

Create a new DelegateRegistration instance.

Parameters

Type Name Required Description
String serialized Yes Serialized
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

deserialize()

1public void deserialize(int assetOffset)

Handle the deserialization of “delegate registration” data.

Parameters

Type Name Required Description
int assetOffset Yes Offset

Return Value

void

org.arkecosystem.crypto.transactions.deserializers.DelegateResignation;

DelegateResignation()

1public DelegateResignation(String serialized, ByteBuffer buffer, Transaction transaction)

Create a new DelegateResignation instance.

Parameters

Type Name Required Description
String serialized Yes Serialized
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

deserialize()

1public void deserialize(int assetOffset)

Handle the deserialization of “delegate resignation” data

Parameters

Type Name Required Description
int assetOffset Yes Offset

Return Value

void

org.arkecosystem.crypto.transactions.deserializers.HtlcClaim;

HtlcClaim()

1public HtlcClaim(String serialized, ByteBuffer buffer, Transaction transaction)

Create a new HtlcClaim instance.

Parameters

Type Name Required Description
String serialized Yes Serialized
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

deserialize()

1public void deserialize(int assetOffset)

Handle the deserialization of “htlc claim” data

Parameters

Type Name Required Description
int assetOffset Yes Offset

Return Value

void

org.arkecosystem.crypto.transactions.deserializers.HtlcLock;

HtlcLock()

1public HtlcLock(String serialized, ByteBuffer buffer, Transaction transaction)

Create a new HtlcLock instance.

Parameters

Type Name Required Description
String serialized Yes Serialized
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

deserialize()

1public void deserialize(int assetOffset)

Handle the deserialization of “htlc lock” data

Parameters

Type Name Required Description
int assetOffset Yes Offset

Return Value

void

org.arkecosystem.crypto.transactions.deserializers.HtlcRefund;

HtlcRefund()

1public HtlcRefund(String serialized, ByteBuffer buffer, Transaction transaction)

Create a new HtlcRefund instance.

Parameters

Type Name Required Description
String serialized Yes Serialized
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

deserialize()

1public void deserialize(int assetOffset)

Handle the deserialization of “htlc refund” data

Parameters

Type Name Required Description
int assetOffset Yes Offset

Return Value

void

org.arkecosystem.crypto.transactions.deserializers.Ipfs;

Ipfs()

1public Ipfs(String serialized, ByteBuffer buffer, Transaction transaction)

Create a new Ipfs instance.

Parameters

Type Name Required Description
String serialized Yes Serialized
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

deserialize()

1public void deserialize(int assetOffset)

Handle the deserialization of “Ipfs” data

Parameters

Type Name Required Description
int assetOffset Yes Offset

Return Value

void

org.arkecosystem.crypto.transactions.deserializers.MultiPayment;

MultiPayment()

1public MultiPayment(String serialized, ByteBuffer buffer, Transaction transaction)

Create a new MultiPayment instance.

Parameters

Type Name Required Description
String serialized Yes Serialized
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

deserialize()

1public void deserialize(int assetOffset)

Handle the deserialization of “multi payment” data

Parameters

Type Name Required Description
int assetOffset Yes Offset

Return Value

void

org.arkecosystem.crypto.transactions.deserializers.MultiSignatureRegistration;

MultiSignatureRegistration()

1public MultiSignatureRegistration(String serialized, ByteBuffer buffer, Transaction transaction)

Create a new MultiSignatureRegistration instance.

Parameters

Type Name Required Description
String serialized Yes Serialized
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

deserialize()

1public void deserialize(int assetOffset)

Handle the deserialization of “multi signature registration” data

Parameters

Type Name Required Description
int assetOffset Yes Offset

Return Value

void

org.arkecosystem.crypto.transactions.deserializers.SecondSignatureRegistration;

SecondSignatureRegistration()

1public SecondSignatureRegistration(String serialized, ByteBuffer buffer, Transaction transaction)

Create a new SecondSignatureRegistration instance.

Parameters

Type Name Required Description
String serialized Yes Serialized
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

deserialize()

1public void deserialize(int assetOffset)

Handle the deserialization of “second signature” data.

Parameters

Type Name Required Description
int assetOffset Yes Offset

Return Value

void

org.arkecosystem.crypto.transactions.deserializers.Transfer;

Transfer()

1public Transfer(String serialized, ByteBuffer buffer, Transaction transaction)

Create a new Transfer instance.

Parameters

Type Name Required Description
String serialized Yes Serialized
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

deserialize()

1public void deserialize(int assetOffset)

Handle the deserialization of “transfer” data.

Parameters

Type Name Required Description
int assetOffset Yes Offsets

Return Value

void

org.arkecosystem.crypto.transactions.deserializers.Vote;

Vote()

1public Vote(String serialized, ByteBuffer buffer, Transaction transaction)

Create a new Vote instance.

Parameters

Type Name Required Description
String serialized Yes Serialized
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

deserialize()

1public void deserialize(int assetOffset)

Handle the deserialization of “vote” data.

Parameters

Type Name Required Description
int assetOffset Yes Offset

Return Value

void

org.arkecosystem.crypto.transactions.serializers.AbstractSerializer;

AbstractSerializer()

1public AbstractSerializer(ByteBuffer buffer, Transaction transaction)

Create a new AbstractSerializer instance.

Parameters

Type Name Required Description
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

org.arkecosystem.crypto.transactions.serializers.DelegateRegistration;

DelegateRegistration()

1public DelegateRegistration(ByteBuffer buffer, Transaction transaction)

Create a new DelegateRegistration instance.

Parameters

Type Name Required Description
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

serialize

1public void serialize()

Handle the serialization of “delegate registration” data.

Return Value

void

org.arkecosystem.crypto.transactions.serializers.DelegateResignation;

DelegateResignation()

1public DelegateResignation(ByteBuffer buffer, Transaction transaction)

Create a new DelegateResignation instance.

Parameters

Type Name Required Description
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

serialize

1public void serialize()

Handle the serialization of “delegate resignation” data.

Return Value

void

org.arkecosystem.crypto.transactions.serializers.HtlcClaim;

HtlcClaim()

1public HtlcClaim(ByteBuffer buffer, Transaction transaction)

Create a new HtlcClaim instance.

Parameters

Type Name Required Description
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

serialize

1public void serialize()

Handle the serialization of “htlc claim” data.

Return Value

void

org.arkecosystem.crypto.transactions.serializers.HtlcLock;

HtlcLock()

1public HtlcLock(ByteBuffer buffer, Transaction transaction)

Create a new HtlcLock instance.

Parameters

Type Name Required Description
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

serialize

1public void serialize()

Handle the serialization of “htlc lock” data.

Return Value

void

org.arkecosystem.crypto.transactions.serializers.HtlcRefund;

HtlcRefund()

1public HtlcRefund(ByteBuffer buffer, Transaction transaction)

Create a new HtlcRefund instance.

Parameters

Type Name Required Description
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

serialize

1public void serialize()

Handle the serialization of “htlc refund” data.

Return Value

void

org.arkecosystem.crypto.transactions.serializers.Ipfs;

Ipfs()

1public Ipfs(ByteBuffer buffer, Transaction transaction)

Create a new Ipfs instance.

Parameters

Type Name Required Description
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

serialize

1public void serialize()

Handle the serialization of “ipfs” data.

Return Value

void

org.arkecosystem.crypto.transactions.serializers.MultiPayment;

MultiPayment()

1public MultiPayment(ByteBuffer buffer, Transaction transaction)

Create a new MultiPayment instance.

Parameters

Type Name Required Description
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

serialize

1public void serialize()

Handle the serialization of “multi payment” data.

Return Value

void

org.arkecosystem.crypto.transactions.serializers.MultiSignatureRegistration;

MultiSignatureRegistration

1public MultiSignatureRegistration(ByteBuffer buffer, Transaction transaction)

Create a new MultiSignatureRegistration instance.

Parameters

Type Name Required Description
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

serialize

1public function serialize()

Handle the serialization of “multi signature registration” data.

Return Value

void

org.arkecosystem.crypto.transactions.serializers.SecondSignatureRegistration;

SecondSignatureRegistration

1public SecondSignatureRegistration(ByteBuffer buffer, Transaction transaction)

Create a new SecondSignatureRegistration instance.

Parameters

Type Name Required Description
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

serialize

1public void serialize()

Handle the serialization of “second signature registration” data.

Return Value

void

org.arkecosystem.crypto.transactions.serializers.Transfer;

Transfer

1public Transfer(ByteBuffer buffer, Transaction transaction)

Create a new Transfer instance.

Parameters

Type Name Required Description
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

serialize

1public void serialize()

Handle the serialization of “transfer” data.

Return Value

void

org.arkecosystem.crypto.transactions.serializers.Vote;

Vote

1public Vote(ByteBuffer buffer, Transaction transaction)

Create a new Vote instance.

Parameters

Type Name Required Description
ByteBuffer buffer Yes Buffer
Transaction transaction Yes Transaction

serialize

1public void serialize()

Handle the serialization of “vote” data.

Return Value

void

org.arkecosystem.crypto.transactions.Deserializer;

deserialize

1public Transaction deserialize(String serialized)

Perform AIP11 compliant deserialization.

Parameters

Type Name Required Description
String serialized Yes Serialized

Return Value

Transaction

org.arkecosystem.crypto.transactions.Serializer;

serialize()

1public byte[] serialize(Transaction transaction)

Perform AIP11 compliant serialization.

Parameters

Type Name Required Description
Transaction transaction Yes Transaction

Return Value

byte[]

org.arkecosystem.crypto.transactions.Transaction;

computeId()

1public String computeId()

Convert the byte representation to a unique identifier.

Return Value

String

sign()

1public Transaction sign(String passphrase)

Sign the transaction using the given passphrase.

Parameters

Type Name Required Description
String passphrase Yes Passphrase

Return Value

Transaction

secondSign()

1public Transaction secondSign(String passphrase)

Sign the transaction using the given second passphrase.

Parameters

Type Name Required Description
String passphrase Yes Second passphrase

Return Value

Transaction

verify()

1public boolean verify()

Verify the transaction.

Return Value

boolean

secondVerify()

1public boolean secondVerify(String secondPublicKey)

Verify the transaction with a second public key.

Parameters

Type Name Required Description
String secondPublicKey Yes Second public key

Return Value

boolean

parseSignatures()

1public Transaction parseSignatures(String serialized, int startOffset)

Parse the signature, second signature and multi signatures.

Parameters

Type Name Required Description
String serialized Yes Serialized
int startOffset Yes Offset

Return Value

Transaction

toHashMap()

1public HashMap toHashMap()

Convert the transaction to its hashmap representation.

Return Value

HashMap

toJson()

1public String toJson()

Convert the transaction to its JSON representation.

Return Value

String

serialize()

1public String serialize()

Perform AIP11 compliant serialization

Return Value

String

deserialize()

1public static Transaction deserialize(String serialized)

Perform AIP11 compliant deserialization.

Parameters

Type Name Required Description
String serialized Yes Serialized

Return Value

Transaction

org.arkecosystem.crypto.utils.Message;

Message()

1public Message(String publickey, String signature, String message)

Create a new message instance

Parameters

Type Name Required Description
String publickey Yes Public key
String signature Yes Signature
String message Yes Message

Return Value

Message

sign()

1public static Message sign(String message, String passphrase)

Sign a message using the given passphrase.

Parameters

Type Name Required Description
String message Yes Message
String passphrase Yes Passphrase

Return Value

Message

verify()

1public boolean verify()

Verify the message contents

Return Value

boolean

toMap()

1public Map toMap()

Convert the message to its map representation

Return Value

array

toJson()

1public String toJson()

Convert the message to its JSON representation

Return Value

String

getMessage()

1public String getMessage()

Get the message content from the message object.

Return Value

String

getPublickey()

1public String getPublickey()

Get the public key from the message.

Return Value

String

getSignature()

1public String getSignature()

Get the signature from the message.

Return Value

String

org.arkecosystem.crypto.utils.Slot;

time()

1public static int time()

Get the time diff between now and network start.

Return Value

int

epoch()

1public static long epoch()

Get the network start epoch.

Return Value

long

Last updated 3 years ago
Edit Page
Share: