///
/**
* Pallet's api and rpc methods
* @packageDocumentation
*
*/
import { SubmittableExtrinsic } from '@polkadot/api/types';
import { KeyringPair } from '@polkadot/keyring/types';
import { SnGenericId, SnGenericIds, SnProof, SnProofWithStorage } from '@sensio/types';
import { EventEmitter } from 'events';
import { IncomingParam } from './decodeStorage';
/**
* Save a single poe to the chain. You need to provide the data, the ID is calculated before saving.
*
* @NOTE calculating the ID inside allows us to decouple the ID generation from the rest of the code and potentially the calculation of the ID on the chain
* @param data Proof data that we want to save to the chain.
* @param signer Account that will be owner of the transaction and ones who pays the fees
* @returns the Broadcast and the built proof payload
* Example:
* ```ts
* const { broadcast: b, payload } = await SensioApi.pallets.poe.save(data, signer)
*
* b.on(SensioApi.pallets.poe.config.EVENT_NAME_SINGLE, (p) => {
* console.log('batch', p.message)
* if (p.finalized) {
* process.exit(0)
* }
* })
* ```
*/
export declare function save(d: SnProof, signer: KeyringPair): Promise;
/**
* Create Submittable transactions
* @param d
*/
export declare function createSubmittableExtrinsics(d: SnProof[]): Promise>>;
/**
* Save many statements in single transaction. It uses the `batch` capability of the chain
* @param ops
* @param signer
*
* ```ts
await api.api()
const statements: SnProof[] = proofs
const signer = getAlice()
const o = await api.pallets.statements.saveBulk(statements, signer)
o.on(EVENT_NAME_BATCH, p => console.log(p.message))
```
*/
export declare function saveBulk(d: SnProof[], signer: KeyringPair): Promise;
/**
* Get all or some Poe from the chain, encoded using SCALE codec.
* @param items
* @returns Return item maps SCALE codec encoded
*/
export declare function getAll(): Promise;
/**
* Get one Poe from the chain, encoded using SCALE codec.
* @param items
* @returns Return item maps SCALE codec encoded
*/
export declare function getPoe(item: SnGenericId): Promise;
/**
* Get all PoE proofs from the network then return the list of the Decoded proofs
* @returns Return item maps SCALE codec decoded
*/
export declare function getAllDecoded(): Promise;
/**
* Get some PoE proofs from the network then return the list of the Decoded proofs
* @param items
* @returns Return item maps SCALE codec decoded
*/
export declare function getSomeDecoded(items?: SnGenericIds): Promise;
/**
* Helper function for creating the Submittable result. This can be easily used in the `ramda.map` function with the list of SnProof. Returns the Submittable statement object
*
* ```ts
* import { map } from 'ramda'
* const txs = map(createSubmittableExtrinsic, d)
* ```
*
* @param d Typescript native SnProof
*
*/
export declare function createSubmittableExtrinsic(d: SnProof): SubmittableExtrinsic<'promise'>;
//# sourceMappingURL=api.d.ts.map