Skip to content

Commit

Permalink
Added VecDeque type (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
KarishmaBothara authored Nov 4, 2020
1 parent 476eb01 commit 63567b4
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 39 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@polkadot/keyring": "^3.5.1",
"@polkadot/types": "2.1.2-2",
"@polkadot/types": "^2.3.1",
"@polkadot/util": "^3.5.1",
"memoizee": "^0.4.14",
"bignumber.js": "^9.0.1"
Expand Down
5 changes: 4 additions & 1 deletion src/interfaces/augment-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BitVec, Bytes, Data, DoNotConstruct, Null, StorageKey, Text, Type, U256
import { AttestationTopic, AttestationValue } from '@cennznet/api-types/interfaces/attestation';
import { ExchangeKey, FeeRate } from '@cennznet/api-types/interfaces/cennzx';
import { AssetInfo } from '@cennznet/api-types/interfaces/ga';
import { RewardBalance, RewardBalanceOf, RewardDestination } from '@cennznet/api-types/interfaces/staking';
import { RewardBalance, RewardBalanceOf, RewardDestination, VecDeque } from '@cennznet/api-types/interfaces/staking';
import { AcceptPayload, DeviceId, DeviceIdResponse, Group, Invite, Member, MemberRoles, Message, MessageId, Meta, PendingInvite, PreKeyBundle, PreKeyBundlesResponse, Response, VaultKey, VaultValue, WithdrawnPreKeyBundle } from '@cennznet/api-types/interfaces/sylo';
import { ChargeTransactionPayment, FeeExchange, FeeExchangeV1 } from '@cennznet/api-types/interfaces/transactionPayment';
import { BlockAttestations, IncludedBlocks, MoreAttestations } from '@polkadot/types/interfaces/attestations';
Expand Down Expand Up @@ -1530,6 +1530,9 @@ declare module '@polkadot/types/types/registry' {
RewardDestination: RewardDestination;
'Option<RewardDestination>': Option<RewardDestination>;
'Vec<RewardDestination>': Vec<RewardDestination>;
VecDeque: VecDeque;
'Option<VecDeque>': Option<VecDeque>;
'Vec<VecDeque>': Vec<VecDeque>;
Meta: Meta;
'Option<Meta>': Option<Meta>;
'Vec<Meta>': Vec<Meta>;
Expand Down
3 changes: 2 additions & 1 deletion src/interfaces/staking/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default {
Controller: 'Null',
Account: 'AccountId'
}
}
},
VecDeque: 'Vec<any>',
}
}
5 changes: 4 additions & 1 deletion src/interfaces/staking/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */

import { Enum } from '@polkadot/types/codec';
import { Enum, Vec } from '@polkadot/types/codec';
import { AccountId, Balance } from '@polkadot/types/interfaces/runtime';

/** @name RewardBalance */
Expand All @@ -18,4 +18,7 @@ export interface RewardDestination extends Enum {
readonly asAccount: AccountId;
}

/** @name VecDeque */
export interface VecDeque extends Vec<any> {}

export type PHANTOM_STAKING = 'staking';
124 changes: 89 additions & 35 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -592,18 +592,6 @@
"@polkadot/util" "3.6.1"
"@polkadot/util-crypto" "3.6.1"

"@polkadot/[email protected]":
version "2.1.2-2"
resolved "https://registry.yarnpkg.com/@polkadot/metadata/-/metadata-2.1.2-2.tgz#24447f45b7a58b1bcabbe8de79639012013062c5"
integrity sha512-62bedTeQnoMK2V81EeCXNNAgU+la22Xju6s9UC/pGWTQFAGv4jM+0LozXlcbiF1nr51ORewc+TdLYw6eegQB/Q==
dependencies:
"@babel/runtime" "^7.11.2"
"@polkadot/types" "2.1.2-2"
"@polkadot/types-known" "2.1.2-2"
"@polkadot/util" "^3.5.1"
"@polkadot/util-crypto" "^3.5.1"
bn.js "^5.1.3"

"@polkadot/[email protected]":
version "2.3.1"
resolved "https://registry.yarnpkg.com/@polkadot/metadata/-/metadata-2.3.1.tgz#c061ca73bfac65416f9717b6452794a5fb648948"
Expand All @@ -616,13 +604,32 @@
"@polkadot/util-crypto" "^3.6.1"
bn.js "^5.1.3"

