///
/**
* Pallet's api and rpc methods
* @packageDocumentation
*
*/
import { SubmittableExtrinsic } from '@polkadot/api/types';
import { KeyringPair } from '@polkadot/keyring/types';
import { SnGenericId, SnSensioStatement, SnStatementWithStorage } from '@sensio/types';
import { EventEmitter } from 'events';
import { CustomEventEmitter } from '../../events';
import { IncomingParam } from './decodeStorage';
/**
* Save the statement, a wrapper around the current saving methods
* @param d Statement that will be saved
* @param signer Who will be signing the transaction and paying fees?
*/
export declare function save(d: SnSensioStatement, signer: KeyringPair): Promise;
/**
* Save the statements, a wrapper around the current bulk saving methods
* @param d Statements that will be saved
* @param signer Who will be signing the transaction and paying fees?
*/
export declare function saveBulk(d: SnSensioStatement[], signer: KeyringPair): Promise;
/**
* Create correct extrinsic submittable result
*```ts
* import { map } from 'ramda'
* const txs = map(createCorrectSubmittableExtrinsic, d)
* ```
* @param d list of any Statement object
*/
export declare function createCorrectSubmittableExtrinsic(d: SnSensioStatement): SubmittableExtrinsic<'promise'>;
/**
* Save a single statement to the chain
* {@link SnStatement}
* @param d Statement d 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 saveCopyright(d: SnSensioStatement, signer: KeyringPair): Promise;
/**
* Save a single operation to the chain
* {@link SnStatement}
* @param d Statement d 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 saveOwnership(d: SnSensioStatement, signer: KeyringPair): Promise;
/**
* Create Submittable Copyright transactions
*```ts
* import { map } from 'ramda'
* const txs = map(createSubmittableExtrinsicsForCopyright, d)
* ```
* @param d list of the typescript native Copyright Statement objects
*/
export declare function createSubmittableExtrinsicsForCopyright(d: SnSensioStatement[]): Promise>>;
/**
* Create Submittable transactions
* @param d
*/
export declare function createSubmittableExtrinsicsForOwnership(d: SnSensioStatement[]): Promise>>;
/**
* Save many statements in single transaction. It uses the `batch` capability of the chain
* @param d
* @param signer
*
* ```ts
await api.api()
const statements: SnStatement[] = statements
const signer = getAlice()
const o = await api.pallets.statements.saveCopyrightsBulk(statements, signer)
o.on(EVENT_NAME_BATCH, p => console.log(p.message))
```
*/
export declare function saveCopyrightsBulk(d: SnSensioStatement[], signer: KeyringPair): 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: SnStatement[] = statements
const signer = getAlice()
const o = await api.pallets.statements.saveOwnershipsBulk(statements, signer)
o.on(EVENT_NAME_BATCH, p => console.log(p.message))
```
*/
export declare function saveOwnershipsBulk(d: SnSensioStatement[], signer: KeyringPair): Promise;
/**
* Get one Statement from the chain, encoded using SCALE codec.
* @param items
* @returns Return item maps SCALE codec encoded
*/
export declare function getOne(item: SnGenericId): Promise;
/**
* Get All statements from the chain, encoded using SCALE codec. Return polkadot encoded Storage
*/
export declare function getAll(): Promise;
/**
* Get all Statements from the network then return the list of the Decoded statements as they are stored.
*/
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?: SnGenericId[]): Promise;
/**
* Helper function for creating the Submittable result. This can be easily used in the `ramda.map` function with the list of SnSensioStatement[]. Returns the Submittable statement object
*
* ```ts
* import { map } from 'ramda'
* const txs = map(createSubmittableExtrinsicOfCopyright, d)
* ```
* @param d
*
*/
export declare function createSubmittableExtrinsicOfCopyright(d: SnSensioStatement): SubmittableExtrinsic<'promise'>;
/**
* Helper function for creating the Submittable result. This can be easily used in the `ramda.map` function with the list of SnSensioStatement. Returns the Submittable statement object
*
* ```ts
* import { map } from 'ramda'
* const txs = map(createSubmittableExtrinsicOfOwnership, d)
* ```
*
* @param op
*/
export declare function createSubmittableExtrinsicOfOwnership(d: SnSensioStatement): SubmittableExtrinsic<'promise'>;
/**
* Revoke the statement
* @param statementId
*/
export declare function createSubmittableExtrinsicRevoke(statementId: SnGenericId): SubmittableExtrinsic<'promise'>;
/**
* Revoke All statements @FUCK remove this at some point
*/
export declare function revokeStatementsBulk(d: SnGenericId[], signer: KeyringPair): Promise;
//# sourceMappingURL=api.d.ts.map