@taquito/taquito 24.2.0 → 24.3.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/README.md +1 -1
  2. package/dist/lib/batch/rpc-batch-provider.js +91 -83
  3. package/dist/lib/context.js +22 -26
  4. package/dist/lib/contract/big-map.js +16 -29
  5. package/dist/lib/contract/contract-methods/contract-method-object-param.js +7 -7
  6. package/dist/lib/contract/contract-methods/contract-on-chain-view.js +31 -44
  7. package/dist/lib/contract/contract.js +21 -32
  8. package/dist/lib/contract/errors.js +9 -9
  9. package/dist/lib/contract/prepare.js +36 -45
  10. package/dist/lib/contract/rpc-contract-provider.js +426 -475
  11. package/dist/lib/contract/sapling-state-abstraction.js +3 -14
  12. package/dist/lib/contract/semantic.js +2 -2
  13. package/dist/lib/errors.js +3 -3
  14. package/dist/lib/estimate/errors.js +1 -1
  15. package/dist/lib/estimate/estimate.js +66 -20
  16. package/dist/lib/estimate/rpc-estimate-provider.js +427 -460
  17. package/dist/lib/forger/composite-forger.js +16 -27
  18. package/dist/lib/forger/errors.js +2 -2
  19. package/dist/lib/forger/taquito-local-forger.js +9 -22
  20. package/dist/lib/global-constants/default-global-constants-provider.js +8 -19
  21. package/dist/lib/global-constants/errors.js +2 -2
  22. package/dist/lib/global-constants/noop-global-constants-provider.js +2 -13
  23. package/dist/lib/import-key.js +23 -34
  24. package/dist/lib/injector/rpc-injector.js +13 -24
  25. package/dist/lib/operations/ballot-operation.js +2 -3
  26. package/dist/lib/operations/delegate-operation.js +5 -8
  27. package/dist/lib/operations/drain-delegate-operation.js +1 -1
  28. package/dist/lib/operations/errors.js +9 -6
  29. package/dist/lib/operations/increase-paid-storage-operation.js +4 -7
  30. package/dist/lib/operations/operations.js +100 -30
  31. package/dist/lib/operations/origination-operation.js +16 -27
  32. package/dist/lib/operations/proposals-operation.js +2 -3
  33. package/dist/lib/operations/register-global-constant-operation.js +4 -7
  34. package/dist/lib/operations/reveal-operation.js +1 -1
  35. package/dist/lib/operations/smart-rollup-add-messages-operation.js +4 -7
  36. package/dist/lib/operations/smart-rollup-execute-outbox-message-operation.js +4 -7
  37. package/dist/lib/operations/smart-rollup-originate-operation.js +4 -7
  38. package/dist/lib/operations/transaction-operation.js +2 -2
  39. package/dist/lib/operations/transfer-ticket-operation.js +4 -6
  40. package/dist/lib/operations/types.js +17 -19
  41. package/dist/lib/operations/update-companion-key-operation.js +4 -7
  42. package/dist/lib/operations/update-consensus-key-operation.js +4 -7
  43. package/dist/lib/packer/michel-codec-packer.js +3 -14
  44. package/dist/lib/packer/rpc-packer.js +2 -13
  45. package/dist/lib/parser/michel-codec-parser.js +82 -107
  46. package/dist/lib/parser/noop-parser.js +2 -13
  47. package/dist/lib/prepare/prepare-provider.js +780 -744
  48. package/dist/lib/provider.js +322 -128
  49. package/dist/lib/read-provider/rpc-read-adapter.js +76 -121
  50. package/dist/lib/signer/errors.js +1 -1
  51. package/dist/lib/signer/noop.js +9 -26
  52. package/dist/lib/subscribe/errors.js +2 -2
  53. package/dist/lib/subscribe/polling-subcribe-provider.js +35 -38
  54. package/dist/lib/taquito.js +33 -33
  55. package/dist/lib/tz/rpc-tz-provider.js +27 -44
  56. package/dist/lib/version.js +2 -2
  57. package/dist/lib/wallet/batch-operation.js +32 -45
  58. package/dist/lib/wallet/delegation-operation.js +25 -40
  59. package/dist/lib/wallet/errors.js +15 -3
  60. package/dist/lib/wallet/increase-paid-storage-operation.js +25 -40
  61. package/dist/lib/wallet/legacy.js +28 -63
  62. package/dist/lib/wallet/operation-factory.js +27 -56
  63. package/dist/lib/wallet/operation.js +123 -59
  64. package/dist/lib/wallet/origination-operation.js +34 -46
  65. package/dist/lib/wallet/register-global-constant-operation.js +26 -43
  66. package/dist/lib/wallet/transaction-operation.js +21 -36
  67. package/dist/lib/wallet/transfer-ticket-operation.js +21 -36
  68. package/dist/lib/wallet/wallet.js +187 -184
  69. package/dist/taquito.es6.js +3424 -3197
  70. package/dist/taquito.es6.js.map +1 -1
  71. package/dist/taquito.min.js +1 -1
  72. package/dist/taquito.umd.js +7930 -7701
  73. package/dist/taquito.umd.js.map +1 -1
  74. package/dist/types/batch/rpc-batch-provider.d.ts +18 -18
  75. package/dist/types/context.d.ts +4 -4
  76. package/dist/types/contract/big-map.d.ts +3 -3
  77. package/dist/types/contract/contract-methods/contract-method-interface.d.ts +4 -4
  78. package/dist/types/contract/contract-methods/contract-method-object-param.d.ts +6 -6
  79. package/dist/types/contract/contract-methods/contract-on-chain-view.d.ts +3 -3
  80. package/dist/types/contract/contract.d.ts +6 -6
  81. package/dist/types/contract/errors.d.ts +11 -11
  82. package/dist/types/contract/interface.d.ts +42 -42
  83. package/dist/types/contract/rpc-contract-provider.d.ts +44 -43
  84. package/dist/types/contract/sapling-state-abstraction.d.ts +1 -1
  85. package/dist/types/contract/semantic.d.ts +2 -2
  86. package/dist/types/errors.d.ts +5 -5
  87. package/dist/types/estimate/errors.d.ts +1 -1
  88. package/dist/types/estimate/estimate-provider-interface.d.ts +81 -84
  89. package/dist/types/estimate/estimate.d.ts +28 -11
  90. package/dist/types/estimate/rpc-estimate-provider.d.ts +34 -30
  91. package/dist/types/forger/errors.d.ts +2 -2
  92. package/dist/types/global-constants/default-global-constants-provider.d.ts +2 -2
  93. package/dist/types/global-constants/errors.d.ts +2 -2
  94. package/dist/types/global-constants/interface-global-constants-provider.d.ts +1 -1
  95. package/dist/types/import-key.d.ts +2 -2
  96. package/dist/types/operations/ballot-operation.d.ts +1 -1
  97. package/dist/types/operations/delegate-operation.d.ts +2 -2
  98. package/dist/types/operations/drain-delegate-operation.d.ts +1 -1
  99. package/dist/types/operations/errors.d.ts +5 -5
  100. package/dist/types/operations/failing-noop-operation.d.ts +1 -1
  101. package/dist/types/operations/increase-paid-storage-operation.d.ts +1 -1
  102. package/dist/types/operations/operations.d.ts +2 -2
  103. package/dist/types/operations/origination-operation.d.ts +5 -5
  104. package/dist/types/operations/proposals-operation.d.ts +1 -1
  105. package/dist/types/operations/register-global-constant-operation.d.ts +2 -2
  106. package/dist/types/operations/reveal-operation.d.ts +1 -1
  107. package/dist/types/operations/smart-rollup-add-messages-operation.d.ts +1 -1
  108. package/dist/types/operations/smart-rollup-execute-outbox-message-operation.d.ts +1 -1
  109. package/dist/types/operations/smart-rollup-originate-operation.d.ts +1 -1
  110. package/dist/types/operations/transaction-operation.d.ts +2 -2
  111. package/dist/types/operations/transfer-ticket-operation.d.ts +2 -2
  112. package/dist/types/operations/types.d.ts +387 -25
  113. package/dist/types/operations/update-companion-key-operation.d.ts +1 -1
  114. package/dist/types/operations/update-consensus-key-operation.d.ts +1 -1
  115. package/dist/types/prepare/interface.d.ts +32 -33
  116. package/dist/types/prepare/prepare-provider.d.ts +34 -60
  117. package/dist/types/provider.d.ts +7 -1
  118. package/dist/types/read-provider/interface.d.ts +21 -21
  119. package/dist/types/read-provider/rpc-read-adapter.d.ts +22 -22
  120. package/dist/types/signer/errors.d.ts +1 -1
  121. package/dist/types/signer/noop.d.ts +1 -1
  122. package/dist/types/subscribe/errors.d.ts +2 -2
  123. package/dist/types/taquito.d.ts +33 -33
  124. package/dist/types/wallet/errors.d.ts +10 -2
  125. package/dist/types/wallet/interface.d.ts +13 -13
  126. package/dist/types/wallet/operation.d.ts +4 -3
  127. package/dist/types/wallet/wallet.d.ts +36 -35
  128. package/package.json +27 -15
  129. package/LICENSE +0 -202
