import { bool, Bytes, Text, u8, u16, u32, u64, u128 } from '@polkadot/types';
import { AccountId, Balance, BlockHash, Hash, Permill, Signature } from '@polkadot/types/interfaces';
import { BTreeSetIdentityId, BTreeSetStatUpdate, BTreeSetTransferCondition, ConfidentialIdentityClaimProofsScopeClaimProof, PalletCorporateActionsCaId, PalletCorporateActionsCorporateAction, PalletCorporateActionsDistribution, PalletStoFundraiser, PolymeshPrimitivesAssetIdentifier, PolymeshPrimitivesAuthorizationAuthorizationData, PolymeshPrimitivesComplianceManagerComplianceRequirement, PolymeshPrimitivesConditionTrustedIssuer, PolymeshPrimitivesDocument, PolymeshPrimitivesDocumentHash, PolymeshPrimitivesIdentityClaimClaimType, PolymeshPrimitivesIdentityId, PolymeshPrimitivesSecondaryKeyPermissions, PolymeshPrimitivesStatisticsStat2ndKey, PolymeshPrimitivesStatisticsStatOpType, PolymeshPrimitivesStatisticsStatType, PolymeshPrimitivesStatisticsStatUpdate, PolymeshPrimitivesSubsetSubsetRestrictionPalletPermissions, PolymeshPrimitivesTicker, PolymeshPrimitivesTransferComplianceTransferCondition } from "../polkadot/types-lookup.ts";
import BigNumber from 'bignumber.js';
import { Account, Checkpoint, CheckpointSchedule, Context, CustomPermissionGroup, DefaultPortfolio, Identity, KnownPermissionGroup, NumberedPortfolio } from "../internal";
import { Event as MiddlewareEvent, IdentityWithClaims as MiddlewareIdentityWithClaims, Portfolio as MiddlewarePortfolio, Scope as MiddlewareScope } from "../middleware/types";
import { AffirmationStatus as MeshAffirmationStatus, AgentGroup, AssetComplianceResult, AssetType, AuthorizationType as MeshAuthorizationType, CAKind, CalendarPeriod as MeshCalendarPeriod, CanTransferResult, CddId, CddStatus, Claim as MeshClaim, ComplianceRequirementResult, DocumentHash, EcdsaSignature, FundraiserTier, GranularCanTransferResult, InstructionStatus as MeshInstructionStatus, InvestorZKProofData, Memo, Moment, MovePortfolioItem, Permissions as MeshPermissions, PortfolioId as MeshPortfolioId, PosRatio, PriceTier, ProtocolOp, RecordDateSpec, RistrettoPoint, Scalar, ScheduleSpec as MeshScheduleSpec, Scope as MeshScope, ScopeId, SecondaryKey as MeshSecondaryKey, SettlementType, Signatory, StoredSchedule, TargetIdentities, TargetIdentity, TransferCondition, VenueType as MeshVenueType } from "../polkadot/polymesh";
import { AffirmationStatus, AssetDocument, Authorization, AuthorizationType, CalendarPeriod, CheckpointScheduleParams, Claim, ClaimType, Compliance, CorporateActionKind, CorporateActionParams, CorporateActionTargets, DividendDistributionParams, EventIdentifier, ExemptKey, IdentityWithClaims, InputRequirement, InputTrustedClaimIssuer, InstructionType, KnownAssetType, OfferingDetails, OfferingTier, PermissionedAccount, Permissions, PermissionsLike, PortfolioLike, PortfolioMovement, Requirement, RequirementCompliance, Scope, SecurityIdentifier, Signer, SignerValue, Tier, TransactionPermissions, TransferBreakdown, TransferRestriction, TransferStatus, TrustedClaimIssuer, TxGroup, TxTag, VenueType } from "../types";
import { CorporateActionIdentifier, ExtrinsicIdentifier, InstructionStatus, InternalAssetType, PermissionGroupIdentifier, PolymeshTx, PortfolioId, ScheduleSpec, ScopeClaimProof, StatisticsOpType, TickerKey } from "../types/internal";
export * from "../generated/utils";
/**
 * Generate an Asset's DID from a ticker
 */
