Create a new Blockchain API instance.
The name of the chain module that provides the portablegabi API.
The api connection to the chain.
Pushes a new Accumulator on chain.
The new Accumulator.
Returns an object that can be used to submit a transaction.
Fetches a single Accumulator from the chain.
The on chain address of the Attester.
The index of the Accumulator to fetch.
The Accumulator at the specified index.
Fetches multiple Accumulators at once.
The chain address of the Attester.
The index of the first Accumulator to fetch.
The index of the last Accumulator to fetch.
An array of Accumulators from startIndex to endIndex or the latest one.
Get the number of stored Accumulators for a specific Attester.
The address of the Attester.
The number of the Attester's Accumulators.
Fetches the last published Accumulator for the specified Attester.
The chain address of the Attester.
The last published Accumulator.
Signs and sends a transaction to a blockchain node.
The transaction that should get submitted.
The keypair used for signing the transaction.
The returned promise will resolve if the transaction was included in a finalized block. If the transaction fails, the promise will be rejected.
Generated using TypeDoc
The Blockchain class provides an interface for querying and creating transactions on chain.
Example:
import portablegabi from '@kiltprotocol/portablegabi' // depending on the blockchain, the module where the accumulator is store might be called differently. // The name can be configured using the 'pgabiModName' option. const bc = await portablegabi.connect({ pgabiModName: 'portablegabiPallet' }) const acc = await bc.getAccumulatorCount(addr)