Skip to content

Commit

Permalink
chore: release 0.35.1 (#863)
Browse files Browse the repository at this point in the history
* Add DIP types

* Run type agumentation

* Set version 0.35.1

* Fix type range

* Fix service URL integration test

* Add dipProvider pallet to authentication key type

* Bump version to rc.2

* Set version to 0.35.1
  • Loading branch information
ntn-x2 authored May 2, 2024
1 parent 0b8b38f commit aafd5ae
Show file tree
Hide file tree
Showing 31 changed files with 1,262 additions and 670 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@
"typedoc": "^0.23.0",
"typescript": "^4.8.3"
},
"version": "0.35.0",
"version": "0.35.1",
"packageManager": "[email protected]"
}
2 changes: 1 addition & 1 deletion packages/asset-did/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kiltprotocol/asset-did",
"version": "0.35.0",
"version": "0.35.1",
"description": "",
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
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.35.0",
"version": "0.35.1",
"description": "",
"types": "./lib/index.d.ts",
"type": "module",
Expand Down
6 changes: 6 additions & 0 deletions packages/augment-api/src/interfaces/augment-api-consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ declare module '@polkadot/api-base/types/consts' {
**/
votingPeriod: u64 & AugmentedConst<ApiType>;
};
depositStorage: {
/**
* The maximum length of keys.
**/
maxKeyLength: u32 & AugmentedConst<ApiType>;
};
did: {
/**
* The amount of balance that will be taken for each DID as a deposit
Expand Down
47 changes: 47 additions & 0 deletions packages/augment-api/src/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,35 @@ declare module '@polkadot/api-base/types/errors' {
**/
WrongUpperBound: AugmentedError<ApiType>;
};
depositStorage: {
/**
* A deposit with the provided key already exists within the specified
* namespace.
**/
DepositExisting: AugmentedError<ApiType>;
/**
* The deposit with the provided key was not found within the specified
* namespace.
**/
DepositNotFound: AugmentedError<ApiType>;
/**
* The origin did not have enough fund to pay for the deposit.
**/
FailedToHold: AugmentedError<ApiType>;
/**
* Error when trying to release a previously-reserved deposit.
**/
FailedToRelease: AugmentedError<ApiType>;
/**
* The external hook failed.
**/
Hook: AugmentedError<ApiType>;
/**
* The origin was not authorized to perform the operation on the
* specified deposit entry.
**/
Unauthorized: AugmentedError<ApiType>;
};
did: {
/**
* The DID has already been previously deleted.
Expand Down Expand Up @@ -483,6 +512,24 @@ declare module '@polkadot/api-base/types/errors' {
**/
OutdatedProof: AugmentedError<ApiType>;
};
dipProvider: {
/**
* The specified commitment cannot be found.
**/
CommitmentNotFound: AugmentedError<ApiType>;
/**
* Error inside the external hook logic.
**/
Hook: AugmentedError<ApiType>;
/**
* Error when generating a commitment for the retrieved identity.
**/
IdentityCommitmentGenerator: AugmentedError<ApiType>;
/**
* Error when retrieving the identity details of the provided subject.
**/
IdentityProvider: AugmentedError<ApiType>;
};
dmpQueue: {
/**
* The amount of weight given is possibly not enough for executing the message.
Expand Down
22 changes: 21 additions & 1 deletion packages/augment-api/src/interfaces/augment-api-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, U8aFixed, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, H256, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { DelegationDelegationHierarchyPermissions, FrameSupportDispatchDispatchInfo, FrameSupportTokensMiscBalanceStatus, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletDidLookupLinkableAccountLinkableAccountId, PalletMigrationEntriesToMigrate, PalletMultisigTimepoint, RuntimeCommonAssetsAssetDid, RuntimeCommonAuthorizationAuthorizationId, SpRuntimeDispatchError, SpWeightsWeightV2Weight, SpiritnetRuntimeProxyType, XcmV3MultiLocation, XcmV3MultiassetMultiAssets, XcmV3Response, XcmV3TraitsError, XcmV3TraitsOutcome, XcmV3Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
import type { DelegationDelegationHierarchyPermissions, FrameSupportDispatchDispatchInfo, FrameSupportTokensMiscBalanceStatus, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletDepositStorageDepositDepositEntry, PalletDidLookupLinkableAccountLinkableAccountId, PalletMigrationEntriesToMigrate, PalletMultisigTimepoint, RuntimeCommonAssetsAssetDid, RuntimeCommonAuthorizationAuthorizationId, RuntimeCommonDipDepositDepositNamespace, SpRuntimeDispatchError, SpWeightsWeightV2Weight, SpiritnetRuntimeProxyType, XcmV3MultiLocation, XcmV3MultiassetMultiAssets, XcmV3Response, XcmV3TraitsError, XcmV3TraitsOutcome, XcmV3Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';

export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;

Expand Down Expand Up @@ -294,6 +294,16 @@ declare module '@polkadot/api-base/types/events' {
**/
Voted: AugmentedEvent<ApiType, [voter: AccountId32, refIndex: u32, vote: PalletDemocracyVoteAccountVote], { voter: AccountId32, refIndex: u32, vote: PalletDemocracyVoteAccountVote }>;
};
depositStorage: {
/**
* A new deposit has been reserved and stored.
**/
DepositAdded: AugmentedEvent<ApiType, [namespace: RuntimeCommonDipDepositDepositNamespace, key: Bytes, depositEntry: PalletDepositStorageDepositDepositEntry], { namespace: RuntimeCommonDipDepositDepositNamespace, key: Bytes, depositEntry: PalletDepositStorageDepositDepositEntry }>;
/**
* A deposit has been released and deleted from storage.
**/
DepositReclaimed: AugmentedEvent<ApiType, [namespace: RuntimeCommonDipDepositDepositNamespace, key: Bytes, depositEntry: PalletDepositStorageDepositDepositEntry], { namespace: RuntimeCommonDipDepositDepositNamespace, key: Bytes, depositEntry: PalletDepositStorageDepositDepositEntry }>;
};
did: {
/**
* A DID-authorised call has been executed.
Expand Down Expand Up @@ -334,6 +344,16 @@ declare module '@polkadot/api-base/types/events' {
**/
MigrationProgress: AugmentedEvent<ApiType, []>;
};
dipProvider: {
/**
* A new commitment has been stored.
**/
VersionedIdentityCommitted: AugmentedEvent<ApiType, [identifier: AccountId32, commitment: H256, version: u16], { identifier: AccountId32, commitment: H256, version: u16 }>;
/**
* A commitment has been deleted.
**/
VersionedIdentityDeleted: AugmentedEvent<ApiType, [identifier: AccountId32, version: u16], { identifier: AccountId32, version: u16 }>;
};
dmpQueue: {
/**
* Downward message executed with the given outcome.
Expand Down
19 changes: 18 additions & 1 deletion 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, PalletBalancesIdAmountRuntimeFreezeReason, PalletBalancesIdAmountRuntimeHoldReason, PalletBalancesReserveData, PalletCollectiveVotes, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletDidLookupConnectionRecord, PalletDidLookupLinkableAccountLinkableAccountId, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduled, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletWeb3NamesWeb3NameWeb3NameOwnership, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, ParachainStakingCandidate, ParachainStakingDelegationCounter, ParachainStakingInflationInflationInfo, ParachainStakingRoundInfo, ParachainStakingStake, ParachainStakingTotalStake, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV5AbridgedHostConfiguration, PolkadotPrimitivesV5PersistedValidationData, PolkadotPrimitivesV5UpgradeRestriction, PublicCredentialsCredentialsCredentialEntry, RuntimeCommonAssetsAssetDid, RuntimeCommonAuthorizationAuthorizationId, SpConsensusAuraSr25519AppSr25519Public, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpTrieStorageProof, SpWeightsWeightV2Weight, SpiritnetRuntimeSessionKeys, XcmVersionedAssetId, XcmVersionedMultiLocation } 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, PalletDepositStorageDepositDepositEntry, PalletDidLookupConnectionRecord, PalletDidLookupLinkableAccountLinkableAccountId, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduled, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletWeb3NamesWeb3NameWeb3NameOwnership, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, ParachainStakingCandidate, ParachainStakingDelegationCounter, ParachainStakingInflationInflationInfo, ParachainStakingRoundInfo, ParachainStakingStake, ParachainStakingTotalStake, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV5AbridgedHostConfiguration, PolkadotPrimitivesV5PersistedValidationData, PolkadotPrimitivesV5UpgradeRestriction, PublicCredentialsCredentialsCredentialEntry, RuntimeCommonAssetsAssetDid, RuntimeCommonAuthorizationAuthorizationId, RuntimeCommonDipDepositDepositNamespace, SpConsensusAuraSr25519AppSr25519Public, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpTrieStorageProof, SpWeightsWeightV2Weight, SpiritnetRuntimeSessionKeys, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types';

export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
Expand Down Expand Up @@ -230,6 +230,14 @@ declare module '@polkadot/api-base/types/storage' {
**/
votingOf: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletDemocracyVoteVoting>, [AccountId32]>;
};
depositStorage: {
/**
* Storage of all deposits. Its first key is a namespace, and the second
* one the deposit key. Its value includes the details associated to a
* deposit instance.
**/
deposits: AugmentedQuery<ApiType, (arg1: RuntimeCommonDipDepositDepositNamespace | 'DipProvider' | number | Uint8Array, arg2: Bytes | string | Uint8Array) => Observable<Option<PalletDepositStorageDepositDepositEntry>>, [RuntimeCommonDipDepositDepositNamespace, Bytes]>;
};
did: {
/**
* DIDs stored on chain.
Expand Down Expand Up @@ -270,6 +278,15 @@ declare module '@polkadot/api-base/types/storage' {
**/
connectedDids: AugmentedQuery<ApiType, (arg: PalletDidLookupLinkableAccountLinkableAccountId | { AccountId20: any } | { AccountId32: any } | string | Uint8Array) => Observable<Option<PalletDidLookupConnectionRecord>>, [PalletDidLookupLinkableAccountLinkableAccountId]>;
};
dipProvider: {
/**
* The pallet contains a single storage element, the `IdentityCommitments`
* double map. Its first key is the `Identifier` of subjects, while the
* second key is the commitment version. The values are identity
* commitments.
**/
identityCommitments: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u16 | AnyNumber | Uint8Array) => Observable<Option<H256>>, [AccountId32, u16]>;
};
dmpQueue: {
/**
* The configuration.
Expand Down
9 changes: 8 additions & 1 deletion packages/augment-api/src/interfaces/augment-api-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// this is required to allow for ambient/previous definitions
import '@polkadot/api-base/types/calls';

import type { DidApiAccountId, PublicCredentialError, PublicCredentialFilter, RawDidLinkedInfo, StakingRates } from '@kiltprotocol/augment-api/extraDefs';
import type { CompleteMerkleProof, DidApiAccountId, DipProofRequest, PublicCredentialError, PublicCredentialFilter, RawDidLinkedInfo, RuntimeApiDipProofError, StakingRates } from '@kiltprotocol/augment-api/extraDefs';
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, Text, Vec, u32 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
Expand Down Expand Up @@ -102,6 +102,13 @@ declare module '@polkadot/api-base/types/calls' {
**/
queryByWeb3Name: AugmentedCall<ApiType, (name: Text | string) => Observable<Option<RawDidLinkedInfo>>>;
};
/** 0xc3b3e8d33273990d/1 */
dipProvider: {
/**
* Generate a Merkle proof for the DIP protocol for the specified request parameters.
**/
generateProof: AugmentedCall<ApiType, (request: DipProofRequest | { identifier?: any; version?: any; proofKeys?: any; accounts?: any; shouldIncludeWeb3Name?: any } | string | Uint8Array) => Observable<Result<CompleteMerkleProof, RuntimeApiDipProofError>>>;
};
/** 0x37e397fc7c91f5e4/2 */
metadata: {
/**
Expand Down
18 changes: 17 additions & 1 deletion packages/augment-api/src/interfaces/augment-api-tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableE
import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, MultiAddress, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { CumulusPrimitivesParachainInherentParachainInherentData, DelegationDelegationHierarchyPermissions, DidDidDetailsDidAuthorizedCallOperation, DidDidDetailsDidCreationDetails, DidDidDetailsDidEncryptionKey, DidDidDetailsDidSignature, DidDidDetailsDidVerificationKey, DidServiceEndpointsDidEndpoint, FrameSupportPreimagesBounded, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDidLookupAssociateAccountRequest, PalletDidLookupLinkableAccountLinkableAccountId, PalletMigrationEntriesToMigrate, PalletMultisigTimepoint, PalletVestingVestingInfo, PublicCredentialsCredentialsCredential, RuntimeCommonAuthorizationPalletAuthorize, SpWeightsWeightV2Weight, SpiritnetRuntimeOriginCaller, SpiritnetRuntimeProxyType, SpiritnetRuntimeSessionKeys, XcmV3MultiLocation, XcmV3WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
import type { CumulusPrimitivesParachainInherentParachainInherentData, DelegationDelegationHierarchyPermissions, DidDidDetailsDidAuthorizedCallOperation, DidDidDetailsDidCreationDetails, DidDidDetailsDidEncryptionKey, DidDidDetailsDidSignature, DidDidDetailsDidVerificationKey, DidServiceEndpointsDidEndpoint, FrameSupportPreimagesBounded, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDidLookupAssociateAccountRequest, PalletDidLookupLinkableAccountLinkableAccountId, PalletMigrationEntriesToMigrate, PalletMultisigTimepoint, PalletVestingVestingInfo, PublicCredentialsCredentialsCredential, RuntimeCommonAuthorizationPalletAuthorize, RuntimeCommonDipDepositDepositNamespace, SpWeightsWeightV2Weight, SpiritnetRuntimeOriginCaller, SpiritnetRuntimeProxyType, SpiritnetRuntimeSessionKeys, XcmV3MultiLocation, XcmV3WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';

export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
Expand Down Expand Up @@ -225,6 +225,12 @@ declare module '@polkadot/api-base/types/submittable' {
**/
vote: AugmentedSubmittable<(refIndex: Compact<u32> | AnyNumber | Uint8Array, vote: PalletDemocracyVoteAccountVote | { Standard: any } | { Split: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, PalletDemocracyVoteAccountVote]>;
};
depositStorage: {
/**
* See [`Pallet::reclaim_deposit`].
**/
reclaimDeposit: AugmentedSubmittable<(namespace: RuntimeCommonDipDepositDepositNamespace | 'DipProvider' | number | Uint8Array, key: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [RuntimeCommonDipDepositDepositNamespace, Bytes]>;
};
did: {
/**
* See [`Pallet::add_key_agreement_key`].
Expand Down Expand Up @@ -325,6 +331,16 @@ declare module '@polkadot/api-base/types/submittable' {
**/
updateDeposit: AugmentedSubmittable<(account: PalletDidLookupLinkableAccountLinkableAccountId | { AccountId20: any } | { AccountId32: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletDidLookupLinkableAccountLinkableAccountId]>;
};
dipProvider: {
/**
* See [`Pallet::commit_identity`].
**/
commitIdentity: AugmentedSubmittable<(identifier: AccountId32 | string | Uint8Array, version: Option<u16> | null | Uint8Array | u16 | AnyNumber) => SubmittableExtrinsic<ApiType>, [AccountId32, Option<u16>]>;
/**
* See [`Pallet::delete_identity_commitment`].
**/
deleteIdentityCommitment: AugmentedSubmittable<(identifier: AccountId32 | string | Uint8Array, version: Option<u16> | null | Uint8Array | u16 | AnyNumber) => SubmittableExtrinsic<ApiType>, [AccountId32, Option<u16>]>;
};
dmpQueue: {
/**
* See [`Pallet::service_overweight`].
Expand Down
Loading

0 comments on commit aafd5ae

Please sign in to comment.