export declare function tickerToDid(ticker: string): string;
/**
 * @hidden
 */
export declare function booleanToBool(value: boolean, context: Context): bool;
/**
 * @hidden
 */
export declare function boolToBoolean(value: bool): boolean;
/**
 * @hidden
 */
export declare function stringToBytes(bytes: string, context: Context): Bytes;
/**
 * @hidden
 */
export declare function bytesToString(bytes: Bytes): string;
/**
 * @hidden
 */
export declare function stringToTicker(ticker: string, context: Context): PolymeshPrimitivesTicker;
/**
 * @hidden
 */
export declare function stringToTickerKey(ticker: string, context: Context): TickerKey;
/**
 * @hidden
 */
export declare function tickerToString(ticker: PolymeshPrimitivesTicker): string;
/**
 * @hidden
 */
export declare function stringToInvestorZKProofData(proof: string, context: Context): InvestorZKProofData;
/**
 * @hidden
 */
export declare function dateToMoment(date: Date, context: Context): Moment;
/**
 * @hidden
 */
export declare function momentToDate(moment: Moment): Date;
/**
 * @hidden
 */
export declare function stringToAccountId(accountId: string, context: Context): AccountId;
/**
 * @hidden
 */
export declare function accountIdToString(accountId: AccountId): string;
/**
 * @hidden
 */
export declare function hashToString(hash: Hash): string;
/**
 * @hidden
 */
export declare function stringToHash(hash: string, context: Context): Hash;
/**
 * @hidden
 */
export declare function stringToBlockHash(blockHash: string, context: Context): BlockHash;
/**
 * @hidden
 */
export declare function stringToIdentityId(identityId: string, context: Context): PolymeshPrimitivesIdentityId;
/**
 * @hidden
 */
export declare function identityIdToString(identityId: PolymeshPrimitivesIdentityId): string;
/**
 * @hidden
 */
export declare function stringToEcdsaSignature(signature: string, context: Context): EcdsaSignature;
/**
 * @hidden
 */
export declare function accountIdToAccount(accountId: AccountId, context: Context): Account;
/**
 * @hidden
 */
export declare function signerValueToSignatory(signer: SignerValue, context: Context): Signatory;
/**
 * @hidden
 */
export declare function signatoryToSignerValue(signatory: Signatory): SignerValue;
/**
 * @hidden
 */
export declare function signerToSignerValue(signer: Signer): SignerValue;
/**
 * @hidden
 */
export declare function signerValueToSigner(signerValue: SignerValue, context: Context): Signer;
/**
 * @hidden
 */
export declare function signerToString(signer: string | Signer): string;
/**
 * @hidden
 */
export declare function u64ToBigNumber(value: u64): BigNumber;
/**
 * @hidden
 */
export declare function u128ToBigNumber(value: u128): BigNumber;
/**
 * @hidden
 */
export declare function bigNumberToU64(value: BigNumber, context: Context): u64;
/**
 * @hidden
 */
export declare function bigNumberToU128(value: BigNumber, context: Context): u128;
/**
 * @hidden
 */
export declare function percentageToPermill(value: BigNumber, context: Context): Permill;
/**
 * @hidden
 *
 * @note returns a percentage value ([0, 100])
 */
export declare function permillToBigNumber(value: Permill): BigNumber;
/**
 * @hidden
 */
export declare function meshPortfolioIdToPortfolio(portfolioId: MeshPortfolioId, context: Context): DefaultPortfolio | NumberedPortfolio;
/**
 * @hidden
 */
export declare function portfolioToPortfolioId(portfolio: DefaultPortfolio | NumberedPortfolio): PortfolioId;
/**
 * @hidden
 */
export declare function portfolioLikeToPortfolioId(value: PortfolioLike): PortfolioId;
/**
 * @hidden
 */
export declare function portfolioIdToPortfolio(portfolioId: PortfolioId, context: Context): DefaultPortfolio | NumberedPortfolio;
/**
 * @hidden
 */
export declare function portfolioLikeToPortfolio(value: PortfolioLike, context: Context): DefaultPortfolio | NumberedPortfolio;
/**
 * @hidden
 */
