Skip to content

Commit

Permalink
Update types
Browse files Browse the repository at this point in the history
  • Loading branch information
shekohex committed Oct 10, 2023
1 parent 66fb937 commit 6371a08
Show file tree
Hide file tree
Showing 11 changed files with 417 additions and 400 deletions.
130 changes: 65 additions & 65 deletions types/package.json
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
{
"name": "@webb-tools/dkg-substrate-types",
"version": "0.0.6",
"description": "Polkadot.js type definitions required for interacting with Webb's DKG protocol",
"main": "./build/index.js",
"author": "Webb Developers <[email protected]>",
"license": "Apache-2.0",
"type": "commonjs",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
},
"repository": "https://github.com/webb-tools/dkg-substrate.git",
"bugs": {
"url": "https://github.com/webb-tools/dkg-substrate/issues"
},
"homepage": "https://github.com/webb-tools/dkg-substrate",
"dependencies": {
"@babel/cli": "^7.20.7",
"@babel/core": "^7.20.12",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
"@babel/plugin-proposal-numeric-separator": "^7.18.6",
"@babel/plugin-proposal-optional-chaining": "^7.20.7",
"@babel/plugin-syntax-bigint": "^7.8.3",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-import-assertions": "^7.20.0",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/plugin-syntax-top-level-await": "^7.14.5",
"@babel/plugin-transform-regenerator": "^7.20.5",
"@babel/plugin-transform-runtime": "^7.19.6",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@babel/register": "^7.18.9",
"@babel/runtime": "^7.20.13",
"babel-jest": "^29.4.1",
"babel-plugin-module-extension-resolver": "^1.0.0",
"babel-plugin-module-resolver": "^5.0.0",
"babel-plugin-styled-components": "^2.0.7",
"@open-web3/orml-types": "^1.1.3",
"@polkadot/api-derive": "10.4.1",
"@polkadot/dev": "^0.72.42",
"@polkadot/typegen": "10.4.1",
"@polkadot/types": "10.4.1",
"fs-extra": "^11.1.1",
"glob2base": "^0.0.12",
"minimatch": "^7.4.2",
"mkdirp": "^2.1.5"
},
"devDependencies": {
"@types/websocket": "^1.0.0",
"rimraf": "3.0.2",
"ts-node": "10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "5.0.4",
"websocket": "^1.0.31"
},
"scripts": {
"build": "node ./scripts/build.js",
"build:interfaces": "yarn build:interfaces:defs && yarn build:interfaces:chain && rm ./src/interfaces/index.ts && rm ./src/interfaces/types.ts",
"build:interfaces:defs": "npx ts-node node_modules/.bin/polkadot-types-from-defs --input ./src/interfaces --package @webb-tools/dkg-substrate-types --endpoint ./src/metadata/metadata.json",
"build:interfaces:chain": "npx ts-node node_modules/.bin/polkadot-types-from-chain --endpoint ./src/metadata/metadata.json --output ./src/interfaces",
"clean": "rm -rf build && rm -rf ts-types",
"publish-types": "node ./scripts/publish-types.js",
"update:metadata": "npx ts-node ./scripts/updateMetadata.ts"
}
"name": "@webb-tools/dkg-substrate-types",
"version": "0.0.7",
"description": "Polkadot.js type definitions required for interacting with Webb's DKG protocol",
"main": "./build/index.js",
"author": "Webb Developers <[email protected]>",
"license": "Apache-2.0",
"type": "commonjs",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
},
"repository": "https://github.com/webb-tools/dkg-substrate.git",
"bugs": {
"url": "https://github.com/webb-tools/dkg-substrate/issues"
},
"homepage": "https://github.com/webb-tools/dkg-substrate",
"dependencies": {
"@babel/cli": "^7.20.7",
"@babel/core": "^7.20.12",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
"@babel/plugin-proposal-numeric-separator": "^7.18.6",
"@babel/plugin-proposal-optional-chaining": "^7.20.7",
"@babel/plugin-syntax-bigint": "^7.8.3",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-import-assertions": "^7.20.0",
"@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/plugin-syntax-top-level-await": "^7.14.5",
"@babel/plugin-transform-regenerator": "^7.20.5",
"@babel/plugin-transform-runtime": "^7.19.6",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@babel/register": "^7.18.9",
"@babel/runtime": "^7.20.13",
"babel-jest": "^29.4.1",
"babel-plugin-module-extension-resolver": "^1.0.0",
"babel-plugin-module-resolver": "^5.0.0",
"babel-plugin-styled-components": "^2.0.7",
"@open-web3/orml-types": "^1.1.3",
"@polkadot/api-derive": "10.4.1",
"@polkadot/dev": "^0.72.42",
"@polkadot/typegen": "10.4.1",
"@polkadot/types": "10.4.1",
"fs-extra": "^11.1.1",
"glob2base": "^0.0.12",
"minimatch": "^7.4.2",
"mkdirp": "^2.1.5"
},
"devDependencies": {
"@types/websocket": "^1.0.0",
"rimraf": "3.0.2",
"ts-node": "10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "5.0.4",
"websocket": "^1.0.31"
},
"scripts": {
"build": "node ./scripts/build.js",
"build:interfaces": "yarn build:interfaces:defs && yarn build:interfaces:chain && rm ./src/interfaces/index.ts && rm ./src/interfaces/types.ts",
"build:interfaces:defs": "npx ts-node node_modules/.bin/polkadot-types-from-defs --input ./src/interfaces --package @webb-tools/dkg-substrate-types --endpoint ./src/metadata/metadata.json",
"build:interfaces:chain": "npx ts-node node_modules/.bin/polkadot-types-from-chain --endpoint ./src/metadata/metadata.json --output ./src/interfaces",
"clean": "rm -rf build && rm -rf ts-types",
"publish-types": "node ./scripts/publish-types.js",
"update:metadata": "npx ts-node ./scripts/updateMetadata.ts"
}
}
1 change: 1 addition & 0 deletions types/src/interfaces/augment-api-consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
import type { Vec, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec } from '@polkadot/types-codec/types';
import type { Perbill } from '@polkadot/types/interfaces/runtime';
import { WebbProposalsHeaderTypedChainId, SpWeightsWeightV2Weight, FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpWeightsRuntimeDbWeight, SpVersionRuntimeVersion } from '@polkadot/types/lookup';

