Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

augment-api: companion for asset_status_chagne call #171

Merged
merged 2 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,36 +38,36 @@
]
},
"devDependencies": {
"@babel/core": "^7.23.3",
"@babel/preset-env": "^7.23.3",
"@commitlint/cli": "^9.0.1",
"@commitlint/config-conventional": "^9.0.1",
"@playwright/test": "^1.21.1",
"@types/jest": "^29.5.3",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"eslint": "^7.32.0",
"eslint-config-airbnb-base": "14.2.1",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsdoc": "^37.2.0",
"eslint-plugin-license-header": "^0.2.1",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.0",
"jest": "^29.6.1",
"moment": "^2.29.1",
"prettier": "^2.4.1",
"rimraf": "^3.0.2",
"testcontainers": "^9.0.0",
"ts-jest": "^29.1.1",
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"@commitlint/cli": "^9.1.2",
"@commitlint/config-conventional": "^9.1.2",
"@playwright/test": "^1.41.2",
"@types/jest": "^29.5.12",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^37.9.7",
"eslint-plugin-license-header": "^0.6.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^9.0.10",
"jest": "^29.7.0",
"moment": "^2.30.1",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"testcontainers": "^10.7.1",
"ts-jest": "^29.1.2",
"ts-jest-resolver": "^2.0.1",
"tsx": "^3.4.3",
"typedoc": "^0.25.3",
"typescript": "^5.3.0"
"tsx": "^4.7.1",
"typedoc": "^0.25.8",
"typescript": "^5.3.3"
},
"resolutions": {
"typescript": "^5.3.3"
},
"version": "0.9.0-1beta5",
"version": "0.9.3-1rc4",
"packageManager": "[email protected]"
}
6 changes: 3 additions & 3 deletions packages/asset/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cord.network/asset",
"version": "0.9.0-1beta5",
"version": "0.9.3-1rc4",
"description": "CORD Asset Management",
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
Expand Down Expand Up @@ -29,8 +29,8 @@
"bugs": "https://github.com/dhiway/cord.js/issues",
"homepage": "https://github.com/dhiway/cord.js#readme",
"devDependencies": {
"rimraf": "^3.0.2",
"typescript": "^5.3.0"
"rimraf": "^5.0.5",
"typescript": "^5.3.3"
},
"dependencies": {
"@cord.network/config": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/augment-api/metadata/cord.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions 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.3-1rc4",
"description": "",
"types": "./lib/index.d.ts",
"type": "module",
Expand Down Expand Up @@ -40,19 +40,19 @@
"bugs": "https://github.com/dhiway/cord.js/issues",
"homepage": "https://github.com/dhiway/cord.js#readme",
"devDependencies": {
"@polkadot/api": "^10.11.1",
"@polkadot/typegen": "^10.11.1",
"@types/node": "^20.10.5",
"rimraf": "^3.0.2",
"ts-node": "^10.9.1",
"typescript": "^5.3.0",
"yargs": "^16.2.0"
"@polkadot/api": "^10.11.2",
"@polkadot/typegen": "^10.11.2",
"@types/node": "^20.11.17",
"rimraf": "^5.0.5",
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"yargs": "^17.7.2"
},
"dependencies": {
"@cord.network/type-definitions": "workspace:*",
"@polkadot/rpc-augment": "^10.11.1",
"@polkadot/rpc-core": "^10.11.1",
"@polkadot/rpc-provider": "^10.11.1",
"glob": "^7.1.1"
"@polkadot/rpc-augment": "^10.11.2",
"@polkadot/rpc-core": "^10.11.2",
"@polkadot/rpc-provider": "^10.11.2",
"glob": "^10.3.10"
}
}
4 changes: 4 additions & 0 deletions packages/augment-api/src/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ declare module '@polkadot/api-base/types/errors' {
* Asset identifier not found
**/
AssetIdNotFound: AugmentedError<ApiType>;
/**
* Asset is in same status as asked for
**/
AssetInSameState: AugmentedError<ApiType>;
/**
* asset instance not found
**/
Expand Down
7 changes: 6 additions & 1 deletion packages/augment-api/src/interfaces/augment-api-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32,
import type { ITuple } from '@polkadot/types-codec/types';
import type { OpaquePeerId } from '@polkadot/types/interfaces/imOnline';
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportDispatchDispatchInfo, FrameSupportTokensMiscBalanceStatus, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, SpConsensusGrandpaAppPublic, SpRuntimeDispatchError } from '@polkadot/types/lookup';
import type { FrameSupportDispatchDispatchInfo, FrameSupportTokensMiscBalanceStatus, PalletAssetAssetStatusOf, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, SpConsensusGrandpaAppPublic, SpRuntimeDispatchError } from '@polkadot/types/lookup'

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

Expand All @@ -27,6 +27,11 @@ declare module '@polkadot/api-base/types/events' {
* \[asset entry identifier, instance identifier\]
**/
Issue: AugmentedEvent<ApiType, [identifier: Bytes, instance: Bytes], { identifier: Bytes, instance: Bytes }>;
/**
* An asset (or instance) entry has a new Status now
* \[asset entry identifier, optional instance identifier, new status\]
**/
StatusChange: AugmentedEvent<ApiType, [identifier: Bytes, instance: Option<Bytes>, status: PalletAssetAssetStatusOf], { identifier: Bytes, instance: Option<Bytes>, status: PalletAssetAssetStatusOf }>;
/**
* A asset has been transfered.
* \[asset entry identifier, instance identifier, owner, beneficiary,
Expand Down
6 changes: 5 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 } 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, PalletAssetAssetInputEntry, PalletAssetAssetIssuanceEntry, PalletAssetAssetStatusOf, 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 All @@ -26,6 +26,10 @@ declare module '@polkadot/api-base/types/submittable' {
* See [`Pallet::issue`].
**/
issue: AugmentedSubmittable<(entry: PalletAssetAssetIssuanceEntry | { assetId?: any; assetOwner?: any; assetIssuanceQty?: any } | string | Uint8Array, digest: H256 | string | Uint8Array, authorization: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletAssetAssetIssuanceEntry, H256, Bytes]>;
/**
* See [`Pallet::status_change`].
**/
statusChange: AugmentedSubmittable<(assetId: Bytes | string | Uint8Array, instanceId: Option<Bytes> | null | Uint8Array | Bytes | string, newStatus: PalletAssetAssetStatusOf | 'ACTIVE' | 'INACTIVE' | 'EXPIRED' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, Option<Bytes>, PalletAssetAssetStatusOf]>;
/**
* See [`Pallet::transfer`].
**/
Expand Down
Loading
Loading