From 6a2baf83526ee6b706db50107e465c5282eefaa9 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 17 Jul 2020 11:27:21 +0200 Subject: [PATCH] Types for Polkadot purchase (#2436) --- CHANGELOG.md | 1 + packages/types/src/interfaces/definitions.ts | 1 + .../src/interfaces/purchase/definitions.ts | 24 +++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 packages/types/src/interfaces/purchase/definitions.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e9ac3bf8b..34ca661353 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Update `NetworkState` reputation for `system_networkState` RPC - Update session progress calcs for Aura (cater for negative) - Fix class prototype for (basically-deprecated) Linkage type +- Add Polkadot types for `purchase` pallet ## 1.24.1 Jul 13, 2020 diff --git a/packages/types/src/interfaces/definitions.ts b/packages/types/src/interfaces/definitions.ts index 7d8c4cdca3..adba5e8f77 100644 --- a/packages/types/src/interfaces/definitions.ts +++ b/packages/types/src/interfaces/definitions.ts @@ -40,6 +40,7 @@ export { default as attestations } from './attestations/definitions'; export { default as claims } from './claims/definitions'; export { default as parachains } from './parachains/definitions'; export { default as poll } from './poll/definitions'; +export { default as purchase } from './purchase/definitions'; // pull in metadata & rpc last, assuming that is uses info from above export { default as metadata } from './metadata/definitions'; diff --git a/packages/types/src/interfaces/purchase/definitions.ts b/packages/types/src/interfaces/purchase/definitions.ts new file mode 100644 index 0000000000..cb72a53e9f --- /dev/null +++ b/packages/types/src/interfaces/purchase/definitions.ts @@ -0,0 +1,24 @@ +// Copyright 2017-2020 @polkadot/types authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +// order important in structs... :) +/* eslint-disable sort-keys */ + +import { Definitions } from '../../types'; + +export default { + rpc: {}, + types: { + AccountStatus: { + validity: 'AccountValidity', + freeBalance: 'Balance', + lockedBalance: 'Balance', + signature: 'Vec', + vat: 'Permill' + }, + AccountValidity: { + _enum: ['Invalid', 'Initiated', 'Pending', 'ValidLow', 'ValidHigh', 'Completed'] + } + } +} as Definitions;