export declare function portfolioIdToMeshPortfolioId(portfolioId: PortfolioId, context: Context): MeshPortfolioId;
/**
 * @hidden
 */
export declare function stringToText(text: string, context: Context): Text;
/**
 * @hidden
 */
export declare function textToString(value: Text): string;
/**
 * Retrieve every Transaction Tag associated to a Transaction Group
 */
export declare function txGroupToTxTags(group: TxGroup): TxTag[];
/**
 * @hidden
 *
 * @note tags that don't belong to any group will be ignored.
 *   The same goes for tags that belong to a group that wasn't completed
 */
export declare function transactionPermissionsToTxGroups(permissions: TransactionPermissions | null): TxGroup[];
/**
 * @hidden
 */
export declare function transactionPermissionsToExtrinsicPermissions(transactionPermissions: TransactionPermissions | null, context: Context): PolymeshPrimitivesSubsetSubsetRestrictionPalletPermissions;
/**
 * @hidden
 */
export declare function permissionsToMeshPermissions(permissions: Permissions, context: Context): MeshPermissions;
/**
 * @hidden
 */
export declare function extrinsicPermissionsToTransactionPermissions(permissions: PolymeshPrimitivesSubsetSubsetRestrictionPalletPermissions): TransactionPermissions | null;
/**
 * @hidden
 */
export declare function meshPermissionsToPermissions(permissions: PolymeshPrimitivesSecondaryKeyPermissions, context: Context): Permissions;
/**
 * @hidden
 */
export declare function bigNumberToU32(value: BigNumber, context: Context): u32;
/**
 * @hidden
 */
export declare function u32ToBigNumber(value: u32): BigNumber;
/**
 * @hidden
 */
export declare function u16ToBigNumber(value: u16): BigNumber;
/**
 * @hidden
 */
export declare function u8ToBigNumber(value: u8): BigNumber;
/**
 * @hidden
 */
export declare function permissionGroupIdentifierToAgentGroup(permissionGroup: PermissionGroupIdentifier, context: Context): AgentGroup;
/**
 * @hidden
 */
export declare function agentGroupToPermissionGroupIdentifier(agentGroup: AgentGroup): PermissionGroupIdentifier;
/**
 * @hidden
 */
export declare function authorizationToAuthorizationData(auth: Authorization, context: Context): PolymeshPrimitivesAuthorizationAuthorizationData;
/**
 * @hidden
 */
export declare function authorizationTypeToMeshAuthorizationType(authorizationType: AuthorizationType, context: Context): MeshAuthorizationType;
/**
 * @hidden
 */
export declare function bigNumberToBalance(value: BigNumber, context: Context, divisible?: boolean): Balance;
/**
 * @hidden
 */
export declare function balanceToBigNumber(balance: Balance): BigNumber;
/**
 * @hidden
 */
export declare function agentGroupToPermissionGroup(agentGroup: AgentGroup, ticker: string, context: Context): KnownPermissionGroup | CustomPermissionGroup;
/**
 * @hidden
 */
export declare function authorizationDataToAuthorization(auth: PolymeshPrimitivesAuthorizationAuthorizationData, context: Context): Authorization;
/**
 * @hidden
 */
export declare function stringToMemo(value: string, context: Context): Memo;
/**
 * @hidden
 */
export declare function u8ToTransferStatus(status: u8): TransferStatus;
/**
 * @hidden
 */
export declare function internalAssetTypeToAssetType(type: InternalAssetType, context: Context): AssetType;
/**
 * @hidden
 */
export declare function assetTypeToKnownOrId(assetType: AssetType): KnownAssetType | BigNumber;
/**
 * @hidden
 */
export declare function posRatioToBigNumber(postRatio: PosRatio): BigNumber;
/**
 * @hidden
 */
export declare function isIsinValid(isin: string): boolean;
/**
 * @hidden
 *
 * @note CINS and CUSIP use the same validation
 */
export declare function isCusipValid(cusip: string): boolean;
/**
 * @hidden
 */
