starknet 6.0.0-beta.5 → 6.0.0-beta.6
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 +8 -0
- package/dist/index.d.ts +149 -100
- package/dist/index.global.js +155 -175
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +155 -175
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +155 -175
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# [6.0.0-beta.6](https://github.com/starknet-io/starknet.js/compare/v6.0.0-beta.5...v6.0.0-beta.6) (2023-12-11)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- def rpc 0_6, sepolia nodes ([4f59a8f](https://github.com/starknet-io/starknet.js/commit/4f59a8f01439662ae7eb785cafcf781c68b2cb04))
|
|
6
|
+
- default account UniversalDetails, rpc spec update, update interface ([8dc9b8a](https://github.com/starknet-io/starknet.js/commit/8dc9b8ab28a82a9a0eaa47e0271c12b79e8cff39))
|
|
7
|
+
- sepolia constants, rpc open change ([6de46b5](https://github.com/starknet-io/starknet.js/commit/6de46b59d22bfda959c083b3ac5570cb8d4c6d0a))
|
|
8
|
+
|
|
1
9
|
# [6.0.0-beta.5](https://github.com/starknet-io/starknet.js/compare/v6.0.0-beta.4...v6.0.0-beta.5) (2023-12-10)
|
|
2
10
|
|
|
3
11
|
### Bug Fixes
|
package/dist/index.d.ts
CHANGED
|
@@ -912,6 +912,7 @@ interface INSUFFICIENT_ACCOUNT_BALANCE {
|
|
|
912
912
|
interface VALIDATION_FAILURE {
|
|
913
913
|
code: 55;
|
|
914
914
|
message: 'Account validation failed';
|
|
915
|
+
data: string;
|
|
915
916
|
}
|
|
916
917
|
interface COMPILATION_FAILED {
|
|
917
918
|
code: 56;
|
|
@@ -1258,7 +1259,7 @@ type ReadMethods = {
|
|
|
1258
1259
|
block_id: BLOCK_ID;
|
|
1259
1260
|
};
|
|
1260
1261
|
result: FeeEstimate;
|
|
1261
|
-
errors:
|
|
1262
|
+
errors: CONTRACT_ERROR | BLOCK_NOT_FOUND;
|
|
1262
1263
|
};
|
|
1263
1264
|
starknet_blockNumber: {
|
|
1264
1265
|
params: [];
|
|
@@ -1655,15 +1656,18 @@ declare const MAX_STORAGE_ITEM_SIZE = 256n;
|
|
|
1655
1656
|
declare const ADDR_BOUND: bigint;
|
|
1656
1657
|
declare enum BaseUrl {
|
|
1657
1658
|
SN_MAIN = "https://alpha-mainnet.starknet.io",
|
|
1658
|
-
SN_GOERLI = "https://alpha4.starknet.io"
|
|
1659
|
+
SN_GOERLI = "https://alpha4.starknet.io",
|
|
1660
|
+
SN_SEPOLIA = "https://alpha-sepolia.starknet.io"
|
|
1659
1661
|
}
|
|
1660
1662
|
declare enum NetworkName {
|
|
1661
1663
|
SN_MAIN = "SN_MAIN",
|
|
1662
|
-
SN_GOERLI = "SN_GOERLI"
|
|
1664
|
+
SN_GOERLI = "SN_GOERLI",
|
|
1665
|
+
SN_SEPOLIA = "SN_SEPOLIA"
|
|
1663
1666
|
}
|
|
1664
1667
|
declare enum StarknetChainId {
|
|
1665
1668
|
SN_MAIN = "0x534e5f4d41494e",
|
|
1666
|
-
SN_GOERLI = "0x534e5f474f45524c49"
|
|
1669
|
+
SN_GOERLI = "0x534e5f474f45524c49",
|
|
1670
|
+
SN_SEPOLIA = "0x534e5f5345504f4c4941"
|
|
1667
1671
|
}
|
|
1668
1672
|
declare enum TransactionHashPrefix {
|
|
1669
1673
|
DECLARE = "0x6465636c617265",
|
|
@@ -1676,9 +1680,12 @@ declare const UDC: {
|
|
|
1676
1680
|
ADDRESS: string;
|
|
1677
1681
|
ENTRYPOINT: string;
|
|
1678
1682
|
};
|
|
1679
|
-
declare const RPC_DEFAULT_VERSION = "
|
|
1680
|
-
declare const
|
|
1681
|
-
|
|
1683
|
+
declare const RPC_DEFAULT_VERSION = "v0_6";
|
|
1684
|
+
declare const RPC_NODES: {
|
|
1685
|
+
SN_GOERLI: string[];
|
|
1686
|
+
SN_MAIN: string[];
|
|
1687
|
+
SN_SEPOLIA: string[];
|
|
1688
|
+
};
|
|
1682
1689
|
|
|
1683
1690
|
declare const constants_ADDR_BOUND: typeof ADDR_BOUND;
|
|
1684
1691
|
declare const constants_API_VERSION: typeof API_VERSION;
|
|
@@ -1690,8 +1697,7 @@ declare const constants_MAX_STORAGE_ITEM_SIZE: typeof MAX_STORAGE_ITEM_SIZE;
|
|
|
1690
1697
|
type constants_NetworkName = NetworkName;
|
|
1691
1698
|
declare const constants_NetworkName: typeof NetworkName;
|
|
1692
1699
|
declare const constants_RPC_DEFAULT_VERSION: typeof RPC_DEFAULT_VERSION;
|
|
1693
|
-
declare const
|
|
1694
|
-
declare const constants_RPC_MAINNET_NODES: typeof RPC_MAINNET_NODES;
|
|
1700
|
+
declare const constants_RPC_NODES: typeof RPC_NODES;
|
|
1695
1701
|
type constants_StarknetChainId = StarknetChainId;
|
|
1696
1702
|
declare const constants_StarknetChainId: typeof StarknetChainId;
|
|
1697
1703
|
declare const constants_TEXT_TO_FELT_MAX_LEN: typeof TEXT_TO_FELT_MAX_LEN;
|
|
@@ -1709,8 +1715,7 @@ declare namespace constants {
|
|
|
1709
1715
|
constants_MAX_STORAGE_ITEM_SIZE as MAX_STORAGE_ITEM_SIZE,
|
|
1710
1716
|
constants_NetworkName as NetworkName,
|
|
1711
1717
|
constants_RPC_DEFAULT_VERSION as RPC_DEFAULT_VERSION,
|
|
1712
|
-
|
|
1713
|
-
constants_RPC_MAINNET_NODES as RPC_MAINNET_NODES,
|
|
1718
|
+
constants_RPC_NODES as RPC_NODES,
|
|
1714
1719
|
constants_StarknetChainId as StarknetChainId,
|
|
1715
1720
|
constants_TEXT_TO_FELT_MAX_LEN as TEXT_TO_FELT_MAX_LEN,
|
|
1716
1721
|
ETransactionVersion as TRANSACTION_VERSION,
|
|
@@ -2087,7 +2092,7 @@ type InvocationsDetails = {
|
|
|
2087
2092
|
nonce?: BigNumberish;
|
|
2088
2093
|
maxFee?: BigNumberish;
|
|
2089
2094
|
version?: BigNumberish;
|
|
2090
|
-
}
|
|
2095
|
+
} & Partial<V3TransactionDetails>;
|
|
2091
2096
|
type V3TransactionDetails = {
|
|
2092
2097
|
nonce: BigNumberish;
|
|
2093
2098
|
version: BigNumberish;
|
|
@@ -2971,7 +2976,7 @@ type AccountInvocationsFactoryDetails = {
|
|
|
2971
2976
|
nonce?: BigNumberish;
|
|
2972
2977
|
blockIdentifier?: BlockIdentifier;
|
|
2973
2978
|
} & Partial<V3TransactionDetails>;
|
|
2974
|
-
interface
|
|
2979
|
+
interface UniversalDetails {
|
|
2975
2980
|
nonce?: BigNumberish;
|
|
2976
2981
|
blockIdentifier?: BlockIdentifier;
|
|
2977
2982
|
maxFee?: BigNumberish;
|
|
@@ -2984,6 +2989,8 @@ interface EstimateFeeDetails {
|
|
|
2984
2989
|
resourceBounds?: ResourceBounds;
|
|
2985
2990
|
skipValidate?: boolean;
|
|
2986
2991
|
}
|
|
2992
|
+
interface EstimateFeeDetails extends UniversalDetails {
|
|
2993
|
+
}
|
|
2987
2994
|
interface DeployContractResponse {
|
|
2988
2995
|
contract_address: string;
|
|
2989
2996
|
transaction_hash: string;
|
|
@@ -3301,6 +3308,7 @@ type index$2_Uint = Uint;
|
|
|
3301
3308
|
declare const index$2_Uint: typeof Uint;
|
|
3302
3309
|
type index$2_Uint256 = Uint256;
|
|
3303
3310
|
type index$2_UniversalDeployerContractPayload = UniversalDeployerContractPayload;
|
|
3311
|
+
type index$2_UniversalDetails = UniversalDetails;
|
|
3304
3312
|
type index$2_V2DeclareSignerDetails = V2DeclareSignerDetails;
|
|
3305
3313
|
type index$2_V2DeployAccountSignerDetails = V2DeployAccountSignerDetails;
|
|
3306
3314
|
type index$2_V2InvocationsSignerDetails = V2InvocationsSignerDetails;
|
|
@@ -3467,6 +3475,7 @@ declare namespace index$2 {
|
|
|
3467
3475
|
index$2_Uint as Uint,
|
|
3468
3476
|
index$2_Uint256 as Uint256,
|
|
3469
3477
|
index$2_UniversalDeployerContractPayload as UniversalDeployerContractPayload,
|
|
3478
|
+
index$2_UniversalDetails as UniversalDetails,
|
|
3470
3479
|
index$2_V2DeclareSignerDetails as V2DeclareSignerDetails,
|
|
3471
3480
|
index$2_V2DeployAccountSignerDetails as V2DeployAccountSignerDetails,
|
|
3472
3481
|
index$2_V2InvocationsSignerDetails as V2InvocationsSignerDetails,
|
|
@@ -3995,7 +4004,18 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
3995
4004
|
* @param calls the invocation object containing:
|
|
3996
4005
|
* - contractAddress - the address of the contract
|
|
3997
4006
|
* - entrypoint - the entrypoint of the contract
|
|
3998
|
-
* - calldata - (defaults to []) the calldata
|
|
4007
|
+
* - calldata? - (defaults to []) the calldata
|
|
4008
|
+
*
|
|
4009
|
+
* @param estimateFeeDetails -
|
|
4010
|
+
* - blockIdentifier?
|
|
4011
|
+
* - nonce? = 0
|
|
4012
|
+
* - skipValidate? - default true
|
|
4013
|
+
* - tip? - prioritize order of transactions in the mempool.
|
|
4014
|
+
* - accountDeploymentData? - deploy an account contract (substitution for deploy account transaction)
|
|
4015
|
+
* - paymasterData? - entity other than the transaction sender to pay the transaction fees(EIP-4337)
|
|
4016
|
+
* - nonceDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition)
|
|
4017
|
+
* - feeDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition)
|
|
4018
|
+
* - version? - specify ETransactionVersion - V3 Transactions fee is in fri, oldV transactions fee is in wei
|
|
3999
4019
|
*
|
|
4000
4020
|
* @returns response from estimate_fee
|
|
4001
4021
|
*/
|
|
@@ -4005,7 +4025,20 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
4005
4025
|
*
|
|
4006
4026
|
* @param contractPayload the payload object containing:
|
|
4007
4027
|
* - contract - the compiled contract to be declared
|
|
4008
|
-
* -
|
|
4028
|
+
* - casm? - compiled cairo assembly. Cairo1(casm or compiledClassHash are required)
|
|
4029
|
+
* - classHash? - the class hash of the compiled contract. Precalculate for faster execution.
|
|
4030
|
+
* - compiledClassHash?: class hash of the cairo assembly. Cairo1(casm or compiledClassHash are required)
|
|
4031
|
+
*
|
|
4032
|
+
* @param estimateFeeDetails -
|
|
4033
|
+
* - blockIdentifier?
|
|
4034
|
+
* - nonce? = 0
|
|
4035
|
+
* - skipValidate? - default true
|
|
4036
|
+
* - tip? - prioritize order of transactions in the mempool.
|
|
4037
|
+
* - accountDeploymentData? - deploy an account contract (substitution for deploy account transaction)
|
|
4038
|
+
* - paymasterData? - entity other than the transaction sender to pay the transaction fees(EIP-4337)
|
|
4039
|
+
* - nonceDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition)
|
|
4040
|
+
* - feeDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition)
|
|
4041
|
+
* - version? - specify ETransactionVersion - V3 Transactions fee is in fri, oldV transactions fee is in wei
|
|
4009
4042
|
*
|
|
4010
4043
|
* @returns response from estimate_fee
|
|
4011
4044
|
*/
|
|
@@ -4014,11 +4047,21 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
4014
4047
|
* Estimate Fee for executing a DEPLOY_ACCOUNT transaction on starknet
|
|
4015
4048
|
*
|
|
4016
4049
|
* @param contractPayload -
|
|
4017
|
-
* -
|
|
4018
|
-
* -
|
|
4050
|
+
* - classHash - the class hash of the compiled contract.
|
|
4051
|
+
* - constructorCalldata? - constructor data;
|
|
4052
|
+
* - contractAddress? - future account contract address. Precalculate for faster execution.
|
|
4053
|
+
* - addressSalt? - salt used for calculation of the contractAddress. Required if contractAddress is provided.
|
|
4054
|
+
*
|
|
4019
4055
|
* @param estimateFeeDetails -
|
|
4020
|
-
* -
|
|
4021
|
-
* -
|
|
4056
|
+
* - blockIdentifier?
|
|
4057
|
+
* - nonce? = 0
|
|
4058
|
+
* - skipValidate? - default true
|
|
4059
|
+
* - tip? - prioritize order of transactions in the mempool.
|
|
4060
|
+
* - paymasterData? - entity other than the transaction sender to pay the transaction fees(EIP-4337)
|
|
4061
|
+
* - nonceDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition)
|
|
4062
|
+
* - feeDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition)
|
|
4063
|
+
* - version? - specify ETransactionVersion - V3 Transactions fee is in fri, oldV transactions fee is in wei
|
|
4064
|
+
*
|
|
4022
4065
|
* @returns response from estimate_fee
|
|
4023
4066
|
*/
|
|
4024
4067
|
abstract estimateAccountDeployFee(contractPayload: DeployAccountContractPayload, estimateFeeDetails?: EstimateFeeDetails): Promise<EstimateFeeResponse>;
|
|
@@ -4026,18 +4069,24 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
4026
4069
|
* Estimate Fee for executing a UDC DEPLOY transaction on starknet
|
|
4027
4070
|
* This is different from the normal DEPLOY transaction as it goes through the Universal Deployer Contract (UDC)
|
|
4028
4071
|
|
|
4029
|
-
* @param deployContractPayload
|
|
4072
|
+
* @param deployContractPayload array or singular
|
|
4030
4073
|
* - classHash: computed class hash of compiled contract
|
|
4031
4074
|
* - salt: address salt
|
|
4032
4075
|
* - unique: bool if true ensure unique salt
|
|
4033
|
-
* -
|
|
4076
|
+
* - constructorCalldata: constructor calldata
|
|
4034
4077
|
*
|
|
4035
|
-
* @param
|
|
4036
|
-
*
|
|
4037
|
-
*
|
|
4038
|
-
*
|
|
4078
|
+
* @param estimateFeeDetails -
|
|
4079
|
+
* - blockIdentifier?
|
|
4080
|
+
* - nonce?
|
|
4081
|
+
* - skipValidate? - default true
|
|
4082
|
+
* - tip? - prioritize order of transactions in the mempool.
|
|
4083
|
+
* - accountDeploymentData? - deploy an account contract (substitution for deploy account transaction)
|
|
4084
|
+
* - paymasterData? - entity other than the transaction sender to pay the transaction fees(EIP-4337)
|
|
4085
|
+
* - nonceDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition)
|
|
4086
|
+
* - feeDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition)
|
|
4087
|
+
* - version? - specify ETransactionVersion - V3 Transactions fee is in fri, oldV transactions fee is in wei
|
|
4039
4088
|
*/
|
|
4040
|
-
abstract estimateDeployFee(deployContractPayload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[],
|
|
4089
|
+
abstract estimateDeployFee(deployContractPayload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[], estimateFeeDetails?: EstimateFeeDetails): Promise<EstimateFeeResponse>;
|
|
4041
4090
|
/**
|
|
4042
4091
|
* Estimate Fee for executing a list of transactions on starknet
|
|
4043
4092
|
* Contract must be deployed for fee estimation to be possible
|
|
@@ -4046,9 +4095,38 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
4046
4095
|
* - type - the type of transaction : 'DECLARE' | (multi)'DEPLOY' | (multi)'INVOKE_FUNCTION' | 'DEPLOY_ACCOUNT'
|
|
4047
4096
|
* - payload - the payload of the transaction
|
|
4048
4097
|
*
|
|
4098
|
+
* @param estimateFeeDetails -
|
|
4099
|
+
* - blockIdentifier?
|
|
4100
|
+
* - nonce?
|
|
4101
|
+
* - skipValidate? - default true
|
|
4102
|
+
* - tip? - prioritize order of transactions in the mempool.
|
|
4103
|
+
* - accountDeploymentData? - deploy an account contract (substitution for deploy account transaction)
|
|
4104
|
+
* - paymasterData? - entity other than the transaction sender to pay the transaction fees(EIP-4337)
|
|
4105
|
+
* - nonceDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition)
|
|
4106
|
+
* - feeDataAvailabilityMode? - allows users to choose their preferred data availability mode (Volition)
|
|
4107
|
+
* - version? - specify ETransactionVersion - V3 Transactions fee is in fri, oldV transactions fee is in wei
|
|
4108
|
+
*
|
|
4049
4109
|
* @returns response from estimate_fee
|
|
4050
4110
|
*/
|
|
4051
4111
|
abstract estimateFeeBulk(invocations: Invocations, details?: EstimateFeeDetails): Promise<EstimateFeeResponseBulk>;
|
|
4112
|
+
/**
|
|
4113
|
+
* Gets Suggested Max Fee based on the transaction type
|
|
4114
|
+
*
|
|
4115
|
+
* @param {EstimateFeeAction} estimateFeeAction
|
|
4116
|
+
* @param {EstimateFeeDetails} details
|
|
4117
|
+
* @returns EstimateFee (...response, resourceBounds, suggestedMaxFee)
|
|
4118
|
+
*/
|
|
4119
|
+
abstract getSuggestedFee(estimateFeeAction: EstimateFeeAction, details: EstimateFeeDetails): Promise<EstimateFee>;
|
|
4120
|
+
/**
|
|
4121
|
+
* Simulates an array of transaction and returns an array of transaction trace and estimated fee.
|
|
4122
|
+
*
|
|
4123
|
+
* @param invocations Invocations containing:
|
|
4124
|
+
* - type - transaction type: DECLARE, (multi)DEPLOY, DEPLOY_ACCOUNT, (multi)INVOKE_FUNCTION
|
|
4125
|
+
* @param details SimulateTransactionDetails
|
|
4126
|
+
*
|
|
4127
|
+
* @returns response from simulate_transaction
|
|
4128
|
+
*/
|
|
4129
|
+
abstract simulateTransaction(invocations: Invocations, details?: SimulateTransactionDetails): Promise<SimulateTransactionResponse>;
|
|
4052
4130
|
/**
|
|
4053
4131
|
* Invoke execute function in account contract
|
|
4054
4132
|
*
|
|
@@ -4066,14 +4144,12 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
4066
4144
|
* Declares a given compiled contract (json) to starknet
|
|
4067
4145
|
*
|
|
4068
4146
|
* @param contractPayload transaction payload to be deployed containing:
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
* @param transactionsDetail
|
|
4074
|
-
|
|
4075
|
-
- optional version
|
|
4076
|
-
- optional maxFee
|
|
4147
|
+
* - contract: compiled contract code
|
|
4148
|
+
* - (optional) classHash: computed class hash of compiled contract. Pre-compute it for faster execution.
|
|
4149
|
+
* - (required for Cairo1 without compiledClassHash) casm: CompiledContract | string;
|
|
4150
|
+
* - (optional for Cairo1 with casm) compiledClassHash: compiled class hash from casm. Pre-compute it for faster execution.
|
|
4151
|
+
* @param transactionsDetail - InvocationsDetails
|
|
4152
|
+
*
|
|
4077
4153
|
* @returns a confirmation of sending a transaction on the starknet contract
|
|
4078
4154
|
*/
|
|
4079
4155
|
abstract declare(contractPayload: DeclareContractPayload, transactionsDetail?: InvocationsDetails): Promise<DeclareContractResponse>;
|
|
@@ -4086,15 +4162,13 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
4086
4162
|
* - [constructorCalldata] contract constructor calldata
|
|
4087
4163
|
* - [salt=pseudorandom] deploy address salt
|
|
4088
4164
|
* - [unique=true] ensure unique salt
|
|
4089
|
-
* @param details -
|
|
4090
|
-
*
|
|
4091
|
-
* - [version=transactionVersion]
|
|
4092
|
-
* - [maxFee=getSuggestedFee]
|
|
4165
|
+
* @param details - InvocationsDetails
|
|
4166
|
+
*
|
|
4093
4167
|
* @returns
|
|
4094
4168
|
* - contract_address[]
|
|
4095
4169
|
* - transaction_hash
|
|
4096
4170
|
*/
|
|
4097
|
-
abstract deploy(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[], details?: InvocationsDetails
|
|
4171
|
+
abstract deploy(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[], details?: InvocationsDetails): Promise<MultiDeployContractResponse>;
|
|
4098
4172
|
/**
|
|
4099
4173
|
* Simplify deploy simulating old DeployContract with same response + UDC specific response
|
|
4100
4174
|
* Internal wait for L2 transaction, support multicall
|
|
@@ -4104,10 +4178,8 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
4104
4178
|
* - [constructorCalldata] contract constructor calldata
|
|
4105
4179
|
* - [salt=pseudorandom] deploy address salt
|
|
4106
4180
|
* - [unique=true] ensure unique salt
|
|
4107
|
-
* @param details -
|
|
4108
|
-
*
|
|
4109
|
-
* - [version=transactionVersion]
|
|
4110
|
-
* - [maxFee=getSuggestedFee]
|
|
4181
|
+
* @param details - InvocationsDetails
|
|
4182
|
+
*
|
|
4111
4183
|
* @returns
|
|
4112
4184
|
* - contract_address
|
|
4113
4185
|
* - transaction_hash
|
|
@@ -4119,7 +4191,7 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
4119
4191
|
* - calldata
|
|
4120
4192
|
* - salt
|
|
4121
4193
|
*/
|
|
4122
|
-
abstract deployContract(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[], details?: InvocationsDetails
|
|
4194
|
+
abstract deployContract(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[], details?: InvocationsDetails): Promise<DeployContractUDCResponse>;
|
|
4123
4195
|
/**
|
|
4124
4196
|
* Declares and Deploy a given compiled contract (json) to starknet using UDC
|
|
4125
4197
|
* Internal wait for L2 transaction, do not support multicall
|
|
@@ -4133,10 +4205,8 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
4133
4205
|
* - [constructorCalldata] contract constructor calldata
|
|
4134
4206
|
* - [salt=pseudorandom] deploy address salt
|
|
4135
4207
|
* - [unique=true] ensure unique salt
|
|
4136
|
-
* @param details
|
|
4137
|
-
*
|
|
4138
|
-
* - [version=transactionVersion]
|
|
4139
|
-
* - [maxFee=getSuggestedFee]
|
|
4208
|
+
* @param details - InvocationsDetails
|
|
4209
|
+
*
|
|
4140
4210
|
* @returns
|
|
4141
4211
|
* - declare
|
|
4142
4212
|
* - transaction_hash
|
|
@@ -4151,19 +4221,17 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
4151
4221
|
* - calldata
|
|
4152
4222
|
* - salt
|
|
4153
4223
|
*/
|
|
4154
|
-
abstract declareAndDeploy(payload: DeclareAndDeployContractPayload, details?: InvocationsDetails
|
|
4224
|
+
abstract declareAndDeploy(payload: DeclareAndDeployContractPayload, details?: InvocationsDetails): Promise<DeclareDeployUDCResponse>;
|
|
4155
4225
|
/**
|
|
4156
4226
|
* Deploy the account on Starknet
|
|
4157
4227
|
*
|
|
4158
4228
|
* @param contractPayload transaction payload to be deployed containing:
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
* @param transactionsDetail
|
|
4164
|
-
|
|
4165
|
-
- optional version
|
|
4166
|
-
- optional maxFee
|
|
4229
|
+
* - classHash: computed class hash of compiled contract
|
|
4230
|
+
* - optional constructor calldata
|
|
4231
|
+
* - optional address salt
|
|
4232
|
+
* - optional contractAddress
|
|
4233
|
+
* @param transactionsDetail - InvocationsDetails
|
|
4234
|
+
*
|
|
4167
4235
|
* @returns a confirmation of sending a transaction on the starknet contract
|
|
4168
4236
|
*/
|
|
4169
4237
|
abstract deployAccount(contractPayload: DeployAccountContractPayload, transactionsDetail?: InvocationsDetails): Promise<DeployContractResponse>;
|
|
@@ -4211,24 +4279,6 @@ declare abstract class AccountInterface extends ProviderInterface {
|
|
|
4211
4279
|
* @returns nonce of the account
|
|
4212
4280
|
*/
|
|
4213
4281
|
abstract getNonce(blockIdentifier?: BlockIdentifier): Promise<Nonce>;
|
|
4214
|
-
/**
|
|
4215
|
-
* Gets Suggested Max Fee based on the transaction type
|
|
4216
|
-
*
|
|
4217
|
-
* @param {EstimateFeeAction} estimateFeeAction
|
|
4218
|
-
* @param {EstimateFeeDetails} details
|
|
4219
|
-
* @returns suggestedMaxFee
|
|
4220
|
-
*/
|
|
4221
|
-
abstract getSuggestedFee(estimateFeeAction: EstimateFeeAction, details: EstimateFeeDetails): Promise<EstimateFee>;
|
|
4222
|
-
/**
|
|
4223
|
-
* Simulates an array of transaction and returns an array of transaction trace and estimated fee.
|
|
4224
|
-
*
|
|
4225
|
-
* @param invocations Invocations containing:
|
|
4226
|
-
* - type - transaction type: DECLARE, (multi)DEPLOY, DEPLOY_ACCOUNT, (multi)INVOKE_FUNCTION
|
|
4227
|
-
* @param details SimulateTransactionDetails
|
|
4228
|
-
*
|
|
4229
|
-
* @returns response from simulate_transaction
|
|
4230
|
-
*/
|
|
4231
|
-
abstract simulateTransaction(invocations: Invocations, details?: SimulateTransactionDetails): Promise<SimulateTransactionResponse>;
|
|
4232
4282
|
}
|
|
4233
4283
|
|
|
4234
4284
|
declare class Account extends RpcProvider implements AccountInterface {
|
|
@@ -4245,39 +4295,37 @@ declare class Account extends RpcProvider implements AccountInterface {
|
|
|
4245
4295
|
* @param classHash if provided detects Cairo version from classHash, otherwise from the account address
|
|
4246
4296
|
*/
|
|
4247
4297
|
getCairoVersion(classHash?: string): Promise<CairoVersion>;
|
|
4248
|
-
estimateFee(calls: AllowArray<Call>, estimateFeeDetails?:
|
|
4249
|
-
estimateInvokeFee(calls: AllowArray<Call>, details?:
|
|
4250
|
-
estimateDeclareFee(
|
|
4251
|
-
estimateAccountDeployFee({ classHash, addressSalt, constructorCalldata, contractAddress
|
|
4252
|
-
estimateDeployFee(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[],
|
|
4253
|
-
estimateFeeBulk(invocations: Invocations, details?:
|
|
4254
|
-
|
|
4255
|
-
execute(calls: AllowArray<Call>, abis?: Abi[] | undefined, details?:
|
|
4298
|
+
estimateFee(calls: AllowArray<Call>, estimateFeeDetails?: UniversalDetails): Promise<EstimateFee>;
|
|
4299
|
+
estimateInvokeFee(calls: AllowArray<Call>, details?: UniversalDetails): Promise<EstimateFee>;
|
|
4300
|
+
estimateDeclareFee(payload: DeclareContractPayload, details?: UniversalDetails): Promise<EstimateFee>;
|
|
4301
|
+
estimateAccountDeployFee({ classHash, addressSalt, constructorCalldata, contractAddress, }: DeployAccountContractPayload, details?: UniversalDetails): Promise<EstimateFee>;
|
|
4302
|
+
estimateDeployFee(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[], details?: UniversalDetails): Promise<EstimateFee>;
|
|
4303
|
+
estimateFeeBulk(invocations: Invocations, details?: UniversalDetails): Promise<EstimateFeeBulk>;
|
|
4304
|
+
simulateTransaction(invocations: Invocations, details?: SimulateTransactionDetails): Promise<SimulateTransactionResponse>;
|
|
4305
|
+
execute(calls: AllowArray<Call>, abis?: Abi[] | undefined, details?: UniversalDetails): Promise<InvokeFunctionResponse>;
|
|
4256
4306
|
/**
|
|
4257
4307
|
* First check if contract is already declared, if not declare it
|
|
4258
4308
|
* If contract already declared returned transaction_hash is ''.
|
|
4259
4309
|
* Method will pass even if contract is already declared
|
|
4260
4310
|
* @param transactionsDetail (optional)
|
|
4261
4311
|
*/
|
|
4262
|
-
declareIfNot(payload: DeclareContractPayload, transactionsDetail?:
|
|
4263
|
-
declare(payload: DeclareContractPayload, details?:
|
|
4264
|
-
deploy(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[], details?:
|
|
4265
|
-
deployContract(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[], details?:
|
|
4266
|
-
declareAndDeploy(payload: DeclareAndDeployContractPayload, details?:
|
|
4267
|
-
deploySelf: ({ classHash, constructorCalldata, addressSalt, contractAddress: providedContractAddress, }: DeployAccountContractPayload, details?:
|
|
4268
|
-
deployAccount({ classHash, constructorCalldata, addressSalt, contractAddress: providedContractAddress, }: DeployAccountContractPayload, details?:
|
|
4312
|
+
declareIfNot(payload: DeclareContractPayload, transactionsDetail?: UniversalDetails): Promise<DeclareContractResponse>;
|
|
4313
|
+
declare(payload: DeclareContractPayload, details?: UniversalDetails): Promise<DeclareContractResponse>;
|
|
4314
|
+
deploy(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[], details?: UniversalDetails): Promise<MultiDeployContractResponse>;
|
|
4315
|
+
deployContract(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[], details?: UniversalDetails): Promise<DeployContractUDCResponse>;
|
|
4316
|
+
declareAndDeploy(payload: DeclareAndDeployContractPayload, details?: UniversalDetails): Promise<DeclareDeployUDCResponse>;
|
|
4317
|
+
deploySelf: ({ classHash, constructorCalldata, addressSalt, contractAddress: providedContractAddress, }: DeployAccountContractPayload, details?: UniversalDetails) => Promise<DeployContractResponse>;
|
|
4318
|
+
deployAccount({ classHash, constructorCalldata, addressSalt, contractAddress: providedContractAddress, }: DeployAccountContractPayload, details?: UniversalDetails): Promise<DeployContractResponse>;
|
|
4269
4319
|
signMessage(typedData: TypedData): Promise<Signature>;
|
|
4270
4320
|
hashMessage(typedData: TypedData): Promise<string>;
|
|
4271
4321
|
verifyMessageHash(hash: BigNumberish, signature: Signature): Promise<boolean>;
|
|
4272
4322
|
verifyMessage(typedData: TypedData, signature: Signature): Promise<boolean>;
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
*/
|
|
4323
|
+
private getUniversalSuggestedFee;
|
|
4324
|
+
getSuggestedFee({ type, payload }: EstimateFeeAction, details: UniversalDetails): Promise<EstimateFee>;
|
|
4325
|
+
buildInvocation(call: Array<Call>, details: InvocationsSignerDetails): Promise<Invocation>;
|
|
4277
4326
|
buildDeclarePayload(payload: DeclareContractPayload, details: InvocationsSignerDetails): Promise<DeclareContractTransaction>;
|
|
4278
4327
|
buildAccountDeployPayload({ classHash, addressSalt, constructorCalldata, contractAddress: providedContractAddress, }: DeployAccountContractPayload, details: InvocationsSignerDetails): Promise<DeployAccountContractTransaction>;
|
|
4279
4328
|
buildUDCContractPayload(payload: UniversalDeployerContractPayload | UniversalDeployerContractPayload[]): Call[];
|
|
4280
|
-
simulateTransaction(invocations: Invocations, details?: SimulateTransactionDetails): Promise<SimulateTransactionResponse>;
|
|
4281
4329
|
accountInvocationsFactory(invocations: Invocations, details: AccountInvocationsFactoryDetails): Promise<AccountInvocations>;
|
|
4282
4330
|
getStarkName(address?: BigNumberish, // default to the wallet address
|
|
4283
4331
|
StarknetIdContract?: string): Promise<string>;
|
|
@@ -5048,12 +5096,13 @@ declare function estimatedFeeToMaxFee(estimatedFee: BigNumberish, overhead?: num
|
|
|
5048
5096
|
declare function estimateFeeToBounds(estimate: EstimateFeeResponse | 0n, amountOverhead?: number, priceOverhead?: number): ResourceBounds;
|
|
5049
5097
|
declare function intDAM(dam: EDataAvailabilityMode): EDAMode;
|
|
5050
5098
|
/**
|
|
5051
|
-
* Convert to ETransactionVersion or throw an error
|
|
5052
|
-
*
|
|
5099
|
+
* Convert to ETransactionVersion or throw an error.
|
|
5100
|
+
* Return providedVersion is specified else return defaultVersion
|
|
5101
|
+
* @param defaultVersion BigNumberish
|
|
5053
5102
|
* @param providedVersion BigNumberish | undefined
|
|
5054
5103
|
* @returns ETransactionVersion
|
|
5055
5104
|
*/
|
|
5056
|
-
declare function toTransactionVersion(defaultVersion:
|
|
5105
|
+
declare function toTransactionVersion(defaultVersion: BigNumberish, providedVersion?: BigNumberish): ETransactionVersion;
|
|
5057
5106
|
/**
|
|
5058
5107
|
* Convert Transaction version to Fee version or throw an error
|
|
5059
5108
|
* @param providedVersion BigNumberish | undefined
|
|
@@ -5063,7 +5112,7 @@ declare function toFeeVersion(providedVersion?: BigNumberish): ETransactionVersi
|
|
|
5063
5112
|
* Rerturn provided or default v3 tx details
|
|
5064
5113
|
* @param details EstimateFeeDetails
|
|
5065
5114
|
*/
|
|
5066
|
-
declare function v3Details(details:
|
|
5115
|
+
declare function v3Details(details: UniversalDetails): {
|
|
5067
5116
|
tip: BigNumberish;
|
|
5068
5117
|
paymasterData: BigNumberish[];
|
|
5069
5118
|
accountDeploymentData: BigNumberish[];
|
|
@@ -5703,4 +5752,4 @@ declare function parseUDCEvent(txReceipt: InvokeTransactionReceiptResponse): {
|
|
|
5703
5752
|
/** @deprecated prefer the 'num' naming */
|
|
5704
5753
|
declare const number: typeof num;
|
|
5705
5754
|
|
|
5706
|
-
export { Abi, AbiEntry, AbiEnums, AbiEvents, AbiStructs, Account, AccountInterface, AccountInvocationItem, AccountInvocations, AccountInvocationsFactoryDetails, AllowArray, Args, ArgsOrCalldata, ArgsOrCalldataWithOptions, ArraySignatureType, AsyncContractFunction, BigNumberish, BlockIdentifier, BlockNumber, BlockStatus, BlockTag, Builtins, ByteCode, Cairo1Event, CairoAssembly, CairoContract, CairoCustomEnum, CairoEnum, CairoEnumRaw, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoVersion, Call, CallContractResponse, CallData, CallDetails, CallL1Handler, CallOptions, CallStruct, Calldata, CommonTransactionResponse, CompiledContract, CompiledSierra, CompiledSierraCasm, CompilerVersion, CompleteDeclareContractPayload, CompressedProgram, Contract, ContractClass, ContractClassResponse, ContractEntryPoint, ContractEntryPointFields, ContractFactory, ContractFactoryParams, ContractFunction, ContractInterface, ContractOptions, ContractVersion, CustomError, DeclareAndDeployContractPayload, DeclareContractPayload, DeclareContractResponse, DeclareContractTransaction, DeclareDeployUDCResponse, DeclareSignerDetails, DeclareTransactionReceiptResponse, DeclareTransactionResponse, DeployAccountContractPayload, DeployAccountContractTransaction, DeployAccountSignerDetails, DeployContractResponse, DeployContractUDCResponse, DeployTransactionReceiptResponse, DeployedContractItem, Details, EntryPointType, EntryPointsByType, EnumAbi, EstimateFee, EstimateFeeAction, EstimateFeeBulk, EstimateFeeDetails, EstimateFeeResponse, EstimateFeeResponseBulk, Event, EventAbi, EventEntry, ExecutionResources, FunctionAbi, FunctionInvocation, GatewayError, GetBlockResponse, GetCodeResponse, GetContractAddressesResponse, GetTransactionReceiptResponse, GetTransactionResponse, GetTransactionStatusResponse, HexCalldata, HttpError, Invocation, Invocations, InvocationsDetails, InvocationsDetailsWithNonce, InvocationsSignerDetails, InvokeFunctionResponse, InvokeOptions, InvokeTransactionReceiptResponse, InvokeTransactionResponse, LegacyCompiledContract, LegacyContractClass, LegacyEvent, LibraryError, Litteral, MessageToL1, MessageToL2, MultiDeployContractResponse, MultiType, Nonce, OptionalPayload, ParsedEvent, ParsedEvents, ParsedStruct, Program, RpcProvider as Provider, ProviderInterface, ProviderOptions, PythonicHints, index$3 as RPC, RawArgs, RawArgsArray, RawArgsObject, RawCalldata, RejectedTransactionReceiptResponse, RejectedTransactionResponse, Result, RevertedTransactionReceiptResponse, RpcChannel, RpcProvider, RpcProviderOptions, SIMULATION_FLAG, sequencer as Sequencer, SequencerHttpMethod, SequencerIdentifier, SequencerProviderOptions, SierraContractClass, SierraContractEntryPointFields, SierraEntryPointsByType, SierraProgramDebugInfo, Signature, Signer, SignerInterface, SimulateTransactionDetails, SimulateTransactionResponse, SimulatedTransaction, SimulationFlags, StarkNetDomain, StarkNetMerkleType, StarkNetType, StateUpdateResponse, Storage, StructAbi, SuccessfulTransactionReceiptResponse, TransactionExecutionStatus, TransactionFinalityStatus, TransactionStatus, TransactionType, Tupled, TypedContract, TypedData, Uint, Uint256, UniversalDeployerContractPayload, V2DeclareSignerDetails, V2DeployAccountSignerDetails, V2InvocationsSignerDetails, V3DeclareSignerDetails, V3DeployAccountSignerDetails, V3InvocationsSignerDetails, V3TransactionDetails, ValidateType, WeierstrassSignatureType, addAddressPadding, buildUrl, cairo, constants, contractClassResponseToLegacyCompiledContract, defaultProvider, ec, encode, index as events, extractContractHashes, fixProto, fixStack, getCalldata, getChecksumAddress, getContractVersionOptions, getEstimateFeeBulkOptions, getSimulateTransactionOptions, index$1 as hash, isSierra, isUrl, json, merkle, num, number, parseUDCEvent, provider, selector, shortString, splitArgsAndOptions, stark, starknetId, transaction, typedData, index$2 as types, uint256$1 as uint256, v2 as v2hash, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, waitForTransactionOptions };
|
|
5755
|
+
export { Abi, AbiEntry, AbiEnums, AbiEvents, AbiStructs, Account, AccountInterface, AccountInvocationItem, AccountInvocations, AccountInvocationsFactoryDetails, AllowArray, Args, ArgsOrCalldata, ArgsOrCalldataWithOptions, ArraySignatureType, AsyncContractFunction, BigNumberish, BlockIdentifier, BlockNumber, BlockStatus, BlockTag, Builtins, ByteCode, Cairo1Event, CairoAssembly, CairoContract, CairoCustomEnum, CairoEnum, CairoEnumRaw, CairoOption, CairoOptionVariant, CairoResult, CairoResultVariant, CairoVersion, Call, CallContractResponse, CallData, CallDetails, CallL1Handler, CallOptions, CallStruct, Calldata, CommonTransactionResponse, CompiledContract, CompiledSierra, CompiledSierraCasm, CompilerVersion, CompleteDeclareContractPayload, CompressedProgram, Contract, ContractClass, ContractClassResponse, ContractEntryPoint, ContractEntryPointFields, ContractFactory, ContractFactoryParams, ContractFunction, ContractInterface, ContractOptions, ContractVersion, CustomError, DeclareAndDeployContractPayload, DeclareContractPayload, DeclareContractResponse, DeclareContractTransaction, DeclareDeployUDCResponse, DeclareSignerDetails, DeclareTransactionReceiptResponse, DeclareTransactionResponse, DeployAccountContractPayload, DeployAccountContractTransaction, DeployAccountSignerDetails, DeployContractResponse, DeployContractUDCResponse, DeployTransactionReceiptResponse, DeployedContractItem, Details, EntryPointType, EntryPointsByType, EnumAbi, EstimateFee, EstimateFeeAction, EstimateFeeBulk, EstimateFeeDetails, EstimateFeeResponse, EstimateFeeResponseBulk, Event, EventAbi, EventEntry, ExecutionResources, FunctionAbi, FunctionInvocation, GatewayError, GetBlockResponse, GetCodeResponse, GetContractAddressesResponse, GetTransactionReceiptResponse, GetTransactionResponse, GetTransactionStatusResponse, HexCalldata, HttpError, Invocation, Invocations, InvocationsDetails, InvocationsDetailsWithNonce, InvocationsSignerDetails, InvokeFunctionResponse, InvokeOptions, InvokeTransactionReceiptResponse, InvokeTransactionResponse, LegacyCompiledContract, LegacyContractClass, LegacyEvent, LibraryError, Litteral, MessageToL1, MessageToL2, MultiDeployContractResponse, MultiType, Nonce, OptionalPayload, ParsedEvent, ParsedEvents, ParsedStruct, Program, RpcProvider as Provider, ProviderInterface, ProviderOptions, PythonicHints, index$3 as RPC, RawArgs, RawArgsArray, RawArgsObject, RawCalldata, RejectedTransactionReceiptResponse, RejectedTransactionResponse, Result, RevertedTransactionReceiptResponse, RpcChannel, RpcProvider, RpcProviderOptions, SIMULATION_FLAG, sequencer as Sequencer, SequencerHttpMethod, SequencerIdentifier, SequencerProviderOptions, SierraContractClass, SierraContractEntryPointFields, SierraEntryPointsByType, SierraProgramDebugInfo, Signature, Signer, SignerInterface, SimulateTransactionDetails, SimulateTransactionResponse, SimulatedTransaction, SimulationFlags, StarkNetDomain, StarkNetMerkleType, StarkNetType, StateUpdateResponse, Storage, StructAbi, SuccessfulTransactionReceiptResponse, TransactionExecutionStatus, TransactionFinalityStatus, TransactionStatus, TransactionType, Tupled, TypedContract, TypedData, Uint, Uint256, UniversalDeployerContractPayload, UniversalDetails, V2DeclareSignerDetails, V2DeployAccountSignerDetails, V2InvocationsSignerDetails, V3DeclareSignerDetails, V3DeployAccountSignerDetails, V3InvocationsSignerDetails, V3TransactionDetails, ValidateType, WeierstrassSignatureType, addAddressPadding, buildUrl, cairo, constants, contractClassResponseToLegacyCompiledContract, defaultProvider, ec, encode, index as events, extractContractHashes, fixProto, fixStack, getCalldata, getChecksumAddress, getContractVersionOptions, getEstimateFeeBulkOptions, getSimulateTransactionOptions, index$1 as hash, isSierra, isUrl, json, merkle, num, number, parseUDCEvent, provider, selector, shortString, splitArgsAndOptions, stark, starknetId, transaction, typedData, index$2 as types, uint256$1 as uint256, v2 as v2hash, v3 as v3hash, validateAndParseAddress, validateChecksumAddress, waitForTransactionOptions };
|