Skip to content

Commit

Permalink
Merge commit '0762a5119c9ee119b54065e839d947f685afdcf7' into aa/chain…
Browse files Browse the repository at this point in the history
…-helpers-move
  • Loading branch information
ntn-x2 committed Oct 2, 2023
2 parents 0d02a59 + 0762a51 commit a6c451b
Show file tree
Hide file tree
Showing 36 changed files with 1,312 additions and 865 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ module.exports = {
},
},
{
files: ['tests/**/*', 'packages/testing/**/*'],
files: ['tests/**/*'],
rules: {
'import/extensions': 'off',
'jsdoc/require-jsdoc': 'off',
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ module.exports = {
roots: ['<rootDir>/tests/breakingChanges'],
},
]
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@
"typedoc": "^0.23.0",
"typescript": "^4.8.3"
},
"version": "0.33.2-6",
"version": "0.34.0",
"packageManager": "[email protected]"
}
6 changes: 5 additions & 1 deletion packages/asset-credentials/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kiltprotocol/asset-credentials",
"version": "0.33.2-6",
"version": "0.34.0",
"description": "",
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
Expand Down Expand Up @@ -29,6 +29,10 @@
"license": "BSD-4-Clause",
"bugs": "https://github.com/KILTprotocol/sdk-js/issues",
"homepage": "https://github.com/KILTprotocol/sdk-js#readme",
"devDependencies": {
"rimraf": "^3.0.2",
"typescript": "^4.8.3"
},
"dependencies": {
"@kiltprotocol/chain-helpers": "workspace:*",
"@kiltprotocol/config": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/augment-api/metadata/spiritnet.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
@@ -1,6 +1,6 @@
{
"name": "@kiltprotocol/augment-api",
"version": "0.33.2-6",
"version": "0.34.0",
"description": "",
"types": "./lib/index.d.ts",
"type": "module",
Expand Down
33 changes: 32 additions & 1 deletion packages/augment-api/src/interfaces/augment-api-consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,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 @@ -40,6 +55,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>;
};
delegation: {
/**
* The deposit that is required for storing a delegation.
Expand Down Expand Up @@ -398,6 +419,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 @@ -431,6 +456,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
28 changes: 18 additions & 10 deletions packages/augment-api/src/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,35 +43,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 @@ -793,7 +801,7 @@ declare module '@polkadot/api-base/types/errors' {
**/
Filtered: AugmentedError<ApiType>;
/**
* The unlock operation cannot succeed because there are still users of the lock.
* The unlock operation cannot succeed because there are still consumers of the lock.
**/
InUse: AugmentedError<ApiType>;
/**
Expand Down
46 changes: 45 additions & 1 deletion packages/augment-api/src/interfaces/augment-api-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ declare module '@polkadot/api-base/types/events' {
/**
* A balance was set by root.
**/
BalanceSet: AugmentedEvent<ApiType, [who: AccountId32, free: u128, reserved: u128], { who: AccountId32, free: u128, reserved: u128 }>;
BalanceSet: AugmentedEvent<ApiType, [who: AccountId32, free: u128], { who: AccountId32, free: u128 }>;
/**
* Some amount was burned from an account.
**/
Burned: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
/**
* Some amount was deposited (e.g. for transaction fees).
**/
Expand All @@ -55,6 +59,26 @@ declare module '@polkadot/api-base/types/events' {
* An account was created with some free balance.
**/
Endowed: AugmentedEvent<ApiType, [account: AccountId32, freeBalance: u128], { account: AccountId32, freeBalance: u128 }>;
/**
* Some balance was frozen.
**/
Frozen: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
/**
* Total issuance was increased by `amount`, creating a credit to be balanced.
**/
Issued: AugmentedEvent<ApiType, [amount: u128], { amount: u128 }>;
/**
* Some balance was locked.
**/
Locked: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
/**
* Some amount was minted into an account.
**/
Minted: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
/**
* Total issuance was decreased by `amount`, creating a debt to be balanced.
**/
Rescinded: AugmentedEvent<ApiType, [amount: u128], { amount: u128 }>;
/**
* Some balance was reserved (moved from free to reserved).
**/
Expand All @@ -64,18 +88,38 @@ declare module '@polkadot/api-base/types/events' {
* Final argument indicates the destination balance type.
**/
ReserveRepatriated: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, amount: u128, destinationStatus: FrameSupportTokensMiscBalanceStatus], { from: AccountId32, to: AccountId32, amount: u128, destinationStatus: FrameSupportTokensMiscBalanceStatus }>;
/**
* Some amount was restored into an account.
**/
Restored: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
/**
* Some amount was removed from the account (e.g. for misbehavior).
**/
Slashed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
/**
* Some amount was suspended from an account (it can be restored later).
**/
Suspended: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
/**
* Some balance was thawed.
**/
Thawed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
/**
* Transfer succeeded.
**/
Transfer: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, amount: u128], { from: AccountId32, to: AccountId32, amount: u128 }>;
/**
* Some balance was unlocked.
**/
Unlocked: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
/**
* Some balance was unreserved (moved from reserved to free).
**/
Unreserved: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
/**
* An account was upgraded.
**/
Upgraded: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;
/**
* Some amount was withdrawn from the account (e.g. for transaction fees).
**/
Expand Down
16 changes: 12 additions & 4 deletions packages/augment-api/src/interfaces/augment-api-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256 } from '@polkadot/types/interfaces/runtime';
import type { AttestationAttestationsAttestationDetails, CtypeCtypeEntry, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCodeUpgradeAuthorization, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, DelegationDelegationHierarchyDelegationHierarchyDetails, DelegationDelegationHierarchyDelegationNode, DidDidDetails, DidServiceEndpointsDidEndpoint, FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletCollectiveVotes, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletDidLookupConnectionRecord, PalletDidLookupLinkableAccountLinkableAccountId, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduled, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletWeb3NamesWeb3NameWeb3NameOwnership, ParachainStakingCandidate, ParachainStakingDelegationCounter, ParachainStakingInflationInflationInfo, ParachainStakingRoundInfo, ParachainStakingStake, ParachainStakingTotalStake, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV2AbridgedHostConfiguration, PolkadotPrimitivesV2PersistedValidationData, PolkadotPrimitivesV2UpgradeRestriction, PublicCredentialsCredentialsCredentialEntry, RuntimeCommonAssetsAssetDid, RuntimeCommonAuthorizationAuthorizationId, SpConsensusAuraSr25519AppSr25519Public, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpTrieStorageProof, SpWeightsWeightV2Weight, SpiritnetRuntimeSessionKeys } from '@polkadot/types/lookup';
import type { AttestationAttestationsAttestationDetails, CtypeCtypeEntry, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCodeUpgradeAuthorization, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, DelegationDelegationHierarchyDelegationHierarchyDetails, DelegationDelegationHierarchyDelegationNode, DidDidDetails, DidServiceEndpointsDidEndpoint, FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmountRuntimeFreezeReason, PalletBalancesIdAmountRuntimeHoldReason, PalletBalancesReserveData, PalletCollectiveVotes, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletDidLookupConnectionRecord, PalletDidLookupLinkableAccountLinkableAccountId, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduled, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletWeb3NamesWeb3NameWeb3NameOwnership, ParachainStakingCandidate, ParachainStakingDelegationCounter, ParachainStakingInflationInflationInfo, ParachainStakingRoundInfo, ParachainStakingStake, ParachainStakingTotalStake, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV4AbridgedHostConfiguration, PolkadotPrimitivesV4PersistedValidationData, PolkadotPrimitivesV4UpgradeRestriction, PublicCredentialsCredentialsCredentialEntry, RuntimeCommonAssetsAssetDid, RuntimeCommonAuthorizationAuthorizationId, SpConsensusAuraSr25519AppSr25519Public, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpTrieStorageProof, SpWeightsWeightV2Weight, SpiritnetRuntimeSessionKeys } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types';

export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
Expand Down Expand Up @@ -87,6 +87,14 @@ declare module '@polkadot/api-base/types/storage' {
* NOTE: This is only used in the case that this pallet is used to store balances.
**/
account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]>;
/**
* Freeze locks on account balances.
**/
freezes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesIdAmountRuntimeFreezeReason>>, [AccountId32]>;
/**
* Holds on account balances.
**/
holds: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<PalletBalancesIdAmountRuntimeHoldReason>>, [AccountId32]>;
/**
* The total units of outstanding deactivated balance in the system.
**/
Expand Down Expand Up @@ -430,7 +438,7 @@ declare module '@polkadot/api-base/types/storage' {
*
* This data is also absent from the genesis.
**/
hostConfiguration: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2AbridgedHostConfiguration>>, []>;
hostConfiguration: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV4AbridgedHostConfiguration>>, []>;
/**
* HRMP messages that were sent in a block.
*
Expand Down Expand Up @@ -526,7 +534,7 @@ declare module '@polkadot/api-base/types/storage' {
* relay-chain. This value is ephemeral which means it doesn't hit the storage. This value is
* set after the inherent.
**/
upgradeRestrictionSignal: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2UpgradeRestriction>>, []>;
upgradeRestrictionSignal: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV4UpgradeRestriction>>, []>;
/**
* Upward messages that were sent in a block.
*
Expand All @@ -538,7 +546,7 @@ declare module '@polkadot/api-base/types/storage' {
* This value is expected to be set only once per block and it's never stored
* in the trie.
**/
validationData: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2PersistedValidationData>>, []>;
validationData: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV4PersistedValidationData>>, []>;
};
preimage: {
preimageFor: AugmentedQuery<ApiType, (arg: ITuple<[H256, u32]> | [H256 | string | Uint8Array, u32 | AnyNumber | Uint8Array]) => Observable<Option<Bytes>>, [ITuple<[H256, u32]>]>;
Expand Down
12 changes: 10 additions & 2 deletions packages/augment-api/src/interfaces/augment-api-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,20 @@ declare module '@polkadot/api-base/types/calls' {
**/
queryByWeb3Name: AugmentedCall<ApiType, (name: Text | string) => Observable<Option<RawDidLinkedInfo>>>;
};
/** 0x37e397fc7c91f5e4/1 */
/** 0x37e397fc7c91f5e4/2 */
metadata: {
/**
* Returns the metadata of a runtime
**/
metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
/**
* Returns the metadata at a given version.
**/
metadataAtVersion: AugmentedCall<ApiType, (version: u32 | AnyNumber | Uint8Array) => Observable<Option<OpaqueMetadata>>>;
/**
* Returns the supported metadata versions.
**/
metadataVersions: AugmentedCall<ApiType, () => Observable<Vec<u32>>>;
};
/** 0xf78b278be53f454c/2 */
offchainWorkerApi: {
Expand Down Expand Up @@ -158,7 +166,7 @@ declare module '@polkadot/api-base/types/calls' {
**/
validateTransaction: AugmentedCall<ApiType, (source: TransactionSource | 'InBlock' | 'Local' | 'External' | number | Uint8Array, tx: Extrinsic | IExtrinsic | string | Uint8Array, blockHash: BlockHash | string | Uint8Array) => Observable<TransactionValidity>>;
};
/** 0x37c8bb1350a9a2a8/3 */
/** 0x37c8bb1350a9a2a8/4 */
transactionPaymentApi: {
/**
* The transaction fee details
Expand Down
Loading

0 comments on commit a6c451b

Please sign in to comment.