///
import { SubmittableExtrinsic } from '@polkadot/api/types';
import { KeyringPair } from '@polkadot/keyring/types';
import { SnGenericId, SnRule, SnRuleWithStorage } from '@sensio/types';
import { EventEmitter } from 'events';
import { IncomingParam } from './decodeStorage';
/**
* Save a single rule to the chain
* {@link SnRule}
* @param d Rule that we want to save to the chain.
* @param signer Account that will be owner of the transaction and ones who pays the fees
*/
export declare function save(d: SnRule, signer: KeyringPair): Promise;
/**
* Create Submittable transactions
* @param d
*/
export declare function createSubmittableExtrinsics(d: SnRule[]): Promise>>;
/**
* Save many rules in single transaction. It uses the `batch` capability of the chain
* @param d List of Rule objects
* @param signer Account that will be owner of the transaction and ones who pays the fees
*
* ```ts
await api.api()
const r: SnRule[] = rules
const signer = getAlice()
const o = await api.pallets.rules.saveBulk(r, signer)
o.on(EVENT_NAME_BATCH, p => console.log(p.message))
```
*/
export declare function saveBulk(d: SnRule[], signer: KeyringPair): Promise;
/**
* Get all Rules from the chain, encoded using SCALE codec. For the large sets, this might be slow and resource intensive
* {@link StorageKey}
* {@link RuleInfo}
* @returns List of `[StorageKey, RuleInfo]` SCALE codec encoded
*/
export declare function getAll(): Promise;
/**
* Get a Rule from the chain, encoded using SCALE codec.
* {@link StorageKey}
* {@link RuleInfo}
* @param items
* @returns Item `[StorageKey, RuleInfo]` SCALE codec decoded
*/
export declare function getRule(item: SnGenericId): Promise;
/**
* Get a Rule from the chain, decoded
* {@link StorageKey}
* {@link RuleInfo}
* @param item
* @returns Item `[StorageKey, RuleInfo]` SCALE codec encoded
*/
export declare function getRuleDecoded(item: SnGenericId): Promise;
/**
* Get all Rules from the network then return the list of the Decoded rules
* @param items list of Rule IDs
* @returns List of `[StorageKey, RuleInfo]` SCALE codec decoded
*/
export declare function getAllDecoded(): Promise;
/**
* Helper function for creating the Submittable result. This can be easily used in the `ramda.map` function with the list of SnRule. Returns the Submittable rules object
*
* ```ts
* import { map } from 'ramda'
* const txs = map(createSubmittableExtrinsic, d)
* ```
*
* @param d Typescript native SnRule
* @returns Substrate SubmittableExtrinsic promise unresolved
*/
export declare function createSubmittableExtrinsic(d: SnRule): SubmittableExtrinsic<'promise'>;
//# sourceMappingURL=api.d.ts.map