starknet 8.0.0-beta.3 → 8.0.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/CHANGELOG.md +44 -0
- package/dist/index.d.ts +60 -110
- package/dist/index.global.js +3 -34
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +3 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
# [8.0.0](https://github.com/starknet-io/starknet.js/compare/v7.6.4...v8.0.0) (2025-07-28)
|
|
2
|
+
|
|
3
|
+
- feat!: bump version ([0afb3f8](https://github.com/starknet-io/starknet.js/commit/0afb3f8e82b147bcc7084c417826313c1e488053))
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- accountInvocationsFactory typing ([a1b1e7f](https://github.com/starknet-io/starknet.js/commit/a1b1e7f60e7abfa43836666a0d801abd33242d7b))
|
|
8
|
+
- change DeclareDeployDCResponse name to DeclareDeployUDCResponse ([6498b8b](https://github.com/starknet-io/starknet.js/commit/6498b8b0bbd137658862422031132073f1c42ac3))
|
|
9
|
+
- devenet ([3b2be9d](https://github.com/starknet-io/starknet.js/commit/3b2be9d46beec4931eb96183c0985e0f607e5713))
|
|
10
|
+
- export Deployer, remove old helper parseUDCEvent, fix some tests imports ([c2d0d55](https://github.com/starknet-io/starknet.js/commit/c2d0d5508239f164ec538707bd19625c70dcb604))
|
|
11
|
+
- factory jsdocs, CompleteDeclareContractPayload type update for Cairo1 ([06920cb](https://github.com/starknet-io/starknet.js/commit/06920cbcb52c70fe01d8161d27d6f0e32be94627))
|
|
12
|
+
- import all types from ./api, remove 07 package ([68ac49c](https://github.com/starknet-io/starknet.js/commit/68ac49ceab4de5738671fd9d05757056a8c980df))
|
|
13
|
+
- improve DeclareContractPayload type ([00835ca](https://github.com/starknet-io/starknet.js/commit/00835caf9406e8a9afd2cde22b43e5d3e2773990))
|
|
14
|
+
- remove helper buildUDCCall ([d299f7b](https://github.com/starknet-io/starknet.js/commit/d299f7b3b175c265b218c2d182762ee38f3aa27a))
|
|
15
|
+
- removed duplicated buildDeployerContractPayload ([e7b728d](https://github.com/starknet-io/starknet.js/commit/e7b728ddc6e5e9e3cffea941f4dcc6e20d8df1ff))
|
|
16
|
+
- sepolia Pathfinder tests PASS ([0c41fc2](https://github.com/starknet-io/starknet.js/commit/0c41fc222c33077c7aad45c79af06852a0db3f69))
|
|
17
|
+
- type problem in tests, due to merge in v8 ([fd49e8a](https://github.com/starknet-io/starknet.js/commit/fd49e8af3051b31f105cc82767248b7832df8130))
|
|
18
|
+
- use new entrypoint on the new UDC ([992ee09](https://github.com/starknet-io/starknet.js/commit/992ee09e08533efb3a12ff91abc0fca2acb552f2))
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
- add custom Deployer in Account constructor ([7d62e20](https://github.com/starknet-io/starknet.js/commit/7d62e202c3bab698e383a2128f117675f30f38f7))
|
|
23
|
+
- await Contract.factory() with rawArgs support, del connect(), del contractFactory Class ([c108160](https://github.com/starknet-io/starknet.js/commit/c108160e9b14df7411fa27e8587129d9deaae85e))
|
|
24
|
+
- contract & factory type-sync with Account, fix SierraContractClass abi, buildUDCCall with abi ([20a732a](https://github.com/starknet-io/starknet.js/commit/20a732a47f8312206c1ab946bd99f37c57d92075))
|
|
25
|
+
- customize tip type, cleanup, account interface update, remove types namespace export ([586ffde](https://github.com/starknet-io/starknet.js/commit/586ffdeb9ddcd38da4f93b2f579ad296a349fca5))
|
|
26
|
+
- introduce roc09, made batchClient generic ([c49dd10](https://github.com/starknet-io/starknet.js/commit/c49dd1011ddf1ddec7c1e4403235338ab347b7a0))
|
|
27
|
+
- main modifications without tests ([3407201](https://github.com/starknet-io/starknet.js/commit/34072010ce0a47fe94b80b29288ee129cce2bae1))
|
|
28
|
+
- new channel init ([ffec346](https://github.com/starknet-io/starknet.js/commit/ffec346463f26b3aca8cb77d15d4440a08948e5b))
|
|
29
|
+
- object-base API Account,WalletAccount, backward support methods ([06a3760](https://github.com/starknet-io/starknet.js/commit/06a37606fdde521d862f1608aa4ccf77eebba55c))
|
|
30
|
+
- second swipe update, clean or commented tests ([92185f5](https://github.com/starknet-io/starknet.js/commit/92185f5674f8f1ded18c2aeb3ac273341bb3b117))
|
|
31
|
+
- tip metric, test update ([e665389](https://github.com/starknet-io/starknet.js/commit/e665389c4fe8de6e7b386d6598ecc46b9a3d37c4))
|
|
32
|
+
- tip raw impl in account, tests ([07d4e73](https://github.com/starknet-io/starknet.js/commit/07d4e738ef3e7c6c3c50b9ea3ceb9c3a76310eb4))
|
|
33
|
+
- update packages ([a52db43](https://github.com/starknet-io/starknet.js/commit/a52db430f10dd00e04844933c46e400abb8a2833))
|
|
34
|
+
|
|
35
|
+
### BREAKING CHANGES
|
|
36
|
+
|
|
37
|
+
- starknet version 0.14:
|
|
38
|
+
|
|
39
|
+
# [8.0.0-beta.4](https://github.com/starknet-io/starknet.js/compare/v8.0.0-beta.3...v8.0.0-beta.4) (2025-07-24)
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
- accountInvocationsFactory typing ([a1b1e7f](https://github.com/starknet-io/starknet.js/commit/a1b1e7f60e7abfa43836666a0d801abd33242d7b))
|
|
44
|
+
|
|
1
45
|
# [8.0.0-beta.3](https://github.com/starknet-io/starknet.js/compare/v8.0.0-beta.2...v8.0.0-beta.3) (2025-07-24)
|
|
2
46
|
|
|
3
47
|
### Bug Fixes
|
package/dist/index.d.ts
CHANGED
|
@@ -1714,6 +1714,7 @@ type TipEstimate = {
|
|
|
1714
1714
|
transactionsTipsFound: bigint[];
|
|
1715
1715
|
};
|
|
1716
1716
|
};
|
|
1717
|
+
type TipType = Exclude<keyof TipEstimate, 'metrics'>;
|
|
1717
1718
|
/**
|
|
1718
1719
|
* Options for customizing tip analysis behavior.
|
|
1719
1720
|
*/
|
|
@@ -2389,31 +2390,6 @@ declare class Deployer implements DeployerInterface {
|
|
|
2389
2390
|
declare const defaultDeployer: Deployer;
|
|
2390
2391
|
declare const legacyDeployer: Deployer;
|
|
2391
2392
|
|
|
2392
|
-
/**
|
|
2393
|
-
* Verify in Starknet a signature of a TypedData object or of a given hash.
|
|
2394
|
-
* @param {ProviderInterface} provider - The provider to use for the verification.
|
|
2395
|
-
* @param {BigNumberish | TypedData} message TypedData object to be verified, or message hash to be verified.
|
|
2396
|
-
* @param {Signature} signature signature of the message.
|
|
2397
|
-
* @param {BigNumberish} accountAddress address of the account that has signed the message.
|
|
2398
|
-
* @param {string} [signatureVerificationFunctionName] if account contract with non standard account verification function name.
|
|
2399
|
-
* @param { okResponse: string[]; nokResponse: string[]; error: string[] } [signatureVerificationResponse] if account contract with non standard response of verification function.
|
|
2400
|
-
* @returns
|
|
2401
|
-
* ```typescript
|
|
2402
|
-
* const myTypedMessage: TypedMessage = .... ;
|
|
2403
|
-
* const messageHash = typedData.getMessageHash(myTypedMessage,accountAddress);
|
|
2404
|
-
* const sign: WeierstrassSignatureType = ec.starkCurve.sign(messageHash, privateKey);
|
|
2405
|
-
* const accountAddress = "0x43b7240d227aa2fb8434350b3321c40ac1b88c7067982549e7609870621b535";
|
|
2406
|
-
* const result1 = await myRpcProvider.verifyMessageInStarknet(myTypedMessage, sign, accountAddress);
|
|
2407
|
-
* const result2 = await myRpcProvider.verifyMessageInStarknet(messageHash, sign, accountAddress);
|
|
2408
|
-
* // result1 = result2 = true
|
|
2409
|
-
* ```
|
|
2410
|
-
*/
|
|
2411
|
-
declare function verifyMessageInStarknet(provider: ProviderInterface, message: BigNumberish | TypedData, signature: Signature, accountAddress: BigNumberish, signatureVerificationFunctionName?: string, signatureVerificationResponse?: {
|
|
2412
|
-
okResponse: string[];
|
|
2413
|
-
nokResponse: string[];
|
|
2414
|
-
error: string[];
|
|
2415
|
-
}): Promise<boolean>;
|
|
2416
|
-
|
|
2417
2393
|
/**
|
|
2418
2394
|
* Configuration options for creating an Account instance
|
|
2419
2395
|
*/
|
|
@@ -2436,7 +2412,7 @@ type AccountOptions = {
|
|
|
2436
2412
|
* Default tip type to use for sending transactions (optional)
|
|
2437
2413
|
* @default 'recommendedTip'
|
|
2438
2414
|
*/
|
|
2439
|
-
defaultTipType?:
|
|
2415
|
+
defaultTipType?: TipType;
|
|
2440
2416
|
};
|
|
2441
2417
|
type EstimateFeeBulk = Array<EstimateFeeResponseOverhead>;
|
|
2442
2418
|
type AccountInvocationsFactoryDetails = {
|
|
@@ -2866,7 +2842,6 @@ type ContractOptions = {
|
|
|
2866
2842
|
* Class hash of the contract
|
|
2867
2843
|
*/
|
|
2868
2844
|
classHash?: string;
|
|
2869
|
-
deployTransactionHash?: string;
|
|
2870
2845
|
} & CommonContractOptions;
|
|
2871
2846
|
type ExecuteOptions = Pick<CommonContractOptions, 'parseRequest'> & {
|
|
2872
2847
|
/**
|
|
@@ -3385,7 +3360,7 @@ declare const DEFAULT_GLOBAL_CONFIG: {
|
|
|
3385
3360
|
rpcVersion: _SupportedRpcVersion;
|
|
3386
3361
|
transactionVersion: SupportedTransactionVersion;
|
|
3387
3362
|
resourceBoundsOverhead: ResourceBoundsOverhead;
|
|
3388
|
-
defaultTipType:
|
|
3363
|
+
defaultTipType: TipType;
|
|
3389
3364
|
fetch: any;
|
|
3390
3365
|
websocket: any;
|
|
3391
3366
|
};
|
|
@@ -4273,6 +4248,31 @@ declare const RpcProvider_base: ts_mixer_dist_types_types.Class<any[], RpcProvid
|
|
|
4273
4248
|
declare class RpcProvider extends RpcProvider_base {
|
|
4274
4249
|
}
|
|
4275
4250
|
|
|
4251
|
+
/**
|
|
4252
|
+
* Verify in Starknet a signature of a TypedData object or of a given hash.
|
|
4253
|
+
* @param {ProviderInterface} provider - The provider to use for the verification.
|
|
4254
|
+
* @param {BigNumberish | TypedData} message TypedData object to be verified, or message hash to be verified.
|
|
4255
|
+
* @param {Signature} signature signature of the message.
|
|
4256
|
+
* @param {BigNumberish} accountAddress address of the account that has signed the message.
|
|
4257
|
+
* @param {string} [signatureVerificationFunctionName] if account contract with non standard account verification function name.
|
|
4258
|
+
* @param { okResponse: string[]; nokResponse: string[]; error: string[] } [signatureVerificationResponse] if account contract with non standard response of verification function.
|
|
4259
|
+
* @returns
|
|
4260
|
+
* ```typescript
|
|
4261
|
+
* const myTypedMessage: TypedMessage = .... ;
|
|
4262
|
+
* const messageHash = typedData.getMessageHash(myTypedMessage,accountAddress);
|
|
4263
|
+
* const sign: WeierstrassSignatureType = ec.starkCurve.sign(messageHash, privateKey);
|
|
4264
|
+
* const accountAddress = "0x43b7240d227aa2fb8434350b3321c40ac1b88c7067982549e7609870621b535";
|
|
4265
|
+
* const result1 = await myRpcProvider.verifyMessageInStarknet(myTypedMessage, sign, accountAddress);
|
|
4266
|
+
* const result2 = await myRpcProvider.verifyMessageInStarknet(messageHash, sign, accountAddress);
|
|
4267
|
+
* // result1 = result2 = true
|
|
4268
|
+
* ```
|
|
4269
|
+
*/
|
|
4270
|
+
declare function verifyMessageInStarknet(provider: ProviderInterface, message: BigNumberish | TypedData, signature: Signature, accountAddress: BigNumberish, signatureVerificationFunctionName?: string, signatureVerificationResponse?: {
|
|
4271
|
+
okResponse: string[];
|
|
4272
|
+
nokResponse: string[];
|
|
4273
|
+
error: string[];
|
|
4274
|
+
}): Promise<boolean>;
|
|
4275
|
+
|
|
4276
4276
|
declare const defaultProvider: RpcProvider$1;
|
|
4277
4277
|
|
|
4278
4278
|
declare class Account extends RpcProvider implements AccountInterface {
|
|
@@ -4282,7 +4282,7 @@ declare class Account extends RpcProvider implements AccountInterface {
|
|
|
4282
4282
|
readonly transactionVersion: typeof ETransactionVersion.V3;
|
|
4283
4283
|
paymaster: PaymasterInterface;
|
|
4284
4284
|
deployer: Deployer;
|
|
4285
|
-
defaultTipType:
|
|
4285
|
+
defaultTipType: TipType;
|
|
4286
4286
|
constructor(options: AccountOptions);
|
|
4287
4287
|
/** @deprecated @hidden */
|
|
4288
4288
|
static create(): Promise<never>;
|
|
@@ -4407,6 +4407,36 @@ declare class Account extends RpcProvider implements AccountInterface {
|
|
|
4407
4407
|
buildInvocation(call: Array<Call>, details: InvocationsSignerDetails): Promise<Invocation>;
|
|
4408
4408
|
buildDeclarePayload(payload: DeclareContractPayload, details: InvocationsSignerDetails): Promise<DeclareContractTransaction>;
|
|
4409
4409
|
buildAccountDeployPayload({ classHash, addressSalt, constructorCalldata, contractAddress: providedContractAddress, }: DeployAccountContractPayload, details: InvocationsSignerDetails): Promise<DeployAccountContractTransaction>;
|
|
4410
|
+
/**
|
|
4411
|
+
* Build account invocations with proper typing based on transaction type
|
|
4412
|
+
* @private
|
|
4413
|
+
*/
|
|
4414
|
+
accountInvocationsFactory(invocations: [{
|
|
4415
|
+
type: typeof ETransactionType.INVOKE;
|
|
4416
|
+
payload: AllowArray<Call>;
|
|
4417
|
+
}], details: AccountInvocationsFactoryDetails): Promise<[
|
|
4418
|
+
({
|
|
4419
|
+
type: typeof ETransactionType.INVOKE;
|
|
4420
|
+
} & Invocation) & InvocationsDetailsWithNonce
|
|
4421
|
+
]>;
|
|
4422
|
+
accountInvocationsFactory(invocations: [{
|
|
4423
|
+
type: typeof ETransactionType.DECLARE;
|
|
4424
|
+
payload: DeclareContractPayload;
|
|
4425
|
+
}], details: AccountInvocationsFactoryDetails): Promise<[
|
|
4426
|
+
({
|
|
4427
|
+
type: typeof ETransactionType.DECLARE;
|
|
4428
|
+
} & DeclareContractTransaction) & InvocationsDetailsWithNonce
|
|
4429
|
+
]>;
|
|
4430
|
+
accountInvocationsFactory(invocations: [
|
|
4431
|
+
{
|
|
4432
|
+
type: typeof ETransactionType.DEPLOY_ACCOUNT;
|
|
4433
|
+
payload: DeployAccountContractPayload;
|
|
4434
|
+
}
|
|
4435
|
+
], details: AccountInvocationsFactoryDetails): Promise<[
|
|
4436
|
+
({
|
|
4437
|
+
type: typeof ETransactionType.DEPLOY_ACCOUNT;
|
|
4438
|
+
} & DeployAccountContractTransaction) & InvocationsDetailsWithNonce
|
|
4439
|
+
]>;
|
|
4410
4440
|
accountInvocationsFactory(invocations: Invocations, details: AccountInvocationsFactoryDetails): Promise<AccountInvocations>;
|
|
4411
4441
|
buildPaymasterTransaction(calls: Call[], paymasterDetails: PaymasterDetails): Promise<PreparedTransaction>;
|
|
4412
4442
|
estimatePaymasterTransactionFee(calls: Call[], paymasterDetails: PaymasterDetails): Promise<PaymasterFeeEstimate>;
|
|
@@ -8183,84 +8213,4 @@ declare class Logger {
|
|
|
8183
8213
|
*/
|
|
8184
8214
|
declare const logger: Logger;
|
|
8185
8215
|
|
|
8186
|
-
|
|
8187
|
-
* Backward compatibility utilities for migrating from arguments-based to object-based APIs
|
|
8188
|
-
*/
|
|
8189
|
-
|
|
8190
|
-
/**
|
|
8191
|
-
* Backward compatibility method to create Contract instances using the old arguments-based API
|
|
8192
|
-
*
|
|
8193
|
-
* @deprecated Use `new Contract({ abi, address, providerOrAccount })` instead
|
|
8194
|
-
* @param abi - Contract ABI
|
|
8195
|
-
* @param address - Contract address
|
|
8196
|
-
* @param providerOrAccount - Provider or Account instance
|
|
8197
|
-
* @returns Contract instance
|
|
8198
|
-
*
|
|
8199
|
-
* @example
|
|
8200
|
-
* ```typescript
|
|
8201
|
-
* // Old API (deprecated)
|
|
8202
|
-
* const contract = createContract(abi, address, provider);
|
|
8203
|
-
*
|
|
8204
|
-
* // New API (recommended)
|
|
8205
|
-
* const contract = new Contract({ abi, address, providerOrAccount: provider });
|
|
8206
|
-
* ```
|
|
8207
|
-
*/
|
|
8208
|
-
declare function createContract(abi: Abi, address: string, providerOrAccount: ProviderOrAccount): Contract;
|
|
8209
|
-
/**
|
|
8210
|
-
* Backward compatibility method to create Account instances using the old arguments-based API
|
|
8211
|
-
*
|
|
8212
|
-
* @deprecated Use `new Account({ provider, address, signer, ... })` instead
|
|
8213
|
-
* @param provider - Provider instance or options
|
|
8214
|
-
* @param address - Account address
|
|
8215
|
-
* @param signer - Signer interface, private key string, or Uint8Array
|
|
8216
|
-
* @param cairoVersion - Optional Cairo version
|
|
8217
|
-
* @param transactionVersion - Optional transaction version
|
|
8218
|
-
* @param paymaster - Optional paymaster configuration
|
|
8219
|
-
* @returns Account instance
|
|
8220
|
-
*
|
|
8221
|
-
* @example
|
|
8222
|
-
* ```typescript
|
|
8223
|
-
* // Old API (deprecated)
|
|
8224
|
-
* const account = createAccount(provider, address, privateKey, '1', 'v3', paymasterConfig);
|
|
8225
|
-
*
|
|
8226
|
-
* // New API (recommended)
|
|
8227
|
-
* const account = new Account({
|
|
8228
|
-
* provider,
|
|
8229
|
-
* address,
|
|
8230
|
-
* signer: privateKey,
|
|
8231
|
-
* cairoVersion: '1',
|
|
8232
|
-
* transactionVersion: 'v3',
|
|
8233
|
-
* paymaster: paymasterConfig
|
|
8234
|
-
* });
|
|
8235
|
-
* ```
|
|
8236
|
-
*/
|
|
8237
|
-
declare function createAccount(provider: AccountOptions['provider'], address: string, signer: Uint8Array | string | SignerInterface, cairoVersion?: CairoVersion, transactionVersion?: SupportedTransactionVersion, paymaster?: PaymasterOptions | PaymasterInterface): Account;
|
|
8238
|
-
/**
|
|
8239
|
-
* Backward compatibility method to create WalletAccount instances using the old arguments-based API
|
|
8240
|
-
*
|
|
8241
|
-
* @deprecated Use `new WalletAccount({ provider, walletProvider, address, ... })` instead
|
|
8242
|
-
* @param provider - Provider instance or options
|
|
8243
|
-
* @param walletProvider - Starknet wallet provider (from get-starknet or similar)
|
|
8244
|
-
* @param address - Account address
|
|
8245
|
-
* @param cairoVersion - Optional Cairo version
|
|
8246
|
-
* @param paymaster - Optional paymaster configuration
|
|
8247
|
-
* @returns WalletAccount instance
|
|
8248
|
-
*
|
|
8249
|
-
* @example
|
|
8250
|
-
* ```typescript
|
|
8251
|
-
* // Old API (deprecated)
|
|
8252
|
-
* const walletAccount = createWalletAccount(provider, walletProvider, address, '1', paymasterConfig);
|
|
8253
|
-
*
|
|
8254
|
-
* // New API (recommended)
|
|
8255
|
-
* const walletAccount = new WalletAccount({
|
|
8256
|
-
* provider,
|
|
8257
|
-
* walletProvider,
|
|
8258
|
-
* address,
|
|
8259
|
-
* cairoVersion: '1',
|
|
8260
|
-
* paymaster: paymasterConfig
|
|
8261
|
-
* });
|
|
8262
|
-
* ```
|
|
8263
|
-
*/
|
|
8264
|
-
declare function createWalletAccount(provider: WalletAccountOptions['provider'], walletProvider: StarknetWalletProvider, address: string, cairoVersion?: CairoVersion, paymaster?: PaymasterOptions | PaymasterInterface): WalletAccount;
|
|
8265
|
-
|
|
8266
|
-
export { type Abi, type AbiEntry, type AbiEnum, type AbiEnums, type AbiEvent, type AbiEvents, type AbiInterfaces, type AbiStruct, type AbiStructs, Account, AccountInterface, type AccountInvocationItem, type AccountInvocations, type AccountInvocationsFactoryDetails, type AccountOptions, type AllowArray, type ApiEstimateFeeResponse, type Args, type ArgsOrCalldata, type ArgsOrCalldataWithOptions, type ArraySignatureType, type AsyncContractFunction, type BLOCK_HASH, type BLOCK_NUMBER, BatchClient, type BatchClientOptions, type BigNumberish, type Block$1 as Block, type BlockIdentifier, type BlockNumber, BlockStatus, BlockTag, type BlockWithTxHashes, type Builtins, type ByteArray, type ByteCode, type CairoAssembly, type CairoContract, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, type CairoEvent, type CairoEventDefinition, type CairoEventVariant, CairoFixedArray, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoUint256, CairoUint512, type CairoVersion, type Call, type CallContractResponse, CallData, type CallDetails, type CallOptions, type CallResult, type Calldata, type CompiledContract, type CompiledSierra, type CompiledSierraCasm, type CompilerVersion, type CompleteDeclareContractPayload, type CompressedProgram, Contract, type ContractClass, type ContractClassIdentifier, type ContractClassPayload, type ContractClassResponse, type ContractEntryPointFields, type ContractFunction, ContractInterface, type ContractOptions, type ContractVersion, type DeclareAndDeployContractPayload, type DeclareContractPayload, type DeclareContractResponse, type DeclareContractTransaction, type DeclareDeployUDCResponse, type DeclareSignerDetails, type DeclareTransactionReceiptResponse, type DeclaredTransaction, type DeployAccountContractPayload, type DeployAccountContractTransaction, type DeployAccountSignerDetails, type DeployAccountTransactionReceiptResponse, type DeployAndInvokeTransaction, type DeployContractResponse, type DeployContractUDCResponse, type DeployTransaction, type DeployTransactionReceiptResponse, type DeployedAccountTransaction, Deployer, type DeployerCall, DeployerInterface, type Details, EDAMode, EDataAvailabilityMode, ETH_ADDRESS, ETransactionExecutionStatus, ETransactionStatus, ETransactionVersion, ETransactionVersion2, ETransactionVersion3, type EVENTS_CHUNK, type EmittedEvent, EntryPointType, type EntryPointsByType, type EstimateFeeBulk, type EstimateFeeDetails, type EstimateFeeResponse, type EstimateFeeResponseBulkOverhead, type EstimateFeeResponseOverhead, EthSigner, type Event$1 as Event, type EventEntry, type ExecutableDeployAndInvokeTransaction, type ExecutableDeployTransaction, type ExecutableInvokeTransaction, type ExecutableUserInvoke, type ExecutableUserTransaction, type ExecuteOptions, type ExecutionParameters, type FEE_ESTIMATE, type FELT, type FactoryParams, type FeeEstimate, type FeeMode, type FormatResponse, type FunctionAbi, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, type Hint, type InterfaceAbi, type Invocation, type Invocations, type InvocationsDetails, type InvocationsDetailsWithNonce, type InvocationsSignerDetails, type InvokeFunctionResponse, type InvokeTransaction, type InvokeTransactionReceiptResponse, type InvokedTransaction, type L1HandlerTransactionReceiptResponse, type L1_HANDLER_TXN, type LedgerPathCalculation, LedgerSigner111 as LedgerSigner, LedgerSigner111, LedgerSigner221, LedgerSigner231, type LegacyCompiledContract, type LegacyContractClass, type LegacyEvent, LibraryError, Literal, type LogLevel, LogLevelIndex, type Methods, type MultiDeployContractResponse, type MultiType, NON_ZERO_PREFIX, type Nonce, type OptionalPayload, type OutsideCall, type OutsideExecution, type OutsideExecutionOptions, OutsideExecutionTypesV1, OutsideExecutionTypesV2, OutsideExecutionVersion, type OutsideTransaction, type PENDING_DECLARE_TXN_RECEIPT, type PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT, type PENDING_INVOKE_TXN_RECEIPT, type PENDING_L1_HANDLER_TXN_RECEIPT, type PENDING_STATE_UPDATE, type PRE_CONFIRMED_STATE_UPDATE, type PRICE_UNIT, type ParsedEvent, type ParsedEvents, type ParsedStruct, type PaymasterDetails, type PaymasterFeeEstimate, PaymasterInterface, type PaymasterOptions, PaymasterRpc, type PaymasterRpcOptions, type PaymasterTimeBounds, type PendingBlock, type PendingReceipt, type PendingStateUpdate, type PreConfirmedStateUpdate, type PreparedDeployAndInvokeTransaction, type PreparedDeployTransaction, type PreparedInvokeTransaction, type PreparedTransaction, type Program, RpcProvider as Provider, ProviderInterface, type ProviderOptions, type ProviderOrAccount, type PythonicHints, type RESOURCE_PRICE, index$4 as RPC, rpc_0_8_1 as RPC08, rpc_0_9_0 as RPC09, RPCResponseParser, type RPC_ERROR, type RPC_ERROR_SET, type RawArgs, type RawArgsArray, type RawArgsObject, type RawCalldata, type Receipt, ReceiptTx, type RequiredKeysOf, type ResourceBounds, type ResourceBoundsBN, type ResourceBoundsOverhead, ResponseParser, type RevertedTransactionReceiptResponse, RpcChannel, RpcError, RpcProvider, type RpcProviderOptions, type SIMULATION_FLAG, type STATE_UPDATE, type SierraContractClass, type SierraContractEntryPointFields, type SierraEntryPointsByType, type SierraProgramDebugInfo, type Signature, Signer, SignerInterface, type Simplify, type SimulateTransaction, type SimulateTransactionDetails, type SimulateTransactionOverhead, type SimulateTransactionOverheadResponse, type SimulateTransactionResponse, type SimulationFlags, type StarkProfile, type StateUpdate, type StateUpdateResponse, type Storage, Subscription, type SubscriptionBlockIdentifier, type SuccessfulTransactionReceiptResponse, type TXN_EXECUTION_STATUS, type TXN_HASH$1 as TXN_HASH, type TXN_STATUS, TimeoutError, type TipAnalysisOptions, type TipEstimate, type TokenData, TransactionExecutionStatus, TransactionFinalityStatus, type TransactionReceipt, type TransactionReceiptCallbacks, type TransactionReceiptCallbacksDefault, type TransactionReceiptCallbacksDefined, type TransactionReceiptStatus, type TransactionReceiptValue, type TransactionStatus, type TransactionStatusReceiptSets, type TransactionTrace, TransactionType, type TransactionWithHash, type Tupled, type TypedContractV2, UINT_128_MAX, UINT_128_MIN, UINT_256_HIGH_MAX, UINT_256_HIGH_MIN, UINT_256_LOW_MAX, UINT_256_LOW_MIN, UINT_256_MAX, UINT_256_MIN, UINT_512_MAX, UINT_512_MIN, Uint, type Uint256, type Uint512, type UniversalDeployerContractPayload, type UniversalDetails, type UserInvoke, type UserTransaction, type V3DeclareSignerDetails, type V3DeployAccountSignerDetails, type V3InvocationsSignerDetails, type V3TransactionDetails, ValidateType, WalletAccount, WebSocketChannel, WebSocketNotConnectedError, type WebSocketOptions, type WeierstrassSignatureType, type WithOptions, addAddressPadding, byteArray, cairo, config, constants, contractClassResponseToLegacyCompiledContract, createAccount, createContract, createWalletAccount, defaultDeployer, defaultPaymaster, defaultProvider, ec, encode, eth, index as events, extractContractHashes, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getLedgerPathBuffer111 as getLedgerPathBuffer, getLedgerPathBuffer111, getLedgerPathBuffer221, type getSimulateTransactionOptions, getTipStatsFromBlocks, index$3 as hash, isAccount, isPendingBlock, isPendingStateUpdate, isPendingTransaction, isRPC08Plus_ResourceBounds, isRPC08Plus_ResourceBoundsBN, isSierra, isSupportedSpecVersion, isV3Tx, isVersion, json, legacyDeployer, logger, merkle, num, outsideExecution, parseCalldataField, paymaster, provider, selector, shortString, src5, index$1 as stark, starknetId, toAnyPatchVersion, toApiVersion, index$2 as transaction, typedData, uint256$1 as uint256, units, v2 as v2hash, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, verifyMessageInStarknet, type waitForTransactionOptions, connect as wallet };
|
|
8216
|
+
export { type Abi, type AbiEntry, type AbiEnum, type AbiEnums, type AbiEvent, type AbiEvents, type AbiInterfaces, type AbiStruct, type AbiStructs, Account, AccountInterface, type AccountInvocationItem, type AccountInvocations, type AccountInvocationsFactoryDetails, type AccountOptions, type AllowArray, type ApiEstimateFeeResponse, type Args, type ArgsOrCalldata, type ArgsOrCalldataWithOptions, type ArraySignatureType, type AsyncContractFunction, type BLOCK_HASH, type BLOCK_NUMBER, BatchClient, type BatchClientOptions, type BigNumberish, type Block$1 as Block, type BlockIdentifier, type BlockNumber, BlockStatus, BlockTag, type BlockWithTxHashes, type Builtins, type ByteArray, type ByteCode, type CairoAssembly, type CairoContract, CairoCustomEnum, type CairoEnum, type CairoEnumRaw, type CairoEvent, type CairoEventDefinition, type CairoEventVariant, CairoFixedArray, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoUint256, CairoUint512, type CairoVersion, type Call, type CallContractResponse, CallData, type CallDetails, type CallOptions, type CallResult, type Calldata, type CommonContractOptions, type CompiledContract, type CompiledSierra, type CompiledSierraCasm, type CompilerVersion, type CompleteDeclareContractPayload, type CompressedProgram, Contract, type ContractClass, type ContractClassIdentifier, type ContractClassPayload, type ContractClassResponse, type ContractEntryPointFields, type ContractFunction, ContractInterface, type ContractOptions, type ContractVersion, type DeclareAndDeployContractPayload, type DeclareContractPayload, type DeclareContractResponse, type DeclareContractTransaction, type DeclareDeployUDCResponse, type DeclareSignerDetails, type DeclareTransactionReceiptResponse, type DeclaredTransaction, type DeployAccountContractPayload, type DeployAccountContractTransaction, type DeployAccountSignerDetails, type DeployAccountTransactionReceiptResponse, type DeployAndInvokeTransaction, type DeployContractResponse, type DeployContractUDCResponse, type DeployTransaction, type DeployTransactionReceiptResponse, type DeployedAccountTransaction, Deployer, type DeployerCall, DeployerInterface, type Details, EDAMode, EDataAvailabilityMode, ETH_ADDRESS, ETransactionExecutionStatus, ETransactionStatus, ETransactionVersion, ETransactionVersion2, ETransactionVersion3, type EVENTS_CHUNK, type EmittedEvent, EntryPointType, type EntryPointsByType, type EstimateFeeBulk, type EstimateFeeDetails, type EstimateFeeResponse, type EstimateFeeResponseBulkOverhead, type EstimateFeeResponseOverhead, EthSigner, type Event$1 as Event, type EventEntry, type ExecutableDeployAndInvokeTransaction, type ExecutableDeployTransaction, type ExecutableInvokeTransaction, type ExecutableUserInvoke, type ExecutableUserTransaction, type ExecuteOptions, type ExecutionParameters, type FEE_ESTIMATE, type FELT, type FactoryParams, type FeeEstimate, type FeeMode, type FormatResponse, type FunctionAbi, type GetBlockResponse, type GetTransactionReceiptResponse, type GetTransactionResponse, type GetTxReceiptResponseWithoutHelper, type HexCalldata, type Hint, type InterfaceAbi, type Invocation, type Invocations, type InvocationsDetails, type InvocationsDetailsWithNonce, type InvocationsSignerDetails, type InvokeFunctionResponse, type InvokeTransaction, type InvokeTransactionReceiptResponse, type InvokedTransaction, type L1HandlerTransactionReceiptResponse, type L1_HANDLER_TXN, type LedgerPathCalculation, LedgerSigner111 as LedgerSigner, LedgerSigner111, LedgerSigner221, LedgerSigner231, type LegacyCompiledContract, type LegacyContractClass, type LegacyEvent, LibraryError, Literal, type LogLevel, LogLevelIndex, type Methods, type MultiDeployContractResponse, type MultiType, NON_ZERO_PREFIX, type Nonce, type OptionalPayload, type OutsideCall, type OutsideExecution, type OutsideExecutionOptions, OutsideExecutionTypesV1, OutsideExecutionTypesV2, OutsideExecutionVersion, type OutsideTransaction, type PENDING_DECLARE_TXN_RECEIPT, type PENDING_DEPLOY_ACCOUNT_TXN_RECEIPT, type PENDING_INVOKE_TXN_RECEIPT, type PENDING_L1_HANDLER_TXN_RECEIPT, type PENDING_STATE_UPDATE, type PRE_CONFIRMED_STATE_UPDATE, type PRICE_UNIT, type ParsedEvent, type ParsedEvents, type ParsedStruct, type PaymasterDetails, type PaymasterFeeEstimate, PaymasterInterface, type PaymasterOptions, PaymasterRpc, type PaymasterRpcOptions, type PaymasterTimeBounds, type PendingBlock, type PendingReceipt, type PendingStateUpdate, type PreConfirmedStateUpdate, type PreparedDeployAndInvokeTransaction, type PreparedDeployTransaction, type PreparedInvokeTransaction, type PreparedTransaction, type Program, RpcProvider as Provider, ProviderInterface, type ProviderOptions, type ProviderOrAccount, type PythonicHints, type RESOURCE_PRICE, index$4 as RPC, rpc_0_8_1 as RPC08, rpc_0_9_0 as RPC09, RPCResponseParser, type RPC_ERROR, type RPC_ERROR_SET, type RawArgs, type RawArgsArray, type RawArgsObject, type RawCalldata, type Receipt, ReceiptTx, type RequiredKeysOf, type ResourceBounds, type ResourceBoundsBN, type ResourceBoundsOverhead, ResponseParser, type RevertedTransactionReceiptResponse, RpcChannel, RpcError, RpcProvider, type RpcProviderOptions, type SIMULATION_FLAG, type STATE_UPDATE, type SierraContractClass, type SierraContractEntryPointFields, type SierraEntryPointsByType, type SierraProgramDebugInfo, type Signature, Signer, SignerInterface, type Simplify, type SimulateTransaction, type SimulateTransactionDetails, type SimulateTransactionOverhead, type SimulateTransactionOverheadResponse, type SimulateTransactionResponse, type SimulationFlags, type StarkProfile, type StateUpdate, type StateUpdateResponse, type Storage, Subscription, type SubscriptionBlockIdentifier, type SuccessfulTransactionReceiptResponse, type TXN_EXECUTION_STATUS, type TXN_HASH$1 as TXN_HASH, type TXN_STATUS, TimeoutError, type TipAnalysisOptions, type TipEstimate, type TipType, type TokenData, TransactionExecutionStatus, TransactionFinalityStatus, type TransactionReceipt, type TransactionReceiptCallbacks, type TransactionReceiptCallbacksDefault, type TransactionReceiptCallbacksDefined, type TransactionReceiptStatus, type TransactionReceiptValue, type TransactionStatus, type TransactionStatusReceiptSets, type TransactionTrace, TransactionType, type TransactionWithHash, type Tupled, type TypedContractV2, UINT_128_MAX, UINT_128_MIN, UINT_256_HIGH_MAX, UINT_256_HIGH_MIN, UINT_256_LOW_MAX, UINT_256_LOW_MIN, UINT_256_MAX, UINT_256_MIN, UINT_512_MAX, UINT_512_MIN, Uint, type Uint256, type Uint512, type UniversalDeployerContractPayload, type UniversalDetails, type UserInvoke, type UserTransaction, type V3DeclareSignerDetails, type V3DeployAccountSignerDetails, type V3InvocationsSignerDetails, type V3TransactionDetails, ValidateType, WalletAccount, WebSocketChannel, WebSocketNotConnectedError, type WebSocketOptions, type WeierstrassSignatureType, type WithOptions, addAddressPadding, byteArray, cairo, config, constants, contractClassResponseToLegacyCompiledContract, defaultDeployer, defaultPaymaster, defaultProvider, ec, encode, eth, index as events, extractContractHashes, getChecksumAddress, type getContractVersionOptions, type getEstimateFeeBulkOptions, getLedgerPathBuffer111 as getLedgerPathBuffer, getLedgerPathBuffer111, getLedgerPathBuffer221, type getSimulateTransactionOptions, getTipStatsFromBlocks, index$3 as hash, isAccount, isPendingBlock, isPendingStateUpdate, isPendingTransaction, isRPC08Plus_ResourceBounds, isRPC08Plus_ResourceBoundsBN, isSierra, isSupportedSpecVersion, isV3Tx, isVersion, json, legacyDeployer, logger, merkle, num, outsideExecution, parseCalldataField, paymaster, provider, selector, shortString, src5, index$1 as stark, starknetId, toAnyPatchVersion, toApiVersion, index$2 as transaction, typedData, uint256$1 as uint256, units, v2 as v2hash, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, verifyMessageInStarknet, type waitForTransactionOptions, connect as wallet };
|
package/dist/index.global.js
CHANGED
|
@@ -102,9 +102,6 @@ var starknet = (() => {
|
|
|
102
102
|
config: () => config,
|
|
103
103
|
constants: () => constants_exports,
|
|
104
104
|
contractClassResponseToLegacyCompiledContract: () => contractClassResponseToLegacyCompiledContract,
|
|
105
|
-
createAccount: () => createAccount,
|
|
106
|
-
createContract: () => createContract,
|
|
107
|
-
createWalletAccount: () => createWalletAccount,
|
|
108
105
|
defaultDeployer: () => defaultDeployer,
|
|
109
106
|
defaultPaymaster: () => defaultPaymaster,
|
|
110
107
|
defaultProvider: () => defaultProvider,
|
|
@@ -14220,7 +14217,7 @@ ${indent}}` : "}";
|
|
|
14220
14217
|
}
|
|
14221
14218
|
};
|
|
14222
14219
|
|
|
14223
|
-
// src/
|
|
14220
|
+
// src/provider/modules/tip.ts
|
|
14224
14221
|
function isV3TransactionWithTip(tx) {
|
|
14225
14222
|
return tx.version === "0x3" && "tip" in tx && isString(tx.tip) && (tx.type === "INVOKE" || tx.type === "DECLARE" || tx.type === "DEPLOY_ACCOUNT");
|
|
14226
14223
|
}
|
|
@@ -14901,7 +14898,7 @@ ${indent}}` : "}";
|
|
|
14901
14898
|
return isValid;
|
|
14902
14899
|
}
|
|
14903
14900
|
|
|
14904
|
-
// src/
|
|
14901
|
+
// src/provider/modules/verifyMessageInStarknet.ts
|
|
14905
14902
|
async function verifyMessageInStarknet(provider, message, signature, accountAddress, signatureVerificationFunctionName, signatureVerificationResponse) {
|
|
14906
14903
|
const isTypedData = validateTypedData(message);
|
|
14907
14904
|
if (!isBigNumberish(message) && !isTypedData) {
|
|
@@ -18077,7 +18074,7 @@ ${indent}}` : "}";
|
|
|
18077
18074
|
async resolveDetailsWithTip(details) {
|
|
18078
18075
|
return {
|
|
18079
18076
|
...details,
|
|
18080
|
-
tip: details.tip ?? (await this.getEstimateTip()).
|
|
18077
|
+
tip: details.tip ?? (await this.getEstimateTip())[this.defaultTipType]
|
|
18081
18078
|
};
|
|
18082
18079
|
}
|
|
18083
18080
|
/**
|
|
@@ -18953,34 +18950,6 @@ ${indent}}` : "}";
|
|
|
18953
18950
|
}
|
|
18954
18951
|
return strk.replace(/(\.[0-9]*[1-9])0+$|\.0*$/, "$1");
|
|
18955
18952
|
}
|
|
18956
|
-
|
|
18957
|
-
// src/utils/backward.ts
|
|
18958
|
-
function createContract(abi, address, providerOrAccount) {
|
|
18959
|
-
return new Contract({
|
|
18960
|
-
abi,
|
|
18961
|
-
address,
|
|
18962
|
-
providerOrAccount
|
|
18963
|
-
});
|
|
18964
|
-
}
|
|
18965
|
-
function createAccount(provider, address, signer, cairoVersion, transactionVersion, paymaster) {
|
|
18966
|
-
return new Account({
|
|
18967
|
-
provider,
|
|
18968
|
-
address,
|
|
18969
|
-
signer,
|
|
18970
|
-
...cairoVersion && { cairoVersion },
|
|
18971
|
-
...transactionVersion && { transactionVersion },
|
|
18972
|
-
...paymaster && { paymaster }
|
|
18973
|
-
});
|
|
18974
|
-
}
|
|
18975
|
-
function createWalletAccount(provider, walletProvider, address, cairoVersion, paymaster) {
|
|
18976
|
-
return new WalletAccount({
|
|
18977
|
-
provider,
|
|
18978
|
-
walletProvider,
|
|
18979
|
-
address,
|
|
18980
|
-
...cairoVersion && { cairoVersion },
|
|
18981
|
-
...paymaster && { paymaster }
|
|
18982
|
-
});
|
|
18983
|
-
}
|
|
18984
18953
|
return __toCommonJS(index_exports);
|
|
18985
18954
|
})();
|
|
18986
18955
|
/*! Bundled license information:
|