Skip to content

Commit

Permalink
integration updates
Browse files Browse the repository at this point in the history
  • Loading branch information
smohan-dw authored and amarts committed Dec 1, 2023
1 parent ddc0b71 commit 97205d2
Show file tree
Hide file tree
Showing 16 changed files with 853 additions and 308 deletions.
2 changes: 1 addition & 1 deletion packages/augment-api/metadata/cord.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions packages/augment-api/src/interfaces/augment-api-consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ declare module '@polkadot/api-base/types/consts' {
**/
membershipPeriod: u32 & AugmentedConst<ApiType>;
};
networkScore: {
maxEncodedValueLength: u32 & AugmentedConst<ApiType>;
maxRatingValue: u32 & AugmentedConst<ApiType>;
};
nodeAuthorization: {
/**
* The maximum length in bytes of PeerId
Expand Down Expand Up @@ -305,10 +309,6 @@ declare module '@polkadot/api-base/types/consts' {
schema: {
maxEncodedSchemaLength: u32 & AugmentedConst<ApiType>;
};
score: {
maxEncodedValueLength: u32 & AugmentedConst<ApiType>;
maxRatingValue: u32 & AugmentedConst<ApiType>;
};
statement: {
/**
* Maximum entires supported per batch call
Expand Down
140 changes: 70 additions & 70 deletions packages/augment-api/src/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,76 @@ declare module '@polkadot/api-base/types/errors' {
**/
OriginNotAuthorized: AugmentedError<ApiType>;
};
networkScore: {
/**
* Stream digest is not unique
**/
DigestAlreadyAnchored: AugmentedError<ApiType>;
/**
* Rating Entity mismatch
**/
EntityMismatch: AugmentedError<ApiType>;
/**
* Invalid digest
**/
InvalidDigest: AugmentedError<ApiType>;
/**
* Invalid entity signature
**/
InvalidEntitySignature: AugmentedError<ApiType>;
/**
* Invalid rating or entry type
**/
InvalidEntryOrRatingType: AugmentedError<ApiType>;
/**
* Invalid Identifer Length
**/
InvalidIdentifierLength: AugmentedError<ApiType>;
/**
* Invalid Rating Identifier
**/
InvalidRatingIdentifier: AugmentedError<ApiType>;
/**
* Invalid rating value - should be between 1 and 50
**/
InvalidRatingValue: AugmentedError<ApiType>;
/**
* Invalid creator signature
**/
InvalidSignature: AugmentedError<ApiType>;
/**
* Transaction already rated
**/
MessageIdAlreadyExists: AugmentedError<ApiType>;
/**
* Rating idenfier already exist
**/
RatingIdentifierAlreadyAdded: AugmentedError<ApiType>;
/**
* Rating identifier not found
**/
RatingIdentifierNotFound: AugmentedError<ApiType>;
/**
* Referenced rating identifier not found
**/
ReferenceIdentifierNotFound: AugmentedError<ApiType>;
/**
* Refrenced identifer is not a debit transaction
**/
ReferenceNotAmendIdentifier: AugmentedError<ApiType>;
/**
* Rating Space mismatch
**/
SpaceMismatch: AugmentedError<ApiType>;
/**
* Exceeds the maximum allowed entries in a single transaction
**/
TooManyJournalEntries: AugmentedError<ApiType>;
/**
* Unauthorized operation
**/
UnauthorizedOperation: AugmentedError<ApiType>;
};
nodeAuthorization: {
/**
* The node is already claimed by a user.
Expand Down Expand Up @@ -830,76 +900,6 @@ declare module '@polkadot/api-base/types/errors' {
**/
UnableToPayFees: AugmentedError<ApiType>;
};
score: {
/**
* Stream digest is not unique
**/
DigestAlreadyAnchored: AugmentedError<ApiType>;
/**
* Rating Entity mismatch
**/
EntityMismatch: AugmentedError<ApiType>;
/**
* Invalid digest
**/
InvalidDigest: AugmentedError<ApiType>;
/**
* Invalid entity signature
**/
InvalidEntitySignature: AugmentedError<ApiType>;
/**
* Invalid rating or entry type
**/
InvalidEntryOrRatingType: AugmentedError<ApiType>;
/**
* Invalid Identifer Length
**/
InvalidIdentifierLength: AugmentedError<ApiType>;
/**
* Invalid Rating Identifier
**/
InvalidRatingIdentifier: AugmentedError<ApiType>;
/**
* Invalid rating value - should be between 1 and 50
**/
InvalidRatingValue: AugmentedError<ApiType>;
/**
* Invalid creator signature
**/
InvalidSignature: AugmentedError<ApiType>;
/**
* Transaction already rated
**/
MessageIdAlreadyExists: AugmentedError<ApiType>;
/**
* Rating idenfier already exist
**/
RatingIdentifierAlreadyAdded: AugmentedError<ApiType>;
/**
* Rating identifier not found
**/
RatingIdentifierNotFound: AugmentedError<ApiType>;
/**
* Referenced rating identifier not found
**/
ReferenceIdentifierNotFound: AugmentedError<ApiType>;
/**
* Refrenced identifer is not a debit transaction
**/
ReferenceNotAmendIdentifier: AugmentedError<ApiType>;
/**
* Rating Space mismatch
**/
SpaceMismatch: AugmentedError<ApiType>;
/**
* Exceeds the maximum allowed entries in a single transaction
**/
TooManyJournalEntries: AugmentedError<ApiType>;
/**
* Unauthorized operation
**/
UnauthorizedOperation: AugmentedError<ApiType>;
};
session: {
/**
* Registered duplicate key.
Expand Down
39 changes: 22 additions & 17 deletions packages/augment-api/src/interfaces/augment-api-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,28 @@ declare module '@polkadot/api-base/types/events' {
**/
MembershipRevoked: AugmentedEvent<ApiType, [member: AccountId32], { member: AccountId32 }>;
};
networkScore: {
/**
* Aggregate scores has been updated.
* \[entity identifier\]
**/
AggregateScoreUpdated: AugmentedEvent<ApiType, [entity: Bytes], { entity: Bytes }>;
/**
* A new rating entry has been added.
* \[rating entry identifier, entity, provider\]
**/
RatingEntryAdded: AugmentedEvent<ApiType, [identifier: Bytes, entity: Bytes, provider: AccountId32], { identifier: Bytes, entity: Bytes, provider: AccountId32 }>;
/**
* A rating entry has been revised (after amend).
* \[rating entry identifier, entity, \]
**/
RatingEntryRevised: AugmentedEvent<ApiType, [identifier: Bytes, entity: Bytes, provider: AccountId32], { identifier: Bytes, entity: Bytes, provider: AccountId32 }>;
/**
* A rating entry has been amended.
* \[rating entry identifier, entity, \]
**/
RatingEntryRevoked: AugmentedEvent<ApiType, [identifier: Bytes, entity: Bytes, provider: AccountId32], { identifier: Bytes, entity: Bytes, provider: AccountId32 }>;
};
nodeAuthorization: {
/**
* The given claim was removed by its owner.
Expand Down Expand Up @@ -530,23 +552,6 @@ declare module '@polkadot/api-base/types/events' {
**/
Created: AugmentedEvent<ApiType, [identifier: Bytes, creator: AccountId32], { identifier: Bytes, creator: AccountId32 }>;
};
score: {
/**
* Aggregate scores has been updated.
* \[entity identifier\]
**/
AggregateScoreUpdated: AugmentedEvent<ApiType, [entity: Bytes], { entity: Bytes }>;
/**
* A new rating entry has been added.
* \[rating entry identifier, entity\]
**/
RatingEntryAdded: AugmentedEvent<ApiType, [identifier: Bytes, entity: Bytes], { identifier: Bytes, entity: Bytes }>;
/**
* A rating entry has been amended.
* \[rating entry identifier, entity, \]
**/
RatingEntryRevoked: AugmentedEvent<ApiType, [identifier: Bytes, entity: Bytes], { identifier: Bytes, entity: Bytes }>;
};
session: {
/**
* New session has happened. Note that the argument is the session index, not the
Expand Down
28 changes: 14 additions & 14 deletions packages/augment-api/src/interfaces/augment-api-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { BTreeSet, Bytes, Null, Option, U8aFixed, Vec, bool, u128, u32, u64
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { OpaquePeerId } from '@polkadot/types/interfaces/imOnline';
import type { AccountId32, Call, H256 } from '@polkadot/types/interfaces/runtime';
import type { CordIdentifierEventEntry, CordIdentifierIdentifierTypeOf, CordRuntimeSessionKeys, FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAssetAssetDistributionEntry, PalletAssetAssetEntry, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmountRuntimeFreezeReason, PalletBalancesIdAmountRuntimeHoldReason, PalletBalancesReserveData, PalletChainSpaceSpaceAuthorization, PalletChainSpaceSpaceDetails, PalletCollectiveVotes, PalletDidDidDetails, PalletDidNameDidNameDidNameOwnership, PalletDidServiceEndpointsDidEndpoint, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineSr25519AppSr25519Public, PalletMixnetBoundedMixnode, PalletMultisigMultisig, PalletNetworkMembershipMemberData, PalletNodeAuthorizationNodeInfo, PalletPreimageOldRequestStatus, PalletPreimageRequestStatus, PalletSchedulerScheduled, PalletSchemaSchemaEntry, PalletScoreAggregatedEntryOf, PalletScoreRatingEntry, PalletScoreRatingTypeOf, PalletStatementStatementDetails, PalletStatementStatementEntryStatus, PalletStatementStatementPresentationDetails, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpMixnetAppPublic, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
import type { CordIdentifierEventEntry, CordIdentifierIdentifierTypeOf, CordRuntimeSessionKeys, FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAssetAssetDistributionEntry, PalletAssetAssetEntry, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmountRuntimeFreezeReason, PalletBalancesIdAmountRuntimeHoldReason, PalletBalancesReserveData, PalletChainSpaceSpaceAuthorization, PalletChainSpaceSpaceDetails, PalletCollectiveVotes, PalletDidDidDetails, PalletDidNameDidNameDidNameOwnership, PalletDidServiceEndpointsDidEndpoint, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineSr25519AppSr25519Public, PalletMixnetBoundedMixnode, PalletMultisigMultisig, PalletNetworkMembershipMemberData, PalletNetworkScoreAggregatedEntryOf, PalletNetworkScoreRatingEntry, PalletNetworkScoreRatingTypeOf, PalletNodeAuthorizationNodeInfo, PalletPreimageOldRequestStatus, PalletPreimageRequestStatus, PalletSchedulerScheduled, PalletSchemaSchemaEntry, PalletStatementStatementDetails, PalletStatementStatementEntryStatus, PalletStatementStatementPresentationDetails, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpMixnetAppPublic, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types';

export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
Expand Down Expand Up @@ -364,7 +364,7 @@ declare module '@polkadot/api-base/types/storage' {
state: AugmentedQuery<ApiType, () => Observable<PalletGrandpaStoredState>, []>;
};
identifier: {
identifiers: AugmentedQuery<ApiType, (arg1: Bytes | string | Uint8Array, arg2: CordIdentifierIdentifierTypeOf | 'Asset' | 'Auth' | 'Did' | 'Registry' | 'Statement' | 'Schema' | 'Template' | number | Uint8Array) => Observable<Option<Vec<CordIdentifierEventEntry>>>, [Bytes, CordIdentifierIdentifierTypeOf]>;
identifiers: AugmentedQuery<ApiType, (arg1: Bytes | string | Uint8Array, arg2: CordIdentifierIdentifierTypeOf | 'Asset' | 'Auth' | 'ChainSpace' | 'Did' | 'Rating' | 'Registry' | 'Statement' | 'Schema' | 'Template' | number | Uint8Array) => Observable<Option<Vec<CordIdentifierEventEntry>>>, [Bytes, CordIdentifierIdentifierTypeOf]>;
};
identity: {
/**
Expand Down Expand Up @@ -461,6 +461,18 @@ declare module '@polkadot/api-base/types/storage' {
**/
membershipsRenewsOn: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<Null>>, [AccountId32]>;
};
networkScore: {
/**
* aggregated network score - aggregated and mapped to an entity
* identifier.
**/
aggregateScores: AugmentedQuery<ApiType, (arg1: Bytes | string | Uint8Array, arg2: PalletNetworkScoreRatingTypeOf | 'Overall' | 'Delivery' | number | Uint8Array) => Observable<Option<PalletNetworkScoreAggregatedEntryOf>>, [Bytes, PalletNetworkScoreRatingTypeOf]>;
messageIdentifiers: AugmentedQuery<ApiType, (arg1: Bytes | string | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<Bytes>>, [Bytes, AccountId32]>;
/**
* rating entry identifiers with rating details stored on chain.
**/
ratingEntries: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<PalletNetworkScoreRatingEntry>>, [Bytes]>;
};
nodeAuthorization: {
/**
* The additional adapative connections of each node.
Expand Down Expand Up @@ -519,18 +531,6 @@ declare module '@polkadot/api-base/types/storage' {
**/
schemas: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<PalletSchemaSchemaEntry>>, [Bytes]>;
};
score: {
/**
* aggregated network score - aggregated and mapped to an entity
* identifier.
**/
aggregateScores: AugmentedQuery<ApiType, (arg1: Bytes | string | Uint8Array, arg2: PalletScoreRatingTypeOf | 'Overall' | 'Delivery' | number | Uint8Array) => Observable<Option<PalletScoreAggregatedEntryOf>>, [Bytes, PalletScoreRatingTypeOf]>;
messageIdentifiers: AugmentedQuery<ApiType, (arg1: Bytes | string | Uint8Array, arg2: Bytes | string | Uint8Array) => Observable<Option<Bytes>>, [Bytes, Bytes]>;
/**
* rating entry identifiers with rating details stored on chain.
**/
ratingEntries: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<PalletScoreRatingEntry>>, [Bytes]>;
};
session: {
/**
* Current index of the session.
Expand Down
30 changes: 15 additions & 15 deletions 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 } from '@polkadot/types/interfaces/runtime';
import type { CordRuntimeOriginCaller, CordRuntimeSessionKeys, PalletAssetAssetInputEntry, PalletAssetAssetIssuanceEntry, PalletAssetAssetTransferEntry, PalletDidDidDetailsDidAuthorizedCallOperation, PalletDidDidDetailsDidCreationDetails, PalletDidDidDetailsDidEncryptionKey, PalletDidDidDetailsDidSignature, PalletDidDidDetailsDidVerificationKey, PalletDidServiceEndpointsDidEndpoint, PalletIdentityBitFlags, PalletIdentityJudgement, PalletIdentitySimpleIdentityInfo, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMixnetRegistration, PalletMultisigTimepoint, PalletScoreRatingInputEntry, PalletStatementPresentationTypeOf, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpMixnetAppSignature, SpRuntimeMultiSignature, SpSessionMembershipProof, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
import type { CordRuntimeOriginCaller, CordRuntimeSessionKeys, PalletAssetAssetInputEntry, PalletAssetAssetIssuanceEntry, PalletAssetAssetTransferEntry, PalletDidDidDetailsDidAuthorizedCallOperation, PalletDidDidDetailsDidCreationDetails, PalletDidDidDetailsDidEncryptionKey, PalletDidDidDetailsDidSignature, PalletDidDidDetailsDidVerificationKey, PalletDidServiceEndpointsDidEndpoint, PalletIdentityBitFlags, PalletIdentityJudgement, PalletIdentitySimpleIdentityInfo, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMixnetRegistration, PalletMultisigTimepoint, PalletNetworkScoreRatingInputEntry, PalletStatementPresentationTypeOf, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpMixnetAppSignature, SpRuntimeMultiSignature, SpSessionMembershipProof, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';

export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
Expand Down Expand Up @@ -401,6 +401,20 @@ declare module '@polkadot/api-base/types/submittable' {
**/
revoke: AugmentedSubmittable<(member: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
};
networkScore: {
/**
* See [`Pallet::register_rating`].
**/
registerRating: AugmentedSubmittable<(entry: PalletNetworkScoreRatingInputEntry | { entityUid?: any; providerUid?: any; countOfTxn?: any; totalRating?: any; entityType?: any; ratingType?: any } | string | Uint8Array, digest: H256 | string | Uint8Array, messageId: Bytes | string | Uint8Array, authorization: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNetworkScoreRatingInputEntry, H256, Bytes, Bytes]>;
/**
* See [`Pallet::revise_rating`].
**/
reviseRating: AugmentedSubmittable<(entry: PalletNetworkScoreRatingInputEntry | { entityUid?: any; providerUid?: any; countOfTxn?: any; totalRating?: any; entityType?: any; ratingType?: any } | string | Uint8Array, digest: H256 | string | Uint8Array, messageId: Bytes | string | Uint8Array, debitRefId: Bytes | string | Uint8Array, authorization: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNetworkScoreRatingInputEntry, H256, Bytes, Bytes, Bytes]>;
/**
* See [`Pallet::revoke_rating`].
**/
revokeRating: AugmentedSubmittable<(entryIdentifier: Bytes | string | Uint8Array, messageId: Bytes | string | Uint8Array, digest: H256 | string | Uint8Array, authorization: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, Bytes, H256, Bytes]>;
};
nodeAuthorization: {
/**
* See [`Pallet::add_connection`].
Expand Down Expand Up @@ -493,20 +507,6 @@ declare module '@polkadot/api-base/types/submittable' {
**/
create: AugmentedSubmittable<(txSchema: Bytes | string | Uint8Array, authorization: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, Bytes]>;
};
score: {
/**
* See [`Pallet::amend_rating`].
**/
amendRating: AugmentedSubmittable<(entryIdentifier: Bytes | string | Uint8Array, messageId: Bytes | string | Uint8Array, digest: H256 | string | Uint8Array, authorization: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, Bytes, H256, Bytes]>;
/**
* See [`Pallet::register_rating`].
**/
registerRating: AugmentedSubmittable<(entry: PalletScoreRatingInputEntry | { entityUid?: any; providerUid?: any; countOfTxn?: any; totalRating?: any; entityType?: any; ratingType?: any } | string | Uint8Array, digest: H256 | string | Uint8Array, messageId: Bytes | string | Uint8Array, authorization: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletScoreRatingInputEntry, H256, Bytes, Bytes]>;
/**
* See [`Pallet::revise_rating`].
**/
reviseRating: AugmentedSubmittable<(entry: PalletScoreRatingInputEntry | { entityUid?: any; providerUid?: any; countOfTxn?: any; totalRating?: any; entityType?: any; ratingType?: any } | string | Uint8Array, digest: H256 | string | Uint8Array, messageId: Bytes | string | Uint8Array, amendRefId: Bytes | string | Uint8Array, authorization: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletScoreRatingInputEntry, H256, Bytes, Bytes, Bytes]>;
};
session: {
/**
* See [`Pallet::purge_keys`].
Expand Down
Loading

0 comments on commit 97205d2

Please sign in to comment.