starknet 4.17.0 → 4.18.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 (150) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +2 -10
  3. package/dist/index.d.ts +27 -9
  4. package/dist/index.global.js +30 -13
  5. package/dist/index.global.js.map +1 -1
  6. package/dist/index.js +30 -13
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.mjs +30 -13
  9. package/dist/index.mjs.map +1 -1
  10. package/package.json +5 -1
  11. package/.babelrc +0 -6
  12. package/.commitlintrc +0 -22
  13. package/.eslintignore +0 -2
  14. package/.eslintrc +0 -28
  15. package/.prettierrc +0 -6
  16. package/.releaserc +0 -28
  17. package/CODE_OF_CONDUCT.md +0 -128
  18. package/CONTRIBUTING.md +0 -52
  19. package/__mocks__/Account.json +0 -25486
  20. package/__mocks__/ERC20.json +0 -40027
  21. package/__mocks__/TestDapp.json +0 -12962
  22. package/__mocks__/contract.json +0 -33191
  23. package/__mocks__/l1l2_compiled.json +0 -10107
  24. package/__mocks__/multicall.json +0 -8139
  25. package/__mocks__/naming_compiled.json +0 -53283
  26. package/__mocks__/starknetId_compiled.json +0 -44703
  27. package/__mocks__/typedDataExample.json +0 -35
  28. package/__mocks__/typedDataSessionExample.json +0 -42
  29. package/__mocks__/typedDataStructArrayExample.json +0 -44
  30. package/__tests__/account.test.ts +0 -345
  31. package/__tests__/contract.test.ts +0 -249
  32. package/__tests__/defaultProvider.test.ts +0 -177
  33. package/__tests__/fixtures.ts +0 -84
  34. package/__tests__/jest.setup.ts +0 -30
  35. package/__tests__/rpcProvider.test.ts +0 -132
  36. package/__tests__/sequencerProvider.test.ts +0 -123
  37. package/__tests__/utils/__snapshots__/ellipticalCurve.test.ts.snap +0 -5
  38. package/__tests__/utils/__snapshots__/utils.browser.test.ts.snap +0 -5
  39. package/__tests__/utils/__snapshots__/utils.test.ts.snap +0 -5
  40. package/__tests__/utils/address.test.ts +0 -45
  41. package/__tests__/utils/ellipticalCurve.test.ts +0 -91
  42. package/__tests__/utils/merkle.test.ts +0 -256
  43. package/__tests__/utils/shortString.test.ts +0 -22
  44. package/__tests__/utils/starknetId.test.ts +0 -53
  45. package/__tests__/utils/transactionHash.test.ts +0 -17
  46. package/__tests__/utils/typedData.test.ts +0 -223
  47. package/__tests__/utils/uint256.test.ts +0 -32
  48. package/__tests__/utils/utils.browser.test.ts +0 -29
  49. package/__tests__/utils/utils.test.ts +0 -141
  50. package/img/logo.svg +0 -17
  51. package/index.d.ts +0 -2683
  52. package/index.global.js +0 -23192
  53. package/index.global.js.map +0 -1
  54. package/index.js +0 -4910
  55. package/index.js.map +0 -1
  56. package/index.mjs +0 -4852
  57. package/index.mjs.map +0 -1
  58. package/src/account/default.ts +0 -501
  59. package/src/account/index.ts +0 -2
  60. package/src/account/interface.ts +0 -309
  61. package/src/constants.ts +0 -2065
  62. package/src/contract/contractFactory.ts +0 -88
  63. package/src/contract/default.ts +0 -425
  64. package/src/contract/index.ts +0 -3
  65. package/src/contract/interface.ts +0 -106
  66. package/src/index.ts +0 -26
  67. package/src/provider/default.ts +0 -187
  68. package/src/provider/errors.ts +0 -14
  69. package/src/provider/index.ts +0 -9
  70. package/src/provider/interface.ts +0 -281
  71. package/src/provider/rpc.ts +0 -482
  72. package/src/provider/sequencer.ts +0 -523
  73. package/src/provider/utils.ts +0 -100
  74. package/src/signer/default.ts +0 -99
  75. package/src/signer/index.ts +0 -2
  76. package/src/signer/interface.ts +0 -77
  77. package/src/types/account.ts +0 -43
  78. package/src/types/api/index.ts +0 -10
  79. package/src/types/api/openrpc.ts +0 -607
  80. package/src/types/api/rpc.ts +0 -45
  81. package/src/types/api/sequencer.ts +0 -369
  82. package/src/types/contract.ts +0 -5
  83. package/src/types/index.ts +0 -8
  84. package/src/types/lib.ts +0 -143
  85. package/src/types/provider.ts +0 -134
  86. package/src/types/signer.ts +0 -24
  87. package/src/utils/address.ts +0 -44
  88. package/src/utils/calldata.ts +0 -250
  89. package/src/utils/ellipticCurve.ts +0 -120
  90. package/src/utils/encode.ts +0 -66
  91. package/src/utils/events.ts +0 -32
  92. package/src/utils/fetchPonyfill.ts +0 -5
  93. package/src/utils/hash.ts +0 -235
  94. package/src/utils/json.ts +0 -15
  95. package/src/utils/merkle.ts +0 -69
  96. package/src/utils/number.ts +0 -98
  97. package/src/utils/provider.ts +0 -28
  98. package/src/utils/responseParser/index.ts +0 -28
  99. package/src/utils/responseParser/rpc.ts +0 -70
  100. package/src/utils/responseParser/sequencer.ts +0 -135
  101. package/src/utils/shortString.ts +0 -21
  102. package/src/utils/stark.ts +0 -57
  103. package/src/utils/starknetId.ts +0 -116
  104. package/src/utils/transaction.ts +0 -56
  105. package/src/utils/typedData/index.ts +0 -247
  106. package/src/utils/typedData/types.ts +0 -37
  107. package/src/utils/typedData/utils.ts +0 -16
  108. package/src/utils/uint256.ts +0 -32
  109. package/src/utils/url.ts +0 -53
  110. package/tsconfig.eslint.json +0 -4
  111. package/tsup.config.ts +0 -9
  112. package/www/README.md +0 -41
  113. package/www/babel.config.js +0 -3
  114. package/www/code-examples/account.js +0 -65
  115. package/www/code-examples/amm.js +0 -44
  116. package/www/code-examples/erc20.js +0 -13
  117. package/www/code-examples/package-lock.json +0 -336
  118. package/www/code-examples/package.json +0 -15
  119. package/www/docs/API/_category_.json +0 -5
  120. package/www/docs/API/account.md +0 -463
  121. package/www/docs/API/changelog.md +0 -15
  122. package/www/docs/API/contract.md +0 -135
  123. package/www/docs/API/contractFactory.md +0 -45
  124. package/www/docs/API/index.md +0 -3
  125. package/www/docs/API/provider.md +0 -725
  126. package/www/docs/API/signer.md +0 -105
  127. package/www/docs/API/utils.md +0 -374
  128. package/www/docusaurus.config.js +0 -130
  129. package/www/guides/account.md +0 -140
  130. package/www/guides/cra.md +0 -3
  131. package/www/guides/erc20.md +0 -163
  132. package/www/guides/intro.md +0 -63
  133. package/www/package-lock.json +0 -20405
  134. package/www/package.json +0 -43
  135. package/www/sidebars.js +0 -31
  136. package/www/src/components/HomepageFeatures/index.tsx +0 -67
  137. package/www/src/components/HomepageFeatures/styles.module.css +0 -10
  138. package/www/src/css/custom.css +0 -39
  139. package/www/src/pages/index.module.css +0 -23
  140. package/www/src/pages/index.tsx +0 -40
  141. package/www/src/pages/markdown-page.md +0 -7
  142. package/www/static/.nojekyll +0 -0
  143. package/www/static/img/docusaurus.png +0 -0
  144. package/www/static/img/favicon.ico +0 -0
  145. package/www/static/img/logo.svg +0 -17
  146. package/www/static/img/starknet-1.png +0 -0
  147. package/www/static/img/starknet-2.png +0 -0
  148. package/www/static/img/starknet-3.png +0 -0
  149. package/www/static/img/tutorial/docsVersionDropdown.png +0 -0
  150. package/www/static/img/tutorial/localeDropdown.png +0 -0
