From ef1a3738f6682483f9e62243cf8e62c0d6e7d654 Mon Sep 17 00:00:00 2001 From: Skedley <48058984+Dudleyneedham@users.noreply.github.com> Date: Fri, 23 Apr 2021 22:18:16 +0200 Subject: [PATCH] KILT types definition repo (#5132) * updating kilt types * removed caret and made it specific version * removed spelling mistake * types missing updating to the latest * updating to the latest version of kilt type definitions * removed latest tag from package json added version --- packages/apps-config/package.json | 1 + packages/apps-config/src/api/spec/kilt.ts | 89 +---------------------- yarn.lock | 8 ++ 3 files changed, 11 insertions(+), 87 deletions(-) diff --git a/packages/apps-config/package.json b/packages/apps-config/package.json index e83bc13fd6..1b82e7fd9a 100644 --- a/packages/apps-config/package.json +++ b/packages/apps-config/package.json @@ -14,6 +14,7 @@ "@edgeware/node-types": "^3.3.4", "@equilab/definitions": "1.0.3", "@interlay/polkabtc-types": "^0.6.2", + "@kiltprotocol/type-definitions": "^0.1.3", "@laminar/type-definitions": "^0.3.1", "@phala/typedefs": "0.1.0", "@polkadot/networks": "^6.2.2-7", diff --git a/packages/apps-config/src/api/spec/kilt.ts b/packages/apps-config/src/api/spec/kilt.ts index 9aff7d63f2..686bf7005e 100644 --- a/packages/apps-config/src/api/spec/kilt.ts +++ b/packages/apps-config/src/api/spec/kilt.ts @@ -3,91 +3,6 @@ import type { OverrideBundleDefinition } from '@polkadot/types/types'; -// structs need to be in order -/* eslint-disable sort-keys */ +import { typeBundleForPolkadot } from '@kiltprotocol/type-definitions'; -const definitions: OverrideBundleDefinition = { - types: [ - { - // on all versions - minmax: [0, undefined], - types: { - Attestation: { - attester: 'AccountId', - ctypeHash: 'Hash', - delegationId: 'Option', - revoked: 'bool' - }, - Balance: 'u128', - DelegationNode: { - owner: 'AccountId', - parent: 'Option', - permissions: 'Permissions', - revoked: 'bool', - rootId: 'DelegationNodeId' - }, - DelegationNodeId: 'Hash', - DelegationRoot: { - ctypeHash: 'Hash', - owner: 'AccountId', - revoked: 'bool' - }, - DidRecord: { - boxKey: 'Hash', - docRef: 'Option>', - signKey: 'Hash' - }, - Index: 'u64', - Permissions: 'u32', - PublicBoxKey: 'Hash', - PublicSigningKey: 'Hash', - Signature: 'MultiSignature', - XCurrencyId: { - chainId: 'ChainId', - currencyId: 'Vec' - }, - ChainId: { - _enum: { - RelayChain: 'Null', - ParaChain: 'ParaId' - } - }, - CurrencyIdOf: 'CurrencyId', - CurrencyId: { - _enum: { - DOT: 0, - KSM: 1, - KILT: 2 - } - }, - XcmError: { - _enum: { - Undefined: 0, - Unimplemented: 1, - UnhandledXcmVersion: 2, - UnhandledXcmMessage: 3, - UnhandledEffect: 4, - EscalationOfPrivilege: 5, - UntrustedReserveLocation: 6, - UntrustedTeleportLocation: 7, - DestinationBufferOverflow: 8, - CannotReachDestination: 9, - MultiLocationFull: 10, - FailedToDecode: 11, - BadOrigin: 12, - ExceedsMaxMessageSize: 13, - FailedToTransactAsset: 14 - } - }, - ReferendumInfo: { - _enum: { - Ongoing: 'ReferendumStatus', - Finished: 'ReferendumInfoFinished' - } - } - } - } - ] -}; - -export default definitions; +export default typeBundleForPolkadot as unknown as OverrideBundleDefinition; diff --git a/yarn.lock b/yarn.lock index 6d97133388..22d8bfb600 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1829,6 +1829,13 @@ __metadata: languageName: node linkType: hard +"@kiltprotocol/type-definitions@npm:^0.1.3": + version: 0.1.3 + resolution: "@kiltprotocol/type-definitions@npm:0.1.3" + checksum: 095d2b614bc757b8478654d0bc4e1fea61c28816580919ea9e520c794b8ed94ee54262de3f984354b0b7bdf8961bc80c2c055e81da8560f56256c015bb955251 + languageName: node + linkType: hard + "@laminar/type-definitions@npm:^0.3.1": version: 0.3.1 resolution: "@laminar/type-definitions@npm:0.3.1" @@ -2439,6 +2446,7 @@ __metadata: "@edgeware/node-types": ^3.3.4 "@equilab/definitions": 1.0.3 "@interlay/polkabtc-types": ^0.6.2 + "@kiltprotocol/type-definitions": ^0.1.3 "@laminar/type-definitions": ^0.3.1 "@phala/typedefs": 0.1.0 "@polkadot/networks": ^6.2.2-7