export declare function isLeiValid(lei: string): boolean;
/**
 * Check if given string is a valid FIGI identifier
 *
 * A FIGI consists of three parts:
 *   - a two-character prefix which is a combination of upper case consonants with the following exceptions: BS, BM, GG, GB, GH, KY, VG
 *   - a 'G' as the third character;
 *   - an eight-character combination of upper case consonants and the numerals 0 – 9
 *   - a single check digit
 * @hidden
 */
export declare function isFigiValid(figi: string): boolean;
/**
 * @hidden
 */
export declare function securityIdentifierToAssetIdentifier(identifier: SecurityIdentifier, context: Context): PolymeshPrimitivesAssetIdentifier;
/**
 * @hidden
 */
export declare function assetIdentifierToSecurityIdentifier(identifier: PolymeshPrimitivesAssetIdentifier): SecurityIdentifier;
/**
 * @hidden
 */
export declare function stringToDocumentHash(docHash: string | undefined, context: Context): PolymeshPrimitivesDocumentHash;
/**
 * @hidden
 */
export declare function documentHashToString(docHash: DocumentHash): string | undefined;
/**
 * @hidden
 */
export declare function assetDocumentToDocument({ uri, contentHash, name, filedAt, type }: AssetDocument, context: Context): PolymeshPrimitivesDocument;
/**
 * @hidden
 */
export declare function documentToAssetDocument({ uri, contentHash: hash, name, docType, filingDate, }: PolymeshPrimitivesDocument): AssetDocument;
/**
 * @hidden
 */
export declare function cddStatusToBoolean(cddStatus: CddStatus): boolean;
/**
 * @hidden
 */
export declare function canTransferResultToTransferStatus(canTransferResult: CanTransferResult): TransferStatus;
/**
 * @hidden
 */
export declare function scopeToMeshScope(scope: Scope, context: Context): MeshScope;
/**
 * @hidden
 */
export declare function meshScopeToScope(scope: MeshScope): Scope;
/**
 * @hidden
 */
export declare function stringToCddId(cddId: string, context: Context): CddId;
/**
 * @hidden
 */
export declare function cddIdToString(cddId: CddId): string;
/**
 * @hidden
 */
export declare function stringToScopeId(scopeId: string, context: Context): ScopeId;
/**
 * @hidden
 */
export declare function scopeIdToString(scopeId: ScopeId): string;
/**
 * @hidden
 */
export declare function claimToMeshClaim(claim: Claim, context: Context): MeshClaim;
/**
 * @hidden
 */
export declare function middlewareScopeToScope(scope: MiddlewareScope): Scope;
/**
 * @hidden
 */
export declare function scopeToMiddlewareScope(scope: Scope): MiddlewareScope;
/**
 * @hidden
 */
export declare function middlewareEventToEventIdentifier(event: MiddlewareEvent): EventIdentifier;
/**
 * @hidden
 */
export declare function meshClaimToClaim(claim: MeshClaim): Claim;
/**
 * @hidden
 */
export declare function stringToTargetIdentity(did: string | null, context: Context): TargetIdentity;
/**
 * @hidden
 */
export declare function meshClaimTypeToClaimType(claimType: PolymeshPrimitivesIdentityClaimClaimType): ClaimType;
/**
 * @hidden
 */
export declare function trustedIssuerToTrustedClaimIssuer(trustedIssuer: PolymeshPrimitivesConditionTrustedIssuer, context: Context): TrustedClaimIssuer;
/**
 * @hidden
 */
export declare function trustedClaimIssuerToTrustedIssuer(issuer: InputTrustedClaimIssuer, context: Context): PolymeshPrimitivesConditionTrustedIssuer;
/**
 * @hidden
 */
export declare function requirementToComplianceRequirement(requirement: InputRequirement, context: Context): PolymeshPrimitivesComplianceManagerComplianceRequirement;
/**
 * @hidden
 * @note - the data for this method comes from an RPC call, which hasn't been updated to the camelCase types
 */
export declare function complianceRequirementResultToRequirementCompliance(complianceRequirement: ComplianceRequirementResult, context: Context): RequirementCompliance;
/**
 * @hidden
 */
export declare function complianceRequirementToRequirement(complianceRequirement: PolymeshPrimitivesComplianceManagerComplianceRequirement, context: Context): Requirement;
/**
 * @hidden
 */