export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;

Expand Down
5 changes: 3 additions & 2 deletions types/src/interfaces/augment-api-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, H256, Perbill } from '@polkadot/types/interfaces/runtime';
import { FrameSupportTokensMiscBalanceStatus, DkgRuntimePrimitivesMisbehaviourType, DkgRuntimePrimitivesCryptoPublic, DkgRuntimePrimitivesProposalSignedProposalBatch, DkgRuntimePrimitivesProposalDkgPayloadKey, WebbProposalsHeaderTypedChainId, PalletDkgProposalHandlerSignedProposalEventData, PalletDkgProposalHandlerOffencesDkgMisbehaviorOffenceType, WebbProposalsProposalProposalKind, PalletElectionProviderMultiPhaseElectionCompute, SpNposElectionsElectionScore, PalletElectionProviderMultiPhasePhase, SpConsensusGrandpaAppPublic, PalletImOnlineSr25519AppSr25519Public, PalletStakingExposure, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsPoolState, PalletStakingForcing, PalletStakingValidatorPrefs, SpRuntimeDispatchError, FrameSupportDispatchDispatchInfo } from '@polkadot/types/lookup';

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

Expand Down Expand Up @@ -150,7 +151,7 @@ declare module '@polkadot/api-base/types/events' {
/**
* Next public key signature submitted
**/
NextPublicKeySignatureSubmitted: AugmentedEvent<ApiType, [voterMerkleRoot: U8aFixed, sessionLength: u64, voterCount: u32, nonce: u32, pubKey: Bytes, signature: Bytes], { voterMerkleRoot: U8aFixed, sessionLength: u64, voterCount: u32, nonce: u32, pubKey: Bytes, signature: Bytes }>;
NextPublicKeySignatureSubmitted: AugmentedEvent<ApiType, [voterMerkleRoot: U8aFixed, sessionLength: u64, voterCount: u32, nonce: u32, pubKey: Bytes, signature: Bytes, compressedPubKey: Bytes], { voterMerkleRoot: U8aFixed, sessionLength: u64, voterCount: u32, nonce: u32, pubKey: Bytes, signature: Bytes, compressedPubKey: Bytes }>;
/**
* Next public key submitted
**/
Expand Down Expand Up @@ -178,7 +179,7 @@ declare module '@polkadot/api-base/types/events' {
/**
* Current Public Key Signature Changed.
**/
PublicKeySignatureChanged: AugmentedEvent<ApiType, [voterMerkleRoot: U8aFixed, sessionLength: u64, voterCount: u32, nonce: u32, pubKey: Bytes, signature: Bytes], { voterMerkleRoot: U8aFixed, sessionLength: u64, voterCount: u32, nonce: u32, pubKey: Bytes, signature: Bytes }>;
PublicKeySignatureChanged: AugmentedEvent<ApiType, [voterMerkleRoot: U8aFixed, sessionLength: u64, voterCount: u32, nonce: u32, pubKey: Bytes, signature: Bytes, compressedPubKey: Bytes], { voterMerkleRoot: U8aFixed, sessionLength: u64, voterCount: u32, nonce: u32, pubKey: Bytes, signature: Bytes, compressedPubKey: Bytes }>;
/**
* Current public key submitted
**/
Expand Down
1 change: 1 addition & 0 deletions types/src/interfaces/augment-api-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import type { Bytes, Option, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64 }
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { Observable } from '@polkadot/types/types';
import { SpConsensusAuraSr25519AppSr25519Public, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesIdAmount, DkgStandaloneRuntimeRuntimeHoldReason, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBridgeRegistryBridgeMetadata, WebbProposalsHeaderResourceId, DkgRuntimePrimitivesCryptoPublic, DkgRuntimePrimitivesProposalRefreshProposal, PalletDkgMetadataRoundMetadata, DkgRuntimePrimitivesMisbehaviourType, DkgRuntimePrimitivesAggregatedMisbehaviourReports, WebbProposalsHeaderTypedChainId, DkgRuntimePrimitivesProposalSignedProposalBatch, DkgRuntimePrimitivesProposalStoredUnsignedProposalBatch, DkgRuntimePrimitivesUnsignedProposal, WebbProposalsProposal, PalletDkgProposalsProposalVotes, PalletElectionProviderMultiPhasePhase, SpNposElectionsElectionScore, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistration, PalletIdentityRegistrarInfo, PalletImOnlineSr25519AppSr25519Public, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, SpStakingOffenceOffenceDetails, SpCoreCryptoKeyTypeId, DkgStandaloneRuntimeOpaqueSessionKeys, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingValidatorPrefs, PalletStakingForcing, PalletStakingStakingLedger, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingUnappliedSlash, FrameSystemAccountInfo, FrameSupportDispatchPerDispatchClassWeight, SpRuntimeDigest, FrameSystemEventRecord, FrameSystemPhase, FrameSystemLastRuntimeUpgradeInfo, PalletTransactionPaymentReleases } from '@polkadot/types/lookup';

export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
export type __QueryableStorageEntry<ApiType extends ApiTypes> = QueryableStorageEntry<ApiType>;
Expand Down
1 change: 1 addition & 0 deletions types/src/interfaces/augment-api-tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type { Data } from '@polkadot/types';
import type { Bytes, Compact, Option, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import { WebbProposalsHeaderResourceId, PalletBridgeRegistryBridgeInfo, DkgRuntimePrimitivesCryptoPublic, DkgRuntimePrimitivesAggregatedMisbehaviourReports, DkgRuntimePrimitivesAggregatedPublicKeys, WebbProposalsHeaderTypedChainId, WebbProposalsProposal, DkgRuntimePrimitivesProposalSignedProposalBatch, SpNposElectionsSupport, SpNposElectionsElectionScore, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, SpConsensusGrandpaEquivocationProof, SpCoreVoid, PalletIdentityJudgement, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsPoolState, PalletNominationPoolsConfigOpAccountId32, DkgStandaloneRuntimeOpaqueSessionKeys, PalletStakingRewardDestination, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpPerbill, PalletStakingValidatorPrefs, SpWeightsWeightV2Weight, DkgStandaloneRuntimeOriginCaller } from '@polkadot/types/lookup';

export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
Expand Down
2 changes: 2 additions & 0 deletions types/src/interfaces/augment-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import type { CreatedBlock, ImportedAux } from '@polkadot/types/interfaces/engin
import type { BlockV0, BlockV1, BlockV2, EIP1559Transaction, EIP2930Transaction, EthAccessList, EthAccessListItem, EthAccount, EthAddress, EthBlock, EthBloom, EthCallRequest, EthFeeHistory, EthFilter, EthFilterAddress, EthFilterChanges, EthFilterTopic, EthFilterTopicEntry, EthFilterTopicInner, EthHeader, EthLog, EthReceipt, EthReceiptV0, EthReceiptV3, EthRichBlock, EthRichHeader, EthStorageProof, EthSubKind, EthSubParams, EthSubResult, EthSyncInfo, EthSyncStatus, EthTransaction, EthTransactionAction, EthTransactionCondition, EthTransactionRequest, EthTransactionSignature, EthTransactionStatus, EthWork, EthereumAccountId, EthereumAddress, EthereumLookupSource, EthereumSignature, LegacyTransaction, TransactionV0, TransactionV1, TransactionV2 } from '@polkadot/types/interfaces/eth';
import type { EvmAccount, EvmCallInfo, EvmCreateInfo, EvmLog, EvmVicinity, ExitError, ExitFatal, ExitReason, ExitRevert, ExitSucceed } from '@polkadot/types/interfaces/evm';
import type { AnySignature, EcdsaSignature, Ed25519Signature, Era, Extrinsic, ExtrinsicEra, ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, ExtrinsicSignature, ExtrinsicSignatureV4, ExtrinsicUnknown, ExtrinsicV4, ImmortalEra, MortalEra, MultiSignature, Signature, SignerPayload, Sr25519Signature } from '@polkadot/types/interfaces/extrinsics';
import type { FungiblesAccessError } from '@polkadot/types/interfaces/fungibles';
import type { AssetOptions, Owner, PermissionLatest, PermissionVersions, PermissionsV1 } from '@polkadot/types/interfaces/genericAsset';
import type { ActiveGilt, ActiveGiltsTotal, ActiveIndex, GiltBid } from '@polkadot/types/interfaces/gilt';
import type { AuthorityIndex, AuthorityList, AuthoritySet, AuthoritySetChange, AuthoritySetChanges, AuthorityWeight, DelayKind, DelayKindBest, EncodedFinalityProofs, ForkTreePendingChange, ForkTreePendingChangeNode, GrandpaCommit, GrandpaEquivocation, GrandpaEquivocationProof, GrandpaEquivocationValue, GrandpaJustification, GrandpaPrecommit, GrandpaPrevote, GrandpaSignedPrecommit, JustificationNotification, KeyOwnerProof, NextAuthority, PendingChange, PendingPause, PendingResume, Precommits, Prevotes, ReportedRoundStates, RoundState, SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
Expand Down Expand Up @@ -504,6 +505,7 @@ declare module '@polkadot/types/types/registry' {
FungibilityV0: FungibilityV0;
FungibilityV1: FungibilityV1;
FungibilityV2: FungibilityV2;
FungiblesAccessError: FungiblesAccessError;
Gas: Gas;
GiltBid: GiltBid;
GlobalValidationData: GlobalValidationData;
Expand Down
2 changes: 2 additions & 0 deletions types/src/interfaces/lookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ export default {
nonce: 'u32',
pubKey: 'Bytes',
signature: 'Bytes',
compressedPubKey: 'Bytes',
},
PublicKeyChanged: {
compressedPubKey: 'Bytes',
Expand All @@ -326,6 +327,7 @@ export default {
nonce: 'u32',
pubKey: 'Bytes',
signature: 'Bytes',
compressedPubKey: 'Bytes',
},
MisbehaviourReportsSubmitted: {
misbehaviourType: 'DkgRuntimePrimitivesMisbehaviourType',
Expand Down
2 changes: 2 additions & 0 deletions types/src/interfaces/types-lookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ declare module '@polkadot/types/lookup' {
readonly nonce: u32;
readonly pubKey: Bytes;
readonly signature: Bytes;
readonly compressedPubKey: Bytes;
} & Struct;
readonly isPublicKeyChanged: boolean;
readonly asPublicKeyChanged: {
Expand All @@ -361,6 +362,7 @@ declare module '@polkadot/types/lookup' {
readonly nonce: u32;
readonly pubKey: Bytes;
readonly signature: Bytes;
readonly compressedPubKey: Bytes;
} & Struct;
readonly isMisbehaviourReportsSubmitted: boolean;
readonly asMisbehaviourReportsSubmitted: {
Expand Down
2 changes: 1 addition & 1 deletion types/src/metadata/metadata.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion types/src/metadata/static-latest.ts

Large diffs are not rendered by default.

Loading

0 comments on commit 6371a08

Please sign in to comment.