-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: augmented type generation #747
Changes from 5 commits
a39da3f
504d27c
1cae8a0
1ecdda5
a4c6d33
d02b9f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"types": "../lib/interfaces/extraDefs/index.d.ts" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** | ||
* Copyright (c) 2018-2023, BOTLabs GmbH. | ||
* | ||
* This source code is licensed under the BSD 4-Clause "Original" license | ||
* found in the LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
module.exports = {} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** | ||
* Copyright (c) 2018-2023, BOTLabs GmbH. | ||
* | ||
* This source code is licensed under the BSD 4-Clause "Original" license | ||
* found in the LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
export {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ import type { CreatedBlock } from '@polkadot/types/interfaces/engine'; | |
import type { EthAccount, EthCallRequest, EthFeeHistory, EthFilter, EthFilterChanges, EthLog, EthReceipt, EthRichBlock, EthSubKind, EthSubParams, EthSyncStatus, EthTransaction, EthTransactionRequest, EthWork } from '@polkadot/types/interfaces/eth'; | ||
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics'; | ||
import type { EncodedFinalityProofs, JustificationNotification, ReportedRoundStates } from '@polkadot/types/interfaces/grandpa'; | ||
import type { MmrLeafBatchProof, MmrLeafProof } from '@polkadot/types/interfaces/mmr'; | ||
import type { MmrHash, MmrLeafBatchProof } from '@polkadot/types/interfaces/mmr'; | ||
import type { StorageKind } from '@polkadot/types/interfaces/offchain'; | ||
import type { FeeDetails, RuntimeDispatchInfoV1 } from '@polkadot/types/interfaces/payment'; | ||
import type { RpcMethods } from '@polkadot/types/interfaces/rpc'; | ||
|
@@ -275,7 +275,7 @@ declare module '@polkadot/rpc-core/types/jsonrpc' { | |
/** | ||
* Returns the number of transactions sent from given address at given time (block number). | ||
**/ | ||
getTransactionCount: AugmentedRpc<(hash: H256 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>; | ||
getTransactionCount: AugmentedRpc<(address: H160 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this auto-generated? Why do we have a change from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah we haven't been able to run type generation on this polkadot version, so this has been outdated until now |
||
/** | ||
* Returns transaction receipt by transaction hash. | ||
**/ | ||
|
@@ -373,13 +373,21 @@ declare module '@polkadot/rpc-core/types/jsonrpc' { | |
}; | ||
mmr: { | ||
/** | ||
* Generate MMR proof for the given leaf indices. | ||
* Generate MMR proof for the given block numbers. | ||
**/ | ||
generateBatchProof: AugmentedRpc<(leafIndices: Vec<u64> | (u64 | AnyNumber | Uint8Array)[], at?: BlockHash | string | Uint8Array) => Observable<MmrLeafProof>>; | ||
generateProof: AugmentedRpc<(blockNumbers: Vec<u64> | (u64 | AnyNumber | Uint8Array)[], bestKnownBlockNumber?: u64 | AnyNumber | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<MmrLeafBatchProof>>; | ||
/** | ||
* Generate MMR proof for given leaf index. | ||
* Get the MMR root hash for the current best block. | ||
**/ | ||
generateProof: AugmentedRpc<(leafIndex: u64 | AnyNumber | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<MmrLeafBatchProof>>; | ||
root: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<MmrHash>>; | ||
/** | ||
* Verify an MMR proof | ||
**/ | ||
verifyProof: AugmentedRpc<(proof: MmrLeafBatchProof | { blockHash?: any; leaves?: any; proof?: any } | string | Uint8Array) => Observable<bool>>; | ||
/** | ||
* Verify an MMR proof statelessly given an mmr_root | ||
**/ | ||
verifyProofStateless: AugmentedRpc<(root: MmrHash | string | Uint8Array, proof: MmrLeafBatchProof | { blockHash?: any; leaves?: any; proof?: any } | string | Uint8Array) => Observable<bool>>; | ||
}; | ||
net: { | ||
/** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get a linter error that the header is missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weirdly, I don't ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added the header nevertheless