Socket
Socket
Sign inDemoInstall

@taquito/rpc

Package Overview
Dependencies
Maintainers
6
Versions
199
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@taquito/rpc - npm Package Compare versions

Comparing version 19.2.1 to 20.0.0-RC.0

5

dist/lib/opkind.js

@@ -18,4 +18,4 @@ "use strict";

OpKind["DOUBLE_PREENDORSEMENT_EVIDENCE"] = "double_preendorsement_evidence";
OpKind["ATTESTATION_WITH_SLOT"] = "attestation_with_slot";
OpKind["ENDORSEMENT_WITH_SLOT"] = "endorsement_with_slot";
OpKind["ATTESTATION_WITH_DAL"] = "attestation_with_dal";
OpKind["ENDORSEMENT_WITH_DAL"] = "endorsement_with_dal";
OpKind["SEED_NONCE_REVELATION"] = "seed_nonce_revelation";

@@ -44,2 +44,3 @@ OpKind["DOUBLE_ATTESTATION_EVIDENCE"] = "double_attestation_evidence";

OpKind["SMART_ROLLUP_TIMEOUT"] = "smart_rollup_timeout";
OpKind["DAL_PUBLISH_COMMITMENT"] = "dal_publish_commitment";
})(OpKind || (exports.OpKind = OpKind = {}));

7

dist/lib/rpc-client-interface.js

@@ -18,2 +18,7 @@ "use strict";

RPCMethodName["GET_BALANCE"] = "getBalance";
RPCMethodName["GET_FULL_BALANCE"] = "getFullBalance";
RPCMethodName["GET_STAKED_BALANCE"] = "getStakedBalance";
RPCMethodName["GET_UNSTAKED_FINALIZABLE_BALANCE"] = "getUnstakedFinalizableBalance";
RPCMethodName["GET_UNSTAKED_FROZEN_BALANCE"] = "getUnstakedFrozenBalance";
RPCMethodName["GET_UNSTAKE_REQUESTS"] = "getUnstakeRequests";
RPCMethodName["GET_CHAIN_ID"] = "getChainId";

@@ -29,3 +34,2 @@ RPCMethodName["GET_CONSTANTS"] = "getConstants";

RPCMethodName["GET_ATTESTATION_RIGHTS"] = "getAttestationRights";
RPCMethodName["GET_ENDORSING_RIGHTS"] = "getEndorsingRights";
RPCMethodName["GET_ENTRYPOINTS"] = "getEntrypoints";

@@ -48,3 +52,4 @@ RPCMethodName["GET_LIVE_BLOCKS"] = "getLiveBlocks";

RPCMethodName["GET_ALL_TICKET_BALANCES"] = "getAllTicketBalances";
RPCMethodName["GET_ADAPTIVE_ISSUANCE_LAUNCH_CYCLE"] = "getAdaptiveIssuanceLaunchCycle";
RPCMethodName["GET_PENDING_OPERATIONS"] = "getPendingOperations";
})(RPCMethodName || (exports.RPCMethodName = RPCMethodName = {}));

@@ -101,3 +101,3 @@ "use strict";

* @description Get the block's hash, its unique identifier.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-hash
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-hash
*/

@@ -122,3 +122,3 @@ getBlockHash({ block } = rpc_client_interface_2.defaultRPCOptions) {

* @description List the ancestors of the given block which, if referred to as the branch in an operation header, are recent enough for that operation to be included in the current block.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-live-blocks
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-live-blocks
*/

@@ -144,3 +144,3 @@ getLiveBlocks({ block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Access the spendable balance of a contract, excluding frozen bonds
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-balance
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-balance
*/

@@ -165,6 +165,112 @@ getBalance(address, { block } = rpc_client_interface_2.defaultRPCOptions) {

/**
* @param address address from which we want to retrieve the full balance
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the full balance of a contract, including frozen bonds and stake.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-full-balance
*/
getFullBalance(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
return __awaiter(this, void 0, void 0, function* () {
this.validateAddress(address);
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_FULL_BALANCE, [
block,
address,
]);
if (this.has(key)) {
return this.get(key);
}
else {
const response = this.rpcClient.getFullBalance(address, { block });
this.put(key, response);
return response;
}
});
}
/**
* @param address address from which we want to retrieve the staked balance
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the staked balance of a contract. Returns None if the contract is originated, or neither delegated nor a delegate.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-staked-balance
*/
getStakedBalance(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
return __awaiter(this, void 0, void 0, function* () {
this.validateAddress(address);
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_STAKED_BALANCE, [
block,
address,
]);
if (this.has(key)) {
return this.get(key);
}
else {
const response = this.rpcClient.getStakedBalance(address, { block });
this.put(key, response);
return response;
}
});
}
/**
* @param address address from which we want to retrieve the unstaked finalizable balance
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the balance of a contract that was requested for an unstake operation, and is no longer frozen, which means it will appear in the spendable balance of the contract after any stake/unstake/finalize_unstake operation. Returns None if the contract is originated.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstaked-finalizable-balance
*/
getUnstakedFinalizableBalance(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
return __awaiter(this, void 0, void 0, function* () {
this.validateAddress(address);
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_UNSTAKED_FINALIZABLE_BALANCE, [block, address]);
if (this.has(key)) {
return this.get(key);
}
else {
const response = this.rpcClient.getUnstakedFinalizableBalance(address, { block });
this.put(key, response);
return response;
}
});
}
/**
* @param address address from which we want to retrieve the unstaked frozen balance
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the balance of a contract that was requested for an unstake operation, but is still frozen for the duration of the slashing period. Returns None if the contract is originated.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstaked-frozen-balance
*/
getUnstakedFrozenBalance(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
return __awaiter(this, void 0, void 0, function* () {
this.validateAddress(address);
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_UNSTAKED_FROZEN_BALANCE, [block, address]);
if (this.has(key)) {
return this.get(key);
}
else {
const response = this.rpcClient.getUnstakedFrozenBalance(address, { block });
this.put(key, response);
return response;
}
});
}
/**
* @param address address from which we want to retrieve the unstake requests
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the unstake requests of the contract. The requests that appear in the finalizable field can be finalized, which means that the contract can transfer these (no longer frozen) funds to their spendable balance with a [finalize_unstake] operation call. Returns null if there is no unstake request pending.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstake-requests
*/
getUnstakeRequests(address, { block } = rpc_client_interface_2.defaultRPCOptions) {
return __awaiter(this, void 0, void 0, function* () {
this.validateAddress(address);
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_UNSTAKE_REQUESTS, [block, address]);
if (this.has(key)) {
return this.get(key);
}
else {
const response = this.rpcClient.getUnstakeRequests(address, { block });
this.put(key, response);
return response;
}
});
}
/**
* @param address contract address from which we want to retrieve the storage
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the data of the contract.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-storage
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-storage
*/

