Skip to content

Commit

Permalink
augment-api: Update sdk package to cord:loom RuntimeSpec 9400
Browse files Browse the repository at this point in the history
Signed-off-by: Shreevatsa N <[email protected]>
  • Loading branch information
vatsa287 committed Oct 22, 2024
1 parent a73cc20 commit a1995fe
Show file tree
Hide file tree
Showing 9 changed files with 322 additions and 181 deletions.
2 changes: 1 addition & 1 deletion packages/augment-api/metadata/cord.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions packages/augment-api/src/interfaces/augment-api-consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,9 @@ declare module '@polkadot/api-base/types/consts' {
schema: {
maxEncodedSchemaLength: u32 & AugmentedConst<ApiType>;
};
schemaAccounts: {
maxEncodedSchemaLength: u32 & AugmentedConst<ApiType>;
};
statement: {
/**
* Maximum entires supported per batch call
Expand Down
27 changes: 27 additions & 0 deletions packages/augment-api/src/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,33 @@ declare module '@polkadot/api-base/types/errors' {
**/
UnableToPayFees: AugmentedError<ApiType>;
};
schemaAccounts: {
/**
* Creator DID information not found.
**/
CreatorNotFound: AugmentedError<ApiType>;
/**
* Empty transaction.
**/
EmptyTransaction: AugmentedError<ApiType>;
InvalidIdentifierLength: AugmentedError<ApiType>;
/**
* Schema limit exceeds the permitted size.
**/
MaxEncodedSchemaLimitExceeded: AugmentedError<ApiType>;
/**
* Schema identifier is not unique.
**/
SchemaAlreadyAnchored: AugmentedError<ApiType>;
/**
* Schema identifier not found.
**/
SchemaNotFound: AugmentedError<ApiType>;
/**
* The paying account was unable to pay the fees for creating a schema.
**/
UnableToPayFees: AugmentedError<ApiType>;
};
session: {
/**
* Registered duplicate key.
Expand Down
7 changes: 7 additions & 0 deletions packages/augment-api/src/interfaces/augment-api-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,13 @@ declare module '@polkadot/api-base/types/events' {
**/
Created: AugmentedEvent<ApiType, [identifier: Bytes, creator: AccountId32], { identifier: Bytes, creator: AccountId32 }>;
};
schemaAccounts: {
/**
* A new schema has been created.
* \[schema identifier, digest, author\]
**/
Created: AugmentedEvent<ApiType, [identifier: Bytes, creator: AccountId32], { identifier: Bytes, creator: AccountId32 }>;
};
session: {
/**
* New session has happened. Note that the argument is the session index, not the
Expand Down
11 changes: 9 additions & 2 deletions packages/augment-api/src/interfaces/augment-api-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,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, CordLoomRuntimeSessionKeys, FrameSupportDispatchPerDispatchClassWeight, FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSupportTokensMiscIdAmountRuntimeFreezeReason, FrameSupportTokensMiscIdAmountRuntimeHoldReason, FrameSystemAccountInfo, FrameSystemCodeUpgradeAuthorization, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAssetConversionPoolInfo, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletChainSpaceSpaceAuthorization, PalletChainSpaceSpaceDetails, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletionQueueManager, PalletContractsWasmCodeInfo, PalletDidDidDetails, PalletDidNameDidNameDidNameOwnership, PalletDidServiceEndpointsDidEndpoint, PalletEntriesRegistryEntryDetails, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityAuthorityProperties, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNetworkMembershipMemberData, PalletNetworkScoreAggregatedEntryOf, PalletNetworkScoreRatingEntry, PalletNetworkScoreRatingTypeOf, PalletNodeAuthorizationNodeInfo, PalletPreimageOldRequestStatus, PalletPreimageRequestStatus, PalletRegistriesRegistryAuthorization, PalletRegistriesRegistryDetails, PalletSchedulerRetryConfig, PalletSchedulerScheduled, PalletSchemaSchemaEntry, PalletStatementStatementDetails, PalletStatementStatementEntryStatus, PalletStatementStatementPresentationDetails, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletTreasurySpendStatus, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpConsensusGrandpaAppPublic, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
import type { CordIdentifierEventEntry, CordIdentifierIdentifierTypeOf, CordLoomRuntimeSessionKeys, FrameSupportDispatchPerDispatchClassWeight, FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSupportTokensMiscIdAmountRuntimeFreezeReason, FrameSupportTokensMiscIdAmountRuntimeHoldReason, FrameSystemAccountInfo, FrameSystemCodeUpgradeAuthorization, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAssetConversionPoolInfo, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletChainSpaceSpaceAuthorization, PalletChainSpaceSpaceDetails, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletionQueueManager, PalletContractsWasmCodeInfo, PalletDidDidDetails, PalletDidNameDidNameDidNameOwnership, PalletDidServiceEndpointsDidEndpoint, PalletEntriesRegistryEntryDetails, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityAuthorityProperties, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNetworkMembershipMemberData, PalletNetworkScoreAggregatedEntryOf, PalletNetworkScoreRatingEntry, PalletNetworkScoreRatingTypeOf, PalletNodeAuthorizationNodeInfo, PalletPreimageOldRequestStatus, PalletPreimageRequestStatus, PalletRegistriesRegistryAuthorization, PalletRegistriesRegistryDetails, PalletSchedulerRetryConfig, PalletSchedulerScheduled, PalletSchemaAccountsSchemaEntry, PalletSchemaSchemaEntry, PalletStatementStatementDetails, PalletStatementStatementEntryStatus, PalletStatementStatementPresentationDetails, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletTreasurySpendStatus, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpConsensusGrandpaAppPublic, SpCoreCryptoKeyTypeId, 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 @@ -475,7 +475,7 @@ declare module '@polkadot/api-base/types/storage' {
storedRange: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[u32, u32]>>>, []>;
};
identifier: {
identifiers: AugmentedQuery<ApiType, (arg1: Bytes | string | Uint8Array, arg2: CordIdentifierIdentifierTypeOf | 'Asset' | 'Auth' | 'ChainSpace' | 'Did' | 'Rating' | 'Registry' | 'Statement' | 'Schema' | 'Template' | 'Registries' | 'Entries' | 'RegistryAuthorization' | 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' | 'Registries' | 'Entries' | 'RegistryAuthorization' | 'SchemaAccounts' | number | Uint8Array) => Observable<Option<Vec<CordIdentifierEventEntry>>>, [Bytes, CordIdentifierIdentifierTypeOf]>;
};
identity: {
/**
Expand Down Expand Up @@ -717,6 +717,13 @@ declare module '@polkadot/api-base/types/storage' {
**/
schemas: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<PalletSchemaSchemaEntry>>, [Bytes]>;
};
schemaAccounts: {
/**
* schemas stored on chain.
* It maps from a schema identifier to its details.
**/
schemas: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<PalletSchemaAccountsSchemaEntry>>, [Bytes]>;
};
session: {
/**
* Current index of the session.
Expand Down
19 changes: 18 additions & 1 deletion packages/augment-api/src/interfaces/augment-api-tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3238,7 +3238,8 @@ declare module '@polkadot/api-base/types/submittable' {
* - `origin`: The origin of the transaction, signed by the creator.
* - `registry_id`: A unique code created to identify the registry.
* - `digest`: The digest representing the registry data to be created.
* - `blob`: Optional metadata or data associated with the registry.
* - `schema_id`: (Optional) A unique code represnting the Schema.
* - `blob`: (Optional) Metadata or data associated with the registry.
*
* # Returns
* - `DispatchResult`: Returns `Ok(())` if the registry is successfully created, or an
Expand Down Expand Up @@ -3527,6 +3528,22 @@ declare module '@polkadot/api-base/types/submittable' {
**/
create: AugmentedSubmittable<(txSchema: Bytes | string | Uint8Array, authorization: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, Bytes]>;
};
schemaAccounts: {
/**
* Create a new schema and associates with its identifier.
* `create` takes a `InputSchemaOf<T>` and returns a `DispatchResult`
*
* Arguments:
*
* * `origin`: The origin of the transaction.
* * `tx_schema`: The schema that is being anchored.
*
* Returns:
*
* DispatchResult
**/
create: AugmentedSubmittable<(txSchema: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
};
session: {
/**
* Removes any session key(s) of the function caller.
Expand Down
Loading

0 comments on commit a1995fe

Please sign in to comment.