Skip to content

Commit

Permalink
augument-api and version changes for 0.9.0 (#149)
Browse files Browse the repository at this point in the history
* Also fix the version string.
  • Loading branch information
amarts authored Dec 5, 2023
1 parent 01ed31c commit b7b5364
Show file tree
Hide file tree
Showing 23 changed files with 367 additions and 700 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@
"@polkadot/rpc-core": "10.10.1",
"@polkadot/rpc-provider": "10.10.1"
},
"version": "0.9.0-1beta5",
"version": "0.9.0",
"packageManager": "yarn@4.0.2"
}
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
@@ -1,6 +1,6 @@
{
"name": "@cord.network/augment-api",
"version": "0.9.0-1beta5",
"version": "0.9.0",
"description": "",
"types": "./lib/index.d.ts",
"type": "module",
Expand Down
4 changes: 0 additions & 4 deletions packages/augment-api/src/interfaces/augment-api-consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>

declare module '@polkadot/api-base/types/consts' {
interface AugmentedConsts<ApiType extends ApiTypes> {
asset: {
maxAssetDistribution: u32 & AugmentedConst<ApiType>;
maxEncodedValueLength: u32 & AugmentedConst<ApiType>;
};
babe: {
/**
* The amount of time, in slots, that each epoch should last.
Expand Down
50 changes: 0 additions & 50 deletions packages/augment-api/src/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,56 +11,6 @@ export type __AugmentedError<ApiType extends ApiTypes> = AugmentedError<ApiType>

declare module '@polkadot/api-base/types/errors' {
interface AugmentedErrors<ApiType extends ApiTypes> {
asset: {
/**
* Asset already added
**/
AssetIdAlreadyExists: AugmentedError<ApiType>;
/**
* Asset identifier not found
**/
AssetIdNotFound: AugmentedError<ApiType>;
/**
* asset instance not found
**/
AssetInstanceNotFound: AugmentedError<ApiType>;
/**
* Asset is not active
**/
AssetNotActive: AugmentedError<ApiType>;
/**
* distribution limit exceeded
**/
DistributionLimitExceeded: AugmentedError<ApiType>;
/**
* Not enough balance
**/
InsufficientBalance: AugmentedError<ApiType>;
/**
* Invalid asset type
**/
InvalidAssetType: AugmentedError<ApiType>;
/**
* Invalid asset value - should be greater than zero
**/
InvalidAssetValue: AugmentedError<ApiType>;
/**
* Invalid digest
**/
InvalidDigest: AugmentedError<ApiType>;
/**
* Invalid Identifer Length
**/
InvalidIdentifierLength: AugmentedError<ApiType>;
/**
* Invalid creator signature
**/
InvalidSignature: AugmentedError<ApiType>;
/**
* Unauthorized operation
**/
UnauthorizedOperation: AugmentedError<ApiType>;
};
authorityMembership: {
/**
* The authority entry already exists.
Expand Down
18 changes: 0 additions & 18 deletions packages/augment-api/src/interfaces/augment-api-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,6 @@ export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>

declare module '@polkadot/api-base/types/events' {
interface AugmentedEvents<ApiType extends ApiTypes> {
asset: {
/**
* A new asset entry has been added.
* \[asset entry identifier, issuer\]
**/
Create: AugmentedEvent<ApiType, [identifier: Bytes, issuer: AccountId32], { identifier: Bytes, issuer: AccountId32 }>;
/**
* A new asset entry has been added.
* \[asset entry identifier, instance identifier\]
**/
Issue: AugmentedEvent<ApiType, [identifier: Bytes, instance: Bytes], { identifier: Bytes, instance: Bytes }>;
/**
* A asset has been transfered.
* \[asset entry identifier, instance identifier, owner, beneficiary,
* \]
**/
Transfer: AugmentedEvent<ApiType, [identifier: Bytes, instance: Bytes, from: AccountId32, to: AccountId32], { identifier: Bytes, instance: Bytes, from: AccountId32, to: AccountId32 }>;
};
authorityMembership: {
/**
* List of members who will enter the set of authorities at the next
Expand Down
19 changes: 2 additions & 17 deletions packages/augment-api/src/interfaces/augment-api-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,14 @@ 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, 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 { CordIdentifierEventEntry, CordIdentifierIdentifierTypeOf, CordRuntimeSessionKeys, FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, 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>;
export type __QueryableStorageEntry<ApiType extends ApiTypes> = QueryableStorageEntry<ApiType>;

declare module '@polkadot/api-base/types/storage' {
interface AugmentedQueries<ApiType extends ApiTypes> {
asset: {
assetLookup: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Bytes>>, [H256]>;
/**
* asset entry identifiers with details stored on chain.
**/
assets: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<PalletAssetAssetEntry>>, [Bytes]>;
/**
* asset entry identifiers with details stored on chain.
**/
distribution: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<Vec<Bytes>>>, [Bytes]>;
/**
* asset entry identifiers with details stored on chain.
**/
issuance: AugmentedQuery<ApiType, (arg1: Bytes | string | Uint8Array, arg2: Bytes | string | Uint8Array) => Observable<Option<PalletAssetAssetDistributionEntry>>, [Bytes, Bytes]>;
};
authorityDiscovery: {
/**
* Keys of the current authority set.
Expand Down Expand Up @@ -364,7 +349,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' | 'ChainSpace' | 'Did' | 'Rating' | 'Registry' | 'Statement' | 'Schema' | 'Template' | number | Uint8Array) => Observable<Option<Vec<CordIdentifierEventEntry>>>, [Bytes, CordIdentifierIdentifierTypeOf]>;
identifiers: AugmentedQuery<ApiType, (arg1: Bytes | string | Uint8Array, arg2: CordIdentifierIdentifierTypeOf | 'Auth' | 'ChainSpace' | 'Did' | 'Rating' | 'Registry' | 'Statement' | 'Schema' | 'Template' | number | Uint8Array) => Observable<Option<Vec<CordIdentifierEventEntry>>>, [Bytes, CordIdentifierIdentifierTypeOf]>;
};
identity: {
/**
Expand Down
16 changes: 1 addition & 15 deletions packages/augment-api/src/interfaces/augment-api-tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,14 @@ 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, PalletNetworkScoreRatingInputEntry, PalletStatementPresentationTypeOf, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpMixnetAppSignature, SpRuntimeMultiSignature, SpSessionMembershipProof, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
import type { CordRuntimeOriginCaller, CordRuntimeSessionKeys, 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>;
export type __SubmittableExtrinsicFunction<ApiType extends ApiTypes> = SubmittableExtrinsicFunction<ApiType>;

declare module '@polkadot/api-base/types/submittable' {
interface AugmentedSubmittables<ApiType extends ApiTypes> {
asset: {
/**
* See [`Pallet::create`].
**/
create: AugmentedSubmittable<(entry: PalletAssetAssetInputEntry | { assetType?: any; assetDesc?: any; assetQty?: any; assetValue?: any; assetTag?: any; assetMeta?: any } | string | Uint8Array, signature: SpRuntimeMultiSignature | { ed25519: any } | { sr25519: any } | { ecdsa: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletAssetAssetInputEntry, SpRuntimeMultiSignature]>;
/**
* See [`Pallet::issue`].
**/
issue: AugmentedSubmittable<(entry: PalletAssetAssetIssuanceEntry | { assetId?: any; newAssetOwner?: any; assetIssuanceQty?: any } | string | Uint8Array, signature: SpRuntimeMultiSignature | { ed25519: any } | { sr25519: any } | { ecdsa: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletAssetAssetIssuanceEntry, SpRuntimeMultiSignature]>;
/**
* See [`Pallet::transfer`].
**/
transfer: AugmentedSubmittable<(entry: PalletAssetAssetTransferEntry | { assetId?: any; assetInstanceId?: any; newAssetOwner?: any } | string | Uint8Array, signature: SpRuntimeMultiSignature | { ed25519: any } | { sr25519: any } | { ecdsa: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletAssetAssetTransferEntry, SpRuntimeMultiSignature]>;
};
authorityMembership: {
/**
* See [`Pallet::go_offline`].
Expand Down
Loading

0 comments on commit b7b5364

Please sign in to comment.