@@ -192,3 +298,3 @@ getStorage(address, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Access the code and data of the contract.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-script
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-script
*/

@@ -236,3 +342,3 @@ getScript(address, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Access the complete status of a contract.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id
*/

@@ -260,3 +366,3 @@ getContract(address, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Access the manager of an implicit contract
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-manager-key
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-manager-key
*/

@@ -284,3 +390,3 @@ getManagerKey(address, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Access the delegate of a contract, if any
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-delegate
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-delegate
*/

@@ -309,3 +415,3 @@ getDelegate(address, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Access the value associated with a key in the big map storage of the contract.
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-context-contracts-contract-id-big-map-get
* @see https://tezos.gitlab.io/active/rpc.html#post-block-id-context-contracts-contract-id-big-map-get
*/

@@ -331,3 +437,3 @@ getBigMapKey(address, key, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Access the value associated with a key in a big map.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr
*/

@@ -355,3 +461,3 @@ getBigMapExpr(id, expr, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Everything about a delegate
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-delegates-pkh
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh
*/

@@ -401,3 +507,3 @@ getDelegates(address, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @description All constants
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-constants
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-constants
*/

@@ -422,3 +528,3 @@ getConstants({ block } = rpc_client_interface_2.defaultRPCOptions) {

* @description All the information about a block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id
* @example getBlock() will default to `/main/chains/block/head?version=0` which shows { kind: endorsement }

@@ -444,3 +550,3 @@ * @example getBlock({ block: 'head~2', version: 1 }) will return an offset of 2 from head blocks and shows { kind: attestation }

* @description The whole block header
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-header
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-header
*/

@@ -465,3 +571,3 @@ getBlockHeader({ block } = rpc_client_interface_2.defaultRPCOptions) {

* @description All the metadata associated to the block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-metadata
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-metadata
*/

@@ -487,3 +593,3 @@ getBlockMetadata({ block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Retrieves the list of delegates allowed to bake a block.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-baking-rights
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -510,3 +616,3 @@ getBakingRights(args = {}, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Retrieves the delegates allowed to attest a block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-endorsing-rights
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -527,25 +633,5 @@ getAttestationRights(args = {}, { block } = rpc_client_interface_2.defaultRPCOptions) {

/**
* @deprecated Deprecated in favor of getAttestationRights
* @param args contains optional query arguments (level, cycle, delegate, and consensus_key)
* @param options contains generic configuration for rpc calls
* @description Retrieves the delegates allowed to endorse a block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-endorsing-rights
*/
getEndorsingRights(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_ENDORSING_RIGHTS, [block, args]);
if (this.has(key)) {
return this.get(key);
}
else {
const response = this.rpcClient.getEndorsingRights(args, { block });
this.put(key, response);
return response;
}
});
}
/**
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Ballots casted so far during a voting period
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-ballot-list
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-ballot-list
*/

@@ -570,3 +656,3 @@ getBallotList({ block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Sum of ballots casted so far during a voting period
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-ballots
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-ballots
*/

@@ -589,3 +675,3 @@ getBallots({ block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Current proposal under evaluation.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-proposal
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-proposal
*/

@@ -608,3 +694,3 @@ getCurrentProposal({ block, } = rpc_client_interface_2.defaultRPCOptions) {

* @description Current expected quorum.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-quorum
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-quorum
*/

@@ -629,3 +715,3 @@ getCurrentQuorum({ block, } = rpc_client_interface_2.defaultRPCOptions) {

* @description List of delegates with their voting power
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-listings
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-listings
*/

@@ -650,3 +736,3 @@ getVotesListings({ block, } = rpc_client_interface_2.defaultRPCOptions) {

* @description List of proposals with number of supporters
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-proposals
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-proposals
*/

@@ -672,3 +758,3 @@ getProposals({ block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Forge an operation returning the unsigned bytes
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-forge-operations
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -683,3 +769,3 @@ forgeOperations(data, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Inject an operation in node and broadcast it and return the ID of the operation
* @see https://tezos.gitlab.io/api/rpc.html#post-injection-operation
* @see https://tezos.gitlab.io/shell/rpc.html#post-injection-operation
*/

@@ -695,3 +781,3 @@ injectOperation(signedOpBytes) {

* @description Simulate the application of the operations with the context of the given block and return the result of each operation application
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-preapply-operations
* @see https://tezos.gitlab.io/active/rpc.html#post-block-id-helpers-preapply-operations
*/

@@ -707,3 +793,3 @@ preapplyOperations(ops, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Return the list of entrypoints of the contract
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-entrypoints
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-entrypoints
* @version 005_PsBABY5H

@@ -733,3 +819,3 @@ */

* @description Run an operation with the context of the given block and without signature checks and return the operation application result, including the consumed gas.
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-operation
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -745,3 +831,3 @@ runOperation(op, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Simulate running an operation at some future moment (based on the number of blocks given in the `latency` argument), and return the operation application result.
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/oxford-openapi.json
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -757,3 +843,3 @@ simulateOperation(op, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Run a Michelson script in the current context
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-code
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -769,2 +855,3 @@ runCode(code, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Simulate a call to a michelson view
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -781,3 +868,4 @@ runScriptView(_a, _b) {

* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Simulate a call to a view following the TZIP-4 standard. See https://gitlab.com/tzip/tzip/-/blob/master/proposals/tzip-4/tzip-4.md#view-entrypoints.
* @description Simulate a call to a view following the TZIP-4 standard.
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -813,3 +901,3 @@ runView(_a, _b) {

* @example packData({ data: { string: "test" }, type: { prim: "string" } })
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-pack-data
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -839,3 +927,3 @@ packData(data, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Returns the voting period (index, kind, starting position) and related information (position, remaining) of the interrogated block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-period
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-period
*/

@@ -861,3 +949,3 @@ getCurrentPeriod({ block, } = rpc_client_interface_2.defaultRPCOptions) {

* @example getSuccessorPeriod() will default to successor voting period for /main/chains/block/head.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-successor-period
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-successor-period
*/

@@ -939,3 +1027,3 @@ getSuccessorPeriod({ block, } = rpc_client_interface_2.defaultRPCOptions) {

* @description Access the used storage space of the contract
* @see https://tezos.gitlab.io/lima/rpc.html#get-block-id-context-contracts-contract-id-storage
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -959,3 +1047,3 @@ getStorageUsedSpace(contract, { block } = rpc_client_interface_2.defaultRPCOptions) {

= * @description Access the paid storage space of the contract
* @see https://tezos.gitlab.io/lima/rpc.html#get-block-id-context-contracts-contract-id-storage
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -981,3 +1069,3 @@ getStoragePaidSpace(contract, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @example ticket { ticketer: 'address', content_type: { prim: "string" }, content: { string: 'ticket1' } }
* @see https://tezos.gitlab.io/protocols/016_mumbai.html#rpc-changes
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -1001,3 +1089,3 @@ getTicketBalance(contract, ticket, { block } = rpc_client_interface_2.defaultRPCOptions) {

* @description Access the complete list of tickets owned by the given contract by scanning the contract's storage.
* @see https://tezos.gitlab.io/protocols/016_mumbai.html#rpc-changes
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -1018,6 +1106,23 @@ getAllTicketBalances(contract, { block } = rpc_client_interface_2.defaultRPCOptions) {

/**
* @description Returns the cycle at which the launch of the Adaptive Issuance feature is set to happen. A result of null means that the feature is not yet set to launch.
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-adaptive-issuance-launch-cycle
*/
getAdaptiveIssuanceLaunchCycle({ 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_ADAPTIVE_ISSUANCE_LAUNCH_CYCLE, [block]);
if (this.has(key)) {
return this.get(key);
}
else {
const response = this.rpcClient.getAdaptiveIssuanceLaunchCycle({ block });
this.put(key, response);
return response;
}
});
}
/**
* @description List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint)
* @param args has 5 optional properties. We support version 1 as default will output { applied: { kind: endorsement} } version 2 will output { validated: { kind: attestation} }. The rest of the properties is to filter pending operations response
* @default args { version: '1', applied: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined }
* @see https://tezos.gitlab.io/CHANGES.html?highlight=pending_operations#id4
* @param args has 5 optional properties. We support version 1 & 2
* @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined }
*/

@@ -1024,0 +1129,0 @@ getPendingOperations(args = {}) {

@@ -103,3 +103,3 @@ "use strict";

* @description Get the block's hash, its unique identifier.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-hash
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-hash
*/

@@ -118,3 +118,3 @@ getBlockHash({ block } = rpc_client_interface_1.defaultRPCOptions) {

* @description List the ancestors of the given block which, if referred to as the branch in an operation header, are recent enough for that operation to be included in the current block.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-live-blocks
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-live-blocks
*/

@@ -134,3 +134,3 @@ getLiveBlocks({ block } = rpc_client_interface_1.defaultRPCOptions) {

* @description Access the spendable balance of a contract, excluding frozen bonds
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-balance
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-balance
*/

@@ -148,6 +148,104 @@ getBalance(address, { block } = rpc_client_interface_1.defaultRPCOptions) {

/**
* @param address address from which we want to retrieve the full balance
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the full balance of a contract, including frozen bonds and stake.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-full-balance
*/
getFullBalance(address, { block } = rpc_client_interface_1.defaultRPCOptions) {
return __awaiter(this, void 0, void 0, function* () {
this.validateAddress(address);
const balance = yield this.httpBackend.createRequest({
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/contracts/${address}/full_balance`),
method: 'GET',
});
return new bignumber_js_1.default(balance);
});
}
/**
* @param address address from which we want to retrieve the staked balance
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the staked balance of a contract. Returns None if the contract is originated, or neither delegated nor a delegate.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-staked-balance
*/
getStakedBalance(address, { block } = rpc_client_interface_1.defaultRPCOptions) {
return __awaiter(this, void 0, void 0, function* () {
this.validateAddress(address);
const balance = yield this.httpBackend.createRequest({
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/contracts/${address}/staked_balance`),
method: 'GET',
});
return new bignumber_js_1.default(balance);
});
}
/**
* @param address address from which we want to retrieve the unstaked finalizable balance
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the balance of a contract that was requested for an unstake operation, and is no longer frozen, which means it will appear in the spendable balance of the contract after any stake/unstake/finalize_unstake operation. Returns None if the contract is originated.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstaked-finalizable-balance
*/
getUnstakedFinalizableBalance(address, { block } = rpc_client_interface_1.defaultRPCOptions) {
return __awaiter(this, void 0, void 0, function* () {
this.validateAddress(address);
const balance = yield this.httpBackend.createRequest({
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/contracts/${address}/unstaked_finalizable_balance`),
method: 'GET',
});
return new bignumber_js_1.default(balance);
});
}
/**
* @param address address from which we want to retrieve the unstaked frozen balance
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the balance of a contract that was requested for an unstake operation, but is still frozen for the duration of the slashing period. Returns None if the contract is originated.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstaked-frozen-balance
*/
getUnstakedFrozenBalance(address, { block } = rpc_client_interface_1.defaultRPCOptions) {
return __awaiter(this, void 0, void 0, function* () {
this.validateAddress(address);
const balance = yield this.httpBackend.createRequest({
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/contracts/${address}/unstaked_frozen_balance`),
method: 'GET',
});
return new bignumber_js_1.default(balance);
});
}
/**
* @param address address from which we want to retrieve the unstaked requests
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the unstake requests of the contract. The requests that appear in the finalizable field can be finalized, which means that the contract can transfer these (no longer frozen) funds to their spendable balance with a [finalize_unstake] operation call. Returns null if there is no unstake request pending.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstake-requests
*/
getUnstakeRequests(address, { block } = rpc_client_interface_1.defaultRPCOptions) {
return __awaiter(this, void 0, void 0, function* () {
this.validateAddress(address);
const response = yield this.httpBackend.createRequest({
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/contracts/${address}/unstake_requests`),
method: 'GET',
});
return response === null
? null
: {
finalizable: response.finalizable.map((_a) => {
var { amount } = _a, rest = __rest(_a, ["amount"]);
const castedToBigNumber = (0, utils_1.castToBigNumber)({ amount }, ['amount']);
return Object.assign(Object.assign({}, rest), { amount: castedToBigNumber.amount });
}),
unfinalizable: {
delegate: response.unfinalizable.delegate,
requests: response.unfinalizable.requests.map(({ amount, cycle }) => {
const castedToBigNumber = (0, utils_1.castToBigNumber)({ amount }, ['amount']);
return {
cycle,
amount: castedToBigNumber.amount,
};
}),
},
};
});
}
/**
* @param address contract address from which we want to retrieve the storage
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the data of the contract.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-storage
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-storage
*/

@@ -167,3 +265,3 @@ getStorage(address, { block } = rpc_client_interface_1.defaultRPCOptions) {

* @description Access the code and data of the contract.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-script
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-script
*/

@@ -198,3 +296,3 @@ getScript(address, { block } = rpc_client_interface_1.defaultRPCOptions) {

* @description Access the complete status of a contract.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id
*/

@@ -215,3 +313,3 @@ getContract(address, { block } = rpc_client_interface_1.defaultRPCOptions) {

* @description Access the manager of an implicit contract
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-manager-key
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-manager-key
*/

@@ -231,3 +329,3 @@ getManagerKey(address, { block } = rpc_client_interface_1.defaultRPCOptions) {

* @description Access the delegate of a contract, if any
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-delegate
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-delegate
*/

@@ -260,3 +358,3 @@ getDelegate(address, { block } = rpc_client_interface_1.defaultRPCOptions) {

* @description Access the value associated with a key in the big map storage of the contract.
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-context-contracts-contract-id-big-map-get
* @see https://tezos.gitlab.io/active/rpc.html#post-block-id-context-contracts-contract-id-big-map-get
*/

@@ -277,3 +375,3 @@ getBigMapKey(address, key, { block } = rpc_client_interface_1.defaultRPCOptions) {

* @description Access the value associated with a key in a big map.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr
*/

@@ -292,3 +390,3 @@ getBigMapExpr(id, expr, { block } = rpc_client_interface_1.defaultRPCOptions) {

* @description Everything about a delegate
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-delegates-pkh
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh
*/

@@ -347,3 +445,3 @@ getDelegates(address, { block } = rpc_client_interface_1.defaultRPCOptions) {

* @description All constants
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-constants
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-constants
*/

@@ -391,5 +489,5 @@ getConstants({ block } = rpc_client_interface_1.defaultRPCOptions) {

* @description All the information about a block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id
* @example getBlock() will default to `/main/chains/block/head?version=0` which shows { kind: endorsement }
* @example getBlock({ block: 'head~2', version: 1 }) will return an offset of 2 from head blocks and shows { kind: attestation }
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id
* @example getBlock() will default to `/main/chains/block/head?version=1` which shows { kind: attestation }
* @example getBlock({ block: 'head~2', version: 0 }) will return an offset of 2 from head blocks and shows { kind: endorsement }
* @example getBlock({ block: 'BL8fTiWcSxWCjiMVnDkbh6EuhqVPZzgWheJ2dqwrxYRm9AephXh~2' }) will return an offset of 2 blocks from given block hash..

@@ -412,3 +510,3 @@ */

* @description The whole block header
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-header
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-header
*/

@@ -427,3 +525,3 @@ getBlockHeader({ block } = rpc_client_interface_1.defaultRPCOptions) {

* @description All the metadata associated to the block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-metadata
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-metadata
*/

@@ -446,3 +544,3 @@ getBlockMetadata({ block, version, } = rpc_client_interface_1.defaultRPCOptions) {

* @description Retrieves the list of delegates allowed to bake a block.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-baking-rights
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -463,3 +561,3 @@ getBakingRights(args = {}, { block } = rpc_client_interface_1.defaultRPCOptions) {

* @description Retrieves the delegates allowed to attest a block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-endorsing-rights
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -477,22 +575,5 @@ getAttestationRights(args = {}, { block } = rpc_client_interface_1.defaultRPCOptions) {

/**
* @deprecated Deprecated in favor of getAttestationRights
* @param args contains optional query arguments (level, cycle, delegate, and consensus_key)
* @param options contains generic configuration for rpc calls
* @description Retrieves the delegates allowed to endorse a block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-endorsing-rights
*/
getEndorsingRights(args = {}, { block } = rpc_client_interface_1.defaultRPCOptions) {
return __awaiter(this, void 0, void 0, function* () {
const response = yield this.httpBackend.createRequest({
url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/endorsing_rights`),
method: 'GET',
query: args,
});
return response;
});
}
/**
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Ballots casted so far during a voting period
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-ballot-list
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-ballot-list
*/

@@ -511,3 +592,3 @@ getBallotList({ block } = rpc_client_interface_1.defaultRPCOptions) {

* @description Sum of ballots casted so far during a voting period
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-ballots
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-ballots
*/

@@ -527,3 +608,3 @@ getBallots({ block } = rpc_client_interface_1.defaultRPCOptions) {

* @description Current proposal under evaluation.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-proposal
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-proposal
*/

@@ -542,3 +623,3 @@ getCurrentProposal({ block, } = rpc_client_interface_1.defaultRPCOptions) {

* @description Current expected quorum.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-quorum
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-quorum
*/

@@ -557,3 +638,3 @@ getCurrentQuorum({ block, } = rpc_client_interface_1.defaultRPCOptions) {

* @description List of delegates with their voting power
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-listings
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-listings
*/

@@ -578,3 +659,3 @@ getVotesListings({ block, } = rpc_client_interface_1.defaultRPCOptions) {

* @description List of proposals with number of supporters
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-proposals
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-proposals
*/

@@ -597,3 +678,3 @@ getProposals({ block } = rpc_client_interface_1.defaultRPCOptions) {

* @description Forge an operation returning the unsigned bytes
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-forge-operations
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -611,3 +692,3 @@ forgeOperations(data, { block } = rpc_client_interface_1.defaultRPCOptions) {

* @description Inject an operation in node and broadcast it and return the ID of the operation
* @see https://tezos.gitlab.io/api/rpc.html#post-injection-operation
* @see https://tezos.gitlab.io/shell/rpc.html#post-injection-operation
*/

@@ -626,3 +707,3 @@ injectOperation(signedOpBytes) {

* @description Simulate the application of the operations with the context of the given block and return the result of each operation application
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-preapply-operations
* @see https://tezos.gitlab.io/active/rpc.html#post-block-id-helpers-preapply-operations
*/

@@ -645,3 +726,3 @@ preapplyOperations(ops, { block, version } = rpc_client_interface_1.defaultRPCOptions) {

* @description Return the list of entrypoints of the contract
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-entrypoints
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-entrypoints
* @version 005_PsBABY5H

@@ -664,3 +745,3 @@ */

* @description Run an operation with the context of the given block and without signature checks and return the operation application result, including the consumed gas.
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-operation
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -683,3 +764,3 @@ runOperation(op, { block, version } = rpc_client_interface_1.defaultRPCOptions) {

* @description Simulate running an operation at some future moment (based on the number of blocks given in the `latency` argument), and return the operation application result.
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/oxford-openapi.json
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -702,3 +783,3 @@ simulateOperation(op, { block, version } = rpc_client_interface_1.defaultRPCOptions) {

* @description Run a Michelson script in the current context
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-code
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -718,2 +799,3 @@ runCode(code, { block } = rpc_client_interface_1.defaultRPCOptions) {

* @description Simulate a call to a michelson view
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -733,3 +815,4 @@ runScriptView(_a, _b) {

* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Simulate a call to a view following the TZIP-4 standard. See https://gitlab.com/tzip/tzip/-/blob/master/proposals/tzip-4/tzip-4.md#view-entrypoints.
* @description Simulate a call to a view following the TZIP-4 standard.
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -763,3 +846,3 @@ runView(_a, _b) {

* @example packData({ data: { string: "test" }, type: { prim: "string" } })
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-pack-data
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -790,3 +873,3 @@ packData(data, { block } = rpc_client_interface_1.defaultRPCOptions) {

* @description Returns the voting period (index, kind, starting position) and related information (position, remaining) of the interrogated block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-period
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-period
*/

@@ -806,3 +889,3 @@ getCurrentPeriod({ block, } = rpc_client_interface_1.defaultRPCOptions) {

* @example getSuccessorPeriod() will default to successor voting period for /main/chains/block/head.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-successor-period
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-successor-period
*/

@@ -863,3 +946,3 @@ getSuccessorPeriod({ block, } = rpc_client_interface_1.defaultRPCOptions) {

* @description Access the used storage space of the contract
* @see https://tezos.gitlab.io/lima/rpc.html#get-block-id-context-contracts-contract-id-storage
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -877,4 +960,4 @@ getStorageUsedSpace(contract, { block } = rpc_client_interface_1.defaultRPCOptions) {

* @param options contains generic configuration for rpc calls to specified block (default to head)
= * @description Access the paid storage space of the contract
* @see https://tezos.gitlab.io/lima/rpc.html#get-block-id-context-contracts-contract-id-storage
* @description Access the paid storage space of the contract
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -920,6 +1003,19 @@ getStoragePaidSpace(contract, { block } = rpc_client_interface_1.defaultRPCOptions) {

/**
* @description Returns the cycle at which the launch of the Adaptive Issuance feature is set to happen. A result of null means that the feature is not yet set to launch.
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-adaptive-issuance-launch-cycle
*/
getAdaptiveIssuanceLaunchCycle({ block, } = rpc_client_interface_1.defaultRPCOptions) {
return __awaiter(this, void 0, void 0, function* () {
return this.httpBackend.createRequest({
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/adaptive_issuance_launch_cycle`),
method: 'GET',
});
});
}
/**
* @description List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint)
* @param args has 5 optional properties. We support version 1 as default will output { applied: { kind: endorsement} } version 2 will output { validated: { kind: attestation} }. The rest of the properties is to filter pending operations response
* @default args { version: '1', applied: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined }
* @see https://tezos.gitlab.io/CHANGES.html?highlight=pending_operations#id4
* @param args has 5 optional properties. We support version 1 & 2
* @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined }
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-mempool-openapi-rc.json
*/

@@ -926,0 +1022,0 @@ getPendingOperations(args = {}) {

@@ -54,2 +54,3 @@ "use strict";

SmartRollupRefuteRevealProofKind["DAL_PAGE_PROOF"] = "dal_page_proof";
SmartRollupRefuteRevealProofKind["DAL_PARAMETERS_PROOF"] = "dal_parameters_proof";
})(SmartRollupRefuteRevealProofKind || (exports.SmartRollupRefuteRevealProofKind = SmartRollupRefuteRevealProofKind = {}));

@@ -56,0 +57,0 @@ var SmartRollupRefuteGameStatusOptions;

@@ -6,4 +6,4 @@ "use strict";

exports.VERSION = {
"commitHash": "2e05f6f865be17a1b367b284542b24ffa9823271",
"version": "19.2.1"
"commitHash": "8e07853b62879d06b02ba80c84004fb591452edb",
"version": "20.0.0-RC.0"
};

@@ -14,4 +14,4 @@ export declare enum OpKind {

DOUBLE_PREENDORSEMENT_EVIDENCE = "double_preendorsement_evidence",
ATTESTATION_WITH_SLOT = "attestation_with_slot",
ENDORSEMENT_WITH_SLOT = "endorsement_with_slot",
ATTESTATION_WITH_DAL = "attestation_with_dal",
ENDORSEMENT_WITH_DAL = "endorsement_with_dal",
SEED_NONCE_REVELATION = "seed_nonce_revelation",

@@ -39,3 +39,4 @@ DOUBLE_ATTESTATION_EVIDENCE = "double_attestation_evidence",

SMART_ROLLUP_REFUTE = "smart_rollup_refute",
SMART_ROLLUP_TIMEOUT = "smart_rollup_timeout"
SMART_ROLLUP_TIMEOUT = "smart_rollup_timeout",
DAL_PUBLISH_COMMITMENT = "dal_publish_commitment"
}
import { BigNumber } from 'bignumber.js';
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EndorsingRightsQueryArguments, EndorsingRightsResponse, 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 } 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 } from './types';
export interface RPCOptions {

@@ -13,2 +13,7 @@ block: string;

getBalance(address: string, options?: RPCOptions): Promise<BalanceResponse>;
getFullBalance(address: string, options?: RPCOptions): Promise<BalanceResponse>;
getStakedBalance(address: string, options?: RPCOptions): Promise<BalanceResponse>;
getUnstakedFinalizableBalance(address: string, options?: RPCOptions): Promise<BalanceResponse>;
getUnstakedFrozenBalance(address: string, options?: RPCOptions): Promise<BalanceResponse>;
getUnstakeRequests(address: string, options?: RPCOptions): Promise<UnstakeRequestsResponse>;
getStorage(address: string, options?: RPCOptions): Promise<StorageResponse>;

@@ -30,3 +35,2 @@ getScript(address: string, options?: RPCOptions): Promise<ScriptResponse>;

getAttestationRights(args: AttestationRightsQueryArguments, options?: RPCOptions): Promise<AttestationRightsResponse>;
getEndorsingRights(args: EndorsingRightsQueryArguments, options?: RPCOptions): Promise<EndorsingRightsResponse>;
getBallotList(options?: RPCOptions): Promise<BallotListResponse>;

@@ -62,2 +66,3 @@ getBallots(options?: RPCOptions): Promise<BallotsResponse>;

getAllTicketBalances(contract: string, options?: RPCOptions): Promise<AllTicketBalances>;
getAdaptiveIssuanceLaunchCycle(options?: RPCOptions): Promise<AILaunchCycleResponse>;
getPendingOperations(args: PendingOperationsQueryArguments): Promise<PendingOperationsV1 | PendingOperationsV2>;

@@ -76,2 +81,7 @@ }

GET_BALANCE = "getBalance",
GET_FULL_BALANCE = "getFullBalance",
GET_STAKED_BALANCE = "getStakedBalance",
GET_UNSTAKED_FINALIZABLE_BALANCE = "getUnstakedFinalizableBalance",
GET_UNSTAKED_FROZEN_BALANCE = "getUnstakedFrozenBalance",
GET_UNSTAKE_REQUESTS = "getUnstakeRequests",
GET_CHAIN_ID = "getChainId",

@@ -87,3 +97,2 @@ GET_CONSTANTS = "getConstants",

GET_ATTESTATION_RIGHTS = "getAttestationRights",
GET_ENDORSING_RIGHTS = "getEndorsingRights",
GET_ENTRYPOINTS = "getEntrypoints",

@@ -106,3 +115,4 @@ GET_LIVE_BLOCKS = "getLiveBlocks",

GET_ALL_TICKET_BALANCES = "getAllTicketBalances",
GET_ADAPTIVE_ISSUANCE_LAUNCH_CYCLE = "getAdaptiveIssuanceLaunchCycle",
GET_PENDING_OPERATIONS = "getPendingOperations"
}
import BigNumber from 'bignumber.js';
import { RpcClientInterface, RPCOptions } from '../rpc-client-interface';
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, VotingInfoResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EndorsingRightsQueryArguments, EndorsingRightsResponse, 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 } 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 } from '../types';
interface CachedDataInterface {

@@ -41,3 +41,3 @@ [key: string]: {

* @description Get the block's hash, its unique identifier.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-hash
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-hash
*/

@@ -48,3 +48,3 @@ getBlockHash({ block }?: RPCOptions): Promise<string>;

* @description List the ancestors of the given block which, if referred to as the branch in an operation header, are recent enough for that operation to be included in the current block.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-live-blocks
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-live-blocks
*/

@@ -56,10 +56,45 @@ getLiveBlocks({ block }?: RPCOptions): Promise<string[]>;

* @description Access the spendable balance of a contract, excluding frozen bonds
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-balance
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-balance
*/
getBalance(address: string, { block }?: RPCOptions): Promise<BalanceResponse>;
/**
* @param address address from which we want to retrieve the full balance
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the full balance of a contract, including frozen bonds and stake.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-full-balance
*/
getFullBalance(address: string, { block }?: RPCOptions): Promise<BalanceResponse>;
/**
* @param address address from which we want to retrieve the staked balance
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the staked balance of a contract. Returns None if the contract is originated, or neither delegated nor a delegate.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-staked-balance
*/
getStakedBalance(address: string, { block }?: RPCOptions): Promise<BalanceResponse>;
/**
* @param address address from which we want to retrieve the unstaked finalizable balance
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the balance of a contract that was requested for an unstake operation, and is no longer frozen, which means it will appear in the spendable balance of the contract after any stake/unstake/finalize_unstake operation. Returns None if the contract is originated.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstaked-finalizable-balance
*/
getUnstakedFinalizableBalance(address: string, { block }?: RPCOptions): Promise<BalanceResponse>;
/**
* @param address address from which we want to retrieve the unstaked frozen balance
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the balance of a contract that was requested for an unstake operation, but is still frozen for the duration of the slashing period. Returns None if the contract is originated.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstaked-frozen-balance
*/
getUnstakedFrozenBalance(address: string, { block }?: RPCOptions): Promise<BalanceResponse>;
/**
* @param address address from which we want to retrieve the unstake requests
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the unstake requests of the contract. The requests that appear in the finalizable field can be finalized, which means that the contract can transfer these (no longer frozen) funds to their spendable balance with a [finalize_unstake] operation call. Returns null if there is no unstake request pending.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstake-requests
*/
getUnstakeRequests(address: string, { block }?: RPCOptions): Promise<UnstakeRequestsResponse>;
/**
* @param address contract address from which we want to retrieve the storage
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the data of the contract.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-storage
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-storage
*/

@@ -73,3 +108,3 @@ getStorage(address: string, { block }?: {

* @description Access the code and data of the contract.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-script
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-script
*/

@@ -92,3 +127,3 @@ getScript(address: string, { block }?: {

* @description Access the complete status of a contract.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id
*/

@@ -102,3 +137,3 @@ getContract(address: string, { block }?: {

* @description Access the manager of an implicit contract
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-manager-key
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-manager-key
*/

@@ -112,3 +147,3 @@ getManagerKey(address: string, { block }?: {

* @description Access the delegate of a contract, if any
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-delegate
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-delegate
*/

@@ -123,3 +158,3 @@ getDelegate(address: string, { block }?: {

* @description Access the value associated with a key in the big map storage of the contract.
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-context-contracts-contract-id-big-map-get
* @see https://tezos.gitlab.io/active/rpc.html#post-block-id-context-contracts-contract-id-big-map-get
*/

@@ -134,3 +169,3 @@ getBigMapKey(address: string, key: BigMapKey, { block }?: {

* @description Access the value associated with a key in a big map.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr
*/

@@ -144,3 +179,3 @@ getBigMapExpr(id: string, expr: string, { block }?: {

* @description Everything about a delegate
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-delegates-pkh
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh
*/

@@ -162,3 +197,3 @@ getDelegates(address: string, { block }?: {

* @description All constants
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-constants
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-constants
*/

@@ -169,3 +204,3 @@ getConstants({ block }?: RPCOptions): Promise<ConstantsResponse>;

* @description All the information about a block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id
* @example getBlock() will default to `/main/chains/block/head?version=0` which shows { kind: endorsement }

@@ -179,3 +214,3 @@ * @example getBlock({ block: 'head~2', version: 1 }) will return an offset of 2 from head blocks and shows { kind: attestation }

* @description The whole block header
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-header
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-header
*/

@@ -186,3 +221,3 @@ getBlockHeader({ block }?: RPCOptions): Promise<BlockHeaderResponse>;

* @description All the metadata associated to the block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-metadata
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-metadata
*/

@@ -194,3 +229,3 @@ getBlockMetadata({ block }?: RPCOptions): Promise<BlockMetadata>;

* @description Retrieves the list of delegates allowed to bake a block.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-baking-rights
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -202,17 +237,9 @@ getBakingRights(args?: BakingRightsQueryArguments, { block }?: RPCOptions): Promise<BakingRightsResponse>;

* @description Retrieves the delegates allowed to attest a block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-endorsing-rights
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/
getAttestationRights(args?: AttestationRightsQueryArguments, { block }?: RPCOptions): Promise<AttestationRightsResponse>;
/**
* @deprecated Deprecated in favor of getAttestationRights
* @param args contains optional query arguments (level, cycle, delegate, and consensus_key)
* @param options contains generic configuration for rpc calls
* @description Retrieves the delegates allowed to endorse a block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-endorsing-rights
*/
getEndorsingRights(args?: EndorsingRightsQueryArguments, { block }?: RPCOptions): Promise<EndorsingRightsResponse>;
/**
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Ballots casted so far during a voting period
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-ballot-list
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-ballot-list
*/

@@ -223,3 +250,3 @@ getBallotList({ block }?: RPCOptions): Promise<BallotListResponse>;

* @description Sum of ballots casted so far during a voting period
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-ballots
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-ballots
*/

@@ -230,3 +257,3 @@ getBallots({ block }?: RPCOptions): Promise<BallotsResponse>;

* @description Current proposal under evaluation.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-proposal
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-proposal
*/

@@ -237,3 +264,3 @@ getCurrentProposal({ block, }?: RPCOptions): Promise<CurrentProposalResponse>;

* @description Current expected quorum.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-quorum
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-quorum
*/

@@ -244,3 +271,3 @@ getCurrentQuorum({ block, }?: RPCOptions): Promise<CurrentQuorumResponse>;

* @description List of delegates with their voting power
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-listings
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-listings
*/

@@ -251,3 +278,3 @@ getVotesListings({ block, }?: RPCOptions): Promise<VotesListingsResponse>;

* @description List of proposals with number of supporters
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-proposals
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-proposals
*/

@@ -259,3 +286,3 @@ getProposals({ block }?: RPCOptions): Promise<ProposalsResponse>;

* @description Forge an operation returning the unsigned bytes
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-forge-operations
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -266,3 +293,3 @@ forgeOperations(data: ForgeOperationsParams, { block }?: RPCOptions): Promise<string>;

* @description Inject an operation in node and broadcast it and return the ID of the operation
* @see https://tezos.gitlab.io/api/rpc.html#post-injection-operation
* @see https://tezos.gitlab.io/shell/rpc.html#post-injection-operation
*/

@@ -274,3 +301,3 @@ injectOperation(signedOpBytes: string): Promise<OperationHash>;

* @description Simulate the application of the operations with the context of the given block and return the result of each operation application
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-preapply-operations
* @see https://tezos.gitlab.io/active/rpc.html#post-block-id-helpers-preapply-operations
*/

@@ -282,3 +309,3 @@ preapplyOperations(ops: PreapplyParams, { block }?: RPCOptions): Promise<PreapplyResponse[]>;

* @description Return the list of entrypoints of the contract
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-entrypoints
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-entrypoints
* @version 005_PsBABY5H

@@ -292,3 +319,3 @@ */

* @description Run an operation with the context of the given block and without signature checks and return the operation application result, including the consumed gas.
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-operation
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -300,3 +327,3 @@ runOperation(op: RPCRunOperationParam, { block }?: RPCOptions): Promise<PreapplyResponse>;

* @description Simulate running an operation at some future moment (based on the number of blocks given in the `latency` argument), and return the operation application result.
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/oxford-openapi.json
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -308,3 +335,3 @@ simulateOperation(op: RPCSimulateOperationParam, { block }?: RPCOptions): Promise<PreapplyResponse>;

* @description Run a Michelson script in the current context
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-code
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -316,2 +343,3 @@ runCode(code: RPCRunCodeParam, { block }?: RPCOptions): Promise<RunCodeResult>;

* @description Simulate a call to a michelson view
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -322,3 +350,4 @@ runScriptView({ unparsing_mode, ...rest }: RPCRunScriptViewParam, { block }?: RPCOptions): Promise<RunScriptViewResult>;

* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Simulate a call to a view following the TZIP-4 standard. See https://gitlab.com/tzip/tzip/-/blob/master/proposals/tzip-4/tzip-4.md#view-entrypoints.
* @description Simulate a call to a view following the TZIP-4 standard.
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -336,3 +365,3 @@ runView({ unparsing_mode, ...rest }: RPCRunViewParam, { block }?: RPCOptions): Promise<RunViewResult>;

* @example packData({ data: { string: "test" }, type: { prim: "string" } })
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-pack-data
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -351,3 +380,3 @@ packData(data: PackDataParams, { block }?: RPCOptions): Promise<{

* @description Returns the voting period (index, kind, starting position) and related information (position, remaining) of the interrogated block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-period
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-period
*/

@@ -359,3 +388,3 @@ getCurrentPeriod({ block, }?: RPCOptions): Promise<VotingPeriodBlockResult>;

* @example getSuccessorPeriod() will default to successor voting period for /main/chains/block/head.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-successor-period
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-successor-period
*/

@@ -393,3 +422,3 @@ getSuccessorPeriod({ block, }?: RPCOptions): Promise<VotingPeriodBlockResult>;

* @description Access the used storage space of the contract
* @see https://tezos.gitlab.io/lima/rpc.html#get-block-id-context-contracts-contract-id-storage
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -403,3 +432,3 @@ getStorageUsedSpace(contract: string, { block }?: {

= * @description Access the paid storage space of the contract
* @see https://tezos.gitlab.io/lima/rpc.html#get-block-id-context-contracts-contract-id-storage
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -415,3 +444,3 @@ getStoragePaidSpace(contract: string, { block }?: {

* @example ticket { ticketer: 'address', content_type: { prim: "string" }, content: { string: 'ticket1' } }
* @see https://tezos.gitlab.io/protocols/016_mumbai.html#rpc-changes
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -423,10 +452,15 @@ getTicketBalance(contract: string, ticket: TicketTokenParams, { block }?: RPCOptions): Promise<string>;

* @description Access the complete list of tickets owned by the given contract by scanning the contract's storage.
* @see https://tezos.gitlab.io/protocols/016_mumbai.html#rpc-changes
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/
getAllTicketBalances(contract: string, { block }?: RPCOptions): Promise<AllTicketBalances>;
/**
* @description Returns the cycle at which the launch of the Adaptive Issuance feature is set to happen. A result of null means that the feature is not yet set to launch.
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-adaptive-issuance-launch-cycle
*/
getAdaptiveIssuanceLaunchCycle({ block, }?: RPCOptions): Promise<AILaunchCycleResponse>;
/**
* @description List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint)
* @param args has 5 optional properties. We support version 1 as default will output { applied: { kind: endorsement} } version 2 will output { validated: { kind: attestation} }. The rest of the properties is to filter pending operations response
* @default args { version: '1', applied: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined }
* @see https://tezos.gitlab.io/CHANGES.html?highlight=pending_operations#id4
* @param args has 5 optional properties. We support version 1 & 2
* @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined }
*/

@@ -433,0 +467,0 @@ getPendingOperations(args?: PendingOperationsQueryArguments): Promise<PendingOperationsV1 | PendingOperationsV2>;

@@ -8,3 +8,3 @@ /**

import { RpcClientInterface, RPCOptions } from './rpc-client-interface';
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, VotingInfoResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EndorsingRightsQueryArguments, EndorsingRightsResponse, 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 } 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 } from './types';
export { castToBigNumber } from './utils/utils';

@@ -39,3 +39,3 @@ export { RPCOptions, defaultChain, defaultRPCOptions, RpcClientInterface, } from './rpc-client-interface';

* @description Get the block's hash, its unique identifier.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-hash
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-hash
*/

@@ -46,3 +46,3 @@ getBlockHash({ block }?: RPCOptions): Promise<string>;

* @description List the ancestors of the given block which, if referred to as the branch in an operation header, are recent enough for that operation to be included in the current block.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-live-blocks
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-live-blocks
*/

@@ -54,10 +54,45 @@ getLiveBlocks({ block }?: RPCOptions): Promise<string[]>;

* @description Access the spendable balance of a contract, excluding frozen bonds
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-balance
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-balance
*/
getBalance(address: string, { block }?: RPCOptions): Promise<BalanceResponse>;
/**
* @param address address from which we want to retrieve the full balance
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the full balance of a contract, including frozen bonds and stake.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-full-balance
*/
getFullBalance(address: string, { block }?: RPCOptions): Promise<BalanceResponse>;
/**
* @param address address from which we want to retrieve the staked balance
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the staked balance of a contract. Returns None if the contract is originated, or neither delegated nor a delegate.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-staked-balance
*/
getStakedBalance(address: string, { block }?: RPCOptions): Promise<BalanceResponse>;
/**
* @param address address from which we want to retrieve the unstaked finalizable balance
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the balance of a contract that was requested for an unstake operation, and is no longer frozen, which means it will appear in the spendable balance of the contract after any stake/unstake/finalize_unstake operation. Returns None if the contract is originated.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstaked-finalizable-balance
*/
getUnstakedFinalizableBalance(address: string, { block }?: RPCOptions): Promise<BalanceResponse>;
/**
* @param address address from which we want to retrieve the unstaked frozen balance
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the balance of a contract that was requested for an unstake operation, but is still frozen for the duration of the slashing period. Returns None if the contract is originated.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstaked-frozen-balance
*/
getUnstakedFrozenBalance(address: string, { block }?: RPCOptions): Promise<BalanceResponse>;
/**
* @param address address from which we want to retrieve the unstaked requests
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the unstake requests of the contract. The requests that appear in the finalizable field can be finalized, which means that the contract can transfer these (no longer frozen) funds to their spendable balance with a [finalize_unstake] operation call. Returns null if there is no unstake request pending.
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstake-requests
*/
getUnstakeRequests(address: string, { block }?: RPCOptions): Promise<UnstakeRequestsResponse>;
/**
* @param address contract address from which we want to retrieve the storage
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Access the data of the contract.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-storage
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-storage
*/

@@ -71,3 +106,3 @@ getStorage(address: string, { block }?: {

* @description Access the code and data of the contract.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-script
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-script
*/

@@ -90,3 +125,3 @@ getScript(address: string, { block }?: {

* @description Access the complete status of a contract.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id
*/

@@ -100,3 +135,3 @@ getContract(address: string, { block }?: {

* @description Access the manager of an implicit contract
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-manager-key
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-manager-key
*/

@@ -110,3 +145,3 @@ getManagerKey(address: string, { block }?: {

* @description Access the delegate of a contract, if any
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-delegate
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-delegate
*/

@@ -121,3 +156,3 @@ getDelegate(address: string, { block }?: {

* @description Access the value associated with a key in the big map storage of the contract.
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-context-contracts-contract-id-big-map-get
* @see https://tezos.gitlab.io/active/rpc.html#post-block-id-context-contracts-contract-id-big-map-get
*/

@@ -132,3 +167,3 @@ getBigMapKey(address: string, key: BigMapKey, { block }?: {

* @description Access the value associated with a key in a big map.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr
*/

@@ -142,3 +177,3 @@ getBigMapExpr(id: string, expr: string, { block }?: {

* @description Everything about a delegate
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-delegates-pkh
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh
*/

@@ -160,3 +195,3 @@ getDelegates(address: string, { block }?: {

* @description All constants
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-constants
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-constants
*/

@@ -167,5 +202,5 @@ getConstants({ block }?: RPCOptions): Promise<ConstantsResponse>;

* @description All the information about a block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id
* @example getBlock() will default to `/main/chains/block/head?version=0` which shows { kind: endorsement }
* @example getBlock({ block: 'head~2', version: 1 }) will return an offset of 2 from head blocks and shows { kind: attestation }
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id
* @example getBlock() will default to `/main/chains/block/head?version=1` which shows { kind: attestation }
* @example getBlock({ block: 'head~2', version: 0 }) will return an offset of 2 from head blocks and shows { kind: endorsement }
* @example getBlock({ block: 'BL8fTiWcSxWCjiMVnDkbh6EuhqVPZzgWheJ2dqwrxYRm9AephXh~2' }) will return an offset of 2 blocks from given block hash..

@@ -177,3 +212,3 @@ */

* @description The whole block header
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-header
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-header
*/

@@ -184,3 +219,3 @@ getBlockHeader({ block }?: RPCOptions): Promise<BlockHeaderResponse>;

* @description All the metadata associated to the block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-metadata
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-metadata
*/

@@ -192,3 +227,3 @@ getBlockMetadata({ block, version, }?: RPCOptions): Promise<BlockMetadata>;

* @description Retrieves the list of delegates allowed to bake a block.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-baking-rights
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -200,17 +235,9 @@ getBakingRights(args?: BakingRightsQueryArguments, { block }?: RPCOptions): Promise<BakingRightsResponse>;

* @description Retrieves the delegates allowed to attest a block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-endorsing-rights
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/
getAttestationRights(args?: AttestationRightsQueryArguments, { block }?: RPCOptions): Promise<AttestationRightsResponse>;
/**
* @deprecated Deprecated in favor of getAttestationRights
* @param args contains optional query arguments (level, cycle, delegate, and consensus_key)
* @param options contains generic configuration for rpc calls
* @description Retrieves the delegates allowed to endorse a block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-endorsing-rights
*/
getEndorsingRights(args?: EndorsingRightsQueryArguments, { block }?: RPCOptions): Promise<EndorsingRightsResponse>;
/**
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Ballots casted so far during a voting period
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-ballot-list
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-ballot-list
*/

@@ -221,3 +248,3 @@ getBallotList({ block }?: RPCOptions): Promise<BallotListResponse>;

* @description Sum of ballots casted so far during a voting period
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-ballots
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-ballots
*/

@@ -228,3 +255,3 @@ getBallots({ block }?: RPCOptions): Promise<BallotsResponse>;

* @description Current proposal under evaluation.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-proposal
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-proposal
*/

@@ -235,3 +262,3 @@ getCurrentProposal({ block, }?: RPCOptions): Promise<CurrentProposalResponse>;

* @description Current expected quorum.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-quorum
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-quorum
*/

@@ -242,3 +269,3 @@ getCurrentQuorum({ block, }?: RPCOptions): Promise<CurrentQuorumResponse>;

* @description List of delegates with their voting power
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-listings
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-listings
*/

@@ -249,3 +276,3 @@ getVotesListings({ block, }?: RPCOptions): Promise<VotesListingsResponse>;

* @description List of proposals with number of supporters
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-proposals
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-proposals
*/

@@ -257,3 +284,3 @@ getProposals({ block }?: RPCOptions): Promise<ProposalsResponse>;

* @description Forge an operation returning the unsigned bytes
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-forge-operations
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -264,3 +291,3 @@ forgeOperations(data: ForgeOperationsParams, { block }?: RPCOptions): Promise<string>;

* @description Inject an operation in node and broadcast it and return the ID of the operation
* @see https://tezos.gitlab.io/api/rpc.html#post-injection-operation
* @see https://tezos.gitlab.io/shell/rpc.html#post-injection-operation
*/

@@ -272,3 +299,3 @@ injectOperation(signedOpBytes: string): Promise<OperationHash>;

* @description Simulate the application of the operations with the context of the given block and return the result of each operation application
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-preapply-operations
* @see https://tezos.gitlab.io/active/rpc.html#post-block-id-helpers-preapply-operations
*/

@@ -280,3 +307,3 @@ preapplyOperations(ops: PreapplyParams, { block, version }?: RPCOptions): Promise<PreapplyResponse[]>;

* @description Return the list of entrypoints of the contract
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-entrypoints
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-entrypoints
* @version 005_PsBABY5H

@@ -290,3 +317,3 @@ */

* @description Run an operation with the context of the given block and without signature checks and return the operation application result, including the consumed gas.
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-operation
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -298,3 +325,3 @@ runOperation(op: RPCRunOperationParam, { block, version }?: RPCOptions): Promise<PreapplyResponse>;

* @description Simulate running an operation at some future moment (based on the number of blocks given in the `latency` argument), and return the operation application result.
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/oxford-openapi.json
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -306,3 +333,3 @@ simulateOperation(op: RPCSimulateOperationParam, { block, version }?: RPCOptions): Promise<PreapplyResponse>;

* @description Run a Michelson script in the current context
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-code
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -314,2 +341,3 @@ runCode(code: RPCRunCodeParam, { block }?: RPCOptions): Promise<RunCodeResult>;

* @description Simulate a call to a michelson view
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -320,3 +348,4 @@ runScriptView({ unparsing_mode, ...rest }: RPCRunScriptViewParam, { block }?: RPCOptions): Promise<RunScriptViewResult>;

* @param options contains generic configuration for rpc calls to specified block (default to head)
* @description Simulate a call to a view following the TZIP-4 standard. See https://gitlab.com/tzip/tzip/-/blob/master/proposals/tzip-4/tzip-4.md#view-entrypoints.
* @description Simulate a call to a view following the TZIP-4 standard.
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -334,3 +363,3 @@ runView({ unparsing_mode, ...rest }: RPCRunViewParam, { block }?: RPCOptions): Promise<RunViewResult>;

* @example packData({ data: { string: "test" }, type: { prim: "string" } })
* @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-pack-data
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -349,3 +378,3 @@ packData(data: PackDataParams, { block }?: RPCOptions): Promise<{

* @description Returns the voting period (index, kind, starting position) and related information (position, remaining) of the interrogated block
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-period
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-period
*/

@@ -357,3 +386,3 @@ getCurrentPeriod({ block, }?: RPCOptions): Promise<VotingPeriodBlockResult>;

* @example getSuccessorPeriod() will default to successor voting period for /main/chains/block/head.
* @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-successor-period
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-successor-period
*/

@@ -391,3 +420,3 @@ getSuccessorPeriod({ block, }?: RPCOptions): Promise<VotingPeriodBlockResult>;

* @description Access the used storage space of the contract
* @see https://tezos.gitlab.io/lima/rpc.html#get-block-id-context-contracts-contract-id-storage
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -400,4 +429,4 @@ getStorageUsedSpace(contract: string, { block }?: {

* @param options contains generic configuration for rpc calls to specified block (default to head)
= * @description Access the paid storage space of the contract
* @see https://tezos.gitlab.io/lima/rpc.html#get-block-id-context-contracts-contract-id-storage
* @description Access the paid storage space of the contract
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
*/

@@ -428,8 +457,16 @@ getStoragePaidSpace(contract: string, { block }?: {

/**
* @description Returns the cycle at which the launch of the Adaptive Issuance feature is set to happen. A result of null means that the feature is not yet set to launch.
* @param options contains generic configuration for rpc calls to specified block (default to head)
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-adaptive-issuance-launch-cycle
*/
getAdaptiveIssuanceLaunchCycle({ block, }?: {
block: string;
}): Promise<AILaunchCycleResponse>;
/**
* @description List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint)
* @param args has 5 optional properties. We support version 1 as default will output { applied: { kind: endorsement} } version 2 will output { validated: { kind: attestation} }. The rest of the properties is to filter pending operations response
* @default args { version: '1', applied: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined }
* @see https://tezos.gitlab.io/CHANGES.html?highlight=pending_operations#id4
* @param args has 5 optional properties. We support version 1 & 2
* @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined }
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-mempool-openapi-rc.json
*/
getPendingOperations(args?: PendingOperationsQueryArguments): Promise<PendingOperationsV1 | PendingOperationsV2>;
}
{
"name": "@taquito/rpc",
"version": "19.2.1",
"version": "20.0.0-RC.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": "^19.2.1",
"@taquito/http-utils": "^19.2.1",
"@taquito/utils": "^19.2.1",
"@taquito/core": "^20.0.0-RC.0",
"@taquito/http-utils": "^20.0.0-RC.0",
"@taquito/utils": "^20.0.0-RC.0",
"bignumber.js": "^9.1.2"

@@ -102,3 +102,3 @@ },

},
"gitHead": "3b9dbecb374ffd8136f494ae0817b2d1d530f8d9"
"gitHead": "35bba2dcede224a126fd82e28c441756a5b962e6"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc