Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • nodes/rust/duniter-v2s
  • llaq/lc-core-substrate
  • pini-gh/duniter-v2s
  • vincentux/duniter-v2s
  • mildred/duniter-v2s
  • d0p1/duniter-v2s
  • bgallois/duniter-v2s
  • Nicolas80/duniter-v2s
8 results
Select Git revision
Show changes
Commits on Source (7)
Showing
with 4512 additions and 0 deletions
...@@ -17,3 +17,6 @@ ...@@ -17,3 +17,6 @@
# node modules # node modules
**/node_modules/** **/node_modules/**
# types bundle dist dir
types-bundle/dist
...@@ -32,6 +32,36 @@ ...@@ -32,6 +32,36 @@
} }
} }
] ]
},
{
"label": "Run --tmp",
"type": "shell",
"command": "cargo",
"args": ["run", "--release", "--", "--dev", "--tmp"],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": [
{
"owner": "rust",
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(\\d+):(\\d+)\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"endLine": 4,
"endColumn": 5,
"severity": 6,
"message": 7
}
}
]
} }
] ]
} }
\ No newline at end of file
# lc-core types
This npm package contains lc-core types generated with: https://polkadot.js.org/docs/api/examples/promise/typegen/
## Update types
1. Update manually file `src/interfaces/runtime/definitions.ts`
2. yarn
3. yarn build
4. yarn lint
5. fix eventually errors
This diff is collapsed.
{
"name": "@duniter/core-types",
"version": "0.0.1",
"description": "Using @polkadot/typegen to generate core types definitions",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"repository": "https://git.duniter.org/nodes/rust/lc-core-substrate/types-bundle",
"author": "elois <c@elo.tf>",
"license": "AGPL-3.0",
"scripts": {
"build": "yarn generate:defs && yarn generate:meta",
"generate:defs": "ts-node --skip-project node_modules/.bin/polkadot-types-from-defs --package @duniter/core-types/interfaces --input ./src/interfaces",
"generate:meta": "ts-node --skip-project node_modules/.bin/polkadot-types-from-chain --package @duniter/core-types/interfaces --endpoint ./lc-core.json --output ./src/interfaces --strict",
"lint": "tsc --noEmit --pretty",
"prepublish": "tsc",
"publish": "yarn prepublish && npm publish"
},
"dependencies": {
"@polkadot/api": "^5.1.1"
},
"devDependencies": {
"@polkadot/typegen": "^5.1.1",
"ts-node": "^8.6.2",
"typescript": "^3.8.2"
},
"engines": {
"node": ">= 14.17.3"
}
}
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
import type { Vec, u16 } from '@polkadot/types';
import type { Balance, BalanceOf, BlockNumber, Moment, Permill, RuntimeDbWeight } from '@polkadot/types/interfaces/runtime';
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
import type { BlockLength, BlockWeights } from '@polkadot/types/interfaces/system';
import type { ApiTypes } from '@polkadot/api/types';
declare module '@polkadot/api/types/consts' {
export interface AugmentedConsts<ApiType> {
balances: {
/**
* The minimum amount required to keep an account open.
**/
existentialDeposit: Balance & AugmentedConst<ApiType>;
};
identity: {
/**
* Period during which the owner can confirm the new identity.
**/
confirmPeriod: BlockNumber & AugmentedConst<ApiType>;
/**
* Maximum period of inactivity, after this period, the identity is permanently deleted
**/
maxInactivityPeriod: BlockNumber & AugmentedConst<ApiType>;
/**
* Maximum period with no rights, after this period, the identity is permanently deleted
**/
maxNoRightPeriod: BlockNumber & AugmentedConst<ApiType>;
/**
* Period after which a non-validated identity is deleted
**/
validationPeriod: BlockNumber & AugmentedConst<ApiType>;
};
system: {
/**
* Maximum number of block number to block hash mappings to keep (oldest pruned first).
**/
blockHashCount: BlockNumber & AugmentedConst<ApiType>;
/**
* The maximum length of a block (in bytes).
**/
blockLength: BlockLength & AugmentedConst<ApiType>;
/**
* Block & extrinsics weights: base values and limits.
**/
blockWeights: BlockWeights & AugmentedConst<ApiType>;
/**
* The weight of runtime database operations the runtime can invoke.
**/
dbWeight: RuntimeDbWeight & AugmentedConst<ApiType>;
/**
* The designated SS85 prefix of this chain.
*
* This replaces the "ss58Format" property declared in the chain spec. Reason is
* that the runtime should know about the prefix in order to make use of it as
* an identifier of the chain.
**/
ss58Prefix: u16 & AugmentedConst<ApiType>;
/**
* Get the chain's current version.
**/
version: RuntimeVersion & AugmentedConst<ApiType>;
};
timestamp: {
/**
* The minimum period between blocks. Beware that this is different to the *expected* period
* that the block production apparatus provides. Your chosen consensus system will generally
* work with this to determine a sensible block time. e.g. For Aura, it will be double this
* period on default settings.
**/
minimumPeriod: Moment & AugmentedConst<ApiType>;
};
transactionPayment: {
/**
* The fee to be paid for making a transaction; the per-byte portion.
**/
transactionByteFee: BalanceOf & AugmentedConst<ApiType>;
/**
* The polynomial that is applied in order to derive fee from weight.
**/
weightToFee: Vec<WeightToFeeCoefficient> & AugmentedConst<ApiType>;
};
universalDividend: {
/**
* Square of the money growth rate per ud reevaluation period
**/
squareMoneyGrowthRate: Permill & AugmentedConst<ApiType>;
/**
* Universal dividend creation period
**/
udCreationPeriod: BlockNumber & AugmentedConst<ApiType>;
/**
* Universal dividend reevaluation period (in number of creation period)
**/
udReevalPeriod: BalanceOf & AugmentedConst<ApiType>;
/**
* Universal dividend reevaluation period in number of blocks
* Must be equal to UdReevalPeriod * UdCreationPeriod
**/
udReevalPeriodInBlocks: BlockNumber & AugmentedConst<ApiType>;
};
}
export interface QueryableConsts<ApiType extends ApiTypes> extends AugmentedConsts<ApiType> {
}
}
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
import type { ApiTypes } from '@polkadot/api/types';
declare module '@polkadot/api/types/errors' {
export interface AugmentedErrors<ApiType> {
balances: {
/**
* Beneficiary account must pre-exist
**/
DeadAccount: AugmentedError<ApiType>;
/**
* Value too low to create account due to existential deposit
**/
ExistentialDeposit: AugmentedError<ApiType>;
/**
* A vesting schedule already exists for this account
**/
ExistingVestingSchedule: AugmentedError<ApiType>;
/**
* Balance too low to send value
**/
InsufficientBalance: AugmentedError<ApiType>;
/**
* Transfer/payment would kill account
**/
KeepAlive: AugmentedError<ApiType>;
/**
* Account liquidity restrictions prevent withdrawal
**/
LiquidityRestrictions: AugmentedError<ApiType>;
/**
* Number of named reserves exceed MaxReserves
**/
TooManyReserves: AugmentedError<ApiType>;
/**
* Vesting balance too high to send value
**/
VestingBalance: AugmentedError<ApiType>;
};
grandpa: {
/**
* Attempt to signal GRANDPA change with one already pending.
**/
ChangePending: AugmentedError<ApiType>;
/**
* A given equivocation report is valid but already previously reported.
**/
DuplicateOffenceReport: AugmentedError<ApiType>;
/**
* An equivocation proof provided as part of an equivocation report is invalid.
**/
InvalidEquivocationProof: AugmentedError<ApiType>;
/**
* A key ownership proof provided as part of an equivocation report is invalid.
**/
InvalidKeyOwnershipProof: AugmentedError<ApiType>;
/**
* Attempt to signal GRANDPA pause when the authority set isn't live
* (either paused or already pending pause).
**/
PauseFailed: AugmentedError<ApiType>;
/**
* Attempt to signal GRANDPA resume when the authority set isn't paused
* (either live or already pending resume).
**/
ResumeFailed: AugmentedError<ApiType>;
/**
* Cannot signal forced change so soon after last.
**/
TooSoon: AugmentedError<ApiType>;
};
identity: {
/**
* Identity already confirmed
**/
IdtyAlreadyConfirmed: AugmentedError<ApiType>;
/**
* Identity already exist
**/
IdtyAlreadyExist: AugmentedError<ApiType>;
/**
* Identity already validated
**/
IdtyAlreadyValidated: AugmentedError<ApiType>;
/**
* You are not allowed to create a new identity now
**/
IdtyCreationNotAllowed: AugmentedError<ApiType>;
/**
* Identity not confirmed by owner
**/
IdtyNotConfirmedByOwner: AugmentedError<ApiType>;
/**
* Identity not found
**/
IdtyNotFound: AugmentedError<ApiType>;
/**
* Identity not validated
**/
IdtyNotValidated: AugmentedError<ApiType>;
/**
* Identity not yet renewable
**/
IdtyNotYetRenewable: AugmentedError<ApiType>;
/**
* This operation requires to be the owner of the identity
**/
RequireToBeOwner: AugmentedError<ApiType>;
/**
* Right already added
**/
RightAlreadyAdded: AugmentedError<ApiType>;
/**
* Right not exist
**/
RightNotExist: AugmentedError<ApiType>;
};
strongCert: {
/**
* An identity must receive certifications before it can issue them.
**/
IdtyMustReceiveCertsBeforeCanIssue: AugmentedError<ApiType>;
/**
* This identity has already issued the maximum number of certifications
**/
IssuedTooManyCert: AugmentedError<ApiType>;
/**
* This identity has already issued a certification too recently
**/
NotRespectCertPeriod: AugmentedError<ApiType>;
/**
* This certification has already been issued or renewed recently
**/
NotRespectRenewablePeriod: AugmentedError<ApiType>;
};
sudo: {
/**
* Sender must be the Sudo account
**/
RequireSudo: AugmentedError<ApiType>;
};
system: {
/**
* Failed to extract the runtime version from the new runtime.
*
* Either calling `Core_version` or decoding `RuntimeVersion` failed.
**/
FailedToExtractRuntimeVersion: AugmentedError<ApiType>;
/**
* The name of specification does not match between the current runtime
* and the new runtime.
**/
InvalidSpecName: AugmentedError<ApiType>;
/**
* Suicide called when the account has non-default composite data.
**/
NonDefaultComposite: AugmentedError<ApiType>;
/**
* There is a non-zero reference count preventing the account from being purged.
**/
NonZeroRefCount: AugmentedError<ApiType>;
/**
* The specification version is not allowed to decrease between the current runtime
* and the new runtime.
**/
SpecVersionNeedsToIncrease: AugmentedError<ApiType>;
};
}
export interface DecoratedErrors<ApiType extends ApiTypes> extends AugmentedErrors<ApiType> {
}
}
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
import type { Option, bool, u32, u8 } from '@polkadot/types';
import type { BalanceStatus } from '@polkadot/types/interfaces/balances';
import type { AuthorityList } from '@polkadot/types/interfaces/grandpa';
import type { AccountId, Balance, BalanceOf, Hash } from '@polkadot/types/interfaces/runtime';
import type { DispatchError, DispatchInfo, DispatchResult } from '@polkadot/types/interfaces/system';
import type { IdtyDid, IdtyIndex, IdtyRight } from '@duniter/core-types/interfaces/runtime';
import type { ApiTypes } from '@polkadot/api/types';
declare module '@polkadot/api/types/events' {
export interface AugmentedEvents<ApiType> {
balances: {
/**
* A balance was set by root. \[who, free, reserved\]
**/
BalanceSet: AugmentedEvent<ApiType, [AccountId, Balance, Balance]>;
/**
* Some amount was deposited (e.g. for transaction fees). \[who, deposit\]
**/
Deposit: AugmentedEvent<ApiType, [AccountId, Balance]>;
/**
* An account was removed whose balance was non-zero but below ExistentialDeposit,
* resulting in an outright loss. \[account, balance\]
**/
DustLost: AugmentedEvent<ApiType, [AccountId, Balance]>;
/**
* An account was created with some free balance. \[account, free_balance\]
**/
Endowed: AugmentedEvent<ApiType, [AccountId, Balance]>;
/**
* Some balance was reserved (moved from free to reserved). \[who, value\]
**/
Reserved: AugmentedEvent<ApiType, [AccountId, Balance]>;
/**
* Some balance was moved from the reserve of the first account to the second account.
* Final argument indicates the destination balance type.
* \[from, to, balance, destination_status\]
**/
ReserveRepatriated: AugmentedEvent<ApiType, [AccountId, AccountId, Balance, BalanceStatus]>;
/**
* Transfer succeeded. \[from, to, value\]
**/
Transfer: AugmentedEvent<ApiType, [AccountId, AccountId, Balance]>;
/**
* Some balance was unreserved (moved from reserved to free). \[who, value\]
**/
Unreserved: AugmentedEvent<ApiType, [AccountId, Balance]>;
};
grandpa: {
/**
* New authority set has been applied. \[authority_set\]
**/
NewAuthorities: AugmentedEvent<ApiType, [AuthorityList]>;
/**
* Current authority set has been paused.
**/
Paused: AugmentedEvent<ApiType, []>;
/**
* Current authority set has been resumed.
**/
Resumed: AugmentedEvent<ApiType, []>;
};
identity: {
/**
* An identity has acquired a new right
* [idty, right]
**/
IdtyAcquireRight: AugmentedEvent<ApiType, [IdtyDid, IdtyRight]>;
/**
* An identity has been confirmed by it's owner
* [idty]
**/
IdtyConfirmed: AugmentedEvent<ApiType, [IdtyDid]>;
/**
* A new identity has been created
* [idty, owner_key]
**/
IdtyCreated: AugmentedEvent<ApiType, [IdtyDid, AccountId]>;
/**
* An identity lost a right
* [idty, righ]
**/
IdtyLostRight: AugmentedEvent<ApiType, [IdtyDid, IdtyRight]>;
/**
* An identity was renewed by it's owner
* [idty]
**/
IdtyRenewed: AugmentedEvent<ApiType, [IdtyDid]>;
/**
* An identity has modified a subkey associated with a right
* [idty_did, right, old_subkey_opt, new_subkey_opt]
**/
IdtySetRightSubKey: AugmentedEvent<ApiType, [IdtyDid, IdtyRight, Option<AccountId>, Option<AccountId>]>;
/**
* An identity has been validated
* [idty]
**/
IdtyValidated: AugmentedEvent<ApiType, [IdtyDid]>;
};
strongCert: {
/**
* New certification
* \[issuer, issuer_issued_count, receiver, receiver_received_count\]
**/
NewCert: AugmentedEvent<ApiType, [IdtyIndex, u8, IdtyIndex, u32]>;
/**
* Removed certification
* \[issuer, issuer_issued_count, receiver, receiver_received_count, expiration\]
**/
RemovedCert: AugmentedEvent<ApiType, [IdtyIndex, u8, IdtyIndex, u32, bool]>;
/**
* Renewed certification
* \[issuer, receiver\]
**/
RenewedCert: AugmentedEvent<ApiType, [IdtyIndex, IdtyIndex]>;
};
sudo: {
/**
* The \[sudoer\] just switched identity; the old key is supplied.
**/
KeyChanged: AugmentedEvent<ApiType, [AccountId]>;
/**
* A sudo just took place. \[result\]
**/
Sudid: AugmentedEvent<ApiType, [DispatchResult]>;
/**
* A sudo just took place. \[result\]
**/
SudoAsDone: AugmentedEvent<ApiType, [DispatchResult]>;
};
system: {
/**
* `:code` was updated.
**/
CodeUpdated: AugmentedEvent<ApiType, []>;
/**
* An extrinsic failed. \[error, info\]
**/
ExtrinsicFailed: AugmentedEvent<ApiType, [DispatchError, DispatchInfo]>;
/**
* An extrinsic completed successfully. \[info\]
**/
ExtrinsicSuccess: AugmentedEvent<ApiType, [DispatchInfo]>;
/**
* An \[account\] was reaped.
**/
KilledAccount: AugmentedEvent<ApiType, [AccountId]>;
/**
* A new \[account\] was created.
**/
NewAccount: AugmentedEvent<ApiType, [AccountId]>;
/**
* On on-chain remark happened. \[origin, remark_hash\]
**/
Remarked: AugmentedEvent<ApiType, [AccountId, Hash]>;
};
universalDividend: {
/**
* A new universal dividend is created
* [ud_amout, members_count]
**/
NewUdCreated: AugmentedEvent<ApiType, [BalanceOf, BalanceOf]>;
/**
* The universal dividend has been re-evaluated
* [new_ud_amount, monetary_mass, members_count]
**/
UdReevalued: AugmentedEvent<ApiType, [BalanceOf, BalanceOf, BalanceOf]>;
};
}
export interface DecoratedEvents<ApiType extends ApiTypes> extends AugmentedEvents<ApiType> {
}
}
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
import type { Bytes, Option, Vec, bool, u32, u64 } from '@polkadot/types';
import type { AnyNumber, ITuple, Observable } from '@polkadot/types/types';
import type { AccountData, BalanceLock, ReserveData } from '@polkadot/types/interfaces/balances';
import type { SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
import type { AccountId, Balance, BalanceOf, BlockNumber, Hash, Moment, Releases } from '@polkadot/types/interfaces/runtime';
import type { SessionIndex } from '@polkadot/types/interfaces/session';
import type { AccountInfo, ConsumedWeight, DigestOf, EventIndex, EventRecord, LastRuntimeUpgradeInfo, Phase } from '@polkadot/types/interfaces/system';
import type { Multiplier } from '@polkadot/types/interfaces/txpayment';
import type { CertValue, IdtyCertMeta, IdtyDid, IdtyIndex, IdtyStatus, IdtyValue } from '@duniter/core-types/interfaces/runtime';
import type { ApiTypes } from '@polkadot/api/types';
declare module '@polkadot/api/types/storage' {
export interface AugmentedQueries<ApiType> {
balances: {
/**
* The balance of an account.
*
* NOTE: This is only used in the case that this pallet is used to store balances.
**/
account: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<AccountData>, [AccountId]>;
/**
* Any liquidity locks on some account balances.
* NOTE: Should only be accessed when setting, changing and freeing a lock.
**/
locks: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Vec<BalanceLock>>, [AccountId]>;
/**
* Named reserves on some account balances.
**/
reserves: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Vec<ReserveData>>, [AccountId]>;
/**
* Storage version of the pallet.
*
* This is set to v2.0.0 for new networks.
**/
storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>, []>;
/**
* The total units issued in the system.
**/
totalIssuance: AugmentedQuery<ApiType, () => Observable<Balance>, []>;
};
grandpa: {
/**
* The number of changes (both in terms of keys and underlying economic responsibilities)
* in the "set" of Grandpa validators from genesis.
**/
currentSetId: AugmentedQuery<ApiType, () => Observable<SetId>, []>;
/**
* next block number where we can force a change.
**/
nextForced: AugmentedQuery<ApiType, () => Observable<Option<BlockNumber>>, []>;
/**
* Pending change: (signaled at, scheduled change).
**/
pendingChange: AugmentedQuery<ApiType, () => Observable<Option<StoredPendingChange>>, []>;
/**
* A mapping from grandpa set ID to the index of the *most recent* session for which its
* members were responsible.
*
* TWOX-NOTE: `SetId` is not under user control.
**/
setIdSession: AugmentedQuery<ApiType, (arg: SetId | AnyNumber | Uint8Array) => Observable<Option<SessionIndex>>, [SetId]>;
/**
* `true` if we are currently stalled.
**/
stalled: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[BlockNumber, BlockNumber]>>>, []>;
/**
* State of the current authority set.
**/
state: AugmentedQuery<ApiType, () => Observable<StoredState>, []>;
};
identity: {
/**
* Identities
**/
identities: AugmentedQuery<ApiType, (arg: IdtyIndex | AnyNumber | Uint8Array) => Observable<IdtyValue>, [IdtyIndex]>;
/**
* IdentitiesByDid
**/
identitiesByDid: AugmentedQuery<ApiType, (arg: IdtyDid | { hash?: any; planet?: any; latitude?: any; longitude?: any } | string | Uint8Array) => Observable<IdtyIndex>, [IdtyDid]>;
identitiesCount: AugmentedQuery<ApiType, () => Observable<u64>, []>;
/**
* Identities by expiration block
**/
identitiesExpireOn: AugmentedQuery<ApiType, (arg: BlockNumber | AnyNumber | Uint8Array) => Observable<Vec<IdtyIndex>>, [BlockNumber]>;
/**
* Identities by removed block
**/
identitiesRemovableOn: AugmentedQuery<ApiType, (arg: BlockNumber | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[IdtyIndex, IdtyStatus]>>>, [BlockNumber]>;
nextIdtyIndex: AugmentedQuery<ApiType, () => Observable<IdtyIndex>, []>;
/**
* Storage version of the pallet.
**/
storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>, []>;
};
randomnessCollectiveFlip: {
/**
* Series of block headers from the last 81 blocks that acts as random seed material. This
* is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of
* the oldest hash.
**/
randomMaterial: AugmentedQuery<ApiType, () => Observable<Vec<Hash>>, []>;
};
strongCert: {
storageCertsByIssuer: AugmentedQuery<ApiType, (arg1: IdtyIndex | AnyNumber | Uint8Array, arg2: IdtyIndex | AnyNumber | Uint8Array) => Observable<Option<CertValue>>, [IdtyIndex, IdtyIndex]>;
/**
* Certifications by receiver
**/
storageCertsByReceiver: AugmentedQuery<ApiType, (arg: IdtyIndex | AnyNumber | Uint8Array) => Observable<Vec<IdtyIndex>>, [IdtyIndex]>;
/**
* Certifications removable on
**/
storageCertsRemovableOn: AugmentedQuery<ApiType, (arg: BlockNumber | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[IdtyIndex, IdtyIndex]>>>, [BlockNumber]>;
/**
* Certifications by issuer
**/
storageIdtyCertMeta: AugmentedQuery<ApiType, (arg: IdtyIndex | AnyNumber | Uint8Array) => Observable<IdtyCertMeta>, [IdtyIndex]>;
/**
* Storage version of the pallet.
**/
storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>, []>;
};
sudo: {
/**
* The `AccountId` of the sudo key.
**/
key: AugmentedQuery<ApiType, () => Observable<AccountId>, []>;
};
system: {
/**
* The full account information for a particular account ID.
**/
account: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<AccountInfo>, [AccountId]>;
/**
* Total length (in bytes) for all extrinsics put together, for the current block.
**/
allExtrinsicsLen: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []>;
/**
* Map of block numbers to block hashes.
**/
blockHash: AugmentedQuery<ApiType, (arg: BlockNumber | AnyNumber | Uint8Array) => Observable<Hash>, [BlockNumber]>;
/**
* The current weight for the block.
**/
blockWeight: AugmentedQuery<ApiType, () => Observable<ConsumedWeight>, []>;
/**
* Digest of the current block, also part of the block header.
**/
digest: AugmentedQuery<ApiType, () => Observable<DigestOf>, []>;
/**
* The number of events in the `Events<T>` list.
**/
eventCount: AugmentedQuery<ApiType, () => Observable<EventIndex>, []>;
/**
* Events deposited for the current block.
**/
events: AugmentedQuery<ApiType, () => Observable<Vec<EventRecord>>, []>;
/**
* Mapping between a topic (represented by T::Hash) and a vector of indexes
* of events in the `<Events<T>>` list.
*
* All topic vectors have deterministic storage locations depending on the topic. This
* allows light-clients to leverage the changes trie storage tracking mechanism and
* in case of changes fetch the list of events of interest.
*
* The value has the type `(T::BlockNumber, EventIndex)` because if we used only just
* the `EventIndex` then in case if the topic has the same contents on the next block
* no notification will be triggered thus the event might be lost.
**/
eventTopics: AugmentedQuery<ApiType, (arg: Hash | string | Uint8Array) => Observable<Vec<ITuple<[BlockNumber, EventIndex]>>>, [Hash]>;
/**
* The execution phase of the block.
**/
executionPhase: AugmentedQuery<ApiType, () => Observable<Option<Phase>>, []>;
/**
* Total extrinsics count for the current block.
**/
extrinsicCount: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []>;
/**
* Extrinsics data for the current block (maps an extrinsic's index to its data).
**/
extrinsicData: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]>;
/**
* Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.
**/
lastRuntimeUpgrade: AugmentedQuery<ApiType, () => Observable<Option<LastRuntimeUpgradeInfo>>, []>;
/**
* The current block number being processed. Set by `execute_block`.
**/
number: AugmentedQuery<ApiType, () => Observable<BlockNumber>, []>;
/**
* Hash of the previous block.
**/
parentHash: AugmentedQuery<ApiType, () => Observable<Hash>, []>;
/**
* True if we have upgraded so that AccountInfo contains three types of `RefCount`. False
* (default) if not.
**/
upgradedToTripleRefCount: AugmentedQuery<ApiType, () => Observable<bool>, []>;
/**
* True if we have upgraded so that `type RefCount` is `u32`. False (default) if not.
**/
upgradedToU32RefCount: AugmentedQuery<ApiType, () => Observable<bool>, []>;
};
timestamp: {
/**
* Did the timestamp get updated in this block?
**/
didUpdate: AugmentedQuery<ApiType, () => Observable<bool>, []>;
/**
* Current time for the current block.
**/
now: AugmentedQuery<ApiType, () => Observable<Moment>, []>;
};
transactionPayment: {
nextFeeMultiplier: AugmentedQuery<ApiType, () => Observable<Multiplier>, []>;
storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>, []>;
};
udAccountsStorage: {
/**
* Storage version of the pallet.
**/
storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>, []>;
udAccounts: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<ITuple<[]>>, [AccountId]>;
udAccountsCounter: AugmentedQuery<ApiType, () => Observable<u64>, []>;
};
universalDividend: {
/**
* Last reevaluation
**/
currentUdStorage: AugmentedQuery<ApiType, () => Observable<BalanceOf>, []>;
/**
* Total quantity of money created by universal dividend (does not take into account the possible destruction of money)
**/
monetaryMassStorage: AugmentedQuery<ApiType, () => Observable<BalanceOf>, []>;
/**
* Storage version of the pallet.
**/
storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>, []>;
};
}
export interface QueryableStorage<ApiType extends ApiTypes> extends AugmentedQueries<ApiType> {
}
}
This diff is collapsed.
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
import type { Bytes, Compact, Option, Vec, bool, u32, u64 } from '@polkadot/types';
import type { AnyNumber } from '@polkadot/types/types';
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
import type { GrandpaEquivocationProof, KeyOwnerProof } from '@polkadot/types/interfaces/grandpa';
import type { AccountId, Balance, BlockNumber, Call, ChangesTrieConfiguration, KeyValue, LookupSource, Moment, Perbill, Weight } from '@polkadot/types/interfaces/runtime';
import type { Key } from '@polkadot/types/interfaces/system';
import type { IdtyDid, IdtyIndex, IdtyRight } from '@duniter/core-types/interfaces/runtime';
import type { ApiTypes, SubmittableExtrinsic } from '@polkadot/api/types';
declare module '@polkadot/api/types/submittable' {
export interface AugmentedSubmittables<ApiType> {
balances: {
/**
* Exactly as `transfer`, except the origin must be root and the source account may be
* specified.
* # <weight>
* - Same as transfer, but additional read and write because the source account is
* not assumed to be in the overlay.
* # </weight>
**/
forceTransfer: AugmentedSubmittable<(source: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, dest: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, LookupSource, Compact<Balance>]>;
/**
* Set the balances of a given account.
*
* This will alter `FreeBalance` and `ReservedBalance` in storage. it will
* also decrease the total issuance of the system (`TotalIssuance`).
* If the new free or reserved balance is below the existential deposit,
* it will reset the account nonce (`frame_system::AccountNonce`).
*
* The dispatch origin for this call is `root`.
*
* # <weight>
* - Independent of the arguments.
* - Contains a limited number of reads and writes.
* ---------------------
* - Base Weight:
* - Creating: 27.56 µs
* - Killing: 35.11 µs
* - DB Weight: 1 Read, 1 Write to `who`
* # </weight>
**/
setBalance: AugmentedSubmittable<(who: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, newFree: Compact<Balance> | AnyNumber | Uint8Array, newReserved: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Compact<Balance>, Compact<Balance>]>;
/**
* Transfer some liquid free balance to another account.
*
* `transfer` will set the `FreeBalance` of the sender and receiver.
* It will decrease the total issuance of the system by the `TransferFee`.
* If the sender's account is below the existential deposit as a result
* of the transfer, the account will be reaped.
*
* The dispatch origin for this call must be `Signed` by the transactor.
*
* # <weight>
* - Dependent on arguments but not critical, given proper implementations for
* input config types. See related functions below.
* - It contains a limited number of reads and writes internally and no complex computation.
*
* Related functions:
*
* - `ensure_can_withdraw` is always called internally but has a bounded complexity.
* - Transferring balances to accounts that did not exist before will cause
* `T::OnNewAccount::on_new_account` to be called.
* - Removing enough funds from an account will trigger `T::DustRemoval::on_unbalanced`.
* - `transfer_keep_alive` works the same way as `transfer`, but has an additional
* check that the transfer will not kill the origin account.
* ---------------------------------
* - Base Weight: 73.64 µs, worst case scenario (account created, account removed)
* - DB Weight: 1 Read and 1 Write to destination account
* - Origin account is already in memory, so no DB operations for them.
* # </weight>
**/
transfer: AugmentedSubmittable<(dest: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Compact<Balance>]>;
/**
* Transfer the entire transferable balance from the caller account.
*
* NOTE: This function only attempts to transfer _transferable_ balances. This means that
* any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be
* transferred by this function. To ensure that this function results in a killed account,
* you might need to prepare the account by removing any reference counters, storage
* deposits, etc...
*
* The dispatch origin of this call must be Signed.
*
* - `dest`: The recipient of the transfer.
* - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all
* of the funds the account has, causing the sender account to be killed (false), or
* transfer everything except at least the existential deposit, which will guarantee to
* keep the sender account alive (true).
* # <weight>
* - O(1). Just like transfer, but reading the user's transferable balance first.
* #</weight>
**/
transferAll: AugmentedSubmittable<(dest: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, keepAlive: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, bool]>;
/**
* Same as the [`transfer`] call, but with a check that the transfer will not kill the
* origin account.
*
* 99% of the time you want [`transfer`] instead.
*
* [`transfer`]: struct.Pallet.html#method.transfer
* # <weight>
* - Cheaper than transfer because account cannot be killed.
* - Base Weight: 51.4 µs
* - DB Weight: 1 Read and 1 Write to dest (sender is in overlay already)
* #</weight>
**/
transferKeepAlive: AugmentedSubmittable<(dest: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<Balance> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Compact<Balance>]>;
};
grandpa: {
/**
* Note that the current authority set of the GRANDPA finality gadget has
* stalled. This will trigger a forced authority set change at the beginning
* of the next session, to be enacted `delay` blocks after that. The delay
* should be high enough to safely assume that the block signalling the
* forced change will not be re-orged (e.g. 1000 blocks). The GRANDPA voters
* will start the new authority set using the given finalized block as base.
* Only callable by root.
**/
noteStalled: AugmentedSubmittable<(delay: BlockNumber | AnyNumber | Uint8Array, bestFinalizedBlockNumber: BlockNumber | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [BlockNumber, BlockNumber]>;
/**
* Report voter equivocation/misbehavior. This method will verify the
* equivocation proof and validate the given key ownership proof
* against the extracted offender. If both are valid, the offence
* will be reported.
**/
reportEquivocation: AugmentedSubmittable<(equivocationProof: GrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, keyOwnerProof: KeyOwnerProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [GrandpaEquivocationProof, KeyOwnerProof]>;
/**
* Report voter equivocation/misbehavior. This method will verify the
* equivocation proof and validate the given key ownership proof
* against the extracted offender. If both are valid, the offence
* will be reported.
*
* This extrinsic must be called unsigned and it is expected that only
* block authors will call it (validated in `ValidateUnsigned`), as such
* if the block author is defined it will be defined as the equivocation
* reporter.
**/
reportEquivocationUnsigned: AugmentedSubmittable<(equivocationProof: GrandpaEquivocationProof | { setId?: any; equivocation?: any } | string | Uint8Array, keyOwnerProof: KeyOwnerProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [GrandpaEquivocationProof, KeyOwnerProof]>;
};
identity: {
addRight: AugmentedSubmittable<(idtyIndex: IdtyIndex | AnyNumber | Uint8Array, right: IdtyRight | 'CreateIdty' | 'LightCert' | 'StrongCert' | 'Ud' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [IdtyIndex, IdtyRight]>;
confirmIdentity: AugmentedSubmittable<(idtyDid: IdtyDid | { hash?: any; planet?: any; latitude?: any; longitude?: any } | string | Uint8Array, idtyIndex: IdtyIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [IdtyDid, IdtyIndex]>;
createIdentity: AugmentedSubmittable<(creator: IdtyIndex | AnyNumber | Uint8Array, idtyDid: IdtyDid | { hash?: any; planet?: any; latitude?: any; longitude?: any } | string | Uint8Array, ownerKey: AccountId | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [IdtyIndex, IdtyDid, AccountId]>;
delRight: AugmentedSubmittable<(idtyIndex: IdtyIndex | AnyNumber | Uint8Array, right: IdtyRight | 'CreateIdty' | 'LightCert' | 'StrongCert' | 'Ud' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [IdtyIndex, IdtyRight]>;
renewIdentity: AugmentedSubmittable<(idtyDid: IdtyDid | { hash?: any; planet?: any; latitude?: any; longitude?: any } | string | Uint8Array, idtyIndex: IdtyIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [IdtyDid, IdtyIndex]>;
setRightSubkey: AugmentedSubmittable<(idtyIndex: IdtyIndex | AnyNumber | Uint8Array, right: IdtyRight | 'CreateIdty' | 'LightCert' | 'StrongCert' | 'Ud' | number | Uint8Array, subkeyOpt: Option<AccountId> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [IdtyIndex, IdtyRight, Option<AccountId>]>;
validateIdentity: AugmentedSubmittable<(idtyIndex: IdtyIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [IdtyIndex]>;
validateIdentityAndAddRights: AugmentedSubmittable<(idtyIndex: IdtyIndex | AnyNumber | Uint8Array, rights: Vec<IdtyRight> | (IdtyRight | 'CreateIdty' | 'LightCert' | 'StrongCert' | 'Ud' | number | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [IdtyIndex, Vec<IdtyRight>]>;
};
strongCert: {
addCert: AugmentedSubmittable<(issuer: IdtyIndex | AnyNumber | Uint8Array, receiver: IdtyIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [IdtyIndex, IdtyIndex]>;
delCert: AugmentedSubmittable<(issuer: IdtyIndex | AnyNumber | Uint8Array, receiver: IdtyIndex | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [IdtyIndex, IdtyIndex]>;
};
sudo: {
/**
* Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.
*
* The dispatch origin for this call must be _Signed_.
*
* # <weight>
* - O(1).
* - Limited storage reads.
* - One DB change.
* # </weight>
**/
setKey: AugmentedSubmittable<(updated: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource]>;
/**
* Authenticates the sudo key and dispatches a function call with `Root` origin.
*
* The dispatch origin for this call must be _Signed_.
*
* # <weight>
* - O(1).
* - Limited storage reads.
* - One DB write (event).
* - Weight of derivative `call` execution + 10,000.
* # </weight>
**/
sudo: AugmentedSubmittable<(call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call]>;
/**
* Authenticates the sudo key and dispatches a function call with `Signed` origin from
* a given account.
*
* The dispatch origin for this call must be _Signed_.
*
* # <weight>
* - O(1).
* - Limited storage reads.
* - One DB write (event).
* - Weight of derivative `call` execution + 10,000.
* # </weight>
**/
sudoAs: AugmentedSubmittable<(who: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, Call]>;
/**
* Authenticates the sudo key and dispatches a function call with `Root` origin.
* This function does not check the weight of the call, and instead allows the
* Sudo user to specify the weight of the call.
*
* The dispatch origin for this call must be _Signed_.
*
* # <weight>
* - O(1).
* - The weight of this call is defined by the caller.
* # </weight>
**/
sudoUncheckedWeight: AugmentedSubmittable<(call: Call | { callIndex?: any; args?: any } | string | Uint8Array, weight: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Weight]>;
};
system: {
/**
* A dispatch that will fill the block weight up to the given ratio.
**/
fillBlock: AugmentedSubmittable<(ratio: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Perbill]>;
/**
* Kill all storage items with a key that starts with the given prefix.
*
* **NOTE:** We rely on the Root origin to provide us the number of subkeys under
* the prefix we are removing to accurately calculate the weight of this function.
*
* # <weight>
* - `O(P)` where `P` amount of keys with prefix `prefix`
* - `P` storage deletions.
* - Base Weight: 0.834 * P µs
* - Writes: Number of subkeys + 1
* # </weight>
**/
killPrefix: AugmentedSubmittable<(prefix: Key | string | Uint8Array, subkeys: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Key, u32]>;
/**
* Kill some items from storage.
*
* # <weight>
* - `O(IK)` where `I` length of `keys` and `K` length of one key
* - `I` storage deletions.
* - Base Weight: .378 * i µs
* - Writes: Number of items
* # </weight>
**/
killStorage: AugmentedSubmittable<(keys: Vec<Key> | (Key | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Key>]>;
/**
* Make some on-chain remark.
*
* # <weight>
* - `O(1)`
* # </weight>
**/
remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/**
* Make some on-chain remark and emit event.
*
* # <weight>
* - `O(b)` where b is the length of the remark.
* - 1 event.
* # </weight>
**/
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/**
* Set the new changes trie configuration.
*
* # <weight>
* - `O(1)`
* - 1 storage write or delete (codec `O(1)`).
* - 1 call to `deposit_log`: Uses `append` API, so O(1)
* - Base Weight: 7.218 µs
* - DB Weight:
* - Writes: Changes Trie, System Digest
* # </weight>
**/
setChangesTrieConfig: AugmentedSubmittable<(changesTrieConfig: Option<ChangesTrieConfiguration> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<ChangesTrieConfiguration>]>;
/**
* Set the new runtime code.
*
* # <weight>
* - `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code`
* - 1 storage write (codec `O(C)`).
* - 1 call to `can_set_code`: `O(S)` (calls `sp_io::misc::runtime_version` which is expensive).
* - 1 event.
* The weight of this function is dependent on the runtime, but generally this is very expensive.
* We will treat this as a full block.
* # </weight>
**/
setCode: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/**
* Set the new runtime code without doing any checks of the given `code`.
*
* # <weight>
* - `O(C)` where `C` length of `code`
* - 1 storage write (codec `O(C)`).
* - 1 event.
* The weight of this function is dependent on the runtime. We will treat this as a full block.
* # </weight>
**/
setCodeWithoutChecks: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/**
* Set the number of pages in the WebAssembly environment's heap.
*
* # <weight>
* - `O(1)`
* - 1 storage write.
* - Base Weight: 1.405 µs
* - 1 write to HEAP_PAGES
* # </weight>
**/
setHeapPages: AugmentedSubmittable<(pages: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
/**
* Set some items of storage.
*
* # <weight>
* - `O(I)` where `I` length of `items`
* - `I` storage writes (`O(1)`).
* - Base Weight: 0.568 * i µs
* - Writes: Number of items
* # </weight>
**/
setStorage: AugmentedSubmittable<(items: Vec<KeyValue> | (KeyValue)[]) => SubmittableExtrinsic<ApiType>, [Vec<KeyValue>]>;
};
timestamp: {
/**
* Set the current time.
*
* This call should be invoked exactly once per block. It will panic at the finalization
* phase, if this call hasn't been invoked by that time.
*
* The timestamp should be greater than the previous one by the amount specified by
* `MinimumPeriod`.
*
* The dispatch origin for this call must be `Inherent`.
*
* # <weight>
* - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`)
* - 1 storage read and 1 storage mutation (codec `O(1)`). (because of `DidUpdate::take` in `on_finalize`)
* - 1 event handler `on_timestamp_set`. Must be `O(1)`.
* # </weight>
**/
set: AugmentedSubmittable<(now: Compact<Moment> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<Moment>]>;
};
}
export interface SubmittableExtrinsics<ApiType extends ApiTypes> extends AugmentedSubmittables<ApiType> {
(extrinsic: Call | Extrinsic | Uint8Array | string): SubmittableExtrinsic<ApiType>;
}
}
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
import '@polkadot/api/augment/rpc';
import './augment-api-consts';
import './augment-api-errors';
import './augment-api-events';
import './augment-api-query';
import './augment-api-tx';
import './augment-api-rpc';
This diff is collapsed.
/* eslint-disable @typescript-eslint/camelcase */
export { default as runtime } from './runtime/definitions';
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
export * from './types';
/* eslint-disable @typescript-eslint/camelcase */
export default {
types: {
Balance: "u64",
CertValue: {
chainable_on: "BlockNumber",
removable_on: "BlockNumber"
},
IdtyCertMeta: {
issued_count: "u8",
next_issuable_on: "BlockNumber",
received_count: "u32"
},
IdtyData: {
can_create_on: "BlockNumber"
},
IdtyDid: {
hash: "[u8; 32]",
planet: "Planet",
latitude: "u32",
longitude: "u32"
},
IdtyIndex: "u64",
IdtyRight: {
_enum: [
"CreateIdty",
"LightCert",
"StrongCert",
"Ud"
]
},
IdtyStatus: {
_enum: [
"Created",
"ConfirmedByOwner",
"Validated"
]
},
IdtyValue: {
did: "IdtyDid",
expire_on: "BlockNumber",
owner_key: "AccountId",
removable_on: "BlockNumber",
renewable_on: "BlockNumber",
rights: "Vec<(T::IdtyRight, Option<T::AccountId>)>",
status: "IdtyStatus",
data: "IdtyData"
},
Planet: {
_enum: [
"Earth"
]
}
}
};
\ No newline at end of file
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
export * from './types';
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Enum, Option, Struct, U8aFixed, Vec, u32, u64, u8 } from '@polkadot/types';
import type { ITuple } from '@polkadot/types/types';
import type { AccountId, BlockNumber } from '@polkadot/types/interfaces';
/** @name Balance */
export interface Balance extends u64 {}
/** @name CertValue */
export interface CertValue extends Struct {
readonly chainable_on: BlockNumber;
readonly removable_on: BlockNumber;
}
/** @name IdtyCertMeta */
export interface IdtyCertMeta extends Struct {
readonly issued_count: u8;
readonly next_issuable_on: BlockNumber;
readonly received_count: u32;
}
/** @name IdtyData */
export interface IdtyData extends Struct {
readonly can_create_on: BlockNumber;
}
/** @name IdtyDid */
export interface IdtyDid extends Struct {
readonly hash: U8aFixed;
readonly planet: Planet;
readonly latitude: u32;
readonly longitude: u32;
}
/** @name IdtyIndex */
export interface IdtyIndex extends u64 {}
/** @name IdtyRight */
export interface IdtyRight extends Enum {
readonly isCreateIdty: boolean;
readonly isLightCert: boolean;
readonly isStrongCert: boolean;
readonly isUd: boolean;
}
/** @name IdtyStatus */
export interface IdtyStatus extends Enum {
readonly isCreated: boolean;
readonly isConfirmedByOwner: boolean;
readonly isValidated: boolean;
}
/** @name IdtyValue */
export interface IdtyValue extends Struct {
readonly did: IdtyDid;
readonly expire_on: BlockNumber;
readonly owner_key: AccountId;
readonly removable_on: BlockNumber;
readonly renewable_on: BlockNumber;
readonly rights: Vec<ITuple<[IdtyRight, Option<AccountId>]>>;
readonly status: IdtyStatus;
readonly data: IdtyData;
}
/** @name Planet */
export interface Planet extends Enum {
readonly isEarth: boolean;
}
export type PHANTOM_RUNTIME = 'runtime';
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
export * from './runtime/types';
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "./dist",
"target": "esnext",
"module": "esnext",
"jsx": "preserve",
"declaration": true,
"strict": true,
"noImplicitAny": true,
"noUnusedLocals": true,
"noImplicitReturns": true,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"skipLibCheck": true,
"typeRoots": [
"./node_modules/@types"
],
// this is specific with augmented overrides
"paths": {
// Package name
"@duniter/core-types/*": ["src/*"],
// here we replace the @polkadot/api augmentation with our own, generated from chain
"@polkadot/api/augment": ["src/interfaces/augment-api.ts"],
// replace the augmented types with our own, as generated from definitions
"@polkadot/types/augment": ["src/interfaces/augment-types.ts"],
"@polkadot/types": ["./node_modules/@polkadot/types"],
}
},
"exclude": [
"dist",
"node_modules"
]
}