starknet 7.5.1 → 7.6.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 +10 -0
- package/dist/index.d.ts +15 -2
- package/dist/index.global.js +16 -5
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3559,6 +3559,10 @@ function toAnyPatchVersion(version) {
|
|
|
3559
3559
|
}
|
|
3560
3560
|
return `${parts[0]}.${parts[1]}.*`;
|
|
3561
3561
|
}
|
|
3562
|
+
function toApiVersion(version) {
|
|
3563
|
+
const [major, minor] = version.replace(/^v/, "").split(".");
|
|
3564
|
+
return `v${major}_${minor}`;
|
|
3565
|
+
}
|
|
3562
3566
|
function isPendingBlock(response) {
|
|
3563
3567
|
return response.status === "PENDING";
|
|
3564
3568
|
}
|
|
@@ -3887,6 +3891,7 @@ __export(provider_exports, {
|
|
|
3887
3891
|
createSierraContractClass: () => createSierraContractClass,
|
|
3888
3892
|
getDefaultNodeUrl: () => getDefaultNodeUrl,
|
|
3889
3893
|
getDefaultNodes: () => getDefaultNodes,
|
|
3894
|
+
getSupportedRpcVersions: () => getSupportedRpcVersions,
|
|
3890
3895
|
parseContract: () => parseContract,
|
|
3891
3896
|
validBlockTags: () => validBlockTags,
|
|
3892
3897
|
wait: () => wait
|
|
@@ -3924,15 +3929,17 @@ var getDefaultNodeUrl = (networkName, mute = false, rpcVersion) => {
|
|
|
3924
3929
|
return nodes[randIdx];
|
|
3925
3930
|
};
|
|
3926
3931
|
function getDefaultNodes(rpcVersion) {
|
|
3927
|
-
const vToUrl = (versionString) => `v${versionString.replace(/^v/, "").replace(/\./g, "_")}`;
|
|
3928
3932
|
const nodes = { ...RPC_DEFAULT_NODES };
|
|
3929
3933
|
Object.keys(nodes).forEach(function(key, _) {
|
|
3930
3934
|
nodes[key] = nodes[key].map((it) => {
|
|
3931
|
-
return `${it}${
|
|
3935
|
+
return `${it}${toApiVersion(rpcVersion)}`;
|
|
3932
3936
|
});
|
|
3933
3937
|
});
|
|
3934
3938
|
return nodes;
|
|
3935
3939
|
}
|
|
3940
|
+
function getSupportedRpcVersions() {
|
|
3941
|
+
return [...new Set(Object.values(_SupportedRpcVersion))];
|
|
3942
|
+
}
|
|
3936
3943
|
var validBlockTags = Object.values(BlockTag);
|
|
3937
3944
|
var Block = class {
|
|
3938
3945
|
/**
|
|
@@ -5305,7 +5312,8 @@ var RpcChannel2 = class {
|
|
|
5305
5312
|
type: RPCSPEC08.ETransactionType.INVOKE,
|
|
5306
5313
|
sender_address: invocation.contractAddress,
|
|
5307
5314
|
calldata: CallData.toHex(invocation.calldata),
|
|
5308
|
-
version: toHex(defaultVersions.v3),
|
|
5315
|
+
version: toHex(invocation.version || defaultVersions.v3),
|
|
5316
|
+
// invocation.version as simulate can use fee and normal version
|
|
5309
5317
|
...details
|
|
5310
5318
|
};
|
|
5311
5319
|
}
|
|
@@ -5323,7 +5331,8 @@ var RpcChannel2 = class {
|
|
|
5323
5331
|
},
|
|
5324
5332
|
compiled_class_hash: invocation.compiledClassHash || "",
|
|
5325
5333
|
sender_address: invocation.senderAddress,
|
|
5326
|
-
version: toHex(defaultVersions.v3),
|
|
5334
|
+
version: toHex(invocation.version || defaultVersions.v3),
|
|
5335
|
+
// invocation.version as simulate can use fee and normal version
|
|
5327
5336
|
...details
|
|
5328
5337
|
};
|
|
5329
5338
|
}
|
|
@@ -5334,7 +5343,8 @@ var RpcChannel2 = class {
|
|
|
5334
5343
|
constructor_calldata: CallData.toHex(invocation.constructorCalldata || []),
|
|
5335
5344
|
class_hash: toHex(invocation.classHash),
|
|
5336
5345
|
contract_address_salt: toHex(invocation.addressSalt || 0),
|
|
5337
|
-
version: toHex(defaultVersions.v3),
|
|
5346
|
+
version: toHex(invocation.version || defaultVersions.v3),
|
|
5347
|
+
// invocation.version as simulate can use fee and normal version
|
|
5338
5348
|
...restDetails
|
|
5339
5349
|
};
|
|
5340
5350
|
}
|
|
@@ -10883,6 +10893,7 @@ export {
|
|
|
10883
10893
|
stark_exports as stark,
|
|
10884
10894
|
starknetId_exports as starknetId,
|
|
10885
10895
|
toAnyPatchVersion,
|
|
10896
|
+
toApiVersion,
|
|
10886
10897
|
transaction_exports as transaction,
|
|
10887
10898
|
typedData_exports as typedData,
|
|
10888
10899
|
types_exports as types,
|