@@ -2,155 +2,152 @@ import { OriginateParams, TransferParams, DelegateParams, RegisterDelegateParams
2
2
  import { RevealParams, RegisterGlobalConstantParams, TransferTicketParams, IncreasePaidStorageParams, UpdateConsensusKeyParams, UpdateCompanionKeyParams, SmartRollupAddMessagesParams, SmartRollupOriginateParams, SmartRollupExecuteOutboxMessageParams, StakeParams, UnstakeParams, FinalizeUnstakeParams } from '../operations/types';
3
3
  import { Estimate } from './estimate';
4
4
  import { ContractMethodObject, ContractProvider } from '../contract';
5
+ /**
6
+ * Public estimation API used by `TezosToolkit.estimate`.
7
+ *
8
+ * Estimation is simulation-based: Taquito prepares an unsigned operation, simulates it on the
9
+ * current head, and derives recommended limits/fees from the simulation result.
10
+ *
11
+ * Returned values are best-effort recommendations for the current chain state and mempool
12
+ * conditions. They are not an inclusion guarantee.
13
+ */
5
14
  export interface EstimationProvider {
6
15
  /**
16
+ * Estimate gas/storage/fee for an origination.
7
17
  *
8
- * @description Estimate gasLimit, storageLimit and fees for an origination operation
9
- *
10
- * @returns An estimation of gasLimit, storageLimit and fees for the operation
11
- *
12
- * @param Estimate
18
+ * @param params Origination parameters.
19
+ * @returns Recommended limits and fees for the operation.
13
20
  */
14
21
  originate(params: OriginateParams): Promise<Estimate>;
15
22
  /**
23
+ * Estimate gas/storage/fee for a transaction.
16
24
  *
17
- * @description Estimate gasLimit, storageLimit and fees for an transfer operation
25
+ * If `gasLimit`, `storageLimit`, or `fee` are provided they are used as simulation inputs.
26
+ * Otherwise Taquito fills defaults from protocol constants.
18
27
  *
19
- * @returns An estimation of gasLimit, storageLimit and fees for the operation
20
- *
21
- * @param Estimate
28
+ * @param params Transfer parameters.
29
+ * @returns Recommended limits and fees for the operation.
22
30
  */
23
- transfer({ fee, storageLimit, gasLimit, ...rest }: TransferParams): Promise<Estimate>;
31
+ transfer(params: TransferParams): Promise<Estimate>;
24
32
  /**
33
+ * Estimate gas/storage/fee for the `stake` pseudo-operation.
25
34
  *
26
- * @description Estimate gasLimit, storageLimit and fees for an stake pseudo-operation
27
- *
28
- * @returns An estimation of gasLimit, storageLimit and fees for the operation
29
- *
30
- * @param Estimate
35
+ * @param params Stake parameters.
36
+ * @returns Recommended limits and fees for the operation.
31
37
  */
32
- stake({ fee, storageLimit, gasLimit, ...rest }: StakeParams): Promise<Estimate>;
38
+ stake(params: StakeParams): Promise<Estimate>;
33
39
  /**
40
+ * Estimate gas/storage/fee for the `unstake` pseudo-operation.
34
41
  *
35
- * @description Estimate gasLimit, storageLimit and fees for an unstake pseudo-operation
36
- *
37
- * @returns An estimation of gasLimit, storageLimit and fees for the operation
38
- *
39
- * @param Estimate
42
+ * @param params Unstake parameters.
43
+ * @returns Recommended limits and fees for the operation.
40
44
  */
41
- unstake({ fee, storageLimit, gasLimit, ...rest }: UnstakeParams): Promise<Estimate>;
45
+ unstake(params: UnstakeParams): Promise<Estimate>;
42
46
  /**
47
+ * Estimate gas/storage/fee for the `finalize_unstake` pseudo-operation.
43
48
  *
44
- * @description Estimate gasLimit, storageLimit and fees for an finalize_unstake pseudo-operation
45
- *
46
- * @returns An estimation of gasLimit, storageLimit and fees for the operation
47
- *
48
- * @param Estimate
49
+ * @param params Finalize-unstake parameters.
50
+ * @returns Recommended limits and fees for the operation.
49
51
  */
50
- finalizeUnstake({ fee, storageLimit, gasLimit, ...rest }: FinalizeUnstakeParams): Promise<Estimate>;
52
+ finalizeUnstake(params: FinalizeUnstakeParams): Promise<Estimate>;
51
53
  /**
54
+ * Estimate gas/storage/fee for a `transfer_ticket` operation.
52
55
  *
53
- * @description Estimate gasLimit, storageLimit and fees for an transferTicket operation
54
- *
55
- * @returns An estimation of gasLimit, storageLimit and fees for the operation
56
- *
57
- * @param Estimate
56
+ * @param params Ticket transfer parameters.
57
+ * @returns Recommended limits and fees for the operation.
58
58
  */
59
- transferTicket({ fee, storageLimit, gasLimit, ...rest }: TransferTicketParams): Promise<Estimate>;
59
+ transferTicket(params: TransferTicketParams): Promise<Estimate>;
60
60
  /**
61
+ * Estimate gas/storage/fee for `set_delegate`.
61
62
  *
62
- * @description Estimate gasLimit, storageLimit and fees for a delegate operation
63
- *
64
- * @returns An estimation of gasLimit, storageLimit and fees for the operation
65
- *
66
- * @param Estimate
63
+ * @param params Delegate parameters.
64
+ * @returns Recommended limits and fees for the operation.
67
65
  */
68
66
  setDelegate(params: DelegateParams): Promise<Estimate>;
69
67
  /**
68
+ * Estimate gas/storage/fee for delegate registration (`delegate = source`).
70
69
  *
71
- * @description Estimate gasLimit, storageLimit and fees for a delegate operation
72
- *
73
- * @returns An estimation of gasLimit, storageLimit and fees for the operation
74
- *
75
- * @param Estimate
70
+ * @param params Register-delegate parameters.
71
+ * @returns Recommended limits and fees for the operation.
76
72
  */
77
73
  registerDelegate(params?: RegisterDelegateParams): Promise<Estimate>;
78
74
  /**
75
+ * Estimate gas/storage/fee for an explicit reveal.
79
76
  *
80
- * @description Estimate gasLimit, storageLimit and fees for a reveal operation
81
- * @returns An estimation of gasLimit, storageLimit and fees for the operation or undefined if the account is already revealed
82
- *
83
- * @param Estimate
77
+ * @param params Reveal parameters.
78
+ * @returns Estimate for reveal, or `undefined` if the account is already revealed.
84
79
  */
85
80
  reveal(params?: RevealParams): Promise<Estimate | undefined>;
86
- batch(params: ParamsWithKind[]): Promise<Estimate[]>;
87
81
  /**
82
+ * Estimate gas/storage/fee for each operation in a manager-operation batch.
88
83
  *
89
- * @description Estimate gasLimit, storageLimit and fees for registering an expression (registerGlobalConstant operation)
84
+ * If a reveal is needed, its estimate is returned as the first element.
90
85
  *
91
- * @returns An estimation of gasLimit, storageLimit and fees for the operation
86
+ * For operations missing an explicit `gasLimit`, Taquito patches simulation gas using
87
+ * protocol constants and block gas budget:
88
+ * - count only ops that need gas patching
89
+ * - subtract already-explicit gas from the block budget
90
+ * - reserve reveal gas when reveal will be prepended
91
+ * - divide remaining block gas across ops that need patching
92
92
  *
93
- * @param params registerGlobalConstant operation parameter
93
+ * @param params Batch operation parameters.
94
+ * @returns Per-operation estimates in simulation order.
94
95
  */
95
- registerGlobalConstant(params: RegisterGlobalConstantParams): Promise<Estimate>;
96
+ batch(params: ParamsWithKind[]): Promise<Estimate[]>;
96
97
  /**
98
+ * Estimate gas/storage/fee for `register_global_constant`.
97
99
  *
98
- * @description Estimate gasLimit, storageLimit and fees for an increase paid storage operation
99
- *
100
- * @returns An estimation of gasLimit, storageLimit, and fees for the operation
100
+ * @param params Register-global-constant parameters.
101
+ * @returns Recommended limits and fees for the operation.
102
+ */
103
+ registerGlobalConstant(params: RegisterGlobalConstantParams): Promise<Estimate>;
104
+ /**
105
+ * Estimate gas/storage/fee for `increase_paid_storage`.
101
106
  *
102
- * @param Estimate
107
+ * @param params Increase-paid-storage parameters.
108
+ * @returns Recommended limits and fees for the operation.
103
109
  */
104
110
  increasePaidStorage(params: IncreasePaidStorageParams): Promise<Estimate>;
105
111
  /**
112
+ * Estimate gas/storage/fee for `update_consensus_key`.
106
113
  *
107
- * @description Estimate gasLimit, storageLimit and fees for an Update Consensus Key operation
108
- * @returns An estimation of gasLimit, storageLimit and fees for the operation
109
- *
110
- * @param Estimate
114
+ * @param params Update-consensus-key parameters.
115
+ * @returns Recommended limits and fees for the operation.
111
116
  */
112
117
  updateConsensusKey(params: UpdateConsensusKeyParams): Promise<Estimate>;
113
118
  /**
119
+ * Estimate gas/storage/fee for `update_companion_key`.
114
120
  *
115
- * @description Estimate gasLimit, storageLimit and fees for an Update Companion Key operation
116
- * @returns An estimation of gasLimit, storageLimit and fees for the operation
117
- *
118
- * @param Estimate
121
+ * @param params Update-companion-key parameters.
122
+ * @returns Recommended limits and fees for the operation.
119
123
  */
120
124
  updateCompanionKey(params: UpdateCompanionKeyParams): Promise<Estimate>;
121
125
  /**
126
+ * Estimate gas/storage/fee for `smart_rollup_add_messages`.
122
127
  *
123
- * @description Estimate gasLimit, storageLimit and fees for an Smart Rollup Add Messages operation
124
- *
125
- * @returns An estimation of gasLimit, storageLimit and fees for the operation
126
- *
127
- * @param Estimate
128
+ * @param params Smart-rollup-add-messages parameters.
129
+ * @returns Recommended limits and fees for the operation.
128
130
  */
129
131
  smartRollupAddMessages(params: SmartRollupAddMessagesParams): Promise<Estimate>;
130
132
  /**
133
+ * Estimate gas/storage/fee for `smart_rollup_execute_outbox_message`.
131
134
  *
132
- * @description Estimate gasLimit, storageLimit and fees for an Smart Rollup Execute Outbox Message operation
133
- *
134
- * @returns An estimation of gasLimit, storageLimit and fees for the operation
135
- *
136
- * @param Estimate
135
+ * @param params Smart-rollup-execute-outbox-message parameters.
136
+ * @returns Recommended limits and fees for the operation.
137
137
  */
138
138
  smartRollupExecuteOutboxMessage(params: SmartRollupExecuteOutboxMessageParams): Promise<Estimate>;
139
139
  /**
140
+ * Estimate gas/storage/fee for a typed contract method call.
140
141
  *
141
- * @description Estimate gasLimit, storageLimit and fees for contract call
142
- *
143
- * @returns An estimation of gasLimit, storageLimit and fees for the contract call
144
- *
145
- * @param Estimate
142
+ * @param contractMethod Contract method instance to estimate.
143
+ * @returns Recommended limits and fees for the contract call.
146
144
  */
147
145
  contractCall(contractMethod: ContractMethodObject<ContractProvider>): Promise<Estimate>;
148
146
  /**
149
- * @description Estimate gasLimit, storageLimit and fees for an Smart Rollup Originate operation
150
- *
151
- * @returns An estimation of gasLimit, storageLimit and fees for the operation
147
+ * Estimate gas/storage/fee for `smart_rollup_originate`.
152
148
  *
153
- * @param SmartRollupOrigianteParams
149
+ * @param params Smart-rollup-originate parameters.
150
+ * @returns Recommended limits and fees for the operation.
154
151
  */
155
152
  smartRollupOriginate(params: SmartRollupOriginateParams): Promise<Estimate>;
156
153
  }
@@ -1,9 +1,18 @@
1
+ import { MempoolFilterResponse } from '@taquito/rpc';
2
+ export interface FeeParams {
3
+ minimalFeeMutez: number;
4
+ feePerGasMutez: number;
5
+ feePerByteMutez: number;
6
+ }
7
+ export declare const DEFAULT_FEE_PARAMS: FeeParams;
8
+ export declare const feeParamsFromMempoolFilter: (response?: Pick<MempoolFilterResponse, "minimal_fees" | "minimal_nanotez_per_gas_unit" | "minimal_nanotez_per_byte">) => FeeParams;
1
9
  export interface EstimateProperties {
2
10
  milligasLimit: number;
3
11
  storageLimit: number;
4
12
  opSize: number;
5
13
  minimalFeePerStorageByteMutez: number;
6
14
  baseFeeMutez?: number;
15
+ feeParams?: FeeParams;
7
16
  }
8
17
  /**
9
18
  * Examples of use :
@@ -39,6 +48,13 @@ export interface EstimateProperties {
39
48
  * est.suggestedFeeMutez, est.totalCost, est.usingBaseFeeMutez)
40
49
  *
41
50
  * ```
51
+ *
52
+ * Fee estimation keeps the same overall formula shape on Tezos L1 and on Tezos X / Tezlink:
53
+ * a fixed minimal fee plus byte and gas-price components. The important difference is that on
54
+ * Tezos X the byte fee and gas-price terms exposed by `mempool/filter` are material and may
55
+ * change over time, while on L1 they have historically been close to Taquito's long-standing
56
+ * defaults. `Estimate` therefore accepts fee parameters computed by the estimator instead of
57
+ * assuming L1 values internally.
42
58
  */
43
59
  export declare class Estimate {
44
60
  private readonly _milligasLimit;
@@ -46,46 +62,47 @@ export declare class Estimate {
46
62
  readonly opSize: number | string;
47
63
  private readonly minimalFeePerStorageByteMutez;
48
64
  /**
49
- * @description Base fee in mutez (1 mutez = 1e10−6 tez)
65
+ * Base fee in mutez (1 mutez = 1e10−6 tez)
50
66
  */
51
67
  private readonly baseFeeMutez;
68
+ private readonly feeParams;
52
69
  constructor(_milligasLimit: number | string, _storageLimit: number | string, opSize: number | string, minimalFeePerStorageByteMutez: number | string,
53
70
  /**
54
- * @description Base fee in mutez (1 mutez = 1e10−6 tez)
71
+ * Base fee in mutez (1 mutez = 1e10−6 tez)
55
72
  */
56
- baseFeeMutez?: number | string);
73
+ baseFeeMutez?: number | string, feeParams?: FeeParams);
57
74
  /**
58
- * @description The number of Mutez that will be burned for the storage of the [operation](https://tezos.gitlab.io/user/glossary.html#operations). (Storage + Allocation fees)
75
+ * The number of Mutez that will be burned for the storage of the [operation](https://tezos.gitlab.io/user/glossary.html#operations). (Storage + Allocation fees)
59
76
  */
60
77
  get burnFeeMutez(): number;
61
78
  /**
62
- * @description The limit on the amount of storage an [operation](https://tezos.gitlab.io/user/glossary.html#operations) can use with 20 buffer.
79
+ * The limit on the amount of storage an [operation](https://tezos.gitlab.io/user/glossary.html#operations) can use with 20 buffer.
63
80
  */
64
81
  get storageLimit(): number;
65
82
  /**
66
- * @description The limit on the amount of [gas](https://tezos.gitlab.io/user/glossary.html#gas) a given operation can consume with 100 buffer depends on the operation.
83
+ * The limit on the amount of [gas](https://tezos.gitlab.io/user/glossary.html#gas) a given operation can consume with 100 buffer depends on the operation.
67
84
  */
68
85
  get gasLimit(): number;
69
86
  private get operationFeeMutez();
70
87
  private roundUp;
71
88
  /**
72
- * @description Minimum fees for the [operation](https://tezos.gitlab.io/user/glossary.html#operations) according to [baker](https://tezos.gitlab.io/user/glossary.html#baker) defaults.
89
+ * Minimum fees for the [operation](https://tezos.gitlab.io/user/glossary.html#operations) according to [baker](https://tezos.gitlab.io/user/glossary.html#baker) defaults.
73
90
  */
74
91
  get minimalFeeMutez(): number;
75
92
  /**
76
- * @description The suggested fee for the operation which includes minimal fees and a small buffer.
93
+ * The suggested fee for the operation which includes minimal fees and a small buffer.
77
94
  */
78
95
  get suggestedFeeMutez(): number;
79
96
  /**
80
- * @description Fees according to your specified base fee will ensure that at least minimum fees are used.
97
+ * Fees according to your specified base fee will ensure that at least minimum fees are used.
81
98
  */
82
99
  get usingBaseFeeMutez(): number;
83
100
  /**
84
- * @description The sum of `minimalFeeMutez` + `burnFeeMutez`.
101
+ * The sum of `minimalFeeMutez` + `burnFeeMutez`.
85
102
  */
86
103
  get totalCost(): number;
87
104
  /**
88
- * @description Since Delphinet, consumed gas is provided in milligas for more precision.
105
+ * Since Delphinet, consumed gas is provided in milligas for more precision.
89
106
  * This function returns an estimation of the gas that operation will consume in milligas.
90
107
  */
91
108
  get consumedMilligas(): number;
@@ -3,6 +3,14 @@ import { Estimate } from './estimate';
3
3
  import { EstimationProvider } from '../estimate/estimate-provider-interface';
4
4
  import { ContractMethodObject, ContractProvider } from '../contract';
5
5
  import { Provider } from '../provider';
6
+ /**
7
+ * Estimates gas, storage, and fees by simulating operations against the node RPC.
8
+ *
9
+ * On Tezos L1, Taquito historically matched estimation with built-in fee defaults because the
10
+ * fee-per-byte and fee-per-gas terms were usually close to those values. Tezos X / Tezlink keeps
11
+ * the same fee formula shape, but those terms are surfaced through `mempool/filter` and may be
12
+ * significantly higher or dynamic, so this provider reads them from RPC before computing fees.
13
+ */
6
14
  export declare class RPCEstimateProvider extends Provider implements EstimationProvider {
7
15
  private readonly REVEAL_LENGTH;
8
16
  private readonly REVEAL_LENGTH_TZ4;
@@ -14,16 +22,16 @@ export declare class RPCEstimateProvider extends Provider implements EstimationP
14
22
  private calculateEstimates;
15
23
  /**
16
24
  *
17
- * @description Estimate gasLimit, storageLimit and fees for an origination operation
25
+ * Estimate gasLimit, storageLimit and fees for an origination operation
18
26
  *
19
27
  * @returns An estimation of gasLimit, storageLimit and fees for the operation
20
28
  *
21
- * @param OriginationOperation Originate operation parameter
29
+ * @param params Originate operation parameter
22
30
  */
23
31
  originate(params: OriginateParams): Promise<Estimate>;
24
32
  /**
25
33
  *
26
- * @description Estimate gasLimit, storageLimit and fees for an transfer operation
34
+ * Estimate gasLimit, storageLimit and fees for an transfer operation
27
35
  *
28
36
  * @returns An estimation of gasLimit, storageLimit and fees for the operation
29
37
  *
@@ -32,7 +40,7 @@ export declare class RPCEstimateProvider extends Provider implements EstimationP
32
40
  transfer({ fee, storageLimit, gasLimit, ...rest }: TransferParams): Promise<Estimate>;
33
41
  /**
34
42
  *
35
- * @description Estimate gasLimit, storageLimit and fees for an stake pseudo-operation
43
+ * Estimate gasLimit, storageLimit and fees for an stake pseudo-operation
36
44
  *
37
45
  * @returns An estimation of gasLimit, storageLimit and fees for the operation
38
46
  *
@@ -41,7 +49,7 @@ export declare class RPCEstimateProvider extends Provider implements EstimationP
41
49
  stake({ fee, storageLimit, gasLimit, ...rest }: StakeParams): Promise<Estimate>;
42
50
  /**
43
51
  *
44
- * @description Estimate gasLimit, storageLimit and fees for an Unstake pseudo-operation
52
+ * Estimate gasLimit, storageLimit and fees for an Unstake pseudo-operation
45
53
  *
46
54
  * @returns An estimation of gasLimit, storageLimit and fees for the operation
47
55
  *
@@ -50,7 +58,7 @@ export declare class RPCEstimateProvider extends Provider implements EstimationP
50
58
  unstake({ fee, storageLimit, gasLimit, ...rest }: UnstakeParams): Promise<Estimate>;
51
59
  /**
52
60
  *
53
- * @description Estimate gasLimit, storageLimit and fees for an finalize_unstake pseudo-operation
61
+ * Estimate gasLimit, storageLimit and fees for an finalize_unstake pseudo-operation
54
62
  *
55
63
  * @returns An estimation of gasLimit, storageLimit and fees for the operation
56
64
  *
@@ -59,7 +67,7 @@ export declare class RPCEstimateProvider extends Provider implements EstimationP
59
67
  finalizeUnstake({ fee, storageLimit, gasLimit, ...rest }: FinalizeUnstakeParams): Promise<Estimate>;
60
68
  /**
61
69
  *
62
- * @description Estimate gasLimit, storageLimit and fees for a transferTicket operation
70
+ * Estimate gasLimit, storageLimit and fees for a transferTicket operation
63
71
  *
64
72
  * @returns An estimation of gasLimit, storageLimit and fees for the operation
65
73
  *
@@ -68,40 +76,36 @@ export declare class RPCEstimateProvider extends Provider implements EstimationP
68
76
  transferTicket({ fee, storageLimit, gasLimit, ...rest }: TransferTicketParams): Promise<Estimate>;
69
77
  /**
70
78
  *
71
- * @description Estimate gasLimit, storageLimit and fees for a delegate operation
79
+ * Estimate gasLimit, storageLimit and fees for a delegate operation
72
80
  *
73
81
  * @returns An estimation of gasLimit, storageLimit and fees for the operation
74
- *
75
- * @param Estimate
76
82
  */
77
83
  setDelegate({ fee, gasLimit, storageLimit, ...rest }: DelegateParams): Promise<Estimate>;
78
84
  /**
79
85
  *
80
- * @description Estimate gasLimit, storageLimit and fees for a each operation in the batch
86
+ * Estimate gasLimit, storageLimit and fees for a each operation in the batch
81
87
  *
82
88
  * @returns An array of Estimate objects. If a reveal operation is needed, the first element of the array is the Estimate for the reveal operation.
83
89
  */
84
90
  batch(params: ParamsWithKind[]): Promise<Estimate[]>;
85
91
  /**
86
92
  *
87
- * @description Estimate gasLimit, storageLimit and fees for a delegate operation
93
+ * Estimate gasLimit, storageLimit and fees for a delegate operation
88
94
  *
89
95
  * @returns An estimation of gasLimit, storageLimit and fees for the operation
90
- *
91
- * @param Estimate
92
96
  */
93
97
  registerDelegate({ fee, storageLimit, gasLimit, ...rest }: RegisterDelegateParams, source?: string): Promise<Estimate>;
94
98
  /**
95
99
  *
96
- * @description Estimate gasLimit, storageLimit and fees to reveal the current account
100
+ * Estimate gasLimit, storageLimit and fees to reveal the current account
97
101
  * @returns An estimation of gasLimit, storageLimit and fees for the operation or undefined if the account is already revealed
98
102
  *
99
- * @param Estimate
103
+ * @param params Reveal operation parameter
100
104
  */
101
105
  reveal(params?: RevealParams): Promise<Estimate | undefined>;
102
106
  /**
103
107
  *
104
- * @description Estimate gasLimit, storageLimit and fees for an registerGlobalConstant operation
108
+ * Estimate gasLimit, storageLimit and fees for an registerGlobalConstant operation
105
109
  *
106
110
  * @returns An estimation of gasLimit, storageLimit and fees for the operation
107
111
  *
@@ -110,7 +114,7 @@ export declare class RPCEstimateProvider extends Provider implements EstimationP
110
114
  registerGlobalConstant({ fee, storageLimit, gasLimit, ...rest }: RegisterGlobalConstantParams): Promise<Estimate>;
111
115
  /**
112
116
  *
113
- * @description Estimate gasLimit, storageLimit, and fees for an increasePaidStorage operation
117
+ * Estimate gasLimit, storageLimit, and fees for an increasePaidStorage operation
114
118
  *
115
119
  * @returns An estimation of gasLimit, storageLimit, and fees for the operation
116
120
  *
@@ -119,52 +123,52 @@ export declare class RPCEstimateProvider extends Provider implements EstimationP
119
123
  increasePaidStorage({ fee, storageLimit, gasLimit, ...rest }: IncreasePaidStorageParams): Promise<Estimate>;
120
124
  /**
121
125
  *
122
- * @description Estimate gasLimit, storageLimit and fees for an Update Consensus Key operation
126
+ * Estimate gasLimit, storageLimit and fees for an Update Consensus Key operation
123
127
  * @returns An estimation of gasLimit, storageLimit and fees for the operation
124
- * @param Estimate
128
+ * @param params UpdateConsensusKey operation parameter
125
129
  */
126
130
  updateConsensusKey(params: UpdateConsensusKeyParams): Promise<Estimate>;
127
131
  /**
128
132
  *
129
- * @description Estimate gasLimit, storageLimit and fees for an Update Companion Key operation
133
+ * Estimate gasLimit, storageLimit and fees for an Update Companion Key operation
130
134
  * @returns An estimation of gasLimit, storageLimit and fees for the operation
131
- * @param Estimate
135
+ * @param params UpdateCompanionKey operation parameter
132
136
  */
133
137
  updateCompanionKey(params: UpdateCompanionKeyParams): Promise<Estimate>;
134
138
  /**
135
139
  *
136
- * @description Estimate gasLimit, storageLimit and fees for a smart_rollup_add_messages operation
140
+ * Estimate gasLimit, storageLimit and fees for a smart_rollup_add_messages operation
137
141
  *
138
142
  * @returns An estimation of gasLimit, storageLimit and fees for the operation
139
143
  *
140
- * @param Estimate
144
+ * @param params SmartRollupAddMessages operation parameter
141
145
  */
142
146
  smartRollupAddMessages(params: SmartRollupAddMessagesParams): Promise<Estimate>;
143
147
  /**
144
148
  *
145
- * @description Estimate gasLimit, storageLimit and fees for an Smart Rollup Originate operation
149
+ * Estimate gasLimit, storageLimit and fees for an Smart Rollup Originate operation
146
150
  *
147
151
  * @returns An estimation of gasLimit, storageLimit and fees for the operation
148
152
  *
149
- * @param SmartRollupOriginateParams
153
+ * @param params SmartRollupOriginate operation parameter
150
154
  */
151
155
  smartRollupOriginate(params: SmartRollupOriginateParams): Promise<Estimate>;
152
156
  /**
153
157
  *
154
- * @description Estimate gasLimit, storageLimit and fees for a smart_rollup_execute_outbox_message operation
158
+ * Estimate gasLimit, storageLimit and fees for a smart_rollup_execute_outbox_message operation
155
159
  *
156
160
  * @returns An estimation of gasLimit, storageLimit and fees for the operation
157
161
  *
158
- * @param Estimate
162
+ * @param params SmartRollupExecuteOutboxMessage operation parameter
159
163
  */
160
164
  smartRollupExecuteOutboxMessage(params: SmartRollupExecuteOutboxMessageParams): Promise<Estimate>;
161
165
  /**
162
166
  *
163
- * @description Estimate gasLimit, storageLimit and fees for contract call
167
+ * Estimate gasLimit, storageLimit and fees for contract call
164
168
  *
165
169
  * @returns An estimation of gasLimit, storageLimit and fees for the contract call
166
170
  *
167
- * @param Estimate
171
+ * @param contractMethod ContractMethodObject for the contract call
168
172
  */
169
173
  contractCall(contractMethod: ContractMethodObject<ContractProvider>): Promise<Estimate>;
170
174
  }
@@ -1,7 +1,7 @@
1
1
  import { TaquitoError, TezosToolkitConfigError } from '@taquito/core';
2
2
  /**
3
3
  * @category Error
4
- * @description Error that indicates CompositeForger.forge() results doesn't match each other
4
+ * Error that indicates CompositeForger.forge() results doesn't match each other
5
5
  */
6
6
  export declare class ForgingMismatchError extends TaquitoError {
7
7
  readonly results: string[];
@@ -9,7 +9,7 @@ export declare class ForgingMismatchError extends TaquitoError {
9
9
  }
10
10
  /**
11
11
  * @category Error
12
- * @description Error that indicates no forger has been configured for CompositeForger
12
+ * Error that indicates no forger has been configured for CompositeForger
13
13
  */
14
14
  export declare class UnspecifiedForgerError extends TezosToolkitConfigError {
15
15
  constructor();
@@ -4,12 +4,12 @@ export declare class DefaultGlobalConstantsProvider implements GlobalConstantsPr
4
4
  private _globalConstantsLibrary;
5
5
  /**
6
6
  *
7
- * @description Allows to load global constant hashes and their corresponding Michelson JSON values
7
+ * Allows to load global constant hashes and their corresponding Michelson JSON values
8
8
  */
9
9
  loadGlobalConstant(globalConstant: GlobalConstantHashAndValue): void;
10
10
  /**
11
11
  *
12
- * @description Retrieve the Michelson value of a global constant based on its hash
12
+ * Retrieve the Michelson value of a global constant based on its hash
13
13
  *
14
14
  * @param hash a string representing the global constant hash
15
15
  * @returns Expr, the JSON Michelson value
@@ -1,7 +1,7 @@
1
1
  import { TaquitoError, TezosToolkitConfigError } from '@taquito/core';
2
2
  /**
3
3
  * @category Error
4
- * @description Error that indicates that a global constant does not exist
4
+ * Error that indicates that a global constant does not exist
5
5
  */
6
6
  export declare class GlobalConstantNotFound extends TaquitoError {
7
7
  readonly hash: string;
@@ -9,7 +9,7 @@ export declare class GlobalConstantNotFound extends TaquitoError {
9
9
  }
10
10
  /**
11
11
  * @category Error
12
- * @description Error that indicates the global constant provider not being configured under TezosToolkit
12
+ * Error that indicates the global constant provider not being configured under TezosToolkit
13
13
  */
14
14
  export declare class UnconfiguredGlobalConstantsProviderError extends TezosToolkitConfigError {
15
15
  constructor();
@@ -3,7 +3,7 @@ export type GlobalConstantHash = string;
3
3
  export interface GlobalConstantsProvider {
4
4
  /**
5
5
  *
6
- * @description Retrieve the Michelson value of a global constant based on its hash
6
+ * Retrieve the Michelson value of a global constant based on its hash
7
7
  *
8
8
  * @param hash a string representing the global constant hash
9
9
  */
@@ -1,9 +1,9 @@
1
1
  import { TezosToolkit } from './taquito';
2
2
  /**
3
3
  *
4
- * @description Import a key to sign operation with the side-effect of setting the Tezos instance to use the InMemorySigner provider
4
+ * Import a key to sign operation with the side-effect of setting the Tezos instance to use the InMemorySigner provider
5
5
  *
6
- * @warn The JSON faucets are no longer available on https://teztnets.com/
6
+ * @remarks The JSON faucets are no longer available on https://teztnets.com/
7
7
  * @param toolkit The toolkit instance to attach a signer
8
8
  * @param privateKeyOrEmail Key to load in memory
9
9
  * @param passphrase If the key is encrypted passphrase to decrypt it
@@ -4,7 +4,7 @@ import { Operation } from './operations';
4
4
  import { ForgedBytes } from './types';
5
5
  /**
6
6
  *
7
- * @description BallotOperation provides utility functions to fetch a new operation of kind ballot
7
+ * BallotOperation provides utility functions to fetch a new operation of kind ballot
8
8
  *
9
9
  */
10
10
  export declare class BallotOperation extends Operation {
@@ -3,9 +3,9 @@ import { Context } from '../context';
3
3
  import { Operation } from './operations';
4
4
  import { FeeConsumingOperation, ForgedBytes, GasConsumingOperation, StorageConsumingOperation } from './types';
5
5
  /**
6
- * @description Delegation operation provide utility function to fetch newly issued delegation
6
+ * Delegation operation provide utility function to fetch newly issued delegation
7
7
  *
8
- * @warn Currently support only one delegation per operation
8
+ * @remarks Currently support only one delegation per operation
9
9
  */
10
10
  export declare class DelegateOperation extends Operation implements GasConsumingOperation, StorageConsumingOperation, FeeConsumingOperation {
11
11
  private readonly params;
@@ -4,7 +4,7 @@ import { Operation } from './operations';
4
4
  import { ForgedBytes } from './types';
5
5
  /**
6
6
  *
7
- * @description DrainDelegateOperation provides utility functions to fetch a new operation of kind drain_delegate
7
+ * DrainDelegateOperation provides utility functions to fetch a new operation of kind drain_delegate
8
8
  *
9
9
  */
10
10
  export declare class DrainDelegateOperation extends Operation {