starknet 7.6.1 → 7.6.2
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 +6 -0
- package/dist/index.d.ts +6 -5
- package/dist/index.global.js +6 -5
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [7.6.2](https://github.com/starknet-io/starknet.js/compare/v7.6.1...v7.6.2) (2025-06-24)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- enable passing UniversalDetails into ContractOptions ([#1427](https://github.com/starknet-io/starknet.js/issues/1427)) ([4cde813](https://github.com/starknet-io/starknet.js/commit/4cde813afffe08681d61bd624a3429ca3b47cc6e))
|
|
6
|
+
|
|
1
7
|
## [7.6.1](https://github.com/starknet-io/starknet.js/compare/v7.6.0...v7.6.1) (2025-06-24)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/dist/index.d.ts
CHANGED
|
@@ -1031,6 +1031,9 @@ type AccountInvocationsFactoryDetails = {
|
|
|
1031
1031
|
interface UniversalDetails {
|
|
1032
1032
|
nonce?: BigNumberish;
|
|
1033
1033
|
blockIdentifier?: BlockIdentifier;
|
|
1034
|
+
/**
|
|
1035
|
+
* Max fee to pay for V2 transaction
|
|
1036
|
+
*/
|
|
1034
1037
|
maxFee?: BigNumberish;
|
|
1035
1038
|
tip?: BigNumberish;
|
|
1036
1039
|
paymasterData?: BigNumberish[];
|
|
@@ -1161,13 +1164,11 @@ type ContractOptions = {
|
|
|
1161
1164
|
formatResponse?: {
|
|
1162
1165
|
[key: string]: any;
|
|
1163
1166
|
};
|
|
1164
|
-
maxFee?: BigNumberish;
|
|
1165
|
-
nonce?: BigNumberish;
|
|
1166
1167
|
signature?: Signature;
|
|
1167
1168
|
addressSalt?: string;
|
|
1168
|
-
}
|
|
1169
|
+
} & Partial<UniversalDetails>;
|
|
1169
1170
|
type CallOptions = Pick<ContractOptions, 'blockIdentifier' | 'parseRequest' | 'parseResponse' | 'formatResponse'>;
|
|
1170
|
-
type InvokeOptions =
|
|
1171
|
+
type InvokeOptions = ContractOptions;
|
|
1171
1172
|
type ParsedEvent = {
|
|
1172
1173
|
[name: string]: ParsedStruct;
|
|
1173
1174
|
} & {
|
|
@@ -4510,7 +4511,7 @@ declare class Contract implements ContractInterface {
|
|
|
4510
4511
|
connect(providerOrAccount: ProviderInterface | AccountInterface): void;
|
|
4511
4512
|
deployed(): Promise<Contract>;
|
|
4512
4513
|
call(method: string, args?: ArgsOrCalldata, { parseRequest, parseResponse, formatResponse, blockIdentifier, }?: CallOptions): Promise<Result>;
|
|
4513
|
-
invoke(method: string, args?: ArgsOrCalldata, { parseRequest,
|
|
4514
|
+
invoke(method: string, args?: ArgsOrCalldata, { parseRequest, signature, ...RestInvokeOptions }?: InvokeOptions): Promise<InvokeFunctionResponse>;
|
|
4514
4515
|
estimate(method: string, args?: ArgsOrCalldata): Promise<EstimateFeeResponse>;
|
|
4515
4516
|
populate(method: string, args?: RawArgs): Call;
|
|
4516
4517
|
parseEvents(receipt: GetTransactionReceiptResponse): ParsedEvents;
|
package/dist/index.global.js
CHANGED
|
@@ -19071,7 +19071,7 @@ ${indent}}` : "}";
|
|
|
19071
19071
|
return this.callData.parse(method, it);
|
|
19072
19072
|
});
|
|
19073
19073
|
}
|
|
19074
|
-
invoke(method, args = [], { parseRequest = true,
|
|
19074
|
+
invoke(method, args = [], { parseRequest = true, signature, ...RestInvokeOptions } = {}) {
|
|
19075
19075
|
assert(this.address !== null, "contract is not connected to an address");
|
|
19076
19076
|
const calldata = getCalldata(args, () => {
|
|
19077
19077
|
if (parseRequest) {
|
|
@@ -19088,11 +19088,11 @@ ${indent}}` : "}";
|
|
|
19088
19088
|
};
|
|
19089
19089
|
if ("execute" in this.providerOrAccount) {
|
|
19090
19090
|
return this.providerOrAccount.execute(invocation, {
|
|
19091
|
-
|
|
19092
|
-
nonce
|
|
19091
|
+
...RestInvokeOptions
|
|
19093
19092
|
});
|
|
19094
19093
|
}
|
|
19095
|
-
if (!nonce)
|
|
19094
|
+
if (!RestInvokeOptions.nonce)
|
|
19095
|
+
throw new Error(`Nonce is required when invoking a function without an account`);
|
|
19096
19096
|
logger.warn(`Invoking ${method} without an account. This will not work on a public node.`);
|
|
19097
19097
|
return this.providerOrAccount.invokeFunction(
|
|
19098
19098
|
{
|
|
@@ -19100,7 +19100,8 @@ ${indent}}` : "}";
|
|
|
19100
19100
|
signature
|
|
19101
19101
|
},
|
|
19102
19102
|
{
|
|
19103
|
-
|
|
19103
|
+
...RestInvokeOptions,
|
|
19104
|
+
nonce: RestInvokeOptions.nonce
|
|
19104
19105
|
}
|
|
19105
19106
|
);
|
|
19106
19107
|
}
|