@taquito/rpc
Advanced tools
Comparing version 20.0.0-beta.1 to 20.0.0
@@ -30,2 +30,3 @@ "use strict"; | ||
RPCMethodName["GET_DELEGATE"] = "getDelegate"; | ||
RPCMethodName["GET_ALL_DELEGATES"] = "getAllDelegates"; | ||
RPCMethodName["GET_DELEGATES"] = "getDelegates"; | ||
@@ -32,0 +33,0 @@ RPCMethodName["GET_VOTING_INFO"] = "getVotingInfo"; |
@@ -448,2 +448,24 @@ "use strict"; | ||
/** | ||
* @param args contains optional query arguments (active, inactive, with_minimal_stake, without_minimal_stake) | ||
* @param options contains generic configuration for rpc calls to specified block (default to head) | ||
* @description Lists all registered delegates by default with query arguments to filter unneeded values. | ||
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh | ||
*/ | ||
getAllDelegates(args = {}, { block } = rpc_client_interface_2.defaultRPCOptions) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_ALL_DELEGATES, [ | ||
block, | ||
args, | ||
]); | ||
if (this.has(key)) { | ||
return this.get(key); | ||
} | ||
else { | ||
const response = this.rpcClient.getAllDelegates(args, { block }); | ||
this.put(key, response); | ||
return response; | ||
} | ||
}); | ||
} | ||
/** | ||
* @param address delegate address which we want to retrieve | ||
@@ -450,0 +472,0 @@ * @param options contains generic configuration for rpc calls to specified block (default to head) |
@@ -377,2 +377,17 @@ "use strict"; | ||
/** | ||
* @param args contains optional query arguments (active, inactive, with_minimal_stake, without_minimal_stake) | ||
* @param options contains generic configuration for rpc calls to specified block (default to head) | ||
* @description Lists all registered delegates by default with query arguments to filter unneeded values. | ||
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh | ||
*/ | ||
getAllDelegates(args = {}, { block } = rpc_client_interface_1.defaultRPCOptions) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield this.httpBackend.createRequest({ | ||
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/delegates`), | ||
method: 'GET', | ||
query: args, | ||
}); | ||
}); | ||
} | ||
/** | ||
* @param address delegate address which we want to retrieve | ||
@@ -379,0 +394,0 @@ * @param options contains generic configuration for rpc calls to specified block (default to head) |
@@ -6,4 +6,4 @@ "use strict"; | ||
exports.VERSION = { | ||
"commitHash": "4c6e079465fdb978c1627dfdcced0435c9ef87fc", | ||
"version": "20.0.0-beta.1" | ||
"commitHash": "45fea4a361f29598063e448574800220c4687001", | ||
"version": "20.0.0" | ||
}; |
import { BigNumber } from 'bignumber.js'; | ||
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, UnstakeRequestsResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunScriptViewParam, RPCRunViewParam, RunCodeResult, RunScriptViewResult, RunViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingInfoResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsV1, PendingOperationsV2, PendingOperationsQueryArguments, RPCSimulateOperationParam, AILaunchCycleResponse } from './types'; | ||
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, UnstakeRequestsResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunScriptViewParam, RPCRunViewParam, RunCodeResult, RunScriptViewResult, RunViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingInfoResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsV1, PendingOperationsV2, PendingOperationsQueryArguments, RPCSimulateOperationParam, AILaunchCycleResponse, AllDelegatesQueryArguments } from './types'; | ||
export interface RPCOptions { | ||
@@ -26,2 +26,3 @@ block: string; | ||
getBigMapExpr(id: string, expr: string, options?: RPCOptions): Promise<BigMapResponse>; | ||
getAllDelegates(args: AllDelegatesQueryArguments, options?: RPCOptions): Promise<string[]>; | ||
getDelegates(address: string, options?: RPCOptions): Promise<DelegatesResponse>; | ||
@@ -91,2 +92,3 @@ getVotingInfo(address: string, options?: RPCOptions): Promise<VotingInfoResponse>; | ||
GET_DELEGATE = "getDelegate", | ||
GET_ALL_DELEGATES = "getAllDelegates", | ||
GET_DELEGATES = "getDelegates", | ||
@@ -93,0 +95,0 @@ GET_VOTING_INFO = "getVotingInfo", |
import BigNumber from 'bignumber.js'; | ||
import { RpcClientInterface, RPCOptions } from '../rpc-client-interface'; | ||
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, UnstakeRequestsResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, VotingInfoResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunScriptViewParam, RPCRunViewParam, RunCodeResult, RunScriptViewResult, RunViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsQueryArguments, PendingOperationsV1, PendingOperationsV2, RPCSimulateOperationParam, AILaunchCycleResponse } from '../types'; | ||
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, UnstakeRequestsResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, VotingInfoResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunScriptViewParam, RPCRunViewParam, RunCodeResult, RunScriptViewResult, RunViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsQueryArguments, PendingOperationsV1, PendingOperationsV2, RPCSimulateOperationParam, AILaunchCycleResponse, AllDelegatesQueryArguments } from '../types'; | ||
interface CachedDataInterface { | ||
@@ -167,2 +167,11 @@ [key: string]: { | ||
/** | ||
* @param args contains optional query arguments (active, inactive, with_minimal_stake, without_minimal_stake) | ||
* @param options contains generic configuration for rpc calls to specified block (default to head) | ||
* @description Lists all registered delegates by default with query arguments to filter unneeded values. | ||
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh | ||
*/ | ||
getAllDelegates(args?: AllDelegatesQueryArguments, { block }?: { | ||
block: string; | ||
}): Promise<string[]>; | ||
/** | ||
* @param address delegate address which we want to retrieve | ||
@@ -169,0 +178,0 @@ * @param options contains generic configuration for rpc calls to specified block (default to head) |
@@ -8,3 +8,3 @@ /** | ||
import { RpcClientInterface, RPCOptions } from './rpc-client-interface'; | ||
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, UnstakeRequestsResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, VotingInfoResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunViewParam, RPCRunScriptViewParam, RunCodeResult, RunViewResult, RunScriptViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsQueryArguments, PendingOperationsV1, PendingOperationsV2, RPCSimulateOperationParam, AILaunchCycleResponse } from './types'; | ||
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, UnstakeRequestsResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, VotingInfoResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunViewParam, RPCRunScriptViewParam, RunCodeResult, RunViewResult, RunScriptViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsQueryArguments, PendingOperationsV1, PendingOperationsV2, RPCSimulateOperationParam, AILaunchCycleResponse, AllDelegatesQueryArguments } from './types'; | ||
export { castToBigNumber } from './utils/utils'; | ||
@@ -165,2 +165,11 @@ export { RPCOptions, defaultChain, defaultRPCOptions, RpcClientInterface, } from './rpc-client-interface'; | ||
/** | ||
* @param args contains optional query arguments (active, inactive, with_minimal_stake, without_minimal_stake) | ||
* @param options contains generic configuration for rpc calls to specified block (default to head) | ||
* @description Lists all registered delegates by default with query arguments to filter unneeded values. | ||
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh | ||
*/ | ||
getAllDelegates(args?: AllDelegatesQueryArguments, { block }?: { | ||
block: string; | ||
}): Promise<string[]>; | ||
/** | ||
* @param address delegate address which we want to retrieve | ||
@@ -167,0 +176,0 @@ * @param options contains generic configuration for rpc calls to specified block (default to head) |
{ | ||
"name": "@taquito/rpc", | ||
"version": "20.0.0-beta.1", | ||
"version": "20.0.0", | ||
"description": "Provides low level methods, and types to invoke RPC calls from a Nomadic Tezos RPC node", | ||
@@ -69,5 +69,5 @@ "keywords": [ | ||
"dependencies": { | ||
"@taquito/core": "^20.0.0-beta.1", | ||
"@taquito/http-utils": "^20.0.0-beta.1", | ||
"@taquito/utils": "^20.0.0-beta.1", | ||
"@taquito/core": "^20.0.0", | ||
"@taquito/http-utils": "^20.0.0", | ||
"@taquito/utils": "^20.0.0", | ||
"bignumber.js": "^9.1.2" | ||
@@ -102,3 +102,3 @@ }, | ||
}, | ||
"gitHead": "55491dbb67866d3196843b167ca9303f803b1a99" | ||
"gitHead": "4871f03155be8dfce81ff24cb45fe0e3049c7646" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
523734
10268
1
Updated@taquito/core@^20.0.0
Updated@taquito/http-utils@^20.0.0
Updated@taquito/utils@^20.0.0