All Classes and Interfaces
Class
Description
A contact which monitors minimum balances for coins and assets and post a warning on a slack channel (configured via web-hook url)
in case any of the coin or asset balances goes below some threshold balance
(for instance the 10 ARDR necessary for the trading bot contract to operate).
Derive multiple account addresses from the same seed
Maintain a ledger of changes to selected accounts
Account ledger listener events
Ledger entry
Ledger events
There must be a ledger event defined for each transaction (type,subtype) pair.
Ledger holdings
When adding a new holding, do not change the existing code assignments since
they are stored in the holding_type field of the account_ledger table.
Only bundle transactions sent by accounts which has the "bundling" property set on it by the bundler
The AllForOnePayment contract is triggered every pre-defined number of blocks, sums the received transactions and
sends all of the amount back to one of the payers at random.
Contract for testing purposes which attempts actions allowed by the security policy and verifies that they indeed
succeed.
Bundles only transactions for asset ID provided as parameter
Represents a chain of atomic transactions.
Set of transactions that tracks the atomic chains formed by the transactions in the set.
Static utility classes for BIP39 mnemonics.
This is a helper class which loads exchange rate data from Bittrex.
Blacklist a bundler account
Represent a transaction as certificate encapsulating the transaction sender public key
Generate certificates based on blockchain transactions
Convert the transaction certificate into a CertPath object.
In memory keystore, storing certificates per public key listed in the policy file
KeyStore implementation which converts the signedBy alias specified in the policy file to a public key certificate
Currently this KeyStore does not store any information and does not persist its data
Represent an account public key
A boolean expression in disjunctive normal form - i.e.
A Java logging formatter that writes more compact output than the default
The purpose of broadcast transaction is to support client side signing of transactions.
Bundling filter - transactions for which the
Bundler.Filter.ok(Bundler, ChildTransaction) method returns false are not processed by the Bundler.RuleBundling rule - transactions that match the filter and minimum rate of the rule are bundled.
Transaction created by this call must expire before any transaction bundled.
Monitor the blockchain for unexpected conditions
Sample contract which receives amount in child chain and returns amount in parent chain according to the coin exchange
order book.
Load a contract and all its classes from data retrieved from the blockchain.
Coin exchange home
Define a coin exchange order
'id' and 'fullHash' identify the coin exchange order
'chainId' is the chain identifier for the coin being exchanged
'exchangeId' is the chain identifier for the requested coin
'quantity' is the number of coins being exchanged (updated after each trade)
'bidPrice' is the bid price for the requested coin and is the exchange order price
'askPrice' is the ask price for coin being exchanged and is 1/bidPrice
Define a coin exchange trade
A coin exchange consists of two trades.
Calculate the trade volume of the ARDR/IGNIS pair on the Ardor coin exchange.
Coin exchange transaction types for the Fxt chain
Coin exchange transaction types for a child chain
Compact and reorganize the NRS database.
Mark an interface inside a contract class as the parameters provider interface
CountingInputReader extends Reader to count the number of characters read
CountingOutputWriter extends Writer to count the number of characters written
Buy currency for coin
Each CurrencyFounder instance represents a single founder contribution for a non issued currency
Once the currency is issued all founder contributions are removed
In case the currency is not issued because of insufficient funding, all funds are returned to the founders
Generate new currency units
Manages currency proof of work minting
Claim currency units and receive back coin invested into this currency before it became active
Increase the value of currency units by paying coin
Sell currency for coin
Define and validate currency capabilities
Montgomery <-> Edwards isomorphism converted from C code developed by Daniel Beer (dlbeer@gmail.com) and released as public domain.
Sample contracts to demonstrate how to work with contract permissions.
Upload a file data to a remote node.
The DecodeQRCode API converts a base64-encoded image of a
2-D QR (Quick Response) code to a UTF-8 string, using the ZXing library.
The DistributedRandomNumberGenerator is a utility contract which given a list of accounts and their weight, selects
randomly one the accounts.
The `DroppedTransactionStore` class handles a collection of
comparable data
for transactions that have been dropped.The EncodeQRCode API converts a UTF-8 string to a base64-encoded
jpeg image of a 2-D QR (Quick Response) code, using the ZXing library.
The EventRegister API will create an event listener and register
one or more server events.
The EventWait API will wait for one of the server events
registered by EventRegister.
Sample Java program which demonstrates how to calculate best bundling fee for child chain transactions
Filters the currently known
BundlerRates according to the provided FeeRateCalculator.minBalance, FeeRateCalculator.minFeeLimit
and FeeRateCalculator.whitelist.Wrapper for a SQL Connection
The wrapper forwards all methods to the wrapped connection.
Create Statement and PrepareStatement for use with FilteredConnection
Wrapper for a SQL PreparedStatement
The wrapper forwards all methods to the wrapped prepared statement
Wrapper for a SQL Statement
The wrapper forwards all methods to the wrapped statement
Explore Ardor blocks.
Contract for testing purposes which attempts actions not allowed by the security policy and verifies that they indeed
fail.
The forging reward contract is used to reward forgers for generating blocks on the Ardor and Nxt blockchains.
FullTextTrigger provides Lucene search support.
Monitor account balances based on account properties
Monitored account
Active generator
Usage:
- Update or pop-off the blockchain to the height at which a snapshot is needed
- Start this script
- The JSONs will be saved in the "snapshot" directory in project root
The GetAccountLedger API will return entries from the account ledger.
The GetAccountLedgerEntry API will return an entry from the account ledger.
Get a funding monitor
The GetLog API will return log messages from the ring buffer
maintained by the MemoryHandler log handler.
Currency miners can use this API to obtain their target hash value for minting currency units
The GetNextBlockGenerators API will return the next block generators ordered by the
hit time.
Returns the phasing control for given asset, if set.
Returns the phasing control for given account, if set.
The GetStackTraces API will return the current stack trace for
each Nxt thread.
Sample contract to demonstrate the basic operations.
Sample contract to demonstrate basic operations.
This sample Oracle contract loads the Ignis per Ardor exchange rate from Bittrex and from the internal coin exchange.
Sample Java program which demonstrates use of APIs locally without relying on a remote node
Issue a currency on the Ardor blockchain
Delegate json array operations to json simple and wrap it with convenience methods
This class does not really keep a list, but it implements a list in order to delegate iteration to the underlying JSONArray
in order to support streaming into String.
Delegate json object operations to json simple and wrap it with convenience methods
This class does not really keep a map, but it implements a map in order to delegate entrySet to the underlying JSONArray
in order to support streaming into String.
The downloadJPLSnapshot API can be used to generate a genesis block JSON for a clone to satisfy the JPL 10% sharedrop
requirement to existing Ignis or NXT holders.
Represents a node in the Bip32 derivation tree.
TODO lease renewal still needs some work don't deploy it at the moment
The LeaseRenewal contract checks the existing lessors of the contract account for lease renewal.
A Ledger device connected via USB HID.
Load Liberland citizen records and register them on the blockchain as account proprties
This class requires JDK 11, since we still rely on JDK 8 we comment out all the JDK 11 code and replaced it with
mockup data that you'll need to comment out.
Sample Java program which creates a transaction on a remote node, signs it locally, then broadcasts it to a remote node
Handle logging for the Nxt node server
Log event types
Log levels
MemoryHandler maintains a ring buffer of log messages.
Sample Java program which iterates through blockchain transactions and decrypts their attached message
Sample Java program to encrypt a message locally, then send the encrypted data to a remote node without exposing the passphrase
Resource handler which operates only on system resources but allows retrieving resources with some base location
from all jar files in the classpath.
The network handler creates outbound connections and adds them to the
network selector.
NetworkMessage represents the messages exchanged between peers.
The AddPeers message is sent to a peer to update its peer list and it is also returned
as an asynchronous response to the GetPeers message
Peer list
The BlockchainState message is sent when blockchain state changes.
The BlockIds message is returned in response to the GetNextBlockIds message.
The BlockInventory message is sent when a peer has received a new block.
The Blocks message is returned in response to the GetBlock and GetNextBlocks message.
The BundlerRate message is periodically broadcast when the
peer has one or more active bundlers.
The CumulativeDifficulty message is returned in response to the GetCumulativeDifficulty message.
The Error message is returned when a error is detected while processing a
request.
The GetBlock message is sent when a peer is notified that a new block is available.
The GetCumulativeDifficulty message is sent to a peer to get the current blockchain status.
The GetInfo message is exchanged when a peer connection is established.
The GetMilestoneBlockIds message is sent when a peer is downloading the blockchain.
The GetNextBlockIds message is sent when a peer is downloading the blockchain.
The GetNextBlocks message is sent when a peer is downloading the blockchain.
The GetPeers message is sent to a peer to request a list of connected peers.
The GetTransactions message is sent to retrieve one or more transactions.
The GetUnconfirmedTransactions message is sent to retrieve the current set
of unconfirmed transactions.
The MilestoneBlockIds message is returned in response to the GetMilestoneBlockIds message.
The TransactionsInventory message is sent when a peer has received new transactions.
The Transactions message is returned in response to the GetTransactions and
GetUnconfirmedTransactions messages.
Java LogManager extension for use with Nxt
Coin exchange order cancel attachment for child chains
Coin exchange order cancel attachment for the Fxt chain
Coin exchange order issue attachment for a child chain
Coin exchange order issue attachment for the Fxt chain
Usage: ParseBlockJSON [block json file]
If no file is given, the JSON is read from standard input.
Peer network node
Peer services
Peer state
Only bundle my own transactions.
Sample Java program which demonstrates how to submit a phased transaction
Phasing poll data.
Sample contract which sets a property based on random selection.
Publish exchange offer for
CurrencyType.EXCHANGEABLE currencyQueuedThreadPool creates threads to process requests until the maximum pool
size is reached.
Sample contract which receives amount from the trigger transaction and returns a random amount between 0 and twice the received amount.
A read or update lock allows shared access while a write lock enforces exclusive access.
Lock interface
Produce a Jar that given the same class files and timestamps, generates the binary Jar file
Use this to generate test data which won't change
The purpose of this class is to make sure all contract runners will generate the same random numbers given the same random seed.
RetrievePrunedData will schedule a background task to retrieve data which
has been pruned.
Authentication roles
Map Nxt account to authentication role
Create a role mapper for a permissioned blockchain
Dummy role mapper for a non-permissioned blockchain
This command line utility produces tax report in tab-separated format. Time zone of report will match local.
Usage: <account> <from-date> [to-date [output-file-name]] [-waitForDownloadComplete] [-ignoreIncompleteDownload]
account - account to run report for
from-date - date in yyyymmdd format, inclusive
to-date - date in yyyymmdd format, inclusive, defaults to today
output-file-name - defaults to report-for_account_from-date_to-date.csv
By default this tool exits with warning if blockchain last block timestamp is before to-date.
Following flags modify this behavior:
-ignoreIncompleteDownload - run report for locally available blockchain
-waitForDownloadComplete - run wait for enough blocks downloaded before running this report
Optional additional parameters
--unknownEventPolicy=<FAIL|IGNORE> - what to do with ledger events unknown by this tool. 'FAIL' by default.
--timeZone=<timezone id> - 'UTC' by default, see java.time.ZoneId.of(java.lang.String) for more info
--dateFormat=<date and time format> - 'dd-MM-yyyy HH:mm:ss' by default, see java.time.format.DateTimeFormatter.ofPattern(java.lang.String) for more info
--delimiter=<delimiter to separate values> - '\t' by default, no character escaping is done.
Usage examples:
ARDOR-4RU9-TNCT-F3MU-8952K 20190101 20200101 output.csv
ARDOR-4RU9-TNCT-F3MU-8952K 20190101 20200101 - will create file with name report-for_ARDOR-4RU9-TNCT-F3MU-8952K_20190101_20200101.csv
Security token
Generate an authentication security token for a permissioned blockchain
Sends a transaction to some peers.
Combination of a BIP32 Master Public Key + Chain Code along with a CRC32 checksum.
The SetLogging API will set the NRS log level for all log messages.
Sets a restriction on certain asset that blocks transactions operating with this asset unless they are phased with certain parameters.
Sets an account control that blocks transactions unless they are phased with certain parameters
List all accounts funded using shuffling
Post a message to slack using a web hook.
Generates a local JKS keystore for secured server.
Start a funding monitor
Stop a funding monitor
Post a message to slack using a web hook.
Transaction callback interface
Important!
Whenever adding or changing a value run the main menu to generate the constants in the Constants inner class
Utility class to provide sample data for each transaction type.
Forward ports using the UPnP protocol.
Represents the data which is used to prioritize
UnconfirmedTransactions
in the unconfirmed pool.Meta annotation shared by all validation annotations
Sample Java program which registers a listener and waits for the next block
A contact which monitors new transactions and asset trades and report alerts
when high value transaction or trade is observed.