@@ -1,187 +0,0 @@
1
- import { StarknetChainId } from '../constants';
2
- import {
3
- Call,
4
- CallContractResponse,
5
- ContractClass,
6
- DeclareContractResponse,
7
- DeclareContractTransaction,
8
- DeployAccountContractTransaction,
9
- DeployContractResponse,
10
- EstimateFeeResponse,
11
- GetBlockResponse,
12
- GetCodeResponse,
13
- GetTransactionReceiptResponse,
14
- GetTransactionResponse,
15
- Invocation,
16
- InvocationsDetailsWithNonce,
17
- InvokeFunctionResponse,
18
- Status,
19
- } from '../types';
20
- import { BigNumberish } from '../utils/number';
21
- import { ProviderInterface } from './interface';
22
- import { RpcProvider, RpcProviderOptions } from './rpc';
23
- import { SequencerProvider, SequencerProviderOptions } from './sequencer';
24
- import { BlockIdentifier } from './utils';
25
-
26
- export interface ProviderOptions {
27
- sequencer?: SequencerProviderOptions;
28
- rpc?: RpcProviderOptions;
29
- }
30
-
31
- export class Provider implements ProviderInterface {
32
- private provider!: ProviderInterface;
33
-
34
- constructor(providerOrOptions?: ProviderOptions | ProviderInterface) {
35
- if (providerOrOptions instanceof Provider) {
36
- // providerOrOptions is Provider
37
- this.provider = providerOrOptions.provider;
38
- } else if (
39
- providerOrOptions instanceof RpcProvider ||
40
- providerOrOptions instanceof SequencerProvider
41
- ) {
42
- // providerOrOptions is SequencerProvider or RpcProvider
43
- this.provider = <ProviderInterface>providerOrOptions;
44
- } else if (providerOrOptions && 'rpc' in providerOrOptions) {
45
- // providerOrOptions is rpc option
46
- this.provider = new RpcProvider(<RpcProviderOptions>providerOrOptions.rpc);
47
- } else if (providerOrOptions && 'sequencer' in providerOrOptions) {
48
- // providerOrOptions is sequencer option
49
- this.provider = new SequencerProvider(<SequencerProviderOptions>providerOrOptions.sequencer);
50
- } else {
51
- // providerOrOptions is none, create SequencerProvider as default
52
- this.provider = new SequencerProvider();
53
- }
54
- }
55
-
56
- public get chainId(): StarknetChainId {
57
- return this.provider.chainId;
58
- }
59
-
60
- public async getChainId(): Promise<StarknetChainId> {
61
- return this.provider.getChainId();
62
- }
63
-
64
- public async getBlock(blockIdentifier: BlockIdentifier): Promise<GetBlockResponse> {
65
- return this.provider.getBlock(blockIdentifier);
66
- }
67
-
68
- public async getClassAt(
69
- contractAddress: string,
70
- blockIdentifier?: BlockIdentifier
71
- ): Promise<ContractClass> {
72
- return this.provider.getClassAt(contractAddress, blockIdentifier);
73
- }
74
-
75
- public async getClassHashAt(
76
- contractAddress: string,
77
- blockIdentifier: BlockIdentifier
78
- ): Promise<string> {
79
- return this.provider.getClassHashAt(contractAddress, blockIdentifier);
80
- }
81
-
82
- public getClassByHash(classHash: string): Promise<ContractClass> {
83
- return this.provider.getClassByHash(classHash);
84
- }
85
-
86
- public async getEstimateFee(
87
- invocationWithTxType: Invocation,
88
- invocationDetails: InvocationsDetailsWithNonce,
89
- blockIdentifier: BlockIdentifier
90
- ): Promise<EstimateFeeResponse> {
91
- return this.provider.getEstimateFee(invocationWithTxType, invocationDetails, blockIdentifier);
92
- }
93
-
94
- public async getInvokeEstimateFee(
95
- invocationWithTxType: Invocation,
96
- invocationDetails: InvocationsDetailsWithNonce,
97
- blockIdentifier?: BlockIdentifier
98
- ): Promise<EstimateFeeResponse> {
99
- return this.provider.getInvokeEstimateFee(
100
- invocationWithTxType,
101
- invocationDetails,
102
- blockIdentifier
103
- );
104
- }
105
-
106
- public async getNonceForAddress(
107
- contractAddress: string,
108
- blockIdentifier?: BlockIdentifier
109
- ): Promise<BigNumberish> {
110
- return this.provider.getNonceForAddress(contractAddress, blockIdentifier);
111
- }
112
-
113
- public async getStorageAt(
114
- contractAddress: string,
115
- key: BigNumberish,
116
- blockIdentifier?: BlockIdentifier
117
- ): Promise<BigNumberish> {
118
- return this.provider.getStorageAt(contractAddress, key, blockIdentifier);
119
- }
120
-
121
- public async getTransaction(txHash: BigNumberish): Promise<GetTransactionResponse> {
122
- return this.provider.getTransaction(txHash);
123
- }
124
-
125
- public async getTransactionReceipt(txHash: BigNumberish): Promise<GetTransactionReceiptResponse> {
126
- return this.provider.getTransactionReceipt(txHash);
127
- }
128
-
129
- public async callContract(
130
- request: Call,
131
- blockIdentifier?: BlockIdentifier
132
- ): Promise<CallContractResponse> {
133
- return this.provider.callContract(request, blockIdentifier);
134
- }
135
-
136
- public async invokeFunction(
137
- functionInvocation: Invocation,
138
- details: InvocationsDetailsWithNonce
139
- ): Promise<InvokeFunctionResponse> {
140
- return this.provider.invokeFunction(functionInvocation, details);
141
- }
142
-
143
- public async deployAccountContract(
144
- payload: DeployAccountContractTransaction,
145
- details: InvocationsDetailsWithNonce
146
- ): Promise<DeployContractResponse> {
147
- return this.provider.deployAccountContract(payload, details);
148
- }
149
-
150
- public async declareContract(
151
- transaction: DeclareContractTransaction,
152
- details: InvocationsDetailsWithNonce
153
- ): Promise<DeclareContractResponse> {
154
- return this.provider.declareContract(transaction, details);
155
- }
156
-
157
- public async getDeclareEstimateFee(
158
- transaction: DeclareContractTransaction,
159
- details: InvocationsDetailsWithNonce,
160
- blockIdentifier?: BlockIdentifier
161
- ): Promise<EstimateFeeResponse> {
162
- return this.provider.getDeclareEstimateFee(transaction, details, blockIdentifier);
163
- }
164
-
165
- public getDeployAccountEstimateFee(
166
- transaction: DeployAccountContractTransaction,
167
- details: InvocationsDetailsWithNonce,
168
- blockIdentifier?: BlockIdentifier
169
- ): Promise<EstimateFeeResponse> {
170
- return this.provider.getDeployAccountEstimateFee(transaction, details, blockIdentifier);
171
- }
172
-
173
- public async getCode(
174
- contractAddress: string,
175
- blockIdentifier?: BlockIdentifier
176
- ): Promise<GetCodeResponse> {
177
- return this.provider.getCode(contractAddress, blockIdentifier);
178
- }
179
-
180
- public async waitForTransaction(
181
- txHash: BigNumberish,
182
- retryInterval?: number,
183
- successStates?: Array<Status>
184
- ): Promise<GetTransactionReceiptResponse> {
185
- return this.provider.waitForTransaction(txHash, retryInterval, successStates);
186
- }
187
- }
@@ -1,14 +0,0 @@
1
- /* eslint-disable max-classes-per-file */
2
- import { CustomError } from 'ts-custom-error';
3
-
4
- export class GatewayError extends CustomError {
5
- constructor(message: string, public errorCode: string) {
6
- super(message);
7
- }
8
- }
9
-
10
- export class HttpError extends CustomError {
11
- constructor(message: string, public errorCode: number) {
12
- super(message);
13
- }
14
- }
@@ -1,9 +0,0 @@
1
- import { Provider } from './default';
2
-
3
- export * from './default';
4
- export * from './errors';
5
- export * from './sequencer';
6
- export * from './interface';
7
- export * from './rpc';
8
-
9
- export const defaultProvider = new Provider();
@@ -1,281 +0,0 @@
1
- import { StarknetChainId } from '../constants';
2
- import type {
3
- Call,
4
- CallContractResponse,
5
- ContractClass,
6
- DeclareContractResponse,
7
- DeclareContractTransaction,
8
- DeployAccountContractPayload,
9
- DeployAccountContractTransaction,
10
- DeployContractResponse,
11
- EstimateFeeResponse,
12
- GetBlockResponse,
13
- GetCodeResponse,
14
- GetTransactionReceiptResponse,
15
- GetTransactionResponse,
16
- Invocation,
17
- InvocationsDetailsWithNonce,
18
- InvokeFunctionResponse,
19
- Status,
20
- } from '../types';
21
- import type { BigNumberish } from '../utils/number';
22
- import { BlockIdentifier } from './utils';
23
-
24
- export abstract class ProviderInterface {
25
- public abstract chainId: StarknetChainId;
26
-
27
- /**
28
- * Gets the Starknet chain Id
29
- *
30
- * @returns the chain Id
31
- */
32
- public abstract getChainId(): Promise<StarknetChainId>;
33
-
34
- /**
35
- * Calls a function on the StarkNet contract.
36
- *
37
- * @param call transaction to be called
38
- * @param blockIdentifier block identifier
39
- * @returns the result of the function on the smart contract.
40
- */
41
- public abstract callContract(
42
- call: Call,
43
- blockIdentifier?: BlockIdentifier
44
- ): Promise<CallContractResponse>;
45
-
46
- /**
47
- * Gets the block information
48
- *
49
- * @param blockIdentifier block identifier
50
- * @returns the block object
51
- */
52
- public abstract getBlock(blockIdentifier: BlockIdentifier): Promise<GetBlockResponse>;
53
-
54
- /**
55
- * @deprecated The method should not be used
56
- */
57
- public abstract getCode(
58
- contractAddress: string,
59
- blockIdentifier?: BlockIdentifier
60
- ): Promise<GetCodeResponse>;
61
-
62
- /**
63
- * Gets the contract class of the deployed contract.
64
- *
65
- * @param contractAddress - contract address
66
- * @param blockIdentifier - block identifier
67
- * @returns Contract class of compiled contract
68
- */
69
- public abstract getClassAt(
70
- contractAddress: string,
71
- blockIdentifier?: BlockIdentifier
72
- ): Promise<ContractClass>;
73
-
74
- /**
75
- * Returns the class hash deployed under the given address.
76
- *
77
- * @param contractAddress - contract address
78
- * @param blockIdentifier - block identifier
79
- * @returns Class hash
80
- */
81
- public abstract getClassHashAt(
82
- contractAddress: string,
83
- blockIdentifier?: BlockIdentifier
84
- ): Promise<string>;
85
-
86
- /**
87
- * Returns the contract class deployed under the given class hash.
88
- *
89
- * @param classHash - class hash
90
- * @returns Contract class of compiled contract
91
- */
92
- public abstract getClassByHash(classHash: string): Promise<ContractClass>;
93
-
94
- /**
95
- * Gets the nonce of a contract with respect to a specific block
96
- *
97
- * @param contractAddress - contract address
98
- * @returns the hex nonce
99
- */
100
- public abstract getNonceForAddress(
101
- contractAddress: string,
102
- blockIdentifier?: BlockIdentifier
103
- ): Promise<BigNumberish>;
104
-
105
- /**
106
- * Gets the contract's storage variable at a specific key.
107
- *
108
- * @param contractAddress
109
- * @param key - from getStorageVarAddress('<STORAGE_VARIABLE_NAME>') (WIP)
110
- * @param blockIdentifier - block identifier
111
- * @returns the value of the storage variable
112
- */
113
- public abstract getStorageAt(
114
- contractAddress: string,
115
- key: BigNumberish,
116
- blockIdentifier?: BlockIdentifier
117
- ): Promise<BigNumberish>;
118
-
119
- /**
120
- * Gets the transaction information from a tx id.
121
- *
122
- * @param txHash
123
- * @returns the transaction object { transaction_id, status, transaction, block_number?, block_number?, transaction_index?, transaction_failure_reason? }
124
- */
125
- public abstract getTransaction(transactionHash: BigNumberish): Promise<GetTransactionResponse>;
126
-
127
- /**
128
- * Gets the transaction receipt from a tx hash.
129
- *
130
- * @param txHash
131
- * @returns the transaction receipt object
132
- */
133
- public abstract getTransactionReceipt(
134
- transactionHash: BigNumberish
135
- ): Promise<GetTransactionReceiptResponse>;
136
-
137
- /**
138
- * Deploys a given compiled Account contract (json) to starknet
139
- *
140
- * @param payload payload to be deployed containing:
141
- * - compiled contract code
142
- * - constructor calldata
143
- * - address salt
144
- * @returns a confirmation of sending a transaction on the starknet contract
145
- */
146
- public abstract deployAccountContract(
147
- payload: DeployAccountContractPayload,
148
- details: InvocationsDetailsWithNonce
149
- ): Promise<DeployContractResponse>;
150
-
151
- /**
152
- * Invokes a function on starknet
153
- * @deprecated This method wont be supported as soon as fees are mandatory. Should not be used outside of Account class
154
- *
155
- * @param invocation the invocation object containing:
156
- * - contractAddress - the address of the contract
157
- * - entrypoint - the entrypoint of the contract
158
- * - calldata - (defaults to []) the calldata
159
- * - signature - (defaults to []) the signature
160
- * @param details - optional details containing:
161
- * - nonce - optional nonce
162
- * - version - optional version
163
- * - maxFee - optional maxFee
164
- * @returns response from addTransaction
165
- */
166
- public abstract invokeFunction(
167
- invocation: Invocation,
168
- details: InvocationsDetailsWithNonce
169
- ): Promise<InvokeFunctionResponse>;
170
-
171
- /**
172
- * Declares a given compiled contract (json) to starknet
173
- * @param transaction transaction payload to be deployed containing:
174
- * - compiled contract code
175
- * - sender address
176
- * - signature
177
- * @param details Invocation Details containing:
178
- * - nonce
179
- * - optional version
180
- * - optional maxFee
181
- * @returns a confirmation of sending a transaction on the starknet contract
182
- */
183
- public abstract declareContract(
184
- transaction: DeclareContractTransaction,
185
- details: InvocationsDetailsWithNonce
186
- ): Promise<DeclareContractResponse>;
187
-
188
- /**
189
- * Estimates the fee for a given INVOKE transaction
190
- * @deprecated Please use getInvokeEstimateFee or getDeclareEstimateFee instead. Should not be used outside of Account class
191
- *
192
- * @param invocation the invocation object containing:
193
- * - contractAddress - the address of the contract
194
- * - entrypoint - the entrypoint of the contract
195
- * - calldata - (defaults to []) the calldata
196
- * - signature - (defaults to []) the signature
197
- * @param blockIdentifier - block identifier
198
- * @param details - optional details containing:
199
- * - nonce - optional nonce
200
- * - version - optional version
201
- * @returns the estimated fee
202
- */
203
- public abstract getEstimateFee(
204
- invocation: Invocation,
205
- details: InvocationsDetailsWithNonce,
206
- blockIdentifier: BlockIdentifier
207
- ): Promise<EstimateFeeResponse>;
208
-
209
- /**
210
- * Estimates the fee for a given INVOKE transaction
211
- *
212
- * @param invocation the invocation object containing:
213
- * - contractAddress - the address of the contract
214
- * - entrypoint - the entrypoint of the contract
215
- * - calldata - (defaults to []) the calldata
216
- * - signature - (defaults to []) the signature
217
- * @param blockIdentifier - block identifier
218
- * @param details - optional details containing:
219
- * - nonce - optional nonce
220
- * - version - optional version
221
- * @returns the estimated fee
222
- */
223
- public abstract getInvokeEstimateFee(
224
- invocation: Invocation,
225
- details: InvocationsDetailsWithNonce,
226
- blockIdentifier?: BlockIdentifier
227
- ): Promise<EstimateFeeResponse>;
228
-
229
- /**
230
- * Estimates the fee for a given DECLARE transaction
231
- *
232
- * @param transaction transaction payload to be declared containing:
233
- * - compiled contract code
234
- * - sender address
235
- * - signature - (defaults to []) the signature
236
- * @param details - optional details containing:
237
- * - nonce
238
- * - version - optional version
239
- * - optional maxFee
240
- * @param blockIdentifier - block identifier
241
- * @returns the estimated fee
242
- */
243
- public abstract getDeclareEstimateFee(
244
- transaction: DeclareContractTransaction,
245
- details: InvocationsDetailsWithNonce,
246
- blockIdentifier?: BlockIdentifier
247
- ): Promise<EstimateFeeResponse>;
248
-
249
- /**
250
- * Estimates the fee for a given DEPLOY_ACCOUNT transaction
251
- *
252
- * @param transaction transaction payload to be deployed containing:
253
- * - classHash
254
- * - constructorCalldata
255
- * - addressSalt
256
- * - signature - (defaults to []) the signature
257
- * @param details - optional details containing:
258
- * - nonce
259
- * - version - optional version
260
- * - optional maxFee
261
- * @param blockIdentifier - block identifier
262
- * @returns the estimated fee
263
- */
264
- public abstract getDeployAccountEstimateFee(
265
- transaction: DeployAccountContractTransaction,
266
- details: InvocationsDetailsWithNonce,
267
- blockIdentifier?: BlockIdentifier
268
- ): Promise<EstimateFeeResponse>;
269
-
270
- /**
271
- * Wait for the transaction to be accepted
272
- * @param txHash - transaction hash
273
- * @param retryInterval - retry interval
274
- * @return GetTransactionReceiptResponse
275
- */
276
- public abstract waitForTransaction(
277
- txHash: BigNumberish,
278
- retryInterval?: number,
279
- successStates?: Array<Status>
280
- ): Promise<GetTransactionReceiptResponse>;
281
- }