This commit is contained in:
Jaco Greeff 2020-01-27 13:06:24 +01:00 committed by GitHub
parent bf1804ce69
commit 0db3173c43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 63 additions and 344 deletions

View File

@ -1,3 +1,9 @@
# 0.20.1
- Redesign of all UI components and views (Thanks to https://github.com/EthWorks)
- Account copy now respects the address formatting
- Updated to latest polkadot-js/api
# 0.14.1
- Support for Kusama CC3

View File

@ -9,5 +9,5 @@
"packages": [
"packages/*"
],
"version": "0.15.0-beta.3"
"version": "0.20.0"
}

View File

@ -12,9 +12,9 @@
"yarn": "^1.10.1"
},
"resolutions": {
"@polkadot/api": "^1.0.0-beta.19",
"@polkadot/api": "^1.0.0-beta.22",
"@polkadot/keyring": "^2.0.0-beta.6",
"@polkadot/types": "^1.0.0-beta.19",
"@polkadot/types": "^1.0.0-beta.22",
"@polkadot/util": "^2.0.0-beta.6",
"@polkadot/util-crypto": "^2.0.0-beta.6",
"babel-core": "^7.0.0-bridge.0",

View File

@ -1,12 +1,12 @@
{
"name": "@polkadot/extension-chains",
"description": "Definitions for all known chains as exposed by the extension.",
"version": "0.15.0-beta.3",
"version": "0.20.0",
"author": "Jaco Greeff <jacogr@gmail.com>",
"license": "Apache-2",
"dependencies": {
"@babel/runtime": "^7.8.3",
"edgeware-node-types": "^1.0.10"
"edgeware-node-types": "^1.1.0"
},
"peerDependencies": {
"@polkadot/api": "*"

View File

@ -1,88 +0,0 @@
/* eslint-disable */
import { Bytes, Text, u32, Null } from '@polkadot/types';
import { Option, Struct, Enum } from '@polkadot/types/codec';
import { Registry } from '@polkadot/types/types';
import AccountId from '@polkadot/types/primitive/Generic/AccountId';
export class MetadataRecord extends Struct {
constructor (registry: Registry, value: any) {
super(registry, {
avatar: Text,
display_name: Text,
tagline: Text,
}, value);
}
get avatar (): Text {
return this.get('avatar') as Text;
}
get display_name (): Text {
return this.get('display_name') as Text;
}
get tagline (): Text {
return this.get('tagline') as Text;
}
}
export class Registered extends Null { }
export class Attested extends Null { }
export class Verified extends Null { }
export class IdentityStage extends Enum {
constructor (registry: Registry, value?: string, index?: number) {
super(registry, {
registered: Registered,
attested: Attested,
verified: Verified,
}, value, index);
}
}
export class IdentityRecord extends Struct {
constructor (registry: Registry, value: any) {
super(registry, {
account: AccountId,
identity_type: Text,
identity: Bytes,
stage: IdentityStage,
expiration_time: u32,
proof: Option.with(Text),
metadata: Option.with(MetadataRecord),
}, value);
}
get account (): AccountId {
return this.get('account') as AccountId;
}
get identity (): Bytes {
return this.get('identity') as Bytes;
}
get stage (): IdentityStage {
return this.get('stage') as IdentityStage;
}
get expiration_time(): u32 {
return this.get('expiration_time') as u32;
}
get proof (): Option<Text> {
return this.get('proof') as Option<Text>;
}
get metadata (): Option<MetadataRecord> {
return this.get('metadata') as Option<MetadataRecord>;
}
}
// Old types that aren't used anymore (kept for backwards compatability)
const ArchivedTypes = {
IdentityIndex: u32,
Claim: Bytes,
};
// Current types
const CurrentTypes = {
IdentityStage,
IdentityRecord,
MetadataRecord,
IdentityType: Text,
Attestation: Bytes,
Identity: Bytes,
};
export const IdentityTypes = { ...ArchivedTypes, ...CurrentTypes };

View File

@ -1,52 +0,0 @@
/* eslint-disable */
import { u32, Text, u64, Bytes } from '@polkadot/types';
import { Struct } from '@polkadot/types/codec';
import { Registry } from '@polkadot/types/types';
import { VotingTypes, VoteStage } from './voting';
import AccountId from '@polkadot/types/primitive/Generic/AccountId';
export class ProposalRecord extends Struct {
constructor (registry: Registry, value: any) {
super(registry, {
index: u32,
author: AccountId,
stage: VoteStage,
transition_time: u32,
title: Text,
contents: Text,
vote_id: u64,
}, value);
}
get index (): u32 {
return this.get('index') as u32;
}
get author (): AccountId {
return this.get('author') as AccountId;
}
get stage (): VoteStage {
return this.get('stage') as VoteStage;
}
get transition_time (): u32 {
return this.get('transition_time') as u32;
}
get title () : Text {
return this.get('title') as Text;
}
get contents () : Text {
return this.get('contents') as Text;
}
get vote_id () : u64 {
return this.get('vote_id') as u64;
}
}
export const SignalingTypes = {
PreVoting: VotingTypes.PreVoting,
Voting: VotingTypes.Voting,
Completed: VotingTypes.Completed,
Commit: VotingTypes.Commit,
VoteStage,
ProposalRecord,
ProposalContents: Bytes,
ProposalTitle: Bytes,
};

View File

@ -1,8 +0,0 @@
/* eslint-disable */
import { u128 } from '@polkadot/types';
export class Balance2 extends u128 { }
export const TreasuryRewardTypes = {
Balance2
};

View File

@ -1,132 +0,0 @@
/* eslint-disable */
import { Null, bool, u64, Enum, Struct, Vec, Tuple, Option, u128 } from '@polkadot/types';
import U8aFixed from '@polkadot/types/codec/U8aFixed';
import { AnyU8a, Registry } from '@polkadot/types/types';
import AccountId from '@polkadot/types/primitive/Generic/AccountId';
export class PreVoting extends Null { }
export class Commit extends Null { }
export class Voting extends Null { }
export class Completed extends Null { }
export class VoteStage extends Enum {
constructor (registry: Registry, value?: string, index?: number) {
super(registry, {
prevoting: PreVoting,
commit: Commit,
voting: Voting,
completed: Completed,
}, value, index);
}
}
export class Binary extends Null { }
export class MultiOption extends Null { }
export class RankedChoice extends Null { }
export class VoteType extends Enum {
constructor (registry: Registry, value?: string, index?: number) {
super(registry, {
binary: Binary,
multioption: MultiOption,
rankedchoice: RankedChoice,
}, value, index);
}
}
export class OnePerson extends Null { }
export class OneCoin extends Null { }
export class TallyType extends Enum {
constructor (registry: Registry, value?: string, index?: number) {
super(registry, {
oneperson: OnePerson,
onecoin: OneCoin,
}, value, index);
}
}
export class VoteOutcome extends U8aFixed {
constructor (registry: Registry, value?: AnyU8a) {
super(registry, value, 256);
}
}
export class Tally extends Option.with(Vec.with(Tuple.with([VoteOutcome, u128]))) { }
export class VoteData extends Struct {
constructor (registry: Registry, value: any) {
super(registry, {
initiator: AccountId,
stage: VoteStage,
vote_type: VoteType,
tally_type: TallyType,
is_commit_reveal: bool,
}, value);
}
get initiator (): AccountId {
return this.get('initiator') as AccountId;
}
get stage (): VoteStage {
return this.get('stage') as VoteStage;
}
get vote_type (): VoteType {
return this.get('vote_type') as VoteType;
}
get tally_type (): TallyType {
return this.get('tally_type') as TallyType;
}
get is_commit_reveal (): bool {
return this.get('is_commit_reveal') as bool;
}
}
export class Commitments extends Vec.with(Tuple.with([AccountId, VoteOutcome])) { }
export class Reveals extends Vec.with(Tuple.with([AccountId, Vec.with(VoteOutcome)])) { }
export class VoteRecord extends Struct {
constructor (registry: Registry, value: any) {
super(registry, {
id: u64,
commitments: Commitments,
reveals: Reveals,
data: VoteData,
outcomes: Vec.with(VoteOutcome),
}, value);
}
get id (): u64 {
return this.get('id') as u64;
}
get commitments (): Commitments {
return this.get('commits') as Commitments;
}
get reveals (): Reveals {
return this.get('reveals') as Reveals;
}
get data () : VoteData {
return this.get('data') as VoteData;
}
get outcomes () : Vec<VoteOutcome> {
return this.get('outcomes') as Vec<VoteOutcome>;
}
}
export const VotingTypes = {
PreVoting,
Commit,
Voting,
Completed,
VoteStage,
Binary,
MultiOption,
VoteType,
OnePerson,
OneCoin,
TallyType,
VoteOutcome,
Tally,
VoteData,
VoteRecord,
'voting::VoteType': VoteType,
'voting::TallyType': TallyType,
};

File diff suppressed because one or more lines are too long

View File

@ -1,12 +1,12 @@
{
"name": "@polkadot/extension-dapp",
"description": "Provides an interfaces around the injected globals for ease of access by dapp developers.",
"version": "0.15.0-beta.3",
"version": "0.20.0",
"author": "Jaco Greeff <jacogr@gmail.com>",
"license": "Apache-2",
"dependencies": {
"@babel/runtime": "^7.8.3",
"@polkadot/extension-inject": "^0.15.0-beta.3"
"@polkadot/extension-inject": "^0.20.0"
},
"peerDependencies": {
"@polkadot/api": "*"

View File

@ -1,7 +1,7 @@
{
"name": "@polkadot/extension-inject",
"description": "A generic injector (usable to any extension), that populates the base exposed interfaces to be used by dapps.",
"version": "0.15.0-beta.3",
"version": "0.20.0",
"author": "Jaco Greeff <jacogr@gmail.com>",
"license": "Apache-2",
"dependencies": {

View File

@ -1,7 +1,7 @@
{
"name": "@polkadot/extension-ui",
"description": "A sample signer extension for the @polkadot/api",
"version": "0.15.0-beta.3",
"version": "0.20.0",
"author": "Jaco Greeff <jacogr@gmail.com>",
"license": "Apache-2",
"dependencies": {

View File

@ -1,12 +1,12 @@
{
"name": "@polkadot/extension",
"description": "A sample signer extension for the @polkadot/api",
"version": "0.15.0-beta.3",
"version": "0.20.0",
"author": "Jaco Greeff <jacogr@gmail.com>",
"license": "Apache-2",
"dependencies": {
"@polkadot/api": "^1.0.0-beta.19",
"@polkadot/extension-ui": "^0.15.0-beta.3",
"@polkadot/api": "^1.0.0-beta.22",
"@polkadot/extension-ui": "^0.20.0",
"@polkadot/ui-keyring": "^0.48.0-beta.15"
},
"devDependencies": {

View File

@ -2178,27 +2178,27 @@
dependencies:
"@types/node" ">= 8"
"@polkadot/api-derive@^1.0.0-beta.19":
version "1.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-1.0.0-beta.19.tgz#275a96eb0b0ab624e9c28879b1ee0c3f2d69c93b"
integrity sha512-FbTUTBeeFghdYVp0sZIYX1I1Q6sjUAGxNpWXeYVvnX09k6ecSAZz9Q3oc9Tc1VBEjcPuKev5jIbPX0+ub/T0cQ==
"@polkadot/api-derive@^1.0.0-beta.22":
version "1.0.0-beta.22"
resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-1.0.0-beta.22.tgz#ce597c5e24d5f274d74de3b5c27a04ebaabedfcf"
integrity sha512-MsUZyiJW+w/qKqOfFtNldZOcrb9V3Ffkex/gGOHI6c/9CjcUxu50dN8EXcXIFRNaQx5NhIipuXgjUGvgVL/0Hg==
dependencies:
"@babel/runtime" "^7.8.3"
"@polkadot/api" "^1.0.0-beta.19"
"@polkadot/types" "^1.0.0-beta.19"
"@polkadot/api" "^1.0.0-beta.22"
"@polkadot/types" "^1.0.0-beta.22"
"@polkadot/api@^1.0.0-beta.19":
version "1.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-1.0.0-beta.19.tgz#5caaa19de76113064463ad81c3c2dac2e9ff466f"
integrity sha512-9a7qnQrwWdvir8Ud9DDxkVCD2L222jOLGTRez4e4VA5pdh2mQoZegXWihaMx1S+AdZed1FAtxHhYM/nRzvmOZQ==
"@polkadot/api@^1.0.0-beta.22":
version "1.0.0-beta.22"
resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-1.0.0-beta.22.tgz#d6c17b380bd768b44bc74fa069e6fe7704b28836"
integrity sha512-9RO8QtWqeM4b6T5y8XFXlPNeYscP5sMHUOlPne3wH7fNdkaILr1bUtWv8t8S+3duH2KL+Ltse4Om72/n8Yzztg==
dependencies:
"@babel/runtime" "^7.8.3"
"@polkadot/api-derive" "^1.0.0-beta.19"
"@polkadot/api-derive" "^1.0.0-beta.22"
"@polkadot/keyring" "^2.0.0-beta.6"
"@polkadot/metadata" "^1.0.0-beta.19"
"@polkadot/rpc-core" "^1.0.0-beta.19"
"@polkadot/rpc-provider" "^1.0.0-beta.19"
"@polkadot/types" "^1.0.0-beta.19"
"@polkadot/metadata" "^1.0.0-beta.22"
"@polkadot/rpc-core" "^1.0.0-beta.22"
"@polkadot/rpc-provider" "^1.0.0-beta.22"
"@polkadot/types" "^1.0.0-beta.22"
"@polkadot/util-crypto" "^2.0.0-beta.6"
"@polkadot/dev-react@^0.32.17":
@ -2288,10 +2288,10 @@
typescript "^3.7.5"
vuepress "^1.2.0"
"@polkadot/jsonrpc@^1.0.0-beta.19":
version "1.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-1.0.0-beta.19.tgz#0f45730e172979d417373b7504fa9d10b450ff60"
integrity sha512-3y2AZF9HYly/t0Ibkur2YKfnI/8mrnJ3MjWtX28+DLQRAberkHUsIGPpByRAAAvQDxpaX1N2GPdLSqXrucU8IA==
"@polkadot/jsonrpc@^1.0.0-beta.22":
version "1.0.0-beta.22"
resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-1.0.0-beta.22.tgz#13043c7a2f37615e6f35ff44593250e2377af966"
integrity sha512-O4wRvYZcq7MCbag/G6jUmaPGSehJmFDwiXqDxbpHoMn92Zd8DkQNKS788CjrxcgiN4vlap/Mc0UX0hrgbBrqzQ==
dependencies:
"@babel/runtime" "^7.8.3"
@ -2304,13 +2304,13 @@
"@polkadot/util" "^2.0.0-beta.6"
"@polkadot/util-crypto" "^2.0.0-beta.6"
"@polkadot/metadata@^1.0.0-beta.19":
version "1.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@polkadot/metadata/-/metadata-1.0.0-beta.19.tgz#27b83a511f06d415c00aba79e2de63ebac48ba8a"
integrity sha512-8kpKTju7xJ8VUV32SsyIiP/FOB/7bHbcuMJA3lyGGuM6zkaSNoRfnFM2jz2SJoZPJiRD4G16QREfDaG67v02Rw==
"@polkadot/metadata@^1.0.0-beta.22":
version "1.0.0-beta.22"
resolved "https://registry.yarnpkg.com/@polkadot/metadata/-/metadata-1.0.0-beta.22.tgz#93a8f4ba831402c469cd3b2c2169b930d895f47a"
integrity sha512-uzisWi3yuV4UQegJHNV4pbFMnUuDNEx4LlOPESICVwRmQjM6skbMqKObHHE5Q5VkzM7nBFq4X0CWHy3346r6QQ==
dependencies:
"@babel/runtime" "^7.8.3"
"@polkadot/types" "^1.0.0-beta.19"
"@polkadot/types" "^1.0.0-beta.22"
"@polkadot/util" "^2.0.0-beta.6"
"@polkadot/util-crypto" "^2.0.0-beta.6"
@ -2338,25 +2338,25 @@
qrcode-generator "^1.4.4"
react-qr-reader "^2.2.1"
"@polkadot/rpc-core@^1.0.0-beta.19":
version "1.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-1.0.0-beta.19.tgz#e2e8e4725e256898d03b7346d65ccdeb31ab4952"
integrity sha512-YYXn8aDe7aBrtwT10DcKWaSbGwL67s2MSnFWCaEkX7uymuvcXCkL2PS5Y8TRY++pydxWz9FeBM9FhRpuFyn0JA==
"@polkadot/rpc-core@^1.0.0-beta.22":
version "1.0.0-beta.22"
resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-1.0.0-beta.22.tgz#a7f820b4b6dc75b72a8d50e79811237dd6d44858"
integrity sha512-rWtA/k0eziK0ilZ0jvCZQFpzsWqSQxHP3gfaYqcMGP5Z+OmXp0hS3a5OGq3/4xAlUqfKYgPOrCR41W1GNWLRLg==
dependencies:
"@babel/runtime" "^7.8.3"
"@polkadot/jsonrpc" "^1.0.0-beta.19"
"@polkadot/rpc-provider" "^1.0.0-beta.19"
"@polkadot/types" "^1.0.0-beta.19"
"@polkadot/jsonrpc" "^1.0.0-beta.22"
"@polkadot/rpc-provider" "^1.0.0-beta.22"
"@polkadot/types" "^1.0.0-beta.22"
"@polkadot/util" "^2.0.0-beta.6"
rxjs "^6.5.4"
"@polkadot/rpc-provider@^1.0.0-beta.19":
version "1.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-1.0.0-beta.19.tgz#6f27cae3201be00fae0329234b1de538f5f5bd17"
integrity sha512-uCZgK+4ijssek2pp7f+rpDGTU7L600ZWbndQycQKIAuTUG1cTgLnYcRtXsJ+VJdWr34OBe70KdFd5LF4TOiFkA==
"@polkadot/rpc-provider@^1.0.0-beta.22":
version "1.0.0-beta.22"
resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-1.0.0-beta.22.tgz#fbe248d044fc64a77a5529ab35b31a0fdb973c88"
integrity sha512-1V8jHbKvuwM76Bwv6cFJ7ZFFAN0jAPXVKMOrjPVIuRhKU5S1U+oksRW36x34q/X1JJtIROaDbsWiAubZHSTzCA==
dependencies:
"@babel/runtime" "^7.8.3"
"@polkadot/metadata" "^1.0.0-beta.19"
"@polkadot/metadata" "^1.0.0-beta.22"
"@polkadot/util" "^2.0.0-beta.6"
"@polkadot/util-crypto" "^2.0.0-beta.6"
eventemitter3 "^4.0.0"
@ -2370,13 +2370,13 @@
dependencies:
"@types/chrome" "^0.0.92"
"@polkadot/types@^1.0.0-beta.19":
version "1.0.0-beta.19"
resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-1.0.0-beta.19.tgz#9e96c399320a89b8d6e97b5981b8927d8d38788e"
integrity sha512-+NZDSjgxrVR532KiOo/eZSlMukyEyKBsXdDcYvfurEFa6JXqYOdNc6KlYn6kXToJNCVileQINnEvfwjF0OPAWQ==
"@polkadot/types@^1.0.0-beta.22":
version "1.0.0-beta.22"
resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-1.0.0-beta.22.tgz#d5c34fb7fdb8e7be7a03c7e7f666cd3e07aaa014"
integrity sha512-T4yQG010Pr1Olu45mWXaZOQ/UatMLbbTxvcGPznFMs6Ved3h4w9YGnoahQnyCnpo1VPc94etUHmRJoHkILQeEA==
dependencies:
"@babel/runtime" "^7.8.3"
"@polkadot/metadata" "^1.0.0-beta.19"
"@polkadot/metadata" "^1.0.0-beta.22"
"@polkadot/util" "^2.0.0-beta.6"
"@polkadot/util-crypto" "^2.0.0-beta.6"
"@types/memoizee" "^0.4.3"
@ -5995,7 +5995,7 @@ ecc-jsbn@~0.1.1:
jsbn "~0.1.0"
safer-buffer "^2.1.0"
edgeware-node-types@^1.0.10:
edgeware-node-types@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/edgeware-node-types/-/edgeware-node-types-1.1.0.tgz#ce6f773d6907fde929395347d997e21bc37afa87"
integrity sha512-0e56OWLDowEvEj30mJ+Sp72WlaGayRobxE7q3vSBTH1wNiPTafLQ53NMCO68j6V0aTycMzC373VR08iGKoDf5g==