export declare function txTagToProtocolOp(tag: TxTag, context: Context): ProtocolOp;
/**
 * @hidden
 */
export declare function txTagToExtrinsicIdentifier(tag: TxTag): ExtrinsicIdentifier;
/**
 * @hidden
 */
export declare function extrinsicIdentifierToTxTag(extrinsicIdentifier: ExtrinsicIdentifier): TxTag;
/**
 * @hidden
 */
export declare function assetComplianceResultToCompliance(assetComplianceResult: AssetComplianceResult, context: Context): Compliance;
/**
 * @hidden
 */
export declare function moduleAddressToString(moduleAddress: string, context: Context): string;
/**
 * @hidden
 */
export declare function keyToAddress(key: string, context: Context): string;
/**
 * @hidden
 */
export declare function addressToKey(address: string, context: Context): string;
/**
 * @hidden
 */
export declare function transactionHexToTxTag(bytes: string, context: Context): TxTag;
/**
 * @hidden
 */
export declare function transactionToTxTag<Args extends unknown[]>(tx: PolymeshTx<Args>): TxTag;
/**
 * @hidden
 */
export declare function secondaryAccountToMeshSecondaryKey(secondaryKey: PermissionedAccount, context: Context): MeshSecondaryKey;
/**
 * @hidden
 */
export declare function meshVenueTypeToVenueType(type: MeshVenueType): VenueType;
/**
 * @hidden
 */
export declare function venueTypeToMeshVenueType(type: VenueType, context: Context): MeshVenueType;
/**
 * @hidden
 */
export declare function meshInstructionStatusToInstructionStatus(status: MeshInstructionStatus): InstructionStatus;
/**
 * @hidden
 */
export declare function meshAffirmationStatusToAffirmationStatus(status: MeshAffirmationStatus): AffirmationStatus;
/**
 * @hidden
 */
export declare function endConditionToSettlementType(endCondition: {
    type: InstructionType.SettleOnAffirmation;
} | {
    type: InstructionType.SettleOnBlock;
    value: BigNumber;
}, context: Context): SettlementType;
/**
 * @hidden
 */
export declare function toIdentityWithClaimsArray(data: MiddlewareIdentityWithClaims[], context: Context): IdentityWithClaims[];
/**
 * @hidden
 */
export declare function portfolioMovementToMovePortfolioItem(portfolioItem: PortfolioMovement, context: Context): MovePortfolioItem;
/**
 * @hidden
 */
export declare function claimTypeToMeshClaimType(claimType: ClaimType, context: Context): PolymeshPrimitivesIdentityClaimClaimType;
/**
 * @hidden
 */
export declare function transferRestrictionToPolymeshTransferCondition(restriction: TransferRestriction, context: Context): PolymeshPrimitivesTransferComplianceTransferCondition;
/**
 * @hidden
 */
export declare function scopeIdsToBtreeSetIdentityId(scopeIds: PolymeshPrimitivesIdentityId[], context: Context): BTreeSetIdentityId;
/**
 * @hidden
 */
export declare function transferConditionToTransferRestriction(transferCondition: TransferCondition): TransferRestriction;
/**
 * @hidden
 */
export declare function granularCanTransferResultToTransferBreakdown(result: GranularCanTransferResult, context: Context): TransferBreakdown;
/**
 * @hidden
 */
export declare function offeringTierToPriceTier(tier: OfferingTier, context: Context): PriceTier;
/**
 * @hidden
 */
export declare function permissionsLikeToPermissions(permissionsLike: PermissionsLike, context: Context): Permissions;
/**
 * @hidden
 */
export declare function middlewarePortfolioToPortfolio(portfolio: MiddlewarePortfolio, context: Context): DefaultPortfolio | NumberedPortfolio;
/**
 * @hidden
 */
export declare function fundraiserTierToTier(fundraiserTier: FundraiserTier): Tier;
/**
 * @hidden
 */
export declare function fundraiserToOfferingDetails(fundraiser: PalletStoFundraiser, name: Bytes, context: Context): OfferingDetails;
/**
 * @hidden
 */
