@taquito/rpc 14.0.0 → 14.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/rpc-client-interface.js +1 -0
- package/dist/lib/rpc-client-interface.js.map +1 -1
- package/dist/lib/rpc-client-modules/rpc-cache.js +26 -0
- package/dist/lib/rpc-client-modules/rpc-cache.js.map +1 -1
- package/dist/lib/taquito-rpc.js +18 -0
- package/dist/lib/taquito-rpc.js.map +1 -1
- package/dist/lib/types.js.map +1 -1
- package/dist/lib/version.js +2 -2
- package/dist/taquito-rpc.es6.js +47 -2
- package/dist/taquito-rpc.es6.js.map +1 -1
- package/dist/taquito-rpc.umd.js +47 -2
- package/dist/taquito-rpc.umd.js.map +1 -1
- package/dist/types/rpc-client-interface.d.ts +3 -1
- package/dist/types/rpc-client-modules/rpc-cache.d.ts +13 -1
- package/dist/types/taquito-rpc.d.ts +13 -1
- package/dist/types/types.d.ts +6 -0
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BigNumber } from 'bignumber.js';
|
|
2
|
-
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, EndorsingRightsQueryArguments, EndorsingRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunScriptViewParam, RPCRunViewParam, RunCodeResult, RunScriptViewResult, RunViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, TxRollupInboxResponse, TxRollupStateResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult } from './types';
|
|
2
|
+
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, EndorsingRightsQueryArguments, EndorsingRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunScriptViewParam, RPCRunViewParam, RunCodeResult, RunScriptViewResult, RunViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, TxRollupInboxResponse, TxRollupStateResponse, UnparsingMode, VotesListingsResponse, VotingInfoResponse, VotingPeriodBlockResult } from './types';
|
|
3
3
|
export interface RPCOptions {
|
|
4
4
|
block: string;
|
|
5
5
|
}
|
|
@@ -18,6 +18,7 @@ export interface RpcClientInterface {
|
|
|
18
18
|
getBigMapKey(address: string, key: BigMapKey, options?: RPCOptions): Promise<BigMapGetResponse>;
|
|
19
19
|
getBigMapExpr(id: string, expr: string, options?: RPCOptions): Promise<BigMapResponse>;
|
|
20
20
|
getDelegates(address: string, options?: RPCOptions): Promise<DelegatesResponse>;
|
|
21
|
+
getVotingInfo(address: string, options?: RPCOptions): Promise<VotingInfoResponse>;
|
|
21
22
|
getConstants(options?: RPCOptions): Promise<ConstantsResponse>;
|
|
22
23
|
getBlock(options?: RPCOptions): Promise<BlockResponse>;
|
|
23
24
|
getBlockHeader(options?: RPCOptions): Promise<BlockHeaderResponse>;
|
|
@@ -71,6 +72,7 @@ export declare enum RPCMethodName {
|
|
|
71
72
|
GET_CURRENT_QUORUM = "getCurrentQuorum",
|
|
72
73
|
GET_DELEGATE = "getDelegate",
|
|
73
74
|
GET_DELEGATES = "getDelegates",
|
|
75
|
+
GET_VOTING_INFO = "getVotingInfo",
|
|
74
76
|
GET_ENDORSING_RIGHTS = "getEndorsingRights",
|
|
75
77
|
GET_ENTRYPOINTS = "getEntrypoints",
|
|
76
78
|
GET_LIVE_BLOCKS = "getLiveBlocks",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
|
2
2
|
import { RpcClientInterface, RPCOptions } from '../rpc-client-interface';
|
|
3
|
-
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, EndorsingRightsQueryArguments, EndorsingRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunScriptViewParam, RPCRunViewParam, RunCodeResult, RunScriptViewResult, RunViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, TxRollupInboxResponse, TxRollupStateResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult } from '../types';
|
|
3
|
+
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, VotingInfoResponse, EndorsingRightsQueryArguments, EndorsingRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunScriptViewParam, RPCRunViewParam, RunCodeResult, RunScriptViewResult, RunViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, TxRollupInboxResponse, TxRollupStateResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult } from '../types';
|
|
4
4
|
interface CachedDataInterface {
|
|
5
5
|
[key: string]: {
|
|
6
6
|
handle: () => void;
|
|
@@ -174,6 +174,18 @@ export declare class RpcClientCache implements RpcClientInterface {
|
|
|
174
174
|
getDelegates(address: string, { block }?: {
|
|
175
175
|
block: string;
|
|
176
176
|
}): Promise<DelegatesResponse>;
|
|
177
|
+
/**
|
|
178
|
+
*
|
|
179
|
+
* @param address delegate address which we want to retrieve
|
|
180
|
+
* @param options contains generic configuration for rpc calls
|
|
181
|
+
*
|
|
182
|
+
* @description Returns the delegate info (e.g. voting power) found in the listings of the current voting period.
|
|
183
|
+
*
|
|
184
|
+
* @see https://tezos.gitlab.io/kathmandu/rpc.html#get-block-id-context-delegates-pkh-voting-info
|
|
185
|
+
*/
|
|
186
|
+
getVotingInfo(address: string, { block }?: {
|
|
187
|
+
block: string;
|
|
188
|
+
}): Promise<VotingInfoResponse>;
|
|
177
189
|
/**
|
|
178
190
|
*
|
|
179
191
|
* @param options contains generic configuration for rpc calls
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { HttpBackend } from '@taquito/http-utils';
|
|
6
6
|
import BigNumber from 'bignumber.js';
|
|
7
7
|
import { RpcClientInterface, RPCOptions } from './rpc-client-interface';
|
|
8
|
-
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, EndorsingRightsQueryArguments, EndorsingRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunViewParam, RPCRunScriptViewParam, RunCodeResult, RunViewResult, RunScriptViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult, TxRollupStateResponse, TxRollupInboxResponse } from './types';
|
|
8
|
+
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, VotingInfoResponse, EndorsingRightsQueryArguments, EndorsingRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunViewParam, RPCRunScriptViewParam, RunCodeResult, RunViewResult, RunScriptViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult, TxRollupStateResponse, TxRollupInboxResponse } from './types';
|
|
9
9
|
export { castToBigNumber } from './utils/utils';
|
|
10
10
|
export { RPCOptions, defaultChain, defaultRPCOptions, RpcClientInterface, } from './rpc-client-interface';
|
|
11
11
|
export { RpcClientCache } from './rpc-client-modules/rpc-cache';
|
|
@@ -171,6 +171,18 @@ export declare class RpcClient implements RpcClientInterface {
|
|
|
171
171
|
getDelegates(address: string, { block }?: {
|
|
172
172
|
block: string;
|
|
173
173
|
}): Promise<DelegatesResponse>;
|
|
174
|
+
/**
|
|
175
|
+
*
|
|
176
|
+
* @param address delegate address which we want to retrieve
|
|
177
|
+
* @param options contains generic configuration for rpc calls
|
|
178
|
+
*
|
|
179
|
+
* @description Returns the delegate info (e.g. voting power) found in the listings of the current voting period.
|
|
180
|
+
*
|
|
181
|
+
* @see https://tezos.gitlab.io/kathmandu/rpc.html#get-block-id-context-delegates-pkh-voting-info
|
|
182
|
+
*/
|
|
183
|
+
getVotingInfo(address: string, { block }?: {
|
|
184
|
+
block: string;
|
|
185
|
+
}): Promise<VotingInfoResponse>;
|
|
174
186
|
/**
|
|
175
187
|
*
|
|
176
188
|
* @param options contains generic configuration for rpc calls
|
package/dist/types/types.d.ts
CHANGED
|
@@ -96,6 +96,12 @@ export interface DelegatesResponse {
|
|
|
96
96
|
current_proposals?: string[];
|
|
97
97
|
remaining_proposals?: number;
|
|
98
98
|
}
|
|
99
|
+
export declare type VotingInfoResponse = {
|
|
100
|
+
voting_power?: string;
|
|
101
|
+
current_ballot?: BallotListResponseEnum;
|
|
102
|
+
current_proposals?: string[];
|
|
103
|
+
remaining_proposals?: number;
|
|
104
|
+
};
|
|
99
105
|
interface Frozenbalancebycycle {
|
|
100
106
|
cycle: number;
|
|
101
107
|
deposit?: BigNumber;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taquito/rpc",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.1.0",
|
|
4
4
|
"description": "Provides low level methods, and types to invoke RPC calls from a Nomadic Tezos RPC node",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tezos",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@taquito/http-utils": "^14.
|
|
71
|
-
"@taquito/utils": "^14.
|
|
72
|
-
"bignumber.js": "^9.0
|
|
70
|
+
"@taquito/http-utils": "^14.1.0",
|
|
71
|
+
"@taquito/utils": "^14.1.0",
|
|
72
|
+
"bignumber.js": "^9.1.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@types/bluebird": "^3.5.36",
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"ts-toolbelt": "^9.6.0",
|
|
100
100
|
"typescript": "~4.1.5"
|
|
101
101
|
},
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "39b593efda7b807eef8d11999088d03938c4ac44"
|
|
103
103
|
}
|