@taquito/rpc 10.1.0-methodsObject.0 → 10.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -94,7 +94,7 @@ var RpcClient = /** @class */ (function () {
94
94
  * @param httpBackend Http backend that issue http request.
95
95
  * You can override it by providing your own if you which to hook in the request/response
96
96
  *
97
- * @example new RpcClient('https://api.tez.ie/rpc/mainnet', 'main') this will use https://api.tez.ie/rpc/mainnet/chains/main
97
+ * @example new RpcClient('https://mainnet.api.tez.ie/', 'main') this will use https://mainnet.api.tez.ie//chains/main
98
98
  */
99
99
  function RpcClient(url, chain, httpBackend) {
100
100
  if (chain === void 0) { chain = defaultChain; }
@@ -4,8 +4,8 @@ exports.VERSION = void 0;
4
4
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
5
5
  /* tslint:disable */
6
6
  exports.VERSION = {
7
- "commitHash": "a84011c75c8868b4484afc2bf8347ce3d28cf6da",
8
- "version": "10.1.0-methodsObject.0"
7
+ "commitHash": "eb5b2c4973cd11098b68ce62eb6702dea376e569",
8
+ "version": "10.1.1"
9
9
  };
10
10
  /* tslint:enable */
11
11
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;;AACA,2EAA2E;AAC3E,oBAAoB;AACP,QAAA,OAAO,GAAG;IACnB,YAAY,EAAE,0CAA0C;IACxD,SAAS,EAAE,wBAAwB;CACtC,CAAC;AACF,mBAAmB"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;;AACA,2EAA2E;AAC3E,oBAAoB;AACP,QAAA,OAAO,GAAG;IACnB,YAAY,EAAE,0CAA0C;IACxD,SAAS,EAAE,QAAQ;CACtB,CAAC;AACF,mBAAmB"}
@@ -131,8 +131,8 @@ var OpKind;
131
131
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
132
132
  /* tslint:disable */
133
133
  var VERSION = {
134
- "commitHash": "a84011c75c8868b4484afc2bf8347ce3d28cf6da",
135
- "version": "10.1.0-methodsObject.0"
134
+ "commitHash": "eb5b2c4973cd11098b68ce62eb6702dea376e569",
135
+ "version": "10.1.1"
136
136
  };
137
137
  /* tslint:enable */
138
138
 
@@ -149,7 +149,7 @@ var RpcClient = /** @class */ (function () {
149
149
  * @param httpBackend Http backend that issue http request.
150
150
  * You can override it by providing your own if you which to hook in the request/response
151
151
  *
152
- * @example new RpcClient('https://api.tez.ie/rpc/mainnet', 'main') this will use https://api.tez.ie/rpc/mainnet/chains/main
152
+ * @example new RpcClient('https://mainnet.api.tez.ie/', 'main') this will use https://mainnet.api.tez.ie//chains/main
153
153
  */
154
154
  function RpcClient(url, chain, httpBackend) {
155
155
  if (chain === void 0) { chain = defaultChain; }
@@ -1 +1 @@
1
- {"version":3,"file":"taquito-rpc.es5.js","sources":["../src/utils/utils.ts","../src/opkind.ts","../src/version.ts","../src/taquito-rpc.ts"],"sourcesContent":["const getByPath = require('lodash/get');\nconst setByPath = require('lodash/set');\nimport BigNumber from 'bignumber.js';\n\n/**\n * Casts object/array items to BigNumber\n * keys support lodash path notation\n * @param data input object or array\n * @param keys keys for processing or all items if not defined\n *\n * @see https://lodash.com/docs/#get\n *\n */\nexport function castToBigNumber(data: any, keys?: any): object {\n const returnArray: boolean = Array.isArray(data);\n if (typeof keys === 'undefined') {\n keys = Object.keys(data);\n }\n let response: any = returnArray ? [] : {};\n\n keys.forEach((key: any) => {\n const item = getByPath(data, key);\n let res: any;\n if (typeof item === 'undefined') {\n return;\n }\n\n if (Array.isArray(item)) {\n res = castToBigNumber(item);\n setByPath(response, key, res);\n return;\n }\n\n res = new BigNumber(item);\n setByPath(response, key, res);\n });\n\n return response;\n}\n\n/**\n * Casts object/array BigNumber items to strings for readability\n * @param data input object or array\n * @param keys keys for processing or all items if not defined\n *\n */\nexport function castToString(data: any, keys?: any): object {\n const returnArray: boolean = Array.isArray(data);\n if (typeof keys === 'undefined') {\n keys = Object.keys(data);\n }\n let response: any = returnArray ? [] : {};\n\n keys.forEach((key: any) => {\n const item = data[key];\n\n if (typeof item === 'undefined') {\n return;\n }\n\n if (Array.isArray(item)) {\n response[key] = castToString(item);\n return;\n }\n\n if (!BigNumber.isBigNumber(item)) {\n response[key] = item;\n return;\n }\n\n response[key] = item.toString();\n });\n\n return response;\n}\n","export enum OpKind {\n ORIGINATION = 'origination',\n DELEGATION = 'delegation',\n REVEAL = 'reveal',\n TRANSACTION = 'transaction',\n ACTIVATION = 'activate_account',\n ENDORSEMENT = 'endorsement',\n ENDORSEMENT_WITH_SLOT = 'endorsement_with_slot',\n SEED_NONCE_REVELATION = 'seed_nonce_revelation',\n DOUBLE_ENDORSEMENT_EVIDENCE = 'double_endorsement_evidence',\n DOUBLE_BAKING_EVIDENCE = 'double_baking_evidence',\n PROPOSALS = 'proposals',\n BALLOT = 'ballot',\n FAILING_NOOP = 'failing_noop'\n}\n","\n// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!\n/* tslint:disable */\nexport const VERSION = {\n \"commitHash\": \"a84011c75c8868b4484afc2bf8347ce3d28cf6da\",\n \"version\": \"10.1.0-methodsObject.0\"\n};\n/* tslint:enable */\n","/**\n * @packageDocumentation\n * @module @taquito/rpc\n */\nimport { HttpBackend, HttpResponseError, STATUS_CODE } from '@taquito/http-utils';\nimport BigNumber from 'bignumber.js';\nimport {\n BakingRightsQueryArguments,\n BakingRightsResponse,\n BalanceResponse,\n BallotListResponse,\n BallotsResponse,\n BigMapGetResponse,\n BigMapKey,\n BigMapResponse,\n BlockHeaderResponse,\n BlockMetadata,\n BlockResponse,\n ConstantsResponse,\n ContractResponse,\n CurrentProposalResponse,\n CurrentQuorumResponse,\n DelegateResponse,\n DelegatesResponse,\n EndorsingRightsQueryArguments,\n EndorsingRightsResponse,\n EntrypointsResponse,\n ForgeOperationsParams,\n ManagerKeyResponse,\n OperationHash,\n PackDataParams,\n PackDataResponse,\n PeriodKindResponse,\n PreapplyParams,\n PreapplyResponse,\n ProposalsResponse,\n RawBlockHeaderResponse,\n RPCRunCodeParam,\n RPCRunOperationParam,\n RunCodeResult,\n SaplingDiffResponse,\n ScriptResponse,\n StorageResponse,\n VotesListingsResponse,\n VotingPeriodBlockResult,\n} from './types';\nimport { castToBigNumber } from './utils/utils';\n\nexport * from './types';\n\nexport { OpKind } from './opkind';\n\nexport { VERSION } from './version';\n\nconst defaultChain = 'main';\n\ninterface RPCOptions {\n block: string;\n}\n\nconst defaultRPCOptions: RPCOptions = { block: 'head' };\n\n/***\n * @description RpcClient allows interaction with Tezos network through an rpc node\n */\nexport class RpcClient {\n /**\n *\n * @param url rpc root url\n * @param chain chain (default main)\n * @param httpBackend Http backend that issue http request.\n * You can override it by providing your own if you which to hook in the request/response\n *\n * @example new RpcClient('https://api.tez.ie/rpc/mainnet', 'main') this will use https://api.tez.ie/rpc/mainnet/chains/main\n */\n constructor(\n protected url: string,\n protected chain: string = defaultChain,\n protected httpBackend: HttpBackend = new HttpBackend()\n ) {}\n\n private createURL(path: string) {\n // Trim trailing slashes because it is assumed to be included in path\n return `${this.url.replace(/\\/+$/g, '')}${path}`;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Get the block's hash, its unique identifier.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-hash\n */\n async getBlockHash({ block }: RPCOptions = defaultRPCOptions): Promise<string> {\n const hash = await this.httpBackend.createRequest<string>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/hash`),\n method: 'GET',\n });\n return hash;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @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.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-live-blocks\n */\n async getLiveBlocks({ block }: RPCOptions = defaultRPCOptions): Promise<string[]> {\n const blocks = await this.httpBackend.createRequest<string[]>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/live_blocks`),\n method: 'GET',\n });\n return blocks;\n }\n\n /**\n *\n * @param address address from which we want to retrieve the balance\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the balance of a contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-balance\n */\n async getBalance(\n address: string,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<BalanceResponse> {\n const balance = await this.httpBackend.createRequest<BalanceResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/balance`\n ),\n method: 'GET',\n });\n return new BigNumber(balance);\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the storage\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the data of the contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-storage\n */\n async getStorage(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<StorageResponse> {\n return this.httpBackend.createRequest<StorageResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/storage`\n ),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the script\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the code and data of the contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-script\n */\n async getScript(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<ScriptResponse> {\n return this.httpBackend.createRequest<ScriptResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/script`\n ),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the complete status of a contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id\n */\n async getContract(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<ContractResponse> {\n const contractResponse = await this.httpBackend.createRequest<ContractResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/contracts/${address}`),\n method: 'GET',\n });\n return {\n ...contractResponse,\n balance: new BigNumber(contractResponse.balance),\n };\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the manager\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the manager key of a contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-manager-key\n */\n async getManagerKey(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<ManagerKeyResponse> {\n return this.httpBackend.createRequest<ManagerKeyResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/manager_key`\n ),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the delegate (baker)\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the delegate of a contract, if any.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-delegate\n */\n async getDelegate(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<DelegateResponse> {\n let delegate: DelegateResponse;\n try {\n delegate = await this.httpBackend.createRequest<DelegateResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/delegate`\n ),\n method: 'GET',\n });\n } catch (ex) {\n if (ex instanceof HttpResponseError && ex.status === STATUS_CODE.NOT_FOUND) {\n delegate = null;\n } else {\n throw ex;\n }\n }\n return delegate;\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the big map key\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the value associated with a key in the big map storage of the contract.\n *\n * @deprecated Deprecated in favor of getBigMapKeyByID\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-context-contracts-contract-id-big-map-get\n */\n async getBigMapKey(\n address: string,\n key: BigMapKey,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<BigMapGetResponse> {\n return this.httpBackend.createRequest<BigMapGetResponse>(\n {\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/big_map_get`\n ),\n method: 'POST',\n },\n key\n );\n }\n\n /**\n *\n * @param id Big Map ID\n * @param expr Expression hash to query (A b58check encoded Blake2b hash of the expression (The expression can be packed using the pack_data method))\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the value associated with a key in a big map.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr\n */\n async getBigMapExpr(\n id: string,\n expr: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<BigMapResponse> {\n return this.httpBackend.createRequest<BigMapResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/big_maps/${id}/${expr}`),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param address delegate address which we want to retrieve\n * @param options contains generic configuration for rpc calls\n *\n * @description Fetches information about a delegate from RPC.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-delegates-pkh\n */\n async getDelegates(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<DelegatesResponse> {\n const response = await this.httpBackend.createRequest<DelegatesResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/delegates/${address}`),\n method: 'GET',\n });\n\n return {\n deactivated: response.deactivated,\n balance: new BigNumber(response.balance),\n frozen_balance: new BigNumber(response.frozen_balance),\n frozen_balance_by_cycle: response.frozen_balance_by_cycle.map(\n ({ deposit, deposits, fees, rewards, ...rest }) => {\n const castedToBigNumber: any = castToBigNumber({ deposit, deposits, fees, rewards }, [\n 'deposit',\n 'deposits',\n 'fees',\n 'rewards'\n ]);\n return {\n ...rest,\n deposit: castedToBigNumber.deposit,\n deposits: castedToBigNumber.deposits,\n fees: castedToBigNumber.fees,\n rewards: castedToBigNumber.rewards,\n }\n }\n ),\n staking_balance: new BigNumber(response.staking_balance),\n delegated_contracts: response.delegated_contracts,\n delegated_balance: new BigNumber(response.delegated_balance),\n grace_period: response.grace_period,\n voting_power: response.voting_power\n };\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description All constants\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-constants\n */\n async getConstants({ block }: RPCOptions = defaultRPCOptions): Promise<ConstantsResponse> {\n const response = await this.httpBackend.createRequest<ConstantsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/constants`),\n method: 'GET',\n });\n\n const castedResponse: any = castToBigNumber(response, [\n 'time_between_blocks',\n 'hard_gas_limit_per_operation',\n 'hard_gas_limit_per_block',\n 'proof_of_work_threshold',\n 'tokens_per_roll',\n 'seed_nonce_revelation_tip',\n 'block_security_deposit',\n 'endorsement_security_deposit',\n 'block_reward',\n 'endorsement_reward',\n 'cost_per_byte',\n 'hard_storage_limit_per_operation',\n 'test_chain_duration',\n 'baking_reward_per_endorsement', \n 'delay_per_missing_endorsement',\n 'minimal_block_delay',\n 'liquidity_baking_subsidy'\n ]);\n\n return {\n ...response,\n ...(castedResponse as ConstantsResponse),\n };\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls. See examples for various available sytaxes.\n *\n * @description All the information about a block\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id\n * @example getBlock() will default to /main/chains/block/head.\n * @example getBlock({ block: head~2 }) will return an offset of 2 blocks.\n * @example getBlock({ block: BL8fTiWcSxWCjiMVnDkbh6EuhqVPZzgWheJ2dqwrxYRm9AephXh~2 }) will return an offset of 2 blocks from given block hash..\n */\n async getBlock({ block }: RPCOptions = defaultRPCOptions): Promise<BlockResponse> {\n const response = await this.httpBackend.createRequest<BlockResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description The whole block header\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-header\n */\n async getBlockHeader({ block }: RPCOptions = defaultRPCOptions): Promise<BlockHeaderResponse> {\n const response = await this.httpBackend.createRequest<RawBlockHeaderResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/header`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description All the metadata associated to the block\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-metadata\n */\n async getBlockMetadata({ block }: RPCOptions = defaultRPCOptions): Promise<BlockMetadata> {\n const response = await this.httpBackend.createRequest<BlockMetadata>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/metadata`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param args contains optional query arguments\n * @param options contains generic configuration for rpc calls\n *\n * @description Retrieves the list of delegates allowed to bake a block.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-baking-rights\n */\n async getBakingRights(\n args: BakingRightsQueryArguments = {},\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<BakingRightsResponse> {\n const response = await this.httpBackend.createRequest<BakingRightsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/baking_rights`),\n method: 'GET',\n query: args,\n });\n\n return response;\n }\n\n /**\n *\n * @param args contains optional query arguments\n * @param options contains generic configuration for rpc calls\n *\n * @description Retrieves the list of delegates allowed to bake a block.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-endorsing-rights\n */\n async getEndorsingRights(\n args: EndorsingRightsQueryArguments = {},\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<EndorsingRightsResponse> {\n const response = await this.httpBackend.createRequest<EndorsingRightsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/endorsing_rights`),\n method: 'GET',\n query: args,\n });\n\n return response;\n }\n\n /**\n * @param options contains generic configuration for rpc calls\n *\n * @description Ballots casted so far during a voting period\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-ballot-list\n */\n async getBallotList({ block }: RPCOptions = defaultRPCOptions): Promise<BallotListResponse> {\n const response = await this.httpBackend.createRequest<BallotListResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/ballot_list`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Sum of ballots casted so far during a voting period.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-ballots\n */\n async getBallots({ block }: RPCOptions = defaultRPCOptions): Promise<BallotsResponse> {\n const response = await this.httpBackend.createRequest<BallotsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/ballots`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Current period kind.\n *\n * @deprecated Deprecated in favor of getCurrentPeriod\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-period-kind\n */\n async getCurrentPeriodKind({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<PeriodKindResponse> {\n const response = await this.httpBackend.createRequest<PeriodKindResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/current_period_kind`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Current proposal under evaluation.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-proposal\n */\n async getCurrentProposal({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<CurrentProposalResponse> {\n const response = await this.httpBackend.createRequest<CurrentProposalResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/current_proposal`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Current expected quorum.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-quorum\n */\n async getCurrentQuorum({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<CurrentQuorumResponse> {\n const response = await this.httpBackend.createRequest<CurrentQuorumResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/current_quorum`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description List of delegates with their voting weight, in number of rolls.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-listings\n */\n async getVotesListings({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<VotesListingsResponse> {\n const response = await this.httpBackend.createRequest<VotesListingsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/listings`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description List of proposals with number of supporters.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-proposals\n */\n async getProposals({ block }: RPCOptions = defaultRPCOptions): Promise<ProposalsResponse> {\n const response = await this.httpBackend.createRequest<ProposalsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/proposals`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param data operation contents to forge\n * @param options contains generic configuration for rpc calls\n *\n * @description Forge an operation returning the unsigned bytes\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-forge-operations\n */\n async forgeOperations(\n data: ForgeOperationsParams,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<string> {\n return this.httpBackend.createRequest<string>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/forge/operations`),\n method: 'POST',\n },\n data\n );\n }\n\n /**\n *\n * @param signedOpBytes signed bytes to inject\n *\n * @description Inject an operation in node and broadcast it. Returns the ID of the operation. The `signedOperationContents` should be constructed using a contextual RPCs from the latest block and signed by the client. By default, the RPC will wait for the operation to be (pre-)validated before answering. See RPCs under /blocks/prevalidation for more details on the prevalidation context.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-injection-operation\n */\n async injectOperation(signedOpBytes: string): Promise<OperationHash> {\n return this.httpBackend.createRequest<any>(\n {\n url: this.createURL(`/injection/operation`),\n method: 'POST',\n },\n signedOpBytes\n );\n }\n\n /**\n *\n * @param ops Operations to apply\n * @param options contains generic configuration for rpc calls\n *\n * @description Simulate the validation of an operation\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-preapply-operations\n */\n async preapplyOperations(\n ops: PreapplyParams,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<PreapplyResponse[]> {\n const response = await this.httpBackend.createRequest<PreapplyResponse[]>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/preapply/operations`),\n method: 'POST',\n },\n ops\n );\n\n return response;\n }\n\n /**\n *\n * @param contract address of the contract we want to get the entrypoints of\n *\n * @description Return the list of entrypoints of the contract\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-entrypoints\n *\n * @version 005_PsBABY5H\n */\n async getEntrypoints(\n contract: string,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<EntrypointsResponse> {\n const contractResponse = await this.httpBackend.createRequest<{\n entrypoints: { [key: string]: Object };\n }>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${contract}/entrypoints`\n ),\n method: 'GET',\n });\n\n return contractResponse;\n }\n\n /**\n * @param op Operation to run\n * @param options contains generic configuration for rpc calls\n *\n * @description Run an operation without signature checks\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-operation\n */\n async runOperation(\n op: RPCRunOperationParam,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<PreapplyResponse> {\n const response = await this.httpBackend.createRequest<any>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/scripts/run_operation`),\n method: 'POST',\n },\n op\n );\n\n return response;\n }\n\n /**\n * @param code Code to run\n * @param options contains generic configuration for rpc calls\n *\n * @description Run a piece of code in the current context\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-code\n */\n async runCode(\n code: RPCRunCodeParam,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<RunCodeResult> {\n const response = await this.httpBackend.createRequest<any>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/scripts/run_code`),\n method: 'POST',\n },\n code\n );\n\n return response;\n }\n\n async getChainId() {\n return this.httpBackend.createRequest<string>({\n url: this.createURL(`/chains/${this.chain}/chain_id`),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param data Data to pack\n * @param options contains generic configuration for rpc calls\n *\n * @description Computes the serialized version of a data expression using the same algorithm as script instruction PACK\n *\n * @example packData({ data: { string: \"test\" }, type: { prim: \"string\" } })\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-pack-data\n */\n async packData(data: PackDataParams, { block }: RPCOptions = defaultRPCOptions) {\n const { gas, ...rest } = await this.httpBackend.createRequest<PackDataResponse>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/scripts/pack_data`),\n method: 'POST',\n },\n data\n );\n\n let formattedGas = gas;\n const tryBigNumber = new BigNumber(gas || '');\n if (!tryBigNumber.isNaN()) {\n formattedGas = tryBigNumber;\n }\n\n return { gas: formattedGas, ...rest };\n }\n\n /**\n *\n * @description Return rpc root url\n */\n\n getRpcUrl() {\n return this.url;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Voting period of current block.\n *\n * @example getCurrentPeriod() will default to current voting period for /main/chains/block/head.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-period\n */\n async getCurrentPeriod({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<VotingPeriodBlockResult> {\n const response = await this.httpBackend.createRequest<VotingPeriodBlockResult>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/current_period`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Voting period of next block.\n *\n * @example getSuccessorPeriod() will default to successor voting period for /main/chains/block/head.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-successor-period\n */\n async getSuccessorPeriod({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<VotingPeriodBlockResult> {\n const response = await this.httpBackend.createRequest<VotingPeriodBlockResult>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/successor_period`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param id Sapling state ID\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the value associated with a sapling state ID.\n *\n * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-sapling-sapling-state-id-get-diff\n */\n async getSaplingDiffById(\n id: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<SaplingDiffResponse> {\n return this.httpBackend.createRequest<SaplingDiffResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/sapling/${id}/get_diff`),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param contract address of the contract we want to get the sapling diff\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the value associated with a sapling state.\n *\n * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-single-sapling-get-diff\n */\n async getSaplingDiffByContract(\n contract: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<SaplingDiffResponse> {\n return this.httpBackend.createRequest<SaplingDiffResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/contracts/${contract}/single_sapling_get_diff`),\n method: 'GET',\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACxC,IAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAGxC;;;;;;;;;SASgB,eAAe,CAAC,IAAS,EAAE,IAAU;IACnD,IAAM,WAAW,GAAY,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,C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gBAAC;AAAD,CAAC;;;;"}
1
+ {"version":3,"file":"taquito-rpc.es5.js","sources":["../src/utils/utils.ts","../src/opkind.ts","../src/version.ts","../src/taquito-rpc.ts"],"sourcesContent":["const getByPath = require('lodash/get');\nconst setByPath = require('lodash/set');\nimport BigNumber from 'bignumber.js';\n\n/**\n * Casts object/array items to BigNumber\n * keys support lodash path notation\n * @param data input object or array\n * @param keys keys for processing or all items if not defined\n *\n * @see https://lodash.com/docs/#get\n *\n */\nexport function castToBigNumber(data: any, keys?: any): object {\n const returnArray: boolean = Array.isArray(data);\n if (typeof keys === 'undefined') {\n keys = Object.keys(data);\n }\n let response: any = returnArray ? [] : {};\n\n keys.forEach((key: any) => {\n const item = getByPath(data, key);\n let res: any;\n if (typeof item === 'undefined') {\n return;\n }\n\n if (Array.isArray(item)) {\n res = castToBigNumber(item);\n setByPath(response, key, res);\n return;\n }\n\n res = new BigNumber(item);\n setByPath(response, key, res);\n });\n\n return response;\n}\n\n/**\n * Casts object/array BigNumber items to strings for readability\n * @param data input object or array\n * @param keys keys for processing or all items if not defined\n *\n */\nexport function castToString(data: any, keys?: any): object {\n const returnArray: boolean = Array.isArray(data);\n if (typeof keys === 'undefined') {\n keys = Object.keys(data);\n }\n let response: any = returnArray ? [] : {};\n\n keys.forEach((key: any) => {\n const item = data[key];\n\n if (typeof item === 'undefined') {\n return;\n }\n\n if (Array.isArray(item)) {\n response[key] = castToString(item);\n return;\n }\n\n if (!BigNumber.isBigNumber(item)) {\n response[key] = item;\n return;\n }\n\n response[key] = item.toString();\n });\n\n return response;\n}\n","export enum OpKind {\n ORIGINATION = 'origination',\n DELEGATION = 'delegation',\n REVEAL = 'reveal',\n TRANSACTION = 'transaction',\n ACTIVATION = 'activate_account',\n ENDORSEMENT = 'endorsement',\n ENDORSEMENT_WITH_SLOT = 'endorsement_with_slot',\n SEED_NONCE_REVELATION = 'seed_nonce_revelation',\n DOUBLE_ENDORSEMENT_EVIDENCE = 'double_endorsement_evidence',\n DOUBLE_BAKING_EVIDENCE = 'double_baking_evidence',\n PROPOSALS = 'proposals',\n BALLOT = 'ballot',\n FAILING_NOOP = 'failing_noop'\n}\n","\n// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!\n/* tslint:disable */\nexport const VERSION = {\n \"commitHash\": \"eb5b2c4973cd11098b68ce62eb6702dea376e569\",\n \"version\": \"10.1.1\"\n};\n/* tslint:enable */\n","/**\n * @packageDocumentation\n * @module @taquito/rpc\n */\nimport { HttpBackend, HttpResponseError, STATUS_CODE } from '@taquito/http-utils';\nimport BigNumber from 'bignumber.js';\nimport {\n BakingRightsQueryArguments,\n BakingRightsResponse,\n BalanceResponse,\n BallotListResponse,\n BallotsResponse,\n BigMapGetResponse,\n BigMapKey,\n BigMapResponse,\n BlockHeaderResponse,\n BlockMetadata,\n BlockResponse,\n ConstantsResponse,\n ContractResponse,\n CurrentProposalResponse,\n CurrentQuorumResponse,\n DelegateResponse,\n DelegatesResponse,\n EndorsingRightsQueryArguments,\n EndorsingRightsResponse,\n EntrypointsResponse,\n ForgeOperationsParams,\n ManagerKeyResponse,\n OperationHash,\n PackDataParams,\n PackDataResponse,\n PeriodKindResponse,\n PreapplyParams,\n PreapplyResponse,\n ProposalsResponse,\n RawBlockHeaderResponse,\n RPCRunCodeParam,\n RPCRunOperationParam,\n RunCodeResult,\n SaplingDiffResponse,\n ScriptResponse,\n StorageResponse,\n VotesListingsResponse,\n VotingPeriodBlockResult,\n} from './types';\nimport { castToBigNumber } from './utils/utils';\n\nexport * from './types';\n\nexport { OpKind } from './opkind';\n\nexport { VERSION } from './version';\n\nconst defaultChain = 'main';\n\ninterface RPCOptions {\n block: string;\n}\n\nconst defaultRPCOptions: RPCOptions = { block: 'head' };\n\n/***\n * @description RpcClient allows interaction with Tezos network through an rpc node\n */\nexport class RpcClient {\n /**\n *\n * @param url rpc root url\n * @param chain chain (default main)\n * @param httpBackend Http backend that issue http request.\n * You can override it by providing your own if you which to hook in the request/response\n *\n * @example new RpcClient('https://mainnet.api.tez.ie/', 'main') this will use https://mainnet.api.tez.ie//chains/main\n */\n constructor(\n protected url: string,\n protected chain: string = defaultChain,\n protected httpBackend: HttpBackend = new HttpBackend()\n ) {}\n\n private createURL(path: string) {\n // Trim trailing slashes because it is assumed to be included in path\n return `${this.url.replace(/\\/+$/g, '')}${path}`;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Get the block's hash, its unique identifier.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-hash\n */\n async getBlockHash({ block }: RPCOptions = defaultRPCOptions): Promise<string> {\n const hash = await this.httpBackend.createRequest<string>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/hash`),\n method: 'GET',\n });\n return hash;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @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.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-live-blocks\n */\n async getLiveBlocks({ block }: RPCOptions = defaultRPCOptions): Promise<string[]> {\n const blocks = await this.httpBackend.createRequest<string[]>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/live_blocks`),\n method: 'GET',\n });\n return blocks;\n }\n\n /**\n *\n * @param address address from which we want to retrieve the balance\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the balance of a contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-balance\n */\n async getBalance(\n address: string,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<BalanceResponse> {\n const balance = await this.httpBackend.createRequest<BalanceResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/balance`\n ),\n method: 'GET',\n });\n return new BigNumber(balance);\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the storage\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the data of the contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-storage\n */\n async getStorage(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<StorageResponse> {\n return this.httpBackend.createRequest<StorageResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/storage`\n ),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the script\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the code and data of the contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-script\n */\n async getScript(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<ScriptResponse> {\n return this.httpBackend.createRequest<ScriptResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/script`\n ),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the complete status of a contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id\n */\n async getContract(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<ContractResponse> {\n const contractResponse = await this.httpBackend.createRequest<ContractResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/contracts/${address}`),\n method: 'GET',\n });\n return {\n ...contractResponse,\n balance: new BigNumber(contractResponse.balance),\n };\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the manager\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the manager key of a contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-manager-key\n */\n async getManagerKey(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<ManagerKeyResponse> {\n return this.httpBackend.createRequest<ManagerKeyResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/manager_key`\n ),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the delegate (baker)\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the delegate of a contract, if any.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-delegate\n */\n async getDelegate(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<DelegateResponse> {\n let delegate: DelegateResponse;\n try {\n delegate = await this.httpBackend.createRequest<DelegateResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/delegate`\n ),\n method: 'GET',\n });\n } catch (ex) {\n if (ex instanceof HttpResponseError && ex.status === STATUS_CODE.NOT_FOUND) {\n delegate = null;\n } else {\n throw ex;\n }\n }\n return delegate;\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the big map key\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the value associated with a key in the big map storage of the contract.\n *\n * @deprecated Deprecated in favor of getBigMapKeyByID\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-context-contracts-contract-id-big-map-get\n */\n async getBigMapKey(\n address: string,\n key: BigMapKey,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<BigMapGetResponse> {\n return this.httpBackend.createRequest<BigMapGetResponse>(\n {\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/big_map_get`\n ),\n method: 'POST',\n },\n key\n );\n }\n\n /**\n *\n * @param id Big Map ID\n * @param expr Expression hash to query (A b58check encoded Blake2b hash of the expression (The expression can be packed using the pack_data method))\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the value associated with a key in a big map.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr\n */\n async getBigMapExpr(\n id: string,\n expr: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<BigMapResponse> {\n return this.httpBackend.createRequest<BigMapResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/big_maps/${id}/${expr}`),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param address delegate address which we want to retrieve\n * @param options contains generic configuration for rpc calls\n *\n * @description Fetches information about a delegate from RPC.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-delegates-pkh\n */\n async getDelegates(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<DelegatesResponse> {\n const response = await this.httpBackend.createRequest<DelegatesResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/delegates/${address}`),\n method: 'GET',\n });\n\n return {\n deactivated: response.deactivated,\n balance: new BigNumber(response.balance),\n frozen_balance: new BigNumber(response.frozen_balance),\n frozen_balance_by_cycle: response.frozen_balance_by_cycle.map(\n ({ deposit, deposits, fees, rewards, ...rest }) => {\n const castedToBigNumber: any = castToBigNumber({ deposit, deposits, fees, rewards }, [\n 'deposit',\n 'deposits',\n 'fees',\n 'rewards'\n ]);\n return {\n ...rest,\n deposit: castedToBigNumber.deposit,\n deposits: castedToBigNumber.deposits,\n fees: castedToBigNumber.fees,\n rewards: castedToBigNumber.rewards,\n }\n }\n ),\n staking_balance: new BigNumber(response.staking_balance),\n delegated_contracts: response.delegated_contracts,\n delegated_balance: new BigNumber(response.delegated_balance),\n grace_period: response.grace_period,\n voting_power: response.voting_power\n };\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description All constants\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-constants\n */\n async getConstants({ block }: RPCOptions = defaultRPCOptions): Promise<ConstantsResponse> {\n const response = await this.httpBackend.createRequest<ConstantsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/constants`),\n method: 'GET',\n });\n\n const castedResponse: any = castToBigNumber(response, [\n 'time_between_blocks',\n 'hard_gas_limit_per_operation',\n 'hard_gas_limit_per_block',\n 'proof_of_work_threshold',\n 'tokens_per_roll',\n 'seed_nonce_revelation_tip',\n 'block_security_deposit',\n 'endorsement_security_deposit',\n 'block_reward',\n 'endorsement_reward',\n 'cost_per_byte',\n 'hard_storage_limit_per_operation',\n 'test_chain_duration',\n 'baking_reward_per_endorsement', \n 'delay_per_missing_endorsement',\n 'minimal_block_delay',\n 'liquidity_baking_subsidy'\n ]);\n\n return {\n ...response,\n ...(castedResponse as ConstantsResponse),\n };\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls. See examples for various available sytaxes.\n *\n * @description All the information about a block\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id\n * @example getBlock() will default to /main/chains/block/head.\n * @example getBlock({ block: head~2 }) will return an offset of 2 blocks.\n * @example getBlock({ block: BL8fTiWcSxWCjiMVnDkbh6EuhqVPZzgWheJ2dqwrxYRm9AephXh~2 }) will return an offset of 2 blocks from given block hash..\n */\n async getBlock({ block }: RPCOptions = defaultRPCOptions): Promise<BlockResponse> {\n const response = await this.httpBackend.createRequest<BlockResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description The whole block header\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-header\n */\n async getBlockHeader({ block }: RPCOptions = defaultRPCOptions): Promise<BlockHeaderResponse> {\n const response = await this.httpBackend.createRequest<RawBlockHeaderResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/header`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description All the metadata associated to the block\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-metadata\n */\n async getBlockMetadata({ block }: RPCOptions = defaultRPCOptions): Promise<BlockMetadata> {\n const response = await this.httpBackend.createRequest<BlockMetadata>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/metadata`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param args contains optional query arguments\n * @param options contains generic configuration for rpc calls\n *\n * @description Retrieves the list of delegates allowed to bake a block.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-baking-rights\n */\n async getBakingRights(\n args: BakingRightsQueryArguments = {},\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<BakingRightsResponse> {\n const response = await this.httpBackend.createRequest<BakingRightsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/baking_rights`),\n method: 'GET',\n query: args,\n });\n\n return response;\n }\n\n /**\n *\n * @param args contains optional query arguments\n * @param options contains generic configuration for rpc calls\n *\n * @description Retrieves the list of delegates allowed to bake a block.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-endorsing-rights\n */\n async getEndorsingRights(\n args: EndorsingRightsQueryArguments = {},\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<EndorsingRightsResponse> {\n const response = await this.httpBackend.createRequest<EndorsingRightsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/endorsing_rights`),\n method: 'GET',\n query: args,\n });\n\n return response;\n }\n\n /**\n * @param options contains generic configuration for rpc calls\n *\n * @description Ballots casted so far during a voting period\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-ballot-list\n */\n async getBallotList({ block }: RPCOptions = defaultRPCOptions): Promise<BallotListResponse> {\n const response = await this.httpBackend.createRequest<BallotListResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/ballot_list`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Sum of ballots casted so far during a voting period.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-ballots\n */\n async getBallots({ block }: RPCOptions = defaultRPCOptions): Promise<BallotsResponse> {\n const response = await this.httpBackend.createRequest<BallotsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/ballots`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Current period kind.\n *\n * @deprecated Deprecated in favor of getCurrentPeriod\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-period-kind\n */\n async getCurrentPeriodKind({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<PeriodKindResponse> {\n const response = await this.httpBackend.createRequest<PeriodKindResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/current_period_kind`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Current proposal under evaluation.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-proposal\n */\n async getCurrentProposal({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<CurrentProposalResponse> {\n const response = await this.httpBackend.createRequest<CurrentProposalResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/current_proposal`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Current expected quorum.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-quorum\n */\n async getCurrentQuorum({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<CurrentQuorumResponse> {\n const response = await this.httpBackend.createRequest<CurrentQuorumResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/current_quorum`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description List of delegates with their voting weight, in number of rolls.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-listings\n */\n async getVotesListings({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<VotesListingsResponse> {\n const response = await this.httpBackend.createRequest<VotesListingsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/listings`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description List of proposals with number of supporters.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-proposals\n */\n async getProposals({ block }: RPCOptions = defaultRPCOptions): Promise<ProposalsResponse> {\n const response = await this.httpBackend.createRequest<ProposalsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/proposals`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param data operation contents to forge\n * @param options contains generic configuration for rpc calls\n *\n * @description Forge an operation returning the unsigned bytes\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-forge-operations\n */\n async forgeOperations(\n data: ForgeOperationsParams,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<string> {\n return this.httpBackend.createRequest<string>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/forge/operations`),\n method: 'POST',\n },\n data\n );\n }\n\n /**\n *\n * @param signedOpBytes signed bytes to inject\n *\n * @description Inject an operation in node and broadcast it. Returns the ID of the operation. The `signedOperationContents` should be constructed using a contextual RPCs from the latest block and signed by the client. By default, the RPC will wait for the operation to be (pre-)validated before answering. See RPCs under /blocks/prevalidation for more details on the prevalidation context.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-injection-operation\n */\n async injectOperation(signedOpBytes: string): Promise<OperationHash> {\n return this.httpBackend.createRequest<any>(\n {\n url: this.createURL(`/injection/operation`),\n method: 'POST',\n },\n signedOpBytes\n );\n }\n\n /**\n *\n * @param ops Operations to apply\n * @param options contains generic configuration for rpc calls\n *\n * @description Simulate the validation of an operation\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-preapply-operations\n */\n async preapplyOperations(\n ops: PreapplyParams,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<PreapplyResponse[]> {\n const response = await this.httpBackend.createRequest<PreapplyResponse[]>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/preapply/operations`),\n method: 'POST',\n },\n ops\n );\n\n return response;\n }\n\n /**\n *\n * @param contract address of the contract we want to get the entrypoints of\n *\n * @description Return the list of entrypoints of the contract\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-entrypoints\n *\n * @version 005_PsBABY5H\n */\n async getEntrypoints(\n contract: string,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<EntrypointsResponse> {\n const contractResponse = await this.httpBackend.createRequest<{\n entrypoints: { [key: string]: Object };\n }>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${contract}/entrypoints`\n ),\n method: 'GET',\n });\n\n return contractResponse;\n }\n\n /**\n * @param op Operation to run\n * @param options contains generic configuration for rpc calls\n *\n * @description Run an operation without signature checks\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-operation\n */\n async runOperation(\n op: RPCRunOperationParam,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<PreapplyResponse> {\n const response = await this.httpBackend.createRequest<any>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/scripts/run_operation`),\n method: 'POST',\n },\n op\n );\n\n return response;\n }\n\n /**\n * @param code Code to run\n * @param options contains generic configuration for rpc calls\n *\n * @description Run a piece of code in the current context\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-code\n */\n async runCode(\n code: RPCRunCodeParam,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<RunCodeResult> {\n const response = await this.httpBackend.createRequest<any>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/scripts/run_code`),\n method: 'POST',\n },\n code\n );\n\n return response;\n }\n\n async getChainId() {\n return this.httpBackend.createRequest<string>({\n url: this.createURL(`/chains/${this.chain}/chain_id`),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param data Data to pack\n * @param options contains generic configuration for rpc calls\n *\n * @description Computes the serialized version of a data expression using the same algorithm as script instruction PACK\n *\n * @example packData({ data: { string: \"test\" }, type: { prim: \"string\" } })\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-pack-data\n */\n async packData(data: PackDataParams, { block }: RPCOptions = defaultRPCOptions) {\n const { gas, ...rest } = await this.httpBackend.createRequest<PackDataResponse>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/scripts/pack_data`),\n method: 'POST',\n },\n data\n );\n\n let formattedGas = gas;\n const tryBigNumber = new BigNumber(gas || '');\n if (!tryBigNumber.isNaN()) {\n formattedGas = tryBigNumber;\n }\n\n return { gas: formattedGas, ...rest };\n }\n\n /**\n *\n * @description Return rpc root url\n */\n\n getRpcUrl() {\n return this.url;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Voting period of current block.\n *\n * @example getCurrentPeriod() will default to current voting period for /main/chains/block/head.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-period\n */\n async getCurrentPeriod({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<VotingPeriodBlockResult> {\n const response = await this.httpBackend.createRequest<VotingPeriodBlockResult>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/current_period`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Voting period of next block.\n *\n * @example getSuccessorPeriod() will default to successor voting period for /main/chains/block/head.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-successor-period\n */\n async getSuccessorPeriod({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<VotingPeriodBlockResult> {\n const response = await this.httpBackend.createRequest<VotingPeriodBlockResult>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/successor_period`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param id Sapling state ID\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the value associated with a sapling state ID.\n *\n * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-sapling-sapling-state-id-get-diff\n */\n async getSaplingDiffById(\n id: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<SaplingDiffResponse> {\n return this.httpBackend.createRequest<SaplingDiffResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/sapling/${id}/get_diff`),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param contract address of the contract we want to get the sapling diff\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the value associated with a sapling state.\n *\n * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-single-sapling-get-diff\n */\n async getSaplingDiffByContract(\n contract: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<SaplingDiffResponse> {\n return this.httpBackend.createRequest<SaplingDiffResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/contracts/${contract}/single_sapling_get_diff`),\n method: 'GET',\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AACxC,IAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAGxC;;;;;;;;;SASgB,eAAe,CAAC,IAAS,EAAE,IAAU;IACnD,IAAM,WAAW,GAAY,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;QAC/B,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC1B;IACD,IAAI,QAAQ,GAAQ,WAAW,GAAG,EAAE,GAAG,EAAE,CAAC;IAE1C,IAAI,CAAC,OAAO,CAAC,UAAC,GAAQ;QACpB,IAAM,IAAI,GAAG,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAClC,IAAI,GAAQ,CAAC;QACb,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;YAC/B,OAAO;SACR;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACvB,GAAG,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;YAC5B,SAAS,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;YAC9B,OAAO;SACR;QAED,GAAG,GAAG,IAAI,SAAS,C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;;;;;;;;;IAWM,sCAAkB,GAAxB,UACC,EAAU,EACV,EAAgD;YAAhD,qBAA+B,iBAAiB,KAAA,EAA9C,KAAK,WAAA;;;gBAEP,sBAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAsB;wBACzD,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,aAAW,IAAI,CAAC,KAAK,gBAAW,KAAK,yBAAoB,EAAE,cAAW,CAAC;wBAC3F,MAAM,EAAE,KAAK;qBACd,CAAC,EAAC;;;KACJ;;;;;;;;;;IAWM,4CAAwB,GAA9B,UACC,QAAgB,EAChB,EAAgD;YAAhD,qBAA+B,iBAAiB,KAAA,EAA9C,KAAK,WAAA;;;gBAEP,sBAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAsB;wBACzD,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,aAAW,IAAI,CAAC,KAAK,gBAAW,KAAK,2BAAsB,QAAQ,6BAA0B,CAAC;wBAClH,MAAM,EAAE,KAAK;qBACd,CAAC,EAAC;;;KACJ;IACH,gBAAC;AAAD,CAAC;;;;"}
@@ -138,8 +138,8 @@
138
138
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
139
139
  /* tslint:disable */
140
140
  var VERSION = {
141
- "commitHash": "a84011c75c8868b4484afc2bf8347ce3d28cf6da",
142
- "version": "10.1.0-methodsObject.0"
141
+ "commitHash": "eb5b2c4973cd11098b68ce62eb6702dea376e569",
142
+ "version": "10.1.1"
143
143
  };
144
144
  /* tslint:enable */
145
145
 
@@ -156,7 +156,7 @@
156
156
  * @param httpBackend Http backend that issue http request.
157
157
  * You can override it by providing your own if you which to hook in the request/response
158
158
  *
159
- * @example new RpcClient('https://api.tez.ie/rpc/mainnet', 'main') this will use https://api.tez.ie/rpc/mainnet/chains/main
159
+ * @example new RpcClient('https://mainnet.api.tez.ie/', 'main') this will use https://mainnet.api.tez.ie//chains/main
160
160
  */
161
161
  function RpcClient(url, chain, httpBackend) {
162
162
  if (chain === void 0) { chain = defaultChain; }
@@ -1 +1 @@
1
- {"version":3,"file":"taquito-rpc.umd.js","sources":["../src/utils/utils.ts","../src/opkind.ts","../src/version.ts","../src/taquito-rpc.ts"],"sourcesContent":["const getByPath = require('lodash/get');\nconst setByPath = require('lodash/set');\nimport BigNumber from 'bignumber.js';\n\n/**\n * Casts object/array items to BigNumber\n * keys support lodash path notation\n * @param data input object or array\n * @param keys keys for processing or all items if not defined\n *\n * @see https://lodash.com/docs/#get\n *\n */\nexport function castToBigNumber(data: any, keys?: any): object {\n const returnArray: boolean = Array.isArray(data);\n if (typeof keys === 'undefined') {\n keys = Object.keys(data);\n }\n let response: any = returnArray ? [] : {};\n\n keys.forEach((key: any) => {\n const item = getByPath(data, key);\n let res: any;\n if (typeof item === 'undefined') {\n return;\n }\n\n if (Array.isArray(item)) {\n res = castToBigNumber(item);\n setByPath(response, key, res);\n return;\n }\n\n res = new BigNumber(item);\n setByPath(response, key, res);\n });\n\n return response;\n}\n\n/**\n * Casts object/array BigNumber items to strings for readability\n * @param data input object or array\n * @param keys keys for processing or all items if not defined\n *\n */\nexport function castToString(data: any, keys?: any): object {\n const returnArray: boolean = Array.isArray(data);\n if (typeof keys === 'undefined') {\n keys = Object.keys(data);\n }\n let response: any = returnArray ? [] : {};\n\n keys.forEach((key: any) => {\n const item = data[key];\n\n if (typeof item === 'undefined') {\n return;\n }\n\n if (Array.isArray(item)) {\n response[key] = castToString(item);\n return;\n }\n\n if (!BigNumber.isBigNumber(item)) {\n response[key] = item;\n return;\n }\n\n response[key] = item.toString();\n });\n\n return response;\n}\n","export enum OpKind {\n ORIGINATION = 'origination',\n DELEGATION = 'delegation',\n REVEAL = 'reveal',\n TRANSACTION = 'transaction',\n ACTIVATION = 'activate_account',\n ENDORSEMENT = 'endorsement',\n ENDORSEMENT_WITH_SLOT = 'endorsement_with_slot',\n SEED_NONCE_REVELATION = 'seed_nonce_revelation',\n DOUBLE_ENDORSEMENT_EVIDENCE = 'double_endorsement_evidence',\n DOUBLE_BAKING_EVIDENCE = 'double_baking_evidence',\n PROPOSALS = 'proposals',\n BALLOT = 'ballot',\n FAILING_NOOP = 'failing_noop'\n}\n","\n// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!\n/* tslint:disable */\nexport const VERSION = {\n \"commitHash\": \"a84011c75c8868b4484afc2bf8347ce3d28cf6da\",\n \"version\": \"10.1.0-methodsObject.0\"\n};\n/* tslint:enable */\n","/**\n * @packageDocumentation\n * @module @taquito/rpc\n */\nimport { HttpBackend, HttpResponseError, STATUS_CODE } from '@taquito/http-utils';\nimport BigNumber from 'bignumber.js';\nimport {\n BakingRightsQueryArguments,\n BakingRightsResponse,\n BalanceResponse,\n BallotListResponse,\n BallotsResponse,\n BigMapGetResponse,\n BigMapKey,\n BigMapResponse,\n BlockHeaderResponse,\n BlockMetadata,\n BlockResponse,\n ConstantsResponse,\n ContractResponse,\n CurrentProposalResponse,\n CurrentQuorumResponse,\n DelegateResponse,\n DelegatesResponse,\n EndorsingRightsQueryArguments,\n EndorsingRightsResponse,\n EntrypointsResponse,\n ForgeOperationsParams,\n ManagerKeyResponse,\n OperationHash,\n PackDataParams,\n PackDataResponse,\n PeriodKindResponse,\n PreapplyParams,\n PreapplyResponse,\n ProposalsResponse,\n RawBlockHeaderResponse,\n RPCRunCodeParam,\n RPCRunOperationParam,\n RunCodeResult,\n SaplingDiffResponse,\n ScriptResponse,\n StorageResponse,\n VotesListingsResponse,\n VotingPeriodBlockResult,\n} from './types';\nimport { castToBigNumber } from './utils/utils';\n\nexport * from './types';\n\nexport { OpKind } from './opkind';\n\nexport { VERSION } from './version';\n\nconst defaultChain = 'main';\n\ninterface RPCOptions {\n block: string;\n}\n\nconst defaultRPCOptions: RPCOptions = { block: 'head' };\n\n/***\n * @description RpcClient allows interaction with Tezos network through an rpc node\n */\nexport class RpcClient {\n /**\n *\n * @param url rpc root url\n * @param chain chain (default main)\n * @param httpBackend Http backend that issue http request.\n * You can override it by providing your own if you which to hook in the request/response\n *\n * @example new RpcClient('https://api.tez.ie/rpc/mainnet', 'main') this will use https://api.tez.ie/rpc/mainnet/chains/main\n */\n constructor(\n protected url: string,\n protected chain: string = defaultChain,\n protected httpBackend: HttpBackend = new HttpBackend()\n ) {}\n\n private createURL(path: string) {\n // Trim trailing slashes because it is assumed to be included in path\n return `${this.url.replace(/\\/+$/g, '')}${path}`;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Get the block's hash, its unique identifier.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-hash\n */\n async getBlockHash({ block }: RPCOptions = defaultRPCOptions): Promise<string> {\n const hash = await this.httpBackend.createRequest<string>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/hash`),\n method: 'GET',\n });\n return hash;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @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.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-live-blocks\n */\n async getLiveBlocks({ block }: RPCOptions = defaultRPCOptions): Promise<string[]> {\n const blocks = await this.httpBackend.createRequest<string[]>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/live_blocks`),\n method: 'GET',\n });\n return blocks;\n }\n\n /**\n *\n * @param address address from which we want to retrieve the balance\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the balance of a contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-balance\n */\n async getBalance(\n address: string,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<BalanceResponse> {\n const balance = await this.httpBackend.createRequest<BalanceResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/balance`\n ),\n method: 'GET',\n });\n return new BigNumber(balance);\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the storage\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the data of the contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-storage\n */\n async getStorage(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<StorageResponse> {\n return this.httpBackend.createRequest<StorageResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/storage`\n ),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the script\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the code and data of the contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-script\n */\n async getScript(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<ScriptResponse> {\n return this.httpBackend.createRequest<ScriptResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/script`\n ),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the complete status of a contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id\n */\n async getContract(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<ContractResponse> {\n const contractResponse = await this.httpBackend.createRequest<ContractResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/contracts/${address}`),\n method: 'GET',\n });\n return {\n ...contractResponse,\n balance: new BigNumber(contractResponse.balance),\n };\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the manager\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the manager key of a contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-manager-key\n */\n async getManagerKey(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<ManagerKeyResponse> {\n return this.httpBackend.createRequest<ManagerKeyResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/manager_key`\n ),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the delegate (baker)\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the delegate of a contract, if any.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-delegate\n */\n async getDelegate(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<DelegateResponse> {\n let delegate: DelegateResponse;\n try {\n delegate = await this.httpBackend.createRequest<DelegateResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/delegate`\n ),\n method: 'GET',\n });\n } catch (ex) {\n if (ex instanceof HttpResponseError && ex.status === STATUS_CODE.NOT_FOUND) {\n delegate = null;\n } else {\n throw ex;\n }\n }\n return delegate;\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the big map key\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the value associated with a key in the big map storage of the contract.\n *\n * @deprecated Deprecated in favor of getBigMapKeyByID\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-context-contracts-contract-id-big-map-get\n */\n async getBigMapKey(\n address: string,\n key: BigMapKey,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<BigMapGetResponse> {\n return this.httpBackend.createRequest<BigMapGetResponse>(\n {\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/big_map_get`\n ),\n method: 'POST',\n },\n key\n );\n }\n\n /**\n *\n * @param id Big Map ID\n * @param expr Expression hash to query (A b58check encoded Blake2b hash of the expression (The expression can be packed using the pack_data method))\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the value associated with a key in a big map.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr\n */\n async getBigMapExpr(\n id: string,\n expr: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<BigMapResponse> {\n return this.httpBackend.createRequest<BigMapResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/big_maps/${id}/${expr}`),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param address delegate address which we want to retrieve\n * @param options contains generic configuration for rpc calls\n *\n * @description Fetches information about a delegate from RPC.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-delegates-pkh\n */\n async getDelegates(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<DelegatesResponse> {\n const response = await this.httpBackend.createRequest<DelegatesResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/delegates/${address}`),\n method: 'GET',\n });\n\n return {\n deactivated: response.deactivated,\n balance: new BigNumber(response.balance),\n frozen_balance: new BigNumber(response.frozen_balance),\n frozen_balance_by_cycle: response.frozen_balance_by_cycle.map(\n ({ deposit, deposits, fees, rewards, ...rest }) => {\n const castedToBigNumber: any = castToBigNumber({ deposit, deposits, fees, rewards }, [\n 'deposit',\n 'deposits',\n 'fees',\n 'rewards'\n ]);\n return {\n ...rest,\n deposit: castedToBigNumber.deposit,\n deposits: castedToBigNumber.deposits,\n fees: castedToBigNumber.fees,\n rewards: castedToBigNumber.rewards,\n }\n }\n ),\n staking_balance: new BigNumber(response.staking_balance),\n delegated_contracts: response.delegated_contracts,\n delegated_balance: new BigNumber(response.delegated_balance),\n grace_period: response.grace_period,\n voting_power: response.voting_power\n };\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description All constants\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-constants\n */\n async getConstants({ block }: RPCOptions = defaultRPCOptions): Promise<ConstantsResponse> {\n const response = await this.httpBackend.createRequest<ConstantsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/constants`),\n method: 'GET',\n });\n\n const castedResponse: any = castToBigNumber(response, [\n 'time_between_blocks',\n 'hard_gas_limit_per_operation',\n 'hard_gas_limit_per_block',\n 'proof_of_work_threshold',\n 'tokens_per_roll',\n 'seed_nonce_revelation_tip',\n 'block_security_deposit',\n 'endorsement_security_deposit',\n 'block_reward',\n 'endorsement_reward',\n 'cost_per_byte',\n 'hard_storage_limit_per_operation',\n 'test_chain_duration',\n 'baking_reward_per_endorsement', \n 'delay_per_missing_endorsement',\n 'minimal_block_delay',\n 'liquidity_baking_subsidy'\n ]);\n\n return {\n ...response,\n ...(castedResponse as ConstantsResponse),\n };\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls. See examples for various available sytaxes.\n *\n * @description All the information about a block\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id\n * @example getBlock() will default to /main/chains/block/head.\n * @example getBlock({ block: head~2 }) will return an offset of 2 blocks.\n * @example getBlock({ block: BL8fTiWcSxWCjiMVnDkbh6EuhqVPZzgWheJ2dqwrxYRm9AephXh~2 }) will return an offset of 2 blocks from given block hash..\n */\n async getBlock({ block }: RPCOptions = defaultRPCOptions): Promise<BlockResponse> {\n const response = await this.httpBackend.createRequest<BlockResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description The whole block header\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-header\n */\n async getBlockHeader({ block }: RPCOptions = defaultRPCOptions): Promise<BlockHeaderResponse> {\n const response = await this.httpBackend.createRequest<RawBlockHeaderResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/header`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description All the metadata associated to the block\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-metadata\n */\n async getBlockMetadata({ block }: RPCOptions = defaultRPCOptions): Promise<BlockMetadata> {\n const response = await this.httpBackend.createRequest<BlockMetadata>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/metadata`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param args contains optional query arguments\n * @param options contains generic configuration for rpc calls\n *\n * @description Retrieves the list of delegates allowed to bake a block.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-baking-rights\n */\n async getBakingRights(\n args: BakingRightsQueryArguments = {},\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<BakingRightsResponse> {\n const response = await this.httpBackend.createRequest<BakingRightsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/baking_rights`),\n method: 'GET',\n query: args,\n });\n\n return response;\n }\n\n /**\n *\n * @param args contains optional query arguments\n * @param options contains generic configuration for rpc calls\n *\n * @description Retrieves the list of delegates allowed to bake a block.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-endorsing-rights\n */\n async getEndorsingRights(\n args: EndorsingRightsQueryArguments = {},\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<EndorsingRightsResponse> {\n const response = await this.httpBackend.createRequest<EndorsingRightsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/endorsing_rights`),\n method: 'GET',\n query: args,\n });\n\n return response;\n }\n\n /**\n * @param options contains generic configuration for rpc calls\n *\n * @description Ballots casted so far during a voting period\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-ballot-list\n */\n async getBallotList({ block }: RPCOptions = defaultRPCOptions): Promise<BallotListResponse> {\n const response = await this.httpBackend.createRequest<BallotListResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/ballot_list`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Sum of ballots casted so far during a voting period.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-ballots\n */\n async getBallots({ block }: RPCOptions = defaultRPCOptions): Promise<BallotsResponse> {\n const response = await this.httpBackend.createRequest<BallotsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/ballots`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Current period kind.\n *\n * @deprecated Deprecated in favor of getCurrentPeriod\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-period-kind\n */\n async getCurrentPeriodKind({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<PeriodKindResponse> {\n const response = await this.httpBackend.createRequest<PeriodKindResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/current_period_kind`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Current proposal under evaluation.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-proposal\n */\n async getCurrentProposal({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<CurrentProposalResponse> {\n const response = await this.httpBackend.createRequest<CurrentProposalResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/current_proposal`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Current expected quorum.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-quorum\n */\n async getCurrentQuorum({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<CurrentQuorumResponse> {\n const response = await this.httpBackend.createRequest<CurrentQuorumResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/current_quorum`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description List of delegates with their voting weight, in number of rolls.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-listings\n */\n async getVotesListings({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<VotesListingsResponse> {\n const response = await this.httpBackend.createRequest<VotesListingsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/listings`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description List of proposals with number of supporters.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-proposals\n */\n async getProposals({ block }: RPCOptions = defaultRPCOptions): Promise<ProposalsResponse> {\n const response = await this.httpBackend.createRequest<ProposalsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/proposals`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param data operation contents to forge\n * @param options contains generic configuration for rpc calls\n *\n * @description Forge an operation returning the unsigned bytes\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-forge-operations\n */\n async forgeOperations(\n data: ForgeOperationsParams,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<string> {\n return this.httpBackend.createRequest<string>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/forge/operations`),\n method: 'POST',\n },\n data\n );\n }\n\n /**\n *\n * @param signedOpBytes signed bytes to inject\n *\n * @description Inject an operation in node and broadcast it. Returns the ID of the operation. The `signedOperationContents` should be constructed using a contextual RPCs from the latest block and signed by the client. By default, the RPC will wait for the operation to be (pre-)validated before answering. See RPCs under /blocks/prevalidation for more details on the prevalidation context.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-injection-operation\n */\n async injectOperation(signedOpBytes: string): Promise<OperationHash> {\n return this.httpBackend.createRequest<any>(\n {\n url: this.createURL(`/injection/operation`),\n method: 'POST',\n },\n signedOpBytes\n );\n }\n\n /**\n *\n * @param ops Operations to apply\n * @param options contains generic configuration for rpc calls\n *\n * @description Simulate the validation of an operation\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-preapply-operations\n */\n async preapplyOperations(\n ops: PreapplyParams,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<PreapplyResponse[]> {\n const response = await this.httpBackend.createRequest<PreapplyResponse[]>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/preapply/operations`),\n method: 'POST',\n },\n ops\n );\n\n return response;\n }\n\n /**\n *\n * @param contract address of the contract we want to get the entrypoints of\n *\n * @description Return the list of entrypoints of the contract\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-entrypoints\n *\n * @version 005_PsBABY5H\n */\n async getEntrypoints(\n contract: string,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<EntrypointsResponse> {\n const contractResponse = await this.httpBackend.createRequest<{\n entrypoints: { [key: string]: Object };\n }>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${contract}/entrypoints`\n ),\n method: 'GET',\n });\n\n return contractResponse;\n }\n\n /**\n * @param op Operation to run\n * @param options contains generic configuration for rpc calls\n *\n * @description Run an operation without signature checks\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-operation\n */\n async runOperation(\n op: RPCRunOperationParam,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<PreapplyResponse> {\n const response = await this.httpBackend.createRequest<any>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/scripts/run_operation`),\n method: 'POST',\n },\n op\n );\n\n return response;\n }\n\n /**\n * @param code Code to run\n * @param options contains generic configuration for rpc calls\n *\n * @description Run a piece of code in the current context\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-code\n */\n async runCode(\n code: RPCRunCodeParam,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<RunCodeResult> {\n const response = await this.httpBackend.createRequest<any>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/scripts/run_code`),\n method: 'POST',\n },\n code\n );\n\n return response;\n }\n\n async getChainId() {\n return this.httpBackend.createRequest<string>({\n url: this.createURL(`/chains/${this.chain}/chain_id`),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param data Data to pack\n * @param options contains generic configuration for rpc calls\n *\n * @description Computes the serialized version of a data expression using the same algorithm as script instruction PACK\n *\n * @example packData({ data: { string: \"test\" }, type: { prim: \"string\" } })\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-pack-data\n */\n async packData(data: PackDataParams, { block }: RPCOptions = defaultRPCOptions) {\n const { gas, ...rest } = await this.httpBackend.createRequest<PackDataResponse>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/scripts/pack_data`),\n method: 'POST',\n },\n data\n );\n\n let formattedGas = gas;\n const tryBigNumber = new BigNumber(gas || '');\n if (!tryBigNumber.isNaN()) {\n formattedGas = tryBigNumber;\n }\n\n return { gas: formattedGas, ...rest };\n }\n\n /**\n *\n * @description Return rpc root url\n */\n\n getRpcUrl() {\n return this.url;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Voting period of current block.\n *\n * @example getCurrentPeriod() will default to current voting period for /main/chains/block/head.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-period\n */\n async getCurrentPeriod({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<VotingPeriodBlockResult> {\n const response = await this.httpBackend.createRequest<VotingPeriodBlockResult>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/current_period`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Voting period of next block.\n *\n * @example getSuccessorPeriod() will default to successor voting period for /main/chains/block/head.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-successor-period\n */\n async getSuccessorPeriod({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<VotingPeriodBlockResult> {\n const response = await this.httpBackend.createRequest<VotingPeriodBlockResult>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/successor_period`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param id Sapling state ID\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the value associated with a sapling state ID.\n *\n * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-sapling-sapling-state-id-get-diff\n */\n async getSaplingDiffById(\n id: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<SaplingDiffResponse> {\n return this.httpBackend.createRequest<SaplingDiffResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/sapling/${id}/get_diff`),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param contract address of the contract we want to get the sapling diff\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the value associated with a sapling state.\n *\n * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-single-sapling-get-diff\n */\n async getSaplingDiffByContract(\n contract: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<SaplingDiffResponse> {\n return this.httpBackend.createRequest<SaplingDiffResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/contracts/${contract}/single_sapling_get_diff`),\n method: 'GET',\n });\n }\n}\n"],"names":["BigNumber","OpKind","HttpBackend","HttpResponseError","STATUS_CODE"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA,IAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACxC,IAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAGxC;;;;;;;;;aASgB,eAAe,CAAC,IAAS,EAAE,IAAU;QACnD,IAAM,WAAW,GAAY,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;YAC/B,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC1B;QACD,IAAI,QAAQ,GAAQ,WAAW,GAAG,EAAE,GAAG,EAAE,CAAC;QAE1C,IAAI,CAAC,OAAO,CAAC,UAAC,GAAQ;YACpB,IAAM,IAAI,GAAG,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YAClC,IAAI,GAAQ,CAAC;YACb,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;gBAC/B,OAAO;aACR;YAED,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBACvB,GAAG,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;gBAC5B,SAAS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S,CAAC,aAAW,IAAI,CAAC,KAAK,gBAAW,KAAK,4BAAyB,CAAC;gCACnF,MAAM,EAAE,KAAK;6BACd,CAAC,EAAA;;4BAHI,QAAQ,GAAG,SAGf;4BAEF,sBAAO,QAAQ,EAAC;;;;SACjB;;;;;;;;;;QAWM,sCAAkB,GAAxB,UACC,EAAU,EACV,EAAgD;gBAAhD,qBAA+B,iBAAiB,KAAA,EAA9C,KAAK,WAAA;;;oBAEP,sBAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAsB;4BACzD,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,aAAW,IAAI,CAAC,KAAK,gBAAW,KAAK,yBAAoB,EAAE,cAAW,CAAC;4BAC3F,MAAM,EAAE,KAAK;yBACd,CAAC,EAAC;;;SACJ;;;;;;;;;;QAWM,4CAAwB,GAA9B,UACC,QAAgB,EAChB,EAAgD;gBAAhD,qBAA+B,iBAAiB,KAAA,EAA9C,KAAK,WAAA;;;oBAEP,sBAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAsB;4BACzD,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,aAAW,IAAI,CAAC,KAAK,gBAAW,KAAK,2BAAsB,QAAQ,6BAA0B,CAAC;4BAClH,MAAM,EAAE,KAAK;yBACd,CAAC,EAAC;;;SACJ;QACH,gBAAC;IAAD,CAAC;;;;;;;;;;;"}
1
+ {"version":3,"file":"taquito-rpc.umd.js","sources":["../src/utils/utils.ts","../src/opkind.ts","../src/version.ts","../src/taquito-rpc.ts"],"sourcesContent":["const getByPath = require('lodash/get');\nconst setByPath = require('lodash/set');\nimport BigNumber from 'bignumber.js';\n\n/**\n * Casts object/array items to BigNumber\n * keys support lodash path notation\n * @param data input object or array\n * @param keys keys for processing or all items if not defined\n *\n * @see https://lodash.com/docs/#get\n *\n */\nexport function castToBigNumber(data: any, keys?: any): object {\n const returnArray: boolean = Array.isArray(data);\n if (typeof keys === 'undefined') {\n keys = Object.keys(data);\n }\n let response: any = returnArray ? [] : {};\n\n keys.forEach((key: any) => {\n const item = getByPath(data, key);\n let res: any;\n if (typeof item === 'undefined') {\n return;\n }\n\n if (Array.isArray(item)) {\n res = castToBigNumber(item);\n setByPath(response, key, res);\n return;\n }\n\n res = new BigNumber(item);\n setByPath(response, key, res);\n });\n\n return response;\n}\n\n/**\n * Casts object/array BigNumber items to strings for readability\n * @param data input object or array\n * @param keys keys for processing or all items if not defined\n *\n */\nexport function castToString(data: any, keys?: any): object {\n const returnArray: boolean = Array.isArray(data);\n if (typeof keys === 'undefined') {\n keys = Object.keys(data);\n }\n let response: any = returnArray ? [] : {};\n\n keys.forEach((key: any) => {\n const item = data[key];\n\n if (typeof item === 'undefined') {\n return;\n }\n\n if (Array.isArray(item)) {\n response[key] = castToString(item);\n return;\n }\n\n if (!BigNumber.isBigNumber(item)) {\n response[key] = item;\n return;\n }\n\n response[key] = item.toString();\n });\n\n return response;\n}\n","export enum OpKind {\n ORIGINATION = 'origination',\n DELEGATION = 'delegation',\n REVEAL = 'reveal',\n TRANSACTION = 'transaction',\n ACTIVATION = 'activate_account',\n ENDORSEMENT = 'endorsement',\n ENDORSEMENT_WITH_SLOT = 'endorsement_with_slot',\n SEED_NONCE_REVELATION = 'seed_nonce_revelation',\n DOUBLE_ENDORSEMENT_EVIDENCE = 'double_endorsement_evidence',\n DOUBLE_BAKING_EVIDENCE = 'double_baking_evidence',\n PROPOSALS = 'proposals',\n BALLOT = 'ballot',\n FAILING_NOOP = 'failing_noop'\n}\n","\n// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!\n/* tslint:disable */\nexport const VERSION = {\n \"commitHash\": \"eb5b2c4973cd11098b68ce62eb6702dea376e569\",\n \"version\": \"10.1.1\"\n};\n/* tslint:enable */\n","/**\n * @packageDocumentation\n * @module @taquito/rpc\n */\nimport { HttpBackend, HttpResponseError, STATUS_CODE } from '@taquito/http-utils';\nimport BigNumber from 'bignumber.js';\nimport {\n BakingRightsQueryArguments,\n BakingRightsResponse,\n BalanceResponse,\n BallotListResponse,\n BallotsResponse,\n BigMapGetResponse,\n BigMapKey,\n BigMapResponse,\n BlockHeaderResponse,\n BlockMetadata,\n BlockResponse,\n ConstantsResponse,\n ContractResponse,\n CurrentProposalResponse,\n CurrentQuorumResponse,\n DelegateResponse,\n DelegatesResponse,\n EndorsingRightsQueryArguments,\n EndorsingRightsResponse,\n EntrypointsResponse,\n ForgeOperationsParams,\n ManagerKeyResponse,\n OperationHash,\n PackDataParams,\n PackDataResponse,\n PeriodKindResponse,\n PreapplyParams,\n PreapplyResponse,\n ProposalsResponse,\n RawBlockHeaderResponse,\n RPCRunCodeParam,\n RPCRunOperationParam,\n RunCodeResult,\n SaplingDiffResponse,\n ScriptResponse,\n StorageResponse,\n VotesListingsResponse,\n VotingPeriodBlockResult,\n} from './types';\nimport { castToBigNumber } from './utils/utils';\n\nexport * from './types';\n\nexport { OpKind } from './opkind';\n\nexport { VERSION } from './version';\n\nconst defaultChain = 'main';\n\ninterface RPCOptions {\n block: string;\n}\n\nconst defaultRPCOptions: RPCOptions = { block: 'head' };\n\n/***\n * @description RpcClient allows interaction with Tezos network through an rpc node\n */\nexport class RpcClient {\n /**\n *\n * @param url rpc root url\n * @param chain chain (default main)\n * @param httpBackend Http backend that issue http request.\n * You can override it by providing your own if you which to hook in the request/response\n *\n * @example new RpcClient('https://mainnet.api.tez.ie/', 'main') this will use https://mainnet.api.tez.ie//chains/main\n */\n constructor(\n protected url: string,\n protected chain: string = defaultChain,\n protected httpBackend: HttpBackend = new HttpBackend()\n ) {}\n\n private createURL(path: string) {\n // Trim trailing slashes because it is assumed to be included in path\n return `${this.url.replace(/\\/+$/g, '')}${path}`;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Get the block's hash, its unique identifier.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-hash\n */\n async getBlockHash({ block }: RPCOptions = defaultRPCOptions): Promise<string> {\n const hash = await this.httpBackend.createRequest<string>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/hash`),\n method: 'GET',\n });\n return hash;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @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.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-live-blocks\n */\n async getLiveBlocks({ block }: RPCOptions = defaultRPCOptions): Promise<string[]> {\n const blocks = await this.httpBackend.createRequest<string[]>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/live_blocks`),\n method: 'GET',\n });\n return blocks;\n }\n\n /**\n *\n * @param address address from which we want to retrieve the balance\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the balance of a contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-balance\n */\n async getBalance(\n address: string,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<BalanceResponse> {\n const balance = await this.httpBackend.createRequest<BalanceResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/balance`\n ),\n method: 'GET',\n });\n return new BigNumber(balance);\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the storage\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the data of the contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-storage\n */\n async getStorage(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<StorageResponse> {\n return this.httpBackend.createRequest<StorageResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/storage`\n ),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the script\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the code and data of the contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-script\n */\n async getScript(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<ScriptResponse> {\n return this.httpBackend.createRequest<ScriptResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/script`\n ),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the complete status of a contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id\n */\n async getContract(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<ContractResponse> {\n const contractResponse = await this.httpBackend.createRequest<ContractResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/contracts/${address}`),\n method: 'GET',\n });\n return {\n ...contractResponse,\n balance: new BigNumber(contractResponse.balance),\n };\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the manager\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the manager key of a contract.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-manager-key\n */\n async getManagerKey(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<ManagerKeyResponse> {\n return this.httpBackend.createRequest<ManagerKeyResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/manager_key`\n ),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the delegate (baker)\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the delegate of a contract, if any.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-delegate\n */\n async getDelegate(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<DelegateResponse> {\n let delegate: DelegateResponse;\n try {\n delegate = await this.httpBackend.createRequest<DelegateResponse>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/delegate`\n ),\n method: 'GET',\n });\n } catch (ex) {\n if (ex instanceof HttpResponseError && ex.status === STATUS_CODE.NOT_FOUND) {\n delegate = null;\n } else {\n throw ex;\n }\n }\n return delegate;\n }\n\n /**\n *\n * @param address contract address from which we want to retrieve the big map key\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the value associated with a key in the big map storage of the contract.\n *\n * @deprecated Deprecated in favor of getBigMapKeyByID\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-context-contracts-contract-id-big-map-get\n */\n async getBigMapKey(\n address: string,\n key: BigMapKey,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<BigMapGetResponse> {\n return this.httpBackend.createRequest<BigMapGetResponse>(\n {\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${address}/big_map_get`\n ),\n method: 'POST',\n },\n key\n );\n }\n\n /**\n *\n * @param id Big Map ID\n * @param expr Expression hash to query (A b58check encoded Blake2b hash of the expression (The expression can be packed using the pack_data method))\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the value associated with a key in a big map.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr\n */\n async getBigMapExpr(\n id: string,\n expr: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<BigMapResponse> {\n return this.httpBackend.createRequest<BigMapResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/big_maps/${id}/${expr}`),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param address delegate address which we want to retrieve\n * @param options contains generic configuration for rpc calls\n *\n * @description Fetches information about a delegate from RPC.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-delegates-pkh\n */\n async getDelegates(\n address: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<DelegatesResponse> {\n const response = await this.httpBackend.createRequest<DelegatesResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/delegates/${address}`),\n method: 'GET',\n });\n\n return {\n deactivated: response.deactivated,\n balance: new BigNumber(response.balance),\n frozen_balance: new BigNumber(response.frozen_balance),\n frozen_balance_by_cycle: response.frozen_balance_by_cycle.map(\n ({ deposit, deposits, fees, rewards, ...rest }) => {\n const castedToBigNumber: any = castToBigNumber({ deposit, deposits, fees, rewards }, [\n 'deposit',\n 'deposits',\n 'fees',\n 'rewards'\n ]);\n return {\n ...rest,\n deposit: castedToBigNumber.deposit,\n deposits: castedToBigNumber.deposits,\n fees: castedToBigNumber.fees,\n rewards: castedToBigNumber.rewards,\n }\n }\n ),\n staking_balance: new BigNumber(response.staking_balance),\n delegated_contracts: response.delegated_contracts,\n delegated_balance: new BigNumber(response.delegated_balance),\n grace_period: response.grace_period,\n voting_power: response.voting_power\n };\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description All constants\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-constants\n */\n async getConstants({ block }: RPCOptions = defaultRPCOptions): Promise<ConstantsResponse> {\n const response = await this.httpBackend.createRequest<ConstantsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/constants`),\n method: 'GET',\n });\n\n const castedResponse: any = castToBigNumber(response, [\n 'time_between_blocks',\n 'hard_gas_limit_per_operation',\n 'hard_gas_limit_per_block',\n 'proof_of_work_threshold',\n 'tokens_per_roll',\n 'seed_nonce_revelation_tip',\n 'block_security_deposit',\n 'endorsement_security_deposit',\n 'block_reward',\n 'endorsement_reward',\n 'cost_per_byte',\n 'hard_storage_limit_per_operation',\n 'test_chain_duration',\n 'baking_reward_per_endorsement', \n 'delay_per_missing_endorsement',\n 'minimal_block_delay',\n 'liquidity_baking_subsidy'\n ]);\n\n return {\n ...response,\n ...(castedResponse as ConstantsResponse),\n };\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls. See examples for various available sytaxes.\n *\n * @description All the information about a block\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id\n * @example getBlock() will default to /main/chains/block/head.\n * @example getBlock({ block: head~2 }) will return an offset of 2 blocks.\n * @example getBlock({ block: BL8fTiWcSxWCjiMVnDkbh6EuhqVPZzgWheJ2dqwrxYRm9AephXh~2 }) will return an offset of 2 blocks from given block hash..\n */\n async getBlock({ block }: RPCOptions = defaultRPCOptions): Promise<BlockResponse> {\n const response = await this.httpBackend.createRequest<BlockResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description The whole block header\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-header\n */\n async getBlockHeader({ block }: RPCOptions = defaultRPCOptions): Promise<BlockHeaderResponse> {\n const response = await this.httpBackend.createRequest<RawBlockHeaderResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/header`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description All the metadata associated to the block\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-metadata\n */\n async getBlockMetadata({ block }: RPCOptions = defaultRPCOptions): Promise<BlockMetadata> {\n const response = await this.httpBackend.createRequest<BlockMetadata>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/metadata`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param args contains optional query arguments\n * @param options contains generic configuration for rpc calls\n *\n * @description Retrieves the list of delegates allowed to bake a block.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-baking-rights\n */\n async getBakingRights(\n args: BakingRightsQueryArguments = {},\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<BakingRightsResponse> {\n const response = await this.httpBackend.createRequest<BakingRightsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/baking_rights`),\n method: 'GET',\n query: args,\n });\n\n return response;\n }\n\n /**\n *\n * @param args contains optional query arguments\n * @param options contains generic configuration for rpc calls\n *\n * @description Retrieves the list of delegates allowed to bake a block.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-helpers-endorsing-rights\n */\n async getEndorsingRights(\n args: EndorsingRightsQueryArguments = {},\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<EndorsingRightsResponse> {\n const response = await this.httpBackend.createRequest<EndorsingRightsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/endorsing_rights`),\n method: 'GET',\n query: args,\n });\n\n return response;\n }\n\n /**\n * @param options contains generic configuration for rpc calls\n *\n * @description Ballots casted so far during a voting period\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-ballot-list\n */\n async getBallotList({ block }: RPCOptions = defaultRPCOptions): Promise<BallotListResponse> {\n const response = await this.httpBackend.createRequest<BallotListResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/ballot_list`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Sum of ballots casted so far during a voting period.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-ballots\n */\n async getBallots({ block }: RPCOptions = defaultRPCOptions): Promise<BallotsResponse> {\n const response = await this.httpBackend.createRequest<BallotsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/ballots`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Current period kind.\n *\n * @deprecated Deprecated in favor of getCurrentPeriod\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-period-kind\n */\n async getCurrentPeriodKind({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<PeriodKindResponse> {\n const response = await this.httpBackend.createRequest<PeriodKindResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/current_period_kind`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Current proposal under evaluation.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-proposal\n */\n async getCurrentProposal({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<CurrentProposalResponse> {\n const response = await this.httpBackend.createRequest<CurrentProposalResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/current_proposal`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Current expected quorum.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-quorum\n */\n async getCurrentQuorum({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<CurrentQuorumResponse> {\n const response = await this.httpBackend.createRequest<CurrentQuorumResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/current_quorum`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description List of delegates with their voting weight, in number of rolls.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-listings\n */\n async getVotesListings({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<VotesListingsResponse> {\n const response = await this.httpBackend.createRequest<VotesListingsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/listings`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description List of proposals with number of supporters.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-proposals\n */\n async getProposals({ block }: RPCOptions = defaultRPCOptions): Promise<ProposalsResponse> {\n const response = await this.httpBackend.createRequest<ProposalsResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/proposals`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param data operation contents to forge\n * @param options contains generic configuration for rpc calls\n *\n * @description Forge an operation returning the unsigned bytes\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-forge-operations\n */\n async forgeOperations(\n data: ForgeOperationsParams,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<string> {\n return this.httpBackend.createRequest<string>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/forge/operations`),\n method: 'POST',\n },\n data\n );\n }\n\n /**\n *\n * @param signedOpBytes signed bytes to inject\n *\n * @description Inject an operation in node and broadcast it. Returns the ID of the operation. The `signedOperationContents` should be constructed using a contextual RPCs from the latest block and signed by the client. By default, the RPC will wait for the operation to be (pre-)validated before answering. See RPCs under /blocks/prevalidation for more details on the prevalidation context.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-injection-operation\n */\n async injectOperation(signedOpBytes: string): Promise<OperationHash> {\n return this.httpBackend.createRequest<any>(\n {\n url: this.createURL(`/injection/operation`),\n method: 'POST',\n },\n signedOpBytes\n );\n }\n\n /**\n *\n * @param ops Operations to apply\n * @param options contains generic configuration for rpc calls\n *\n * @description Simulate the validation of an operation\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-preapply-operations\n */\n async preapplyOperations(\n ops: PreapplyParams,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<PreapplyResponse[]> {\n const response = await this.httpBackend.createRequest<PreapplyResponse[]>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/preapply/operations`),\n method: 'POST',\n },\n ops\n );\n\n return response;\n }\n\n /**\n *\n * @param contract address of the contract we want to get the entrypoints of\n *\n * @description Return the list of entrypoints of the contract\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-contracts-contract-id-entrypoints\n *\n * @version 005_PsBABY5H\n */\n async getEntrypoints(\n contract: string,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<EntrypointsResponse> {\n const contractResponse = await this.httpBackend.createRequest<{\n entrypoints: { [key: string]: Object };\n }>({\n url: this.createURL(\n `/chains/${this.chain}/blocks/${block}/context/contracts/${contract}/entrypoints`\n ),\n method: 'GET',\n });\n\n return contractResponse;\n }\n\n /**\n * @param op Operation to run\n * @param options contains generic configuration for rpc calls\n *\n * @description Run an operation without signature checks\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-operation\n */\n async runOperation(\n op: RPCRunOperationParam,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<PreapplyResponse> {\n const response = await this.httpBackend.createRequest<any>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/scripts/run_operation`),\n method: 'POST',\n },\n op\n );\n\n return response;\n }\n\n /**\n * @param code Code to run\n * @param options contains generic configuration for rpc calls\n *\n * @description Run a piece of code in the current context\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-run-code\n */\n async runCode(\n code: RPCRunCodeParam,\n { block }: RPCOptions = defaultRPCOptions\n ): Promise<RunCodeResult> {\n const response = await this.httpBackend.createRequest<any>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/scripts/run_code`),\n method: 'POST',\n },\n code\n );\n\n return response;\n }\n\n async getChainId() {\n return this.httpBackend.createRequest<string>({\n url: this.createURL(`/chains/${this.chain}/chain_id`),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param data Data to pack\n * @param options contains generic configuration for rpc calls\n *\n * @description Computes the serialized version of a data expression using the same algorithm as script instruction PACK\n *\n * @example packData({ data: { string: \"test\" }, type: { prim: \"string\" } })\n *\n * @see https://tezos.gitlab.io/api/rpc.html#post-block-id-helpers-scripts-pack-data\n */\n async packData(data: PackDataParams, { block }: RPCOptions = defaultRPCOptions) {\n const { gas, ...rest } = await this.httpBackend.createRequest<PackDataResponse>(\n {\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/helpers/scripts/pack_data`),\n method: 'POST',\n },\n data\n );\n\n let formattedGas = gas;\n const tryBigNumber = new BigNumber(gas || '');\n if (!tryBigNumber.isNaN()) {\n formattedGas = tryBigNumber;\n }\n\n return { gas: formattedGas, ...rest };\n }\n\n /**\n *\n * @description Return rpc root url\n */\n\n getRpcUrl() {\n return this.url;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Voting period of current block.\n *\n * @example getCurrentPeriod() will default to current voting period for /main/chains/block/head.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-current-period\n */\n async getCurrentPeriod({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<VotingPeriodBlockResult> {\n const response = await this.httpBackend.createRequest<VotingPeriodBlockResult>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/current_period`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param options contains generic configuration for rpc calls\n *\n * @description Voting period of next block.\n *\n * @example getSuccessorPeriod() will default to successor voting period for /main/chains/block/head.\n *\n * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-votes-successor-period\n */\n async getSuccessorPeriod({\n block,\n }: RPCOptions = defaultRPCOptions): Promise<VotingPeriodBlockResult> {\n const response = await this.httpBackend.createRequest<VotingPeriodBlockResult>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/votes/successor_period`),\n method: 'GET',\n });\n\n return response;\n }\n\n /**\n *\n * @param id Sapling state ID\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the value associated with a sapling state ID.\n *\n * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-sapling-sapling-state-id-get-diff\n */\n async getSaplingDiffById(\n id: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<SaplingDiffResponse> {\n return this.httpBackend.createRequest<SaplingDiffResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/sapling/${id}/get_diff`),\n method: 'GET',\n });\n }\n\n /**\n *\n * @param contract address of the contract we want to get the sapling diff\n * @param options contains generic configuration for rpc calls\n *\n * @description Access the value associated with a sapling state.\n *\n * @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-single-sapling-get-diff\n */\n async getSaplingDiffByContract(\n contract: string,\n { block }: { block: string } = defaultRPCOptions\n ): Promise<SaplingDiffResponse> {\n return this.httpBackend.createRequest<SaplingDiffResponse>({\n url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/contracts/${contract}/single_sapling_get_diff`),\n method: 'GET',\n });\n }\n}\n"],"names":["BigNumber","OpKind","HttpBackend","HttpResponseError","STATUS_CODE"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;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AAE,KAAK;yBACd,CAAC,EAAC;;;SACJ;;;;;;;;;;QAWM,4CAAwB,GAA9B,UACC,QAAgB,EAChB,EAAgD;gBAAhD,qBAA+B,iBAAiB,KAAA,EAA9C,KAAK,WAAA;;;oBAEP,sBAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAsB;4BACzD,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,aAAW,IAAI,CAAC,KAAK,gBAAW,KAAK,2BAAsB,QAAQ,6BAA0B,CAAC;4BAClH,MAAM,EAAE,KAAK;yBACd,CAAC,EAAC;;;SACJ;QACH,gBAAC;IAAD,CAAC;;;;;;;;;;;"}
@@ -25,7 +25,7 @@ export declare class RpcClient {
25
25
  * @param httpBackend Http backend that issue http request.
26
26
  * You can override it by providing your own if you which to hook in the request/response
27
27
  *
28
- * @example new RpcClient('https://api.tez.ie/rpc/mainnet', 'main') this will use https://api.tez.ie/rpc/mainnet/chains/main
28
+ * @example new RpcClient('https://mainnet.api.tez.ie/', 'main') this will use https://mainnet.api.tez.ie//chains/main
29
29
  */
30
30
  constructor(url: string, chain?: string, httpBackend?: HttpBackend);
31
31
  private createURL;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taquito/rpc",
3
- "version": "10.1.0-methodsObject.0",
3
+ "version": "10.1.2",
4
4
  "description": "Provides low level methods, and types to invoke RPC calls from a Nomadic Tezos RPC node",
5
5
  "keywords": [
6
6
  "tezos",
@@ -67,7 +67,7 @@
67
67
  ]
68
68
  },
69
69
  "dependencies": {
70
- "@taquito/http-utils": "^10.1.0-methodsObject.0",
70
+ "@taquito/http-utils": "^10.1.2",
71
71
  "bignumber.js": "^9.0.1",
72
72
  "lodash": "^4.17.21"
73
73
  },
@@ -100,5 +100,5 @@
100
100
  "tslint-config-standard": "^9.0.0",
101
101
  "typescript": "^4.1.5"
102
102
  },
103
- "gitHead": "bd60fb3ea35f9260eb318ae47ce8102f3af17fe4"
103
+ "gitHead": "d78608e9da010b98c288cd73c8d5b1beb322492f"
104
104
  }