"@polkadot/metadata@^2.5.1":
version "2.5.1"
resolved "https://registry.yarnpkg.com/@polkadot/metadata/-/metadata-2.5.1.tgz#f208c85c96ab723d09e14324d99fa25c84fe1108"
integrity sha512-FCEFFxKw+2O4fr/z0w1zIYKme59evtZMbr3VR64unhSD9jskwbHXtmk25CGxQvpA8W7AvGzFlqGSwA2n6hIIbA==
dependencies:
"@babel/runtime" "^7.12.1"
"@polkadot/types" "^2.5.1"
"@polkadot/types-known" "^2.5.1"
"@polkadot/util" "^3.7.1"
"@polkadot/util-crypto" "^3.7.1"
bn.js "^5.1.3"

"@polkadot/[email protected]":
version "3.6.1"
resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-3.6.1.tgz#647858a03fd450014af453e72b66b812b027dc19"
integrity sha512-PEEw/vTZaKf32vuAUeFXYNJei+b/s3hr7msMKfvoYeKDU/otgt9Mgkqrh6VCaE6+lHHgX8vLbH70pCqQrGG/uA==
dependencies:
"@babel/runtime" "^7.12.1"

"@polkadot/networks@^3.7.1":
version "3.7.1"
resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-3.7.1.tgz#01e568e0f7791c22eb896ffabc23e936ede57c43"
integrity sha512-kBPUxt3d1xXeJaFilyVI717TKOZJko/3pvFIDqbSc0i2qdXv8bmRR5r7KMnEB7MvTeMPKHVhcesWksAIdsYRew==
dependencies:
"@babel/runtime" "^7.12.1"

"@polkadot/[email protected]":
version "2.3.1"
resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-2.3.1.tgz#aa89b13eb51c5919944c785cebfe9c1dbf57a7fe"
Expand Down Expand Up @@ -668,16 +675,6 @@
websocket "^1.0.32"
yargs "^16.1.0"

"@polkadot/[email protected]":
version "2.1.2-2"
resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-2.1.2-2.tgz#622566db96d530e4879e28c9f46fb2dae1e8f295"
integrity sha512-hB+hwbH9OIvWVp7sbFpLXIKPX997/RMCY7DAABz3qzt/FspyBq+vmcHQRKm3pM77KvaxZhGgL2LxUL3fK5/iGg==
dependencies:
"@babel/runtime" "^7.11.2"
"@polkadot/types" "2.1.2-2"
"@polkadot/util" "^3.5.1"
bn.js "^5.1.3"

"@polkadot/[email protected]":
version "2.3.1"
resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-2.3.1.tgz#4aa255bbe998ed8f0d10f344eb364d96b3cb6fb7"
Expand All @@ -688,19 +685,15 @@
"@polkadot/util" "^3.6.1"
bn.js "^5.1.3"

"@polkadot/types@2.1.2-2":
version "2.1.2-2"
resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-2.1.2-2.tgz#d1aea355dad4741e8cf28fd4992d0c141ff9df55"
integrity sha512-K0lXeq9BrcF0o/vyPjFbHT3s9Xx4JeCo6c4Nfp8xGb8rsINPhEtG/Hwz2B6qymNLBjXw5MyiQ+5/SeyUv0ML4A==
"@polkadot/types-known@^2.5.1":
version "2.5.1"
resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-2.5.1.tgz#debcd946975770aa28bf6f99d57ad64608848e41"
integrity sha512-1r6xdrjoSQFLW4t81uRCIwzG1jgPvFuLpTau+ThznfSaB0eefyrTWWzsH+io76ODWQLFa6KlvMp70XV6yQtEyg==
dependencies:
"@babel/runtime" "^7.11.2"
"@polkadot/metadata" "2.1.2-2"
"@polkadot/util" "^3.5.1"
"@polkadot/util-crypto" "^3.5.1"
"@types/bn.js" "^4.11.6"
"@babel/runtime" "^7.12.1"
"@polkadot/types" "^2.5.1"
"@polkadot/util" "^3.7.1"
bn.js "^5.1.3"
memoizee "^0.4.14"
rxjs "^6.6.3"

"@polkadot/[email protected]":
version "2.3.1"
Expand All @@ -716,7 +709,21 @@
memoizee "^0.4.14"
rxjs "^6.6.3"

"@polkadot/[email protected]", "@polkadot/util-crypto@^3.5.1":
"@polkadot/types@^2.3.1", "@polkadot/types@^2.5.1":
version "2.5.1"
resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-2.5.1.tgz#08d127f18f8acf5517747b17b83fc3d8d8ee684e"
integrity sha512-J0u4wonGBMm7M7r0fttP/545kPlk1zt7xBLmIGIsUpOb6zppOC0EDjTnFCssMU+IuGlKxakYcU8SaVQVwYLAVg==
dependencies:
"@babel/runtime" "^7.12.1"
"@polkadot/metadata" "^2.5.1"
"@polkadot/util" "^3.7.1"
"@polkadot/util-crypto" "^3.7.1"
"@types/bn.js" "^4.11.6"
bn.js "^5.1.3"
memoizee "^0.4.14"
rxjs "^6.6.3"

