starknet 5.24.0 → 5.24.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 +12 -0
- package/dist/index.d.ts +5 -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,15 @@
|
|
|
1
|
+
## [5.24.2](https://github.com/starknet-io/starknet.js/compare/v5.24.1...v5.24.2) (2023-11-17)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- errors when testing in Testnet with a Cairo 1 account ([243074e](https://github.com/starknet-io/starknet.js/commit/243074ebd8324da2a33f13b5d8542949d7e92991))
|
|
6
|
+
|
|
7
|
+
## [5.24.1](https://github.com/starknet-io/starknet.js/compare/v5.24.0...v5.24.1) (2023-11-13)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- stringify error handler data ([1eab2d3](https://github.com/starknet-io/starknet.js/commit/1eab2d3acd67e8a14d6e10ea24d27aa1e108cdcc))
|
|
12
|
+
|
|
1
13
|
# [5.24.0](https://github.com/starknet-io/starknet.js/compare/v5.23.0...v5.24.0) (2023-11-13)
|
|
2
14
|
|
|
3
15
|
### Bug Fixes
|
package/dist/index.d.ts
CHANGED
|
@@ -293,7 +293,7 @@ declare enum CairoResultVariant {
|
|
|
293
293
|
* @param resultContent value of type T or U.
|
|
294
294
|
* @returns an instance representing a Cairo Result.
|
|
295
295
|
* @example ```typescript
|
|
296
|
-
* const myOption = new CairoResult<BigNumberish,CustomError>(CairoResultVariant.Ok, "0x54dda8");
|
|
296
|
+
* const myOption = new CairoResult<BigNumberish, CustomError>(CairoResultVariant.Ok, "0x54dda8");
|
|
297
297
|
* ```
|
|
298
298
|
*/
|
|
299
299
|
declare class CairoResult<T, U> {
|
|
@@ -4637,7 +4637,7 @@ declare function bigNumberishArrayToDecimalStringArray(rawCalldata: BigNumberish
|
|
|
4637
4637
|
*/
|
|
4638
4638
|
declare function bigNumberishArrayToHexadecimalStringArray(rawCalldata: BigNumberish[]): string[];
|
|
4639
4639
|
/**
|
|
4640
|
-
* Test if string is whole number (0,1,2,3...)
|
|
4640
|
+
* Test if string is whole number (0, 1, 2, 3...)
|
|
4641
4641
|
*/
|
|
4642
4642
|
declare const isStringWholeNumber: (value: string) => boolean;
|
|
4643
4643
|
/**
|
|
@@ -5193,7 +5193,7 @@ declare const uint256: (it: BigNumberish) => Uint256;
|
|
|
5193
5193
|
* Create unnamed tuple Cairo type (helper same as common struct type)
|
|
5194
5194
|
* @example
|
|
5195
5195
|
* ```typescript
|
|
5196
|
-
* tuple(1,'0x101',16);
|
|
5196
|
+
* tuple(1, '0x101', 16);
|
|
5197
5197
|
* ```
|
|
5198
5198
|
*/
|
|
5199
5199
|
declare const tuple: (...args: (BigNumberish | object | boolean)[]) => Record<number, BigNumberish | object | boolean>;
|
|
@@ -5273,10 +5273,10 @@ declare class CallData {
|
|
|
5273
5273
|
* @return Calldata - parsed arguments in format that contract is expecting
|
|
5274
5274
|
* @example
|
|
5275
5275
|
* ```typescript
|
|
5276
|
-
* const calldata = myCallData.compile("constructor",["0x34a",[1,3n]]);
|
|
5276
|
+
* const calldata = myCallData.compile("constructor", ["0x34a", [1, 3n]]);
|
|
5277
5277
|
* ```
|
|
5278
5278
|
* ```typescript
|
|
5279
|
-
* const calldata2 = myCallData.compile("constructor",{list:[1,3n],balance:"0x34"}); // wrong order is valid
|
|
5279
|
+
* const calldata2 = myCallData.compile("constructor", {list:[1, 3n], balance:"0x34"}); // wrong order is valid
|
|
5280
5280
|
* ```
|
|
5281
5281
|
*/
|
|
5282
5282
|
compile(method: string, argsCalldata: RawArgs): Calldata;
|
package/dist/index.global.js
CHANGED
|
@@ -5109,10 +5109,10 @@ var starknet = (() => {
|
|
|
5109
5109
|
* @return Calldata - parsed arguments in format that contract is expecting
|
|
5110
5110
|
* @example
|
|
5111
5111
|
* ```typescript
|
|
5112
|
-
* const calldata = myCallData.compile("constructor",["0x34a",[1,3n]]);
|
|
5112
|
+
* const calldata = myCallData.compile("constructor", ["0x34a", [1, 3n]]);
|
|
5113
5113
|
* ```
|
|
5114
5114
|
* ```typescript
|
|
5115
|
-
* const calldata2 = myCallData.compile("constructor",{list:[1,3n],balance:"0x34"}); // wrong order is valid
|
|
5115
|
+
* const calldata2 = myCallData.compile("constructor", {list:[1, 3n], balance:"0x34"}); // wrong order is valid
|
|
5116
5116
|
* ```
|
|
5117
5117
|
*/
|
|
5118
5118
|
compile(method, argsCalldata) {
|
|
@@ -10870,8 +10870,8 @@ var starknet = (() => {
|
|
|
10870
10870
|
if (rpcError) {
|
|
10871
10871
|
const { code, message, data } = rpcError;
|
|
10872
10872
|
throw new LibraryError(
|
|
10873
|
-
`RPC: ${method} with params ${
|
|
10874
|
-
${code}: ${message}: ${data}`
|
|
10873
|
+
`RPC: ${method} with params ${stringify2(params)}
|
|
10874
|
+
${code}: ${message}: ${stringify2(data)}`
|
|
10875
10875
|
);
|
|
10876
10876
|
}
|
|
10877
10877
|
if (otherError instanceof LibraryError) {
|
|
@@ -12174,7 +12174,8 @@ ${res.tx_failure_reason.error_message}`;
|
|
|
12174
12174
|
const orderCalls = calls.map((call) => ({
|
|
12175
12175
|
contractAddress: call.contractAddress,
|
|
12176
12176
|
entrypoint: call.entrypoint,
|
|
12177
|
-
calldata: call.calldata
|
|
12177
|
+
calldata: Array.isArray(call.calldata) && "__compiled__" in call.calldata ? call.calldata : CallData.compile(call.calldata)
|
|
12178
|
+
// RawArgsObject | RawArgsArray type
|
|
12178
12179
|
}));
|
|
12179
12180
|
return CallData.compile({ orderCalls });
|
|
12180
12181
|
};
|