export declare function calendarPeriodToMeshCalendarPeriod(period: CalendarPeriod, context: Context): MeshCalendarPeriod;
/**
 * @hidden
 */
export declare function meshCalendarPeriodToCalendarPeriod(period: MeshCalendarPeriod): CalendarPeriod;
/**
 * @hidden
 */
export declare function scheduleSpecToMeshScheduleSpec(details: ScheduleSpec, context: Context): MeshScheduleSpec;
/**
 * @hidden
 */
export declare function storedScheduleToCheckpointScheduleParams(storedSchedule: StoredSchedule): CheckpointScheduleParams;
/**
 * @hidden
 */
export declare function stringToSignature(signature: string, context: Context): Signature;
/**
 * @hidden
 */
export declare function meshCorporateActionToCorporateActionParams(corporateAction: PalletCorporateActionsCorporateAction, details: Bytes, context: Context): CorporateActionParams;
/**
 * @hidden
 */
export declare function stringToRistrettoPoint(ristrettoPoint: string, context: Context): RistrettoPoint;
/**
 * @hidden
 */
export declare function corporateActionKindToCaKind(kind: CorporateActionKind, context: Context): CAKind;
/**
 * @hidden
 */
export declare function stringToScalar(scalar: string, context: Context): Scalar;
/**
 * @hidden
 */
export declare function checkpointToRecordDateSpec(checkpoint: Checkpoint | Date | CheckpointSchedule, context: Context): RecordDateSpec;
/**
 * @hidden
 */
export declare function scopeClaimProofToConfidentialIdentityClaimProof(proof: ScopeClaimProof, scopeId: string, context: Context): ConfidentialIdentityClaimProofsScopeClaimProof;
/**
 * @hidden
 */
export declare function targetIdentitiesToCorporateActionTargets(targetIdentities: TargetIdentities, context: Context): CorporateActionTargets;
/**
 * @hidden
 */
export declare function targetsToTargetIdentities(targets: Omit<CorporateActionTargets, 'identities'> & {
    identities: (string | Identity)[];
}, context: Context): TargetIdentities;
/**
 * @hidden
 */
export declare function distributionToDividendDistributionParams(distribution: PalletCorporateActionsDistribution, context: Context): DividendDistributionParams;
/**
 * @hidden
 */
export declare function corporateActionIdentifierToCaId(corporateActionIdentifier: CorporateActionIdentifier, context: Context): PalletCorporateActionsCaId;
/**
 * @hidden
 */
export declare function statisticsOpTypeToStatType(op: PolymeshPrimitivesStatisticsStatOpType, context: Context): PolymeshPrimitivesStatisticsStatType;
/**
 * @hidden
 */
export declare function statUpdate(key2: PolymeshPrimitivesStatisticsStat2ndKey, value: u128, context: Context): PolymeshPrimitivesStatisticsStatUpdate;
/**
 * @hidden
 */
export declare function statUpdatesToBtreeStatUpdate(statUpdates: PolymeshPrimitivesStatisticsStatUpdate[], context: Context): BTreeSetStatUpdate;
/**
 * @hidden
 */
export declare function meshStatToStatisticsOpType(rawStat: PolymeshPrimitivesStatisticsStatType): keyof typeof StatisticsOpType;
/**
 * @hidden
 */
export declare function statisticsOpTypeToStatOpType(type: StatisticsOpType, context: Context): PolymeshPrimitivesStatisticsStatOpType;
/**
 * For now this is hard coded to return a NoClaimStat type. Once Claim scopes are added this should be extended
 * @hidden
 */
export declare function createStat2ndKey(context: Context): PolymeshPrimitivesStatisticsStat2ndKey;
/**
 * @hidden
 */
export declare function complianceConditionsToBtreeSet(conditions: PolymeshPrimitivesTransferComplianceTransferCondition[], context: Context): BTreeSetTransferCondition;
/**
 * @hidden
 */
export declare function toExemptKey(tickerKey: TickerKey, op: PolymeshPrimitivesStatisticsStatOpType): ExemptKey;
//# sourceMappingURL=conversion.d.ts.map