@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.
- package/README.md +1 -1
- package/dist/lib/batch/rpc-batch-provider.js +91 -83
- package/dist/lib/context.js +22 -26
- package/dist/lib/contract/big-map.js +16 -29
- package/dist/lib/contract/contract-methods/contract-method-object-param.js +7 -7
- package/dist/lib/contract/contract-methods/contract-on-chain-view.js +31 -44
- package/dist/lib/contract/contract.js +21 -32
- package/dist/lib/contract/errors.js +9 -9
- package/dist/lib/contract/prepare.js +36 -45
- package/dist/lib/contract/rpc-contract-provider.js +426 -475
- package/dist/lib/contract/sapling-state-abstraction.js +3 -14
- package/dist/lib/contract/semantic.js +2 -2
- package/dist/lib/errors.js +3 -3
- package/dist/lib/estimate/errors.js +1 -1
- package/dist/lib/estimate/estimate.js +66 -20
- package/dist/lib/estimate/rpc-estimate-provider.js +427 -460
- package/dist/lib/forger/composite-forger.js +16 -27
- package/dist/lib/forger/errors.js +2 -2
- package/dist/lib/forger/taquito-local-forger.js +9 -22
- package/dist/lib/global-constants/default-global-constants-provider.js +8 -19
- package/dist/lib/global-constants/errors.js +2 -2
- package/dist/lib/global-constants/noop-global-constants-provider.js +2 -13
- package/dist/lib/import-key.js +23 -34
- package/dist/lib/injector/rpc-injector.js +13 -24
- package/dist/lib/operations/ballot-operation.js +2 -3
- package/dist/lib/operations/delegate-operation.js +5 -8
- package/dist/lib/operations/drain-delegate-operation.js +1 -1
- package/dist/lib/operations/errors.js +9 -6
- package/dist/lib/operations/increase-paid-storage-operation.js +4 -7
- package/dist/lib/operations/operations.js +100 -30
- package/dist/lib/operations/origination-operation.js +16 -27
- package/dist/lib/operations/proposals-operation.js +2 -3
- package/dist/lib/operations/register-global-constant-operation.js +4 -7
- package/dist/lib/operations/reveal-operation.js +1 -1
- package/dist/lib/operations/smart-rollup-add-messages-operation.js +4 -7
- package/dist/lib/operations/smart-rollup-execute-outbox-message-operation.js +4 -7
- package/dist/lib/operations/smart-rollup-originate-operation.js +4 -7
- package/dist/lib/operations/transaction-operation.js +2 -2
- package/dist/lib/operations/transfer-ticket-operation.js +4 -6
- package/dist/lib/operations/types.js +17 -19
- package/dist/lib/operations/update-companion-key-operation.js +4 -7
- package/dist/lib/operations/update-consensus-key-operation.js +4 -7
- package/dist/lib/packer/michel-codec-packer.js +3 -14
- package/dist/lib/packer/rpc-packer.js +2 -13
- package/dist/lib/parser/michel-codec-parser.js +82 -107
- package/dist/lib/parser/noop-parser.js +2 -13
- package/dist/lib/prepare/prepare-provider.js +780 -744
- package/dist/lib/provider.js +322 -128
- package/dist/lib/read-provider/rpc-read-adapter.js +76 -121
- package/dist/lib/signer/errors.js +1 -1
- package/dist/lib/signer/noop.js +9 -26
- package/dist/lib/subscribe/errors.js +2 -2
- package/dist/lib/subscribe/polling-subcribe-provider.js +35 -38
- package/dist/lib/taquito.js +33 -33
- package/dist/lib/tz/rpc-tz-provider.js +27 -44
- package/dist/lib/version.js +2 -2
- package/dist/lib/wallet/batch-operation.js +32 -45
- package/dist/lib/wallet/delegation-operation.js +25 -40
- package/dist/lib/wallet/errors.js +15 -3
- package/dist/lib/wallet/increase-paid-storage-operation.js +25 -40
- package/dist/lib/wallet/legacy.js +28 -63
- package/dist/lib/wallet/operation-factory.js +27 -56
- package/dist/lib/wallet/operation.js +123 -59
- package/dist/lib/wallet/origination-operation.js +34 -46
- package/dist/lib/wallet/register-global-constant-operation.js +26 -43
- package/dist/lib/wallet/transaction-operation.js +21 -36
- package/dist/lib/wallet/transfer-ticket-operation.js +21 -36
- package/dist/lib/wallet/wallet.js +187 -184
- package/dist/taquito.es6.js +3424 -3197
- package/dist/taquito.es6.js.map +1 -1
- package/dist/taquito.min.js +1 -1
- package/dist/taquito.umd.js +7930 -7701
- package/dist/taquito.umd.js.map +1 -1
- package/dist/types/batch/rpc-batch-provider.d.ts +18 -18
- package/dist/types/context.d.ts +4 -4
- package/dist/types/contract/big-map.d.ts +3 -3
- package/dist/types/contract/contract-methods/contract-method-interface.d.ts +4 -4
- package/dist/types/contract/contract-methods/contract-method-object-param.d.ts +6 -6
- package/dist/types/contract/contract-methods/contract-on-chain-view.d.ts +3 -3
- package/dist/types/contract/contract.d.ts +6 -6
- package/dist/types/contract/errors.d.ts +11 -11
- package/dist/types/contract/interface.d.ts +42 -42
- package/dist/types/contract/rpc-contract-provider.d.ts +44 -43
- package/dist/types/contract/sapling-state-abstraction.d.ts +1 -1
- package/dist/types/contract/semantic.d.ts +2 -2
- package/dist/types/errors.d.ts +5 -5
- package/dist/types/estimate/errors.d.ts +1 -1
- package/dist/types/estimate/estimate-provider-interface.d.ts +81 -84
- package/dist/types/estimate/estimate.d.ts +28 -11
- package/dist/types/estimate/rpc-estimate-provider.d.ts +34 -30
- package/dist/types/forger/errors.d.ts +2 -2
- package/dist/types/global-constants/default-global-constants-provider.d.ts +2 -2
- package/dist/types/global-constants/errors.d.ts +2 -2
- package/dist/types/global-constants/interface-global-constants-provider.d.ts +1 -1
- package/dist/types/import-key.d.ts +2 -2
- package/dist/types/operations/ballot-operation.d.ts +1 -1
- package/dist/types/operations/delegate-operation.d.ts +2 -2
- package/dist/types/operations/drain-delegate-operation.d.ts +1 -1
- package/dist/types/operations/errors.d.ts +5 -5
- package/dist/types/operations/failing-noop-operation.d.ts +1 -1
- package/dist/types/operations/increase-paid-storage-operation.d.ts +1 -1
- package/dist/types/operations/operations.d.ts +2 -2
- package/dist/types/operations/origination-operation.d.ts +5 -5
- package/dist/types/operations/proposals-operation.d.ts +1 -1
- package/dist/types/operations/register-global-constant-operation.d.ts +2 -2
- package/dist/types/operations/reveal-operation.d.ts +1 -1
- package/dist/types/operations/smart-rollup-add-messages-operation.d.ts +1 -1
- package/dist/types/operations/smart-rollup-execute-outbox-message-operation.d.ts +1 -1
- package/dist/types/operations/smart-rollup-originate-operation.d.ts +1 -1
- package/dist/types/operations/transaction-operation.d.ts +2 -2
- package/dist/types/operations/transfer-ticket-operation.d.ts +2 -2
- package/dist/types/operations/types.d.ts +387 -25
- package/dist/types/operations/update-companion-key-operation.d.ts +1 -1
- package/dist/types/operations/update-consensus-key-operation.d.ts +1 -1
- package/dist/types/prepare/interface.d.ts +32 -33
- package/dist/types/prepare/prepare-provider.d.ts +34 -60
- package/dist/types/provider.d.ts +7 -1
- package/dist/types/read-provider/interface.d.ts +21 -21
- package/dist/types/read-provider/rpc-read-adapter.d.ts +22 -22
- package/dist/types/signer/errors.d.ts +1 -1
- package/dist/types/signer/noop.d.ts +1 -1
- package/dist/types/subscribe/errors.d.ts +2 -2
- package/dist/types/taquito.d.ts +33 -33
- package/dist/types/wallet/errors.d.ts +10 -2
- package/dist/types/wallet/interface.d.ts +13 -13
- package/dist/types/wallet/operation.d.ts +4 -3
- package/dist/types/wallet/wallet.d.ts +36 -35
- package/package.json +27 -15
- package/LICENSE +0 -202
|
@@ -5,139 +5,129 @@ import { ContractProvider } from '../contract/interface';
|
|
|
5
5
|
import { ParamsWithKind } from '../operations/types';
|
|
6
6
|
import { ForgeParams } from '@taquito/local-forging';
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* PrepareProvider is a utility class to output the prepared format of an operation
|
|
9
9
|
*/
|
|
10
10
|
export interface PreparationProvider {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
* @param
|
|
14
|
-
* @param source string or undefined source pkh
|
|
12
|
+
* Method to prepare an activation operation
|
|
13
|
+
* @param params activation operation parameters
|
|
15
14
|
* @returns a PreparedOperation object
|
|
16
15
|
*/
|
|
17
16
|
activate(params: ActivationParams): Promise<PreparedOperation>;
|
|
18
17
|
/**
|
|
19
18
|
*
|
|
20
|
-
*
|
|
19
|
+
* Method to prepare a reveal operation
|
|
21
20
|
* @param params reveal operation parameters
|
|
22
|
-
* @param source string or undefined source pkh
|
|
23
21
|
* @returns a PreparedOperation object
|
|
24
22
|
*/
|
|
25
23
|
reveal(params: RevealParams): Promise<PreparedOperation>;
|
|
26
24
|
/**
|
|
27
|
-
*
|
|
25
|
+
* Method to prepare an origination operation
|
|
28
26
|
* @param params originate operation parameters
|
|
29
|
-
* @param source string or undefined source pkh
|
|
30
27
|
* @returns a PreparedOperation object
|
|
31
28
|
*/
|
|
32
29
|
originate(params: OriginateParams): Promise<PreparedOperation>;
|
|
33
30
|
/**
|
|
34
31
|
*
|
|
35
|
-
*
|
|
32
|
+
* Method to prepare a transaction operation
|
|
36
33
|
*
|
|
37
34
|
* @param params transaction operation parameters
|
|
38
|
-
* @param source string or undefined source pkh
|
|
39
35
|
*
|
|
40
36
|
* @returns a PreparedOperation object
|
|
41
37
|
*/
|
|
42
38
|
transaction(params: TransferParams): Promise<PreparedOperation>;
|
|
43
39
|
/**
|
|
44
40
|
*
|
|
45
|
-
*
|
|
41
|
+
* Method to prepare a delegation operation
|
|
46
42
|
* @param params delegation operation parameters
|
|
47
|
-
* @param source string or undefined source pkh
|
|
48
43
|
* @returns a PreparedOperation object
|
|
49
44
|
*/
|
|
50
45
|
delegation(params: DelegateParams): Promise<PreparedOperation>;
|
|
51
46
|
/**
|
|
52
|
-
*
|
|
47
|
+
* Method to prepare a register_global_constant operation
|
|
53
48
|
* @param params registerGlobalConstant operation parameters
|
|
54
|
-
* @param source string or undefined source pkh
|
|
55
49
|
* @returns a PreparedOperation object
|
|
56
50
|
*/
|
|
57
51
|
registerGlobalConstant(params: RegisterGlobalConstantParams): Promise<PreparedOperation>;
|
|
58
52
|
/**
|
|
59
|
-
*
|
|
53
|
+
* Method to prepare an update_consensus_key operation
|
|
60
54
|
* @param params updateConsensusKey operation parameters
|
|
61
|
-
* @param source string or undefined source pkh
|
|
62
55
|
* @returns a PreparedOperation object
|
|
63
56
|
*/
|
|
64
57
|
updateConsensusKey(params: UpdateConsensusKeyParams): Promise<PreparedOperation>;
|
|
65
58
|
/**
|
|
66
|
-
*
|
|
59
|
+
* Method to prepare an update_companion_key operation
|
|
67
60
|
* @param params updateCompanionKey operation parameters
|
|
68
|
-
* @param source string or undefined source pkh
|
|
69
61
|
* @returns a PreparedOperation object
|
|
70
62
|
*/
|
|
71
63
|
updateCompanionKey(params: UpdateCompanionKeyParams): Promise<PreparedOperation>;
|
|
72
64
|
/**
|
|
73
65
|
*
|
|
74
|
-
*
|
|
75
|
-
* @param params
|
|
76
|
-
* @param source string or undefined source pkh
|
|
66
|
+
* Method to prepare a transfer_ticket operation
|
|
67
|
+
* @param params TransferTicket operation parameters
|
|
77
68
|
* @returns a PreparedOperation object
|
|
78
69
|
*/
|
|
79
70
|
transferTicket(params: TransferTicketParams): Promise<PreparedOperation>;
|
|
80
71
|
/**
|
|
81
|
-
*
|
|
72
|
+
* Method to prepare an increase_paid_storage operation
|
|
82
73
|
* @param params increasePaidStorage operation parameters
|
|
83
|
-
* @param source string or undefined source pkh
|
|
84
74
|
* @returns a PreparedOperation object
|
|
85
75
|
*/
|
|
86
76
|
increasePaidStorage(params: IncreasePaidStorageParams): Promise<PreparedOperation>;
|
|
87
77
|
/**
|
|
88
|
-
*
|
|
78
|
+
* Method to prepare a ballot operation
|
|
89
79
|
* @param params ballot operation parameters
|
|
90
80
|
* @returns a PreparedOperation object
|
|
91
81
|
*/
|
|
92
82
|
ballot(params: BallotParams): Promise<PreparedOperation>;
|
|
93
83
|
/**
|
|
94
84
|
*
|
|
95
|
-
*
|
|
85
|
+
* Method to prepare a proposals operation
|
|
96
86
|
* @param params proposals operation parameters
|
|
97
87
|
* @returns a PreparedOperation object
|
|
98
88
|
*/
|
|
99
89
|
proposals(params: ProposalsParams): Promise<PreparedOperation>;
|
|
100
90
|
/**
|
|
101
|
-
*
|
|
91
|
+
* Method to prepare a drain_delegate operation
|
|
102
92
|
* @param params drainDelegate operation parameters
|
|
103
93
|
* @returns a PreparedOperation object
|
|
104
94
|
*/
|
|
105
95
|
drainDelegate(params: DrainDelegateParams): Promise<PreparedOperation>;
|
|
106
96
|
/**
|
|
107
|
-
*
|
|
97
|
+
* Method to prepare a smart_rollup_add_messages operation
|
|
108
98
|
* @param params smartRollupAddMessages operation parameters
|
|
109
99
|
* @returns a PreparedOperation object
|
|
110
100
|
*/
|
|
111
101
|
smartRollupAddMessages(params: SmartRollupAddMessagesParams): Promise<PreparedOperation>;
|
|
112
102
|
/**
|
|
113
|
-
*
|
|
103
|
+
* Method to prepare a smart_rollup_originate operation
|
|
114
104
|
* @param params smartRollupOriginate operation parameters
|
|
115
105
|
* @returns a PreparedOperation object
|
|
116
106
|
*/
|
|
117
107
|
smartRollupOriginate(params: SmartRollupOriginateParams): Promise<PreparedOperation>;
|
|
118
108
|
/**
|
|
119
109
|
*
|
|
120
|
-
*
|
|
121
|
-
* @param
|
|
110
|
+
* Method to prepare a batch operation
|
|
111
|
+
* @param batchParams batch operation parameters
|
|
122
112
|
* @returns a PreparedOperation object
|
|
123
113
|
*/
|
|
124
114
|
batch(batchParams: ParamsWithKind[]): Promise<PreparedOperation>;
|
|
125
115
|
/**
|
|
126
|
-
*
|
|
116
|
+
* Method to prepare a contract call (transfer) operation
|
|
127
117
|
* @param contractMethod ContractMethodObject retrieved from smart contract
|
|
128
118
|
* @returns a PreparedOperation object
|
|
129
119
|
*/
|
|
130
120
|
contractCall(contractMethod: ContractMethodObject<ContractProvider>): Promise<PreparedOperation>;
|
|
131
121
|
/**
|
|
132
122
|
*
|
|
133
|
-
*
|
|
123
|
+
* Method to convert a PreparedOperation to the params needed for the preapplyOperation method
|
|
134
124
|
* @param prepared a Prepared Operation
|
|
135
125
|
* @returns a PreapplyParams object
|
|
136
126
|
*/
|
|
137
127
|
toPreapply(prepared: PreparedOperation): Promise<PreapplyParams>;
|
|
138
128
|
/**
|
|
139
129
|
*
|
|
140
|
-
*
|
|
130
|
+
* Method to convert a PreparedOperation to the params needed for forging
|
|
141
131
|
* @param param a Prepared Operation
|
|
142
132
|
* @returns a ForgeParams object
|
|
143
133
|
*/
|
|
@@ -150,4 +140,13 @@ export interface PreparedOperation {
|
|
|
150
140
|
protocol: string;
|
|
151
141
|
};
|
|
152
142
|
counter: number;
|
|
143
|
+
simulation?: {
|
|
144
|
+
/**
|
|
145
|
+
* Indexes of operation contents whose gas limit was auto-assigned for simulation.
|
|
146
|
+
* This mirrors octez-client's `may_patch_limits` behavior, which tracks manager
|
|
147
|
+
* operations with unknown gas limits and rebalances only that set against the
|
|
148
|
+
* block gas budget during simulation.
|
|
149
|
+
*/
|
|
150
|
+
gasLimitPatchableIndexes?: number[];
|
|
151
|
+
};
|
|
153
152
|
}
|
|
@@ -9,7 +9,7 @@ import { Estimate } from '../estimate';
|
|
|
9
9
|
import { ForgeParams } from '@taquito/local-forging';
|
|
10
10
|
import { Provider } from '../provider';
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* PrepareProvider is a utility class to output the prepared format of an operation
|
|
13
13
|
*/
|
|
14
14
|
export declare class PrepareProvider extends Provider implements PreparationProvider {
|
|
15
15
|
#private;
|
|
@@ -18,194 +18,168 @@ export declare class PrepareProvider extends Provider implements PreparationProv
|
|
|
18
18
|
private getBlockHash;
|
|
19
19
|
private getProtocolHash;
|
|
20
20
|
private getHeadCounter;
|
|
21
|
-
private
|
|
21
|
+
private adjustGasForManagerOperations;
|
|
22
22
|
private getOperationLimits;
|
|
23
|
+
private getOperationLimitsForManagerOperation;
|
|
23
24
|
private getFee;
|
|
24
25
|
private getSource;
|
|
25
26
|
private addRevealOperationIfNeeded;
|
|
26
27
|
private getKeys;
|
|
27
28
|
private convertIntoArray;
|
|
29
|
+
private getSingleManagerOperationSimulation;
|
|
30
|
+
private withSimulationMetadata;
|
|
28
31
|
private constructOpContents;
|
|
29
32
|
/**
|
|
30
33
|
*
|
|
31
|
-
*
|
|
32
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
33
|
-
* @param source string or undefined source pkh
|
|
34
|
+
* Method to prepare an activation operation
|
|
34
35
|
* @returns a PreparedOperation object
|
|
35
36
|
*/
|
|
36
37
|
activate({ pkh, secret }: ActivationParams): Promise<PreparedOperation>;
|
|
37
38
|
/**
|
|
38
39
|
*
|
|
39
|
-
*
|
|
40
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
41
|
-
* @param source string or undefined source pkh
|
|
40
|
+
* Method to prepare a reveal operation
|
|
42
41
|
* @returns a PreparedOperation object
|
|
43
42
|
*/
|
|
44
43
|
reveal({ fee, gasLimit, storageLimit, proof }: RevealParams): Promise<PreparedOperation>;
|
|
45
44
|
/**
|
|
46
45
|
*
|
|
47
|
-
*
|
|
48
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
46
|
+
* Method to prepare an origination operation
|
|
49
47
|
* @param source string or undefined source pkh
|
|
50
48
|
* @returns a PreparedOperation object
|
|
51
49
|
*/
|
|
52
50
|
originate<TContract extends DefaultContractType = DefaultContractType>({ fee, storageLimit, gasLimit, ...rest }: OriginateParams<ContractStorageType<TContract>>, source?: string): Promise<PreparedOperation>;
|
|
53
51
|
/**
|
|
54
52
|
*
|
|
55
|
-
*
|
|
56
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
57
|
-
* @param source string or undefined source pkh
|
|
53
|
+
* Method to prepare a transaction operation
|
|
58
54
|
* @returns a PreparedOperation object
|
|
59
55
|
*/
|
|
60
56
|
transaction({ fee, storageLimit, gasLimit, ...rest }: TransferParams): Promise<PreparedOperation>;
|
|
61
57
|
/**
|
|
62
58
|
*
|
|
63
|
-
*
|
|
64
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
65
|
-
* @param source string or undefined source pkh
|
|
59
|
+
* Method to prepare a stake pseudo-operation
|
|
66
60
|
* @returns a PreparedOperation object
|
|
67
61
|
*/
|
|
68
62
|
stake({ fee, storageLimit, gasLimit, ...rest }: StakeParams): Promise<PreparedOperation>;
|
|
69
63
|
/**
|
|
70
64
|
*
|
|
71
|
-
*
|
|
72
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
73
|
-
* @param source string or undefined source pkh
|
|
65
|
+
* Method to prepare a unstake pseudo-operation
|
|
74
66
|
* @returns a PreparedOperation object
|
|
75
67
|
*/
|
|
76
68
|
unstake({ fee, storageLimit, gasLimit, ...rest }: UnstakeParams): Promise<PreparedOperation>;
|
|
77
69
|
/**
|
|
78
70
|
*
|
|
79
|
-
*
|
|
80
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
81
|
-
* @param source string or undefined source pkh
|
|
71
|
+
* Method to prepare a finalize_unstake pseudo-operation
|
|
82
72
|
* @returns a PreparedOperation object
|
|
83
73
|
*/
|
|
84
74
|
finalizeUnstake({ fee, storageLimit, gasLimit, to, ...rest }: FinalizeUnstakeParams): Promise<PreparedOperation>;
|
|
85
75
|
/**
|
|
86
76
|
*
|
|
87
|
-
*
|
|
88
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
89
|
-
* @param source string or undefined source pkh
|
|
77
|
+
* Method to prepare a delegation operation
|
|
90
78
|
* @returns a PreparedOperation object
|
|
91
79
|
*/
|
|
92
80
|
delegation({ fee, storageLimit, gasLimit, ...rest }: DelegateParams): Promise<PreparedOperation>;
|
|
93
81
|
/**
|
|
94
82
|
*
|
|
95
|
-
*
|
|
96
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
83
|
+
* Method to prepare a register delegate operation
|
|
97
84
|
* @param source string or undefined source pkh
|
|
98
85
|
* @returns a PreparedOperation object
|
|
99
86
|
*/
|
|
100
87
|
registerDelegate({ fee, storageLimit, gasLimit }: RegisterDelegateParams, source?: string): Promise<PreparedOperation>;
|
|
101
88
|
/**
|
|
102
89
|
*
|
|
103
|
-
*
|
|
104
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
105
|
-
* @param source string or undefined source pkh
|
|
90
|
+
* Method to prepare a register_global_constant operation
|
|
106
91
|
* @returns a PreparedOperation object
|
|
107
92
|
*/
|
|
108
93
|
registerGlobalConstant({ fee, storageLimit, gasLimit, ...rest }: RegisterGlobalConstantParams): Promise<PreparedOperation>;
|
|
109
94
|
/**
|
|
110
95
|
*
|
|
111
|
-
*
|
|
112
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
96
|
+
* Method to prepare an update_consensus_key operation
|
|
113
97
|
* @param source string or undefined source pkh
|
|
114
98
|
* @returns a PreparedOperation object
|
|
115
99
|
*/
|
|
116
100
|
updateConsensusKey({ fee, storageLimit, gasLimit, ...rest }: UpdateConsensusKeyParams, source?: string): Promise<PreparedOperation>;
|
|
117
101
|
/**
|
|
118
102
|
*
|
|
119
|
-
*
|
|
120
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
103
|
+
* Method to prepare an update_companion_key operation
|
|
121
104
|
* @param source string or undefined source pkh
|
|
122
105
|
* @returns a PreparedOperation object
|
|
123
106
|
*/
|
|
124
107
|
updateCompanionKey({ fee, storageLimit, gasLimit, ...rest }: UpdateCompanionKeyParams, source?: string): Promise<PreparedOperation>;
|
|
125
108
|
/**
|
|
126
109
|
*
|
|
127
|
-
*
|
|
128
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
129
|
-
* @param source string or undefined source pkh
|
|
110
|
+
* Method to prepare an increase_paid_storage operation
|
|
130
111
|
* @returns a PreparedOperation object
|
|
131
112
|
*/
|
|
132
113
|
increasePaidStorage({ fee, storageLimit, gasLimit, ...rest }: IncreasePaidStorageParams): Promise<PreparedOperation>;
|
|
133
114
|
/**
|
|
134
115
|
*
|
|
135
|
-
*
|
|
136
|
-
* @param
|
|
116
|
+
* Method to prepare a ballot operation
|
|
117
|
+
* @param params ballot operation parameters
|
|
137
118
|
* @returns a PreparedOperation object
|
|
138
119
|
*/
|
|
139
120
|
ballot(params: BallotParams): Promise<PreparedOperation>;
|
|
140
121
|
/**
|
|
141
122
|
*
|
|
142
|
-
*
|
|
143
|
-
* @param
|
|
123
|
+
* Method to prepare a proposals operation
|
|
124
|
+
* @param params proposals operation parameters
|
|
144
125
|
* @returns a PreparedOperation object
|
|
145
126
|
*/
|
|
146
127
|
proposals(params: ProposalsParams): Promise<PreparedOperation>;
|
|
147
128
|
/**
|
|
148
129
|
*
|
|
149
|
-
*
|
|
150
|
-
* @param
|
|
130
|
+
* Method to prepare a drain_delegate operation
|
|
131
|
+
* @param params drainDelegate operation parameters
|
|
151
132
|
* @returns a PreparedOperation object
|
|
152
133
|
*/
|
|
153
134
|
drainDelegate(params: DrainDelegateParams, source?: string): Promise<PreparedOperation>;
|
|
154
135
|
/**
|
|
155
136
|
*
|
|
156
|
-
*
|
|
157
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
158
|
-
* @param source string or undefined source pkh
|
|
137
|
+
* Method to prepare a transfer_ticket operation
|
|
159
138
|
* @returns a PreparedOperation object
|
|
160
139
|
*/
|
|
161
140
|
transferTicket({ fee, storageLimit, gasLimit, ...rest }: TransferTicketParams): Promise<PreparedOperation>;
|
|
162
141
|
/**
|
|
163
142
|
*
|
|
164
|
-
*
|
|
165
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
166
|
-
* @param source string or undefined source pkh
|
|
143
|
+
* Method to prepare a smart_rollup_add_messages operation
|
|
167
144
|
* @returns a PreparedOperation object
|
|
168
145
|
*/
|
|
169
146
|
smartRollupAddMessages({ fee, storageLimit, gasLimit, ...rest }: SmartRollupAddMessagesParams): Promise<PreparedOperation>;
|
|
170
147
|
/**
|
|
171
148
|
*
|
|
172
|
-
*
|
|
173
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
149
|
+
* Method to prepare a smart_rollup_originate operation
|
|
174
150
|
* @returns a PreparedOperation object
|
|
175
151
|
*/
|
|
176
152
|
smartRollupOriginate({ fee, storageLimit, gasLimit, ...rest }: SmartRollupOriginateParams): Promise<PreparedOperation>;
|
|
177
153
|
/**
|
|
178
154
|
*
|
|
179
|
-
*
|
|
180
|
-
* @param operation RPCOperation object or RPCOperation array
|
|
181
|
-
* @param source string or undefined source pkh
|
|
155
|
+
* Method to prepare a smart_rollup_execute_outbox_message operation
|
|
182
156
|
* @returns a PreparedOperation object
|
|
183
157
|
*/
|
|
184
158
|
smartRollupExecuteOutboxMessage({ fee, storageLimit, gasLimit, ...rest }: SmartRollupExecuteOutboxMessageParams): Promise<PreparedOperation>;
|
|
185
159
|
/**
|
|
186
160
|
*
|
|
187
|
-
*
|
|
188
|
-
* @param
|
|
161
|
+
* Method to prepare a batch operation
|
|
162
|
+
* @param batchParams batch operation parameters
|
|
189
163
|
* @returns a PreparedOperation object
|
|
190
164
|
*/
|
|
191
165
|
batch(batchParams: ParamsWithKind[], estimates?: Estimate[]): Promise<PreparedOperation>;
|
|
192
166
|
/**
|
|
193
167
|
*
|
|
194
|
-
*
|
|
195
|
-
* @param
|
|
168
|
+
* Method to prepare a contract call operation
|
|
169
|
+
* @param contractMethod ContractMethodObject retrieved from smart contract
|
|
196
170
|
* @returns a PreparedOperation object
|
|
197
171
|
*/
|
|
198
172
|
contractCall(contractMethod: ContractMethodObject<ContractProvider>): Promise<PreparedOperation>;
|
|
199
173
|
/**
|
|
200
174
|
*
|
|
201
|
-
*
|
|
175
|
+
* Method to convert a PreparedOperation to the params needed for the preapplyOperation method
|
|
202
176
|
* @param prepared a Prepared Operation
|
|
203
177
|
* @returns a PreapplyParams object
|
|
204
178
|
*/
|
|
205
179
|
toPreapply(prepared: PreparedOperation): Promise<PreapplyParams>;
|
|
206
180
|
/**
|
|
207
181
|
*
|
|
208
|
-
*
|
|
182
|
+
* Method to convert a PreparedOperation to the params needed for forging
|
|
209
183
|
* @param param a Prepared Operation
|
|
210
184
|
* @returns a ForgeParams object
|
|
211
185
|
*/
|
package/dist/types/provider.d.ts
CHANGED
|
@@ -5,6 +5,12 @@ import { PreparedOperation } from './prepare';
|
|
|
5
5
|
import { Estimate } from './estimate';
|
|
6
6
|
export declare abstract class Provider {
|
|
7
7
|
protected context: Context;
|
|
8
|
+
private parseRpcErrors;
|
|
9
|
+
private toBigInt;
|
|
10
|
+
private parseCounterInThePastAdjustments;
|
|
11
|
+
private hasGasLimitTooHighAndBlockExhausted;
|
|
12
|
+
private patchSimulationGasLimits;
|
|
13
|
+
private patchSimulationCounters;
|
|
8
14
|
get rpc(): RpcClientInterface;
|
|
9
15
|
get signer(): import("@taquito/core").Signer;
|
|
10
16
|
constructor(context: Context);
|
|
@@ -27,7 +33,7 @@ export declare abstract class Provider {
|
|
|
27
33
|
storageLimit: number | undefined;
|
|
28
34
|
}>;
|
|
29
35
|
getRPCOp(param: ParamsWithKind): Promise<import("./operations/types").RPCTransferOperation | import("./operations/types").RPCOriginationOperation | import("./operations/types").RPCDelegateOperation | import("./operations/types").RPCRegisterGlobalConstantOperation | import("./operations/types").RPCIncreasePaidStorageOperation | import("./operations/types").RPCUpdateConsensusKeyOperation | import("./operations/types").RPCUpdateCompanionKeyOperation | import("./operations/types").RPCTransferTicketOperation | import("./operations/types").RPCSmartRollupAddMessagesOperation | import("./operations/types").RPCSmartRollupOriginateOperation | import("./operations/types").RPCSmartRollupOutboxMessageOperation>;
|
|
30
|
-
protected simulate(op: RPCSimulateOperationParam): Promise<{
|
|
36
|
+
protected simulate(op: RPCSimulateOperationParam, preparedOperation?: PreparedOperation): Promise<{
|
|
31
37
|
opResponse: import("@taquito/rpc").PreapplyResponse;
|
|
32
38
|
op: RPCSimulateOperationParam;
|
|
33
39
|
context: Context;
|
|
@@ -10,33 +10,33 @@ export type SaplingStateQuery = {
|
|
|
10
10
|
export type BlockIdentifier = 'head' | `head~${number}` | `B${string}` | number;
|
|
11
11
|
export interface TzReadProvider {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* The spendable balance of a contract (in mutez), also known as liquid balance. Corresponds to tez owned by the contract that are neither staked, nor in unstaked requests, nor in frozen bonds. Identical to the 'spendable' RPC.
|
|
14
14
|
* @param address address from which we want to retrieve the spendable balance
|
|
15
15
|
* @param block from which we want to retrieve the balance
|
|
16
16
|
* @returns the balance in mutez
|
|
17
17
|
*/
|
|
18
18
|
getBalance(address: string, block: BlockIdentifier): Promise<BigNumber>;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* The spendable balance of a contract (in mutez), also known as liquid balance. Corresponds to tez owned by the contract that are neither staked, nor in unstaked requests, nor in frozen bonds. Identical to the 'balance' RPC.
|
|
21
21
|
* @param address address from which we want to retrieve the spendable balance
|
|
22
22
|
* @param block from which we want to retrieve the balance
|
|
23
23
|
* @returns the balance in mutez
|
|
24
24
|
*/
|
|
25
25
|
getSpendable(address: string, block: BlockIdentifier): Promise<BigNumber>;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Access the delegate of a contract, if any.
|
|
28
28
|
* @param address contract address from which we want to retrieve the delegate (baker)
|
|
29
29
|
* @param block from which we want to retrieve the delegate
|
|
30
30
|
* @returns the public key hash of the delegate or null if no delegate
|
|
31
31
|
*/
|
|
32
32
|
getDelegate(address: string, block: BlockIdentifier): Promise<string | null>;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* Access the next protocol hash
|
|
35
35
|
* @param block from which we want to retrieve the next protocol hash
|
|
36
36
|
*/
|
|
37
37
|
getNextProtocol(block: BlockIdentifier): Promise<string>;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* Access protocol constants used in Taquito
|
|
40
40
|
* @param block from which we want to retrieve the constants
|
|
41
41
|
*/
|
|
42
42
|
getProtocolConstants(block: BlockIdentifier): Promise<{
|
|
@@ -49,83 +49,83 @@ export interface TzReadProvider {
|
|
|
49
49
|
smart_rollup_origination_size: number;
|
|
50
50
|
}>;
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* Access the script (code and storage) of a smart contract
|
|
53
53
|
* @param contract contract address from which we want to retrieve the script
|
|
54
54
|
* @param block from which we want to retrieve the storage value
|
|
55
55
|
* @returns Note: The code must be in the JSON format and not contain global constant
|
|
56
56
|
*/
|
|
57
57
|
getScript(contract: string, block: BlockIdentifier): Promise<ScriptedContracts>;
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* Access the storage of a contract
|
|
60
60
|
* @param contract contract address from which we want to retrieve the storage
|
|
61
61
|
* @param block from which we want to retrieve the storage value
|
|
62
62
|
*/
|
|
63
63
|
getStorage(contract: string, block: BlockIdentifier): Promise<MichelsonV1Expression>;
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* Access the block hash
|
|
66
66
|
*/
|
|
67
67
|
getBlockHash(block: BlockIdentifier): Promise<string>;
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Access the block level
|
|
70
70
|
*/
|
|
71
71
|
getBlockLevel(block: BlockIdentifier): Promise<number>;
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* Access the counter of an address
|
|
74
74
|
* @param pkh from which we want to retrieve the counter
|
|
75
75
|
* @param block from which we want to retrieve the counter
|
|
76
76
|
*/
|
|
77
77
|
getCounter(pkh: string, block: BlockIdentifier): Promise<string>;
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* Access the timestamp of a block
|
|
80
80
|
* @param block from which we want to retrieve the timestamp
|
|
81
81
|
* @returns date ISO format zero UTC offset ("2022-01-19T22:37:07Z")
|
|
82
82
|
*/
|
|
83
83
|
getBlockTimestamp(block: BlockIdentifier): Promise<string>;
|
|
84
84
|
/**
|
|
85
|
-
*
|
|
85
|
+
* Access the value associated with a key in a big map.
|
|
86
86
|
* @param bigMapQuery Big Map ID and Expression hash to query (A b58check encoded Blake2b hash of the expression)
|
|
87
87
|
* @param block from which we want to retrieve the big map value
|
|
88
88
|
*/
|
|
89
89
|
getBigMapValue(bigMapQuery: BigMapQuery, block: BlockIdentifier): Promise<MichelsonV1Expression>;
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
92
|
-
* @param
|
|
91
|
+
* Access the value associated with a sapling state ID.
|
|
92
|
+
* @param saplingStateQuery Sapling state ID query
|
|
93
93
|
* @param block from which we want to retrieve the sapling state
|
|
94
94
|
*/
|
|
95
95
|
getSaplingDiffById(saplingStateQuery: SaplingStateQuery, block: BlockIdentifier): Promise<SaplingDiffResponse>;
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* Access the sapling state of a smart contract.
|
|
98
98
|
* @param contractAddress The address of the smart contract
|
|
99
99
|
* @param block The block you want to retrieve the sapling state from
|
|
100
100
|
*/
|
|
101
101
|
getSaplingDiffByContract(contractAddress: string, block: BlockIdentifier): Promise<SaplingDiffResponse>;
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
103
|
+
* Return the list of entrypoints of the contract
|
|
104
104
|
* @param contract address of the contract we want to get the entrypoints of
|
|
105
105
|
*/
|
|
106
106
|
getEntrypoints(contract: string): Promise<EntrypointsResponse>;
|
|
107
107
|
/**
|
|
108
|
-
*
|
|
108
|
+
* Access the chain id
|
|
109
109
|
*/
|
|
110
110
|
getChainId(): Promise<string>;
|
|
111
111
|
/**
|
|
112
|
-
*
|
|
112
|
+
* Indicate if an account is revealed
|
|
113
113
|
* @param publicKeyHash of the account
|
|
114
114
|
* @param block from which we want to know if the account is revealed
|
|
115
115
|
*/
|
|
116
116
|
isAccountRevealed(publicKeyHash: string, block: BlockIdentifier): Promise<boolean>;
|
|
117
117
|
/**
|
|
118
|
-
*
|
|
118
|
+
* Return all the information about a block
|
|
119
119
|
* @param block from which we want to retrieve the information
|
|
120
120
|
*/
|
|
121
121
|
getBlock(block: BlockIdentifier): Promise<BlockResponse>;
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
123
|
+
* Return a list of 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.
|
|
124
124
|
* @param block from which we want to retrieve the information
|
|
125
125
|
*/
|
|
126
126
|
getLiveBlocks(block: BlockIdentifier): Promise<string[]>;
|
|
127
127
|
/**
|
|
128
|
-
*
|
|
128
|
+
* Returns the cycle at which the launch of the Adaptive Issuance feature is set to happen. A result of null means that the feature is not yet set to launch.
|
|
129
129
|
* @param block from which we want to retrieve the information
|
|
130
130
|
*/
|
|
131
131
|
getAdaptiveIssuanceLaunchCycle(block: BlockIdentifier): Promise<AILaunchCycleResponse>;
|