"@polkadot/[email protected]":
version "3.5.1"
resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-3.5.1.tgz#7f8d8b5982f9d2df2432ff017d89110e7212f330"
integrity sha512-7SWxOYG+dUCAkGW2xCJc9gutLJ02T9LwiumTW8cXFysRai4qLA3XRl+XQHAEdRzKA+97IQmtGMl4/Tjq9TGwYw==
Expand Down Expand Up @@ -755,6 +762,26 @@
tweetnacl "^1.0.3"
xxhashjs "^0.2.2"

"@polkadot/util-crypto@^3.7.1":
version "3.7.1"
resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-3.7.1.tgz#69e1cca5adc521cf0880b244dc1ae0d086c42e4c"
integrity sha512-ZxQa10bo85YlxfS8ieDUzmFZMkKWwOp2dGQ0Xy94e4VBkWVPq9JjAfm8RnLy6D7k5KvMhzKuzJk7IcBDDdXGSw==
dependencies:
"@babel/runtime" "^7.12.1"
"@polkadot/networks" "^3.7.1"
"@polkadot/util" "^3.7.1"
"@polkadot/wasm-crypto" "^1.4.1"
base-x "^3.0.8"
blakejs "^1.1.0"
bn.js "^5.1.3"
create-hash "^1.2.0"
elliptic "^6.5.3"
js-sha3 "^0.8.0"
pbkdf2 "^3.1.1"
scryptsy "^2.1.0"
tweetnacl "^1.0.3"
xxhashjs "^0.2.2"

"@polkadot/[email protected]", "@polkadot/util@^3.5.1":
version "3.5.1"
resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-3.5.1.tgz#65b7f2669dde043088d925274070bf2e51f9c045"
Expand Down Expand Up @@ -783,6 +810,19 @@
chalk "^4.1.0"
ip-regex "^4.2.0"

"@polkadot/util@^3.7.1":
version "3.7.1"
resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-3.7.1.tgz#b7585380a6177814f7e28dc2165814864ef2c67b"
integrity sha512-nvgzAbT/a213mpUd56YwK/zgbGKcQoMNLTmqcBHn1IP9u5J9XJcb1zPzqmCTg6mqnjrsgzJsWml9OpQftrcB6g==
dependencies:
"@babel/runtime" "^7.12.1"
"@polkadot/x-textdecoder" "^3.7.1"
"@polkadot/x-textencoder" "^3.7.1"
"@types/bn.js" "^4.11.6"
bn.js "^5.1.3"
camelcase "^5.3.1"
ip-regex "^4.2.0"

"@polkadot/wasm-crypto@^1.4.1":
version "1.4.1"
resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-1.4.1.tgz#0a053d0c2587da30fb5313cef81f8d9a52029c68"
Expand Down Expand Up @@ -811,6 +851,13 @@
dependencies:
"@babel/runtime" "^7.12.1"

"@polkadot/x-textdecoder@^3.7.1":
version "3.7.1"
resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-3.7.1.tgz#2d02bd33df0e5d4818b8d96892a5c8290e967573"
integrity sha512-GztrO7O880GR7C64PK30J7oLm+88OMxAUVW35njE+9qFUH6MGEKbtaLGUSn0JLCCtSme2f1i7DZ+1Pdbqowtnw==
dependencies:
"@babel/runtime" "^7.12.1"

"@polkadot/x-textencoder@^0.3.2":
version "0.3.2"
resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-0.3.2.tgz#6976bf9a2885fd7f96ae5f9363e259427b9ca259"
Expand All @@ -825,6 +872,13 @@
dependencies:
"@babel/runtime" "^7.12.1"

"@polkadot/x-textencoder@^3.7.1":
version "3.7.1"
resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-3.7.1.tgz#1fe1884821f255565735b1b5dbb17ee61de51fa3"
integrity sha512-39jwEu+gok8hFl/UqBr6WDhSeSr4qblriwM++2Vwrw/298hd5uQ7xtJNZKdrbrPCkExPZhrxwVg/mJTHBpwSng==
dependencies:
"@babel/runtime" "^7.12.1"

"@polkadot/x-ws@^0.3.3":
version "0.3.3"
resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-0.3.3.tgz#b2f12c2ef6c534c11d600e239f8be1cade026357"
Expand Down Expand Up @@ -1594,7 +1648,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=

create-hash@^1.1.0, create-hash@^1.1.2:
create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196"
integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==
Expand Down

0 comments on commit 63567b4

Please sign in to comment.