Full documentation of the library is here.
Available Transactions and Calls
DIRTlib provides convenience wrapper classes for each DIRT contract. The wrapper classes mirror but do not exactly match the contracts in structure (fields and methods).
Note that there are two types of method invocations in Ethereum, calls and transactions. Calls are readonly methods on the blockchain that do not cost anything to run. Transactions are methods that can write to the blockchain. Transactions must be signed and paid for with an Ethereum account.
The following contracts are available as public fields:
Challenging an item
let newVote = await registry.challenge('keyOfItem', 'newValue', TokenValue.from(2))
let voteController = await dirt.getVoteControllerAtAddress<PublicVoteController>(newVote.contract) await voteController.vote( newVote.voteId, Candidate.Incumbent, TokenValue.from(1))
See more in the complete lib reference.