@taquito/rpc 17.1.1 → 17.2.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.map +1 -1
- package/dist/lib/rpc-client-modules/rpc-cache.js +13 -0
- package/dist/lib/rpc-client-modules/rpc-cache.js.map +1 -1
- package/dist/lib/taquito-rpc.js +17 -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 +32 -2
- package/dist/taquito-rpc.es6.js.map +1 -1
- package/dist/taquito-rpc.umd.js +32 -2
- package/dist/taquito-rpc.umd.js.map +1 -1
- package/dist/types/rpc-client-interface.d.ts +2 -1
- package/dist/types/rpc-client-modules/rpc-cache.d.ts +10 -1
- package/dist/types/taquito-rpc.d.ts +10 -1
- package/dist/types/types.d.ts +8 -4
- 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, VotingInfoResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperations, PendingOperationsQueryArguments, OriginationProofParams } 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, TicketTokenParams, AllTicketBalances, PendingOperations, PendingOperationsQueryArguments, OriginationProofParams, RPCSimulateOperationParam } from './types';
|
|
3
3
|
export interface RPCOptions {
|
|
4
4
|
block: string;
|
|
5
5
|
}
|
|
@@ -36,6 +36,7 @@ export interface RpcClientInterface {
|
|
|
36
36
|
preapplyOperations(ops: PreapplyParams, options?: RPCOptions): Promise<PreapplyResponse[]>;
|
|
37
37
|
getEntrypoints(contract: string, options?: RPCOptions): Promise<EntrypointsResponse>;
|
|
38
38
|
runOperation(op: RPCRunOperationParam, options?: RPCOptions): Promise<PreapplyResponse>;
|
|
39
|
+
simulateOperation(op: RPCSimulateOperationParam, options?: RPCOptions): Promise<PreapplyResponse>;
|
|
39
40
|
runCode(code: RPCRunCodeParam, options?: RPCOptions): Promise<RunCodeResult>;
|
|
40
41
|
runScriptView(viewScriptParams: RPCRunScriptViewParam, options?: RPCOptions): Promise<RunScriptViewResult>;
|
|
41
42
|
runView(viewParams: RPCRunViewParam, options?: RPCOptions): Promise<RunViewResult>;
|
|
@@ -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, 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, TicketTokenParams, AllTicketBalances, PendingOperationsQueryArguments, PendingOperations, OriginationProofParams } 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, TicketTokenParams, AllTicketBalances, PendingOperationsQueryArguments, PendingOperations, OriginationProofParams, RPCSimulateOperationParam } from '../types';
|
|
4
4
|
interface CachedDataInterface {
|
|
5
5
|
[key: string]: {
|
|
6
6
|
handle: () => void;
|
|
@@ -347,6 +347,15 @@ export declare class RpcClientCache implements RpcClientInterface {
|
|
|
347
347
|
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-operation
|
|
348
348
|
*/
|
|
349
349
|
runOperation(op: RPCRunOperationParam, { block }?: RPCOptions): Promise<PreapplyResponse>;
|
|
350
|
+
/**
|
|
351
|
+
* @param op Operation to simulate
|
|
352
|
+
* @param options contains generic configuration for rpc calls
|
|
353
|
+
*
|
|
354
|
+
* @description Simulate an operation
|
|
355
|
+
*
|
|
356
|
+
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/nairobi-openapi.json
|
|
357
|
+
*/
|
|
358
|
+
simulateOperation(op: RPCSimulateOperationParam, { block }?: RPCOptions): Promise<PreapplyResponse>;
|
|
350
359
|
/**
|
|
351
360
|
* @param code Code to run
|
|
352
361
|
* @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, 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, TicketTokenParams, AllTicketBalances, PendingOperationsQueryArguments, PendingOperations, OriginationProofParams } 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, TicketTokenParams, AllTicketBalances, PendingOperationsQueryArguments, PendingOperations, OriginationProofParams, RPCSimulateOperationParam } 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';
|
|
@@ -344,6 +344,15 @@ export declare class RpcClient implements RpcClientInterface {
|
|
|
344
344
|
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-operation
|
|
345
345
|
*/
|
|
346
346
|
runOperation(op: RPCRunOperationParam, { block }?: RPCOptions): Promise<PreapplyResponse>;
|
|
347
|
+
/**
|
|
348
|
+
* @param op Operation to simulate
|
|
349
|
+
* @param options contains generic configuration for rpc calls
|
|
350
|
+
*
|
|
351
|
+
* @description Simulate an operation on the blockchain
|
|
352
|
+
*
|
|
353
|
+
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/nairobi-openapi.json
|
|
354
|
+
*/
|
|
355
|
+
simulateOperation(op: RPCSimulateOperationParam, { block }?: RPCOptions): Promise<PreapplyResponse>;
|
|
347
356
|
/**
|
|
348
357
|
* @param code Code to run
|
|
349
358
|
* @param options contains generic configuration for rpc calls
|
package/dist/types/types.d.ts
CHANGED
|
@@ -202,10 +202,6 @@ export interface OperationContentsEndorsementWithSlot {
|
|
|
202
202
|
endorsement: InlinedEndorsement;
|
|
203
203
|
slot: number;
|
|
204
204
|
}
|
|
205
|
-
export interface OperationContentsFailingNoop {
|
|
206
|
-
kind: OpKind.FAILING_NOOP;
|
|
207
|
-
arbitrary: string;
|
|
208
|
-
}
|
|
209
205
|
export interface OperationContentsRevelation {
|
|
210
206
|
kind: OpKind.SEED_NONCE_REVELATION;
|
|
211
207
|
level: number;
|
|
@@ -231,6 +227,10 @@ export interface OperationContentsActivateAccount {
|
|
|
231
227
|
pkh: string;
|
|
232
228
|
secret: string;
|
|
233
229
|
}
|
|
230
|
+
export interface OperationContentsFailingNoop {
|
|
231
|
+
kind: OpKind.FAILING_NOOP;
|
|
232
|
+
arbitrary: string;
|
|
233
|
+
}
|
|
234
234
|
export interface OperationContentsProposals {
|
|
235
235
|
kind: OpKind.PROPOSALS;
|
|
236
236
|
source: string;
|
|
@@ -1776,6 +1776,10 @@ export declare type RPCRunOperationParam = {
|
|
|
1776
1776
|
operation: OperationObject;
|
|
1777
1777
|
chain_id: string;
|
|
1778
1778
|
};
|
|
1779
|
+
export interface RPCSimulateOperationParam extends RPCRunOperationParam {
|
|
1780
|
+
blocks_before_activation?: number;
|
|
1781
|
+
latency?: number;
|
|
1782
|
+
}
|
|
1779
1783
|
export declare type RPCRunCodeParam = {
|
|
1780
1784
|
script: MichelsonV1ExpressionExtended[];
|
|
1781
1785
|
storage: MichelsonV1Expression;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taquito/rpc",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.2.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/core": "^17.
|
|
71
|
-
"@taquito/http-utils": "^17.
|
|
72
|
-
"@taquito/utils": "^17.
|
|
70
|
+
"@taquito/core": "^17.2.0",
|
|
71
|
+
"@taquito/http-utils": "^17.2.0",
|
|
72
|
+
"@taquito/utils": "^17.2.0",
|
|
73
73
|
"bignumber.js": "^9.1.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"ts-toolbelt": "^9.6.0",
|
|
101
101
|
"typescript": "~4.1.5"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "8fe3376401f12f5a97556479620c0414a6e5c7c3"
|
|
104
104
|
}
|