Skip to content

Commit

Permalink
chain augument api update
Browse files Browse the repository at this point in the history
  • Loading branch information
smohan-dw committed May 25, 2023
1 parent 5cf6be6 commit 0b8c9cd
Show file tree
Hide file tree
Showing 17 changed files with 2,968 additions and 12,432 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"ts-jest": "^27.1.2",
"ts-jest-resolver": "^2.0.0",
"tsx": "^3.4.3",
"typedoc": "^0.22.15",
"typedoc": "^0.23.0",
"typescript": "^4.8.3"
},
"version": "0.8.0-beta.9",
Expand Down
2 changes: 1 addition & 1 deletion packages/augment-api/metadata/cord.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/augment-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@types/websocket": "^1.0.5",
"glob": "^7.1.1",
"rimraf": "^3.0.2",
"ts-node": "^10.4.0",
"ts-node": "^10.9.0",
"typescript": "^4.8.3",
"websocket": "^1.0.34",
"yargs": "^16.2.0"
Expand Down
66 changes: 65 additions & 1 deletion packages/augment-api/src/interfaces/augment-api-consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>

declare module '@polkadot/api-base/types/consts' {
interface AugmentedConsts<ApiType extends ApiTypes> {
authorityManager: {
maxProposalLength: u16 & AugmentedConst<ApiType>;
};
babe: {
/**
* The amount of time, in slots, that each epoch should last.
Expand All @@ -36,9 +39,24 @@ declare module '@polkadot/api-base/types/consts' {
};
balances: {
/**
* The minimum amount required to keep an account open.
* The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
*
* If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for
* this pallet. However, you do so at your own risk: this will open up a major DoS vector.
* In case you have multiple sources of provider references, you may also get unexpected
* behaviour if you set this to zero.
*
* Bottom line: Do yourself a favour and make it at least one!
**/
existentialDeposit: u128 & AugmentedConst<ApiType>;
/**
* The maximum number of individual freeze locks that can exist on an account at any time.
**/
maxFreezes: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of holds that can exist on an account at any time.
**/
maxHolds: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of locks that should exist on an account.
* Not strictly enforced, but used for weight estimation.
Expand All @@ -49,6 +67,12 @@ declare module '@polkadot/api-base/types/consts' {
**/
maxReserves: u32 & AugmentedConst<ApiType>;
};
council: {
/**
* The maximum weight of a dispatch call that can be proposed and executed.
**/
maxProposalWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
};
democracy: {
/**
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
Expand Down Expand Up @@ -192,6 +216,36 @@ declare module '@polkadot/api-base/types/consts' {
**/
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
};
identity: {
/**
* The amount held on deposit for a registered identity
**/
basicDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount held on deposit per additional field for a registered identity.
**/
fieldDeposit: u128 & AugmentedConst<ApiType>;
/**
* Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O
* required to access an identity, but can be pretty high.
**/
maxAdditionalFields: u32 & AugmentedConst<ApiType>;
/**
* Maxmimum number of registrars allowed in the system. Needed to bound the complexity
* of, e.g., updating judgements.
**/
maxRegistrars: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of sub-accounts allowed per identified account.
**/
maxSubAccounts: u32 & AugmentedConst<ApiType>;
/**
* The amount held on deposit for a registered subaccount. This should account for the fact
* that one storage item's value will increase by the size of an account ID, and there will
* be another trie item whose value is the size of an account ID plus 32 bytes.
**/
subAccountDeposit: u128 & AugmentedConst<ApiType>;
};
imOnline: {
/**
* A configuration for base priority of unsigned transactions.
Expand Down Expand Up @@ -264,6 +318,10 @@ declare module '@polkadot/api-base/types/consts' {
maximumWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
/**
* The maximum number of scheduled calls in the queue for a single block.
*
* NOTE:
* + Dependent pallets' benchmarks might require a higher limit for the setting. Set a
* higher limit under `runtime-benchmarks` feature.
**/
maxScheduledPerBlock: u32 & AugmentedConst<ApiType>;
};
Expand Down Expand Up @@ -306,6 +364,12 @@ declare module '@polkadot/api-base/types/consts' {
**/
version: SpVersionRuntimeVersion & AugmentedConst<ApiType>;
};
technicalCommittee: {
/**
* The maximum weight of a dispatch call that can be proposed and executed.
**/
maxProposalWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
};
timestamp: {
/**
* The minimum period between blocks. Beware that this is different to the *expected*
Expand Down
125 changes: 116 additions & 9 deletions packages/augment-api/src/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,28 @@ export type __AugmentedError<ApiType extends ApiTypes> = AugmentedError<ApiType>

declare module '@polkadot/api-base/types/errors' {
interface AugmentedErrors<ApiType extends ApiTypes> {
authorityManager: {
/**
* The authority entry already exists.
**/
AuthorityAlreadyExists: AugmentedError<ApiType>;
/**
* There is no authority with the given ID.
**/
AuthorityNotFound: AugmentedError<ApiType>;
/**
* Not an authority owner.
**/
BadOrigin: AugmentedError<ApiType>;
/**
* Max authorities included in a proposal exceeds the limit.
**/
MaxProposalLimitExceeded: AugmentedError<ApiType>;
/**
* No validator associated with the identity.
**/
NoAssociatedValidatorId: AugmentedError<ApiType>;
};
babe: {
/**
* A given equivocation report is valid but already previously reported.
Expand All @@ -31,35 +53,43 @@ declare module '@polkadot/api-base/types/errors' {
};
balances: {
/**
* Beneficiary account must pre-exist
* Beneficiary account must pre-exist.
**/
DeadAccount: AugmentedError<ApiType>;
/**
* Value too low to create account due to existential deposit
* Value too low to create account due to existential deposit.
**/
ExistentialDeposit: AugmentedError<ApiType>;
/**
* A vesting schedule already exists for this account
* A vesting schedule already exists for this account.
**/
ExistingVestingSchedule: AugmentedError<ApiType>;
/**
* Transfer/payment would kill account.
**/
Expendability: AugmentedError<ApiType>;
/**
* Balance too low to send value.
**/
InsufficientBalance: AugmentedError<ApiType>;
/**
* Transfer/payment would kill account
* Account liquidity restrictions prevent withdrawal.
**/
LiquidityRestrictions: AugmentedError<ApiType>;
/**
* Number of freezes exceed `MaxFreezes`.
**/
KeepAlive: AugmentedError<ApiType>;
TooManyFreezes: AugmentedError<ApiType>;
/**
* Account liquidity restrictions prevent withdrawal
* Number of holds exceed `MaxHolds`.
**/
LiquidityRestrictions: AugmentedError<ApiType>;
TooManyHolds: AugmentedError<ApiType>;
/**
* Number of named reserves exceed MaxReserves
* Number of named reserves exceed `MaxReserves`.
**/
TooManyReserves: AugmentedError<ApiType>;
/**
* Vesting balance too high to send value
* Vesting balance too high to send value.
**/
VestingBalance: AugmentedError<ApiType>;
};
Expand Down Expand Up @@ -450,6 +480,80 @@ declare module '@polkadot/api-base/types/errors' {
**/
TooSoon: AugmentedError<ApiType>;
};
identity: {
/**
* Account ID is already named.
**/
AlreadyClaimed: AugmentedError<ApiType>;
/**
* Empty index.
**/
EmptyIndex: AugmentedError<ApiType>;
/**
* Fee is changed.
**/
FeeChanged: AugmentedError<ApiType>;
/**
* The index is invalid.
**/
InvalidIndex: AugmentedError<ApiType>;
/**
* Invalid judgement.
**/
InvalidJudgement: AugmentedError<ApiType>;
/**
* The target is invalid.
**/
InvalidTarget: AugmentedError<ApiType>;
/**
* The provided judgement was for a different identity.
**/
JudgementForDifferentIdentity: AugmentedError<ApiType>;
/**
* Judgement given.
**/
JudgementGiven: AugmentedError<ApiType>;
/**
* Error that occurs when there is an issue paying for judgement.
**/
JudgementPaymentFailed: AugmentedError<ApiType>;
/**
* No identity found.
**/
NoIdentity: AugmentedError<ApiType>;
/**
* Account isn't found.
**/
NotFound: AugmentedError<ApiType>;
/**
* Account isn't named.
**/
NotNamed: AugmentedError<ApiType>;
/**
* Sub-account isn't owned by sender.
**/
NotOwned: AugmentedError<ApiType>;
/**
* Sender is not a sub-account.
**/
NotSub: AugmentedError<ApiType>;
/**
* Sticky judgement.
**/
StickyJudgement: AugmentedError<ApiType>;
/**
* Too many additional fields.
**/
TooManyFields: AugmentedError<ApiType>;
/**
* Maximum amount of registrars reached. Cannot add any more.
**/
TooManyRegistrars: AugmentedError<ApiType>;
/**
* Too many subs-accounts.
**/
TooManySubAccounts: AugmentedError<ApiType>;
};
imOnline: {
/**
* Duplicated heartbeat.
Expand Down Expand Up @@ -614,6 +718,9 @@ declare module '@polkadot/api-base/types/errors' {
* Empty transaction.
**/
EmptyTransaction: AugmentedError<ApiType>;
/**
* Invalid Identifier
**/
InvalidIdentifier: AugmentedError<ApiType>;
InvalidIdentifierLength: AugmentedError<ApiType>;
InvalidIdentifierPrefix: AugmentedError<ApiType>;
Expand Down
Loading

0 comments on commit 0b8c9cd

Please sign in to comment.