starknet 10.7.6 → 10.8.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 +111 -103
- package/dist/index.global.js +34 -31
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +34 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -101,11 +101,12 @@ __export(index_exports, {
|
|
|
101
101
|
RPC: () => api_exports,
|
|
102
102
|
RPC0102: () => rpc_0_10_2_exports,
|
|
103
103
|
RPC0103: () => rpc_0_10_3_exports,
|
|
104
|
+
RPC0104: () => rpc_0_10_4_exports,
|
|
104
105
|
RPC09: () => rpc_0_9_0_exports,
|
|
105
106
|
RPCResponseParser: () => RPCResponseParser,
|
|
106
107
|
ReceiptTx: () => ReceiptTx,
|
|
107
108
|
ResponseParser: () => ResponseParser,
|
|
108
|
-
RpcChannel: () =>
|
|
109
|
+
RpcChannel: () => RpcChannel4,
|
|
109
110
|
RpcError: () => RpcError,
|
|
110
111
|
RpcProvider: () => RpcProvider,
|
|
111
112
|
Signer: () => Signer,
|
|
@@ -255,8 +256,8 @@ __export(constants_exports, {
|
|
|
255
256
|
var api_exports = {};
|
|
256
257
|
__export(api_exports, {
|
|
257
258
|
JRPC: () => jsonrpc_exports,
|
|
258
|
-
PAYMASTER_API: () =>
|
|
259
|
-
|
|
259
|
+
PAYMASTER_API: () => import_starknet_types_0104.PAYMASTER_API,
|
|
260
|
+
RPCSPEC0104: () => RPCSPEC0104,
|
|
260
261
|
RPCSPEC09: () => RPCSPEC09
|
|
261
262
|
});
|
|
262
263
|
|
|
@@ -265,12 +266,12 @@ var jsonrpc_exports = {};
|
|
|
265
266
|
|
|
266
267
|
// src/types/api/index.ts
|
|
267
268
|
var RPCSPEC09 = __toESM(require("@starknet-io/starknet-types-09"));
|
|
268
|
-
var
|
|
269
|
-
var
|
|
269
|
+
var RPCSPEC0104 = __toESM(require("@starknet-io/starknet-types-0104"));
|
|
270
|
+
var import_starknet_types_0104 = require("@starknet-io/starknet-types-0104");
|
|
270
271
|
|
|
271
272
|
// src/types/api/rpc.ts
|
|
272
273
|
var rpc_exports = {};
|
|
273
|
-
__reExport(rpc_exports, require("@starknet-io/starknet-types-
|
|
274
|
+
__reExport(rpc_exports, require("@starknet-io/starknet-types-0104"));
|
|
274
275
|
|
|
275
276
|
// src/types/api/index.ts
|
|
276
277
|
__reExport(api_exports, rpc_exports);
|
|
@@ -279,19 +280,19 @@ __reExport(api_exports, rpc_exports);
|
|
|
279
280
|
var { ETransactionVersion } = RPCSPEC09;
|
|
280
281
|
var { ETransactionVersion2 } = RPCSPEC09;
|
|
281
282
|
var { ETransactionVersion3 } = RPCSPEC09;
|
|
282
|
-
var { EDataAvailabilityMode } =
|
|
283
|
-
var { EDAMode } =
|
|
283
|
+
var { EDataAvailabilityMode } = RPCSPEC0104;
|
|
284
|
+
var { EDAMode } = RPCSPEC0104;
|
|
284
285
|
function isRPC08Plus_ResourceBounds(entry) {
|
|
285
286
|
return "l1_data_gas" in entry;
|
|
286
287
|
}
|
|
287
288
|
function isRPC08Plus_ResourceBoundsBN(entry) {
|
|
288
289
|
return "l1_data_gas" in entry;
|
|
289
290
|
}
|
|
290
|
-
var { ETxnResponseFlag } =
|
|
291
|
-
var { ETraceFlag } =
|
|
292
|
-
var { ESubscriptionTag } =
|
|
293
|
-
var { ETransactionStatus } =
|
|
294
|
-
var { ETransactionExecutionStatus } =
|
|
291
|
+
var { ETxnResponseFlag } = RPCSPEC0104;
|
|
292
|
+
var { ETraceFlag } = RPCSPEC0104;
|
|
293
|
+
var { ESubscriptionTag } = RPCSPEC0104;
|
|
294
|
+
var { ETransactionStatus } = RPCSPEC0104;
|
|
295
|
+
var { ETransactionExecutionStatus } = RPCSPEC0104;
|
|
295
296
|
var { ETransactionType: TransactionType } = RPCSPEC09;
|
|
296
297
|
var { EBlockStatus: BlockStatus } = RPCSPEC09;
|
|
297
298
|
var { ETransactionFinalityStatus: TransactionFinalityStatus } = RPCSPEC09;
|
|
@@ -507,10 +508,12 @@ var _SupportedRpcVersion = {
|
|
|
507
508
|
"0.10.0": "0.10.0",
|
|
508
509
|
"0.10.2": "0.10.2",
|
|
509
510
|
"0.10.3": "0.10.3",
|
|
511
|
+
"0.10.4": "0.10.4",
|
|
510
512
|
v0_9_0: "0.9.0",
|
|
511
513
|
v0_10_0: "0.10.0",
|
|
512
514
|
v0_10_2: "0.10.2",
|
|
513
|
-
v0_10_3: "0.10.3"
|
|
515
|
+
v0_10_3: "0.10.3",
|
|
516
|
+
v0_10_4: "0.10.4"
|
|
514
517
|
};
|
|
515
518
|
var DEFAULT_GLOBAL_CONFIG = {
|
|
516
519
|
rpcVersion: "0.10.0",
|
|
@@ -7423,6 +7426,16 @@ var RpcChannel3 = class extends RpcChannel2 {
|
|
|
7423
7426
|
channelSpecVersion = _SupportedRpcVersion.v0_10_3;
|
|
7424
7427
|
};
|
|
7425
7428
|
|
|
7429
|
+
// src/channel/rpc_0_10_4.ts
|
|
7430
|
+
var rpc_0_10_4_exports = {};
|
|
7431
|
+
__export(rpc_0_10_4_exports, {
|
|
7432
|
+
RpcChannel: () => RpcChannel4
|
|
7433
|
+
});
|
|
7434
|
+
var RpcChannel4 = class extends RpcChannel3 {
|
|
7435
|
+
id = "RPC0.10.4";
|
|
7436
|
+
channelSpecVersion = _SupportedRpcVersion.v0_10_4;
|
|
7437
|
+
};
|
|
7438
|
+
|
|
7426
7439
|
// src/utils/eventEmitter.ts
|
|
7427
7440
|
var EventEmitter = class {
|
|
7428
7441
|
listeners = {};
|
|
@@ -9880,12 +9893,12 @@ var RpcProvider = class {
|
|
|
9880
9893
|
if (isVersion("0.9", options.specVersion)) {
|
|
9881
9894
|
this.channel = new rpc_0_9_0_exports.RpcChannel({ ...options, waitMode: false });
|
|
9882
9895
|
} else if (isVersion("0.10", options.specVersion)) {
|
|
9883
|
-
this.channel = new
|
|
9896
|
+
this.channel = new rpc_0_10_4_exports.RpcChannel({ ...options, waitMode: false });
|
|
9884
9897
|
} else throw new Error(`unsupported channel for spec version: ${options.specVersion}`);
|
|
9885
9898
|
} else if (isVersion("0.9", config.get("rpcVersion"))) {
|
|
9886
9899
|
this.channel = new rpc_0_9_0_exports.RpcChannel({ ...options, waitMode: false });
|
|
9887
9900
|
} else if (isVersion("0.10", config.get("rpcVersion"))) {
|
|
9888
|
-
this.channel = new
|
|
9901
|
+
this.channel = new rpc_0_10_4_exports.RpcChannel({ ...options, waitMode: false });
|
|
9889
9902
|
} else throw new Error("unable to define spec version for channel");
|
|
9890
9903
|
this.responseParser = new RPCResponseParser(options?.resourceBoundsOverhead);
|
|
9891
9904
|
const plugins = options?.plugins === false ? [] : options?.plugins ?? defaultPlugins;
|
|
@@ -9909,13 +9922,14 @@ var RpcProvider = class {
|
|
|
9909
9922
|
if (isVersion("0.9", specVersion)) {
|
|
9910
9923
|
return new this({
|
|
9911
9924
|
...optionsOrProvider,
|
|
9912
|
-
specVersion
|
|
9925
|
+
specVersion
|
|
9913
9926
|
});
|
|
9914
9927
|
}
|
|
9915
9928
|
if (isVersion("0.10", specVersion)) {
|
|
9916
9929
|
return new this({
|
|
9917
9930
|
...optionsOrProvider,
|
|
9918
|
-
|
|
9931
|
+
// forward the version the node reports, not the newest revision the SDK implements
|
|
9932
|
+
specVersion
|
|
9919
9933
|
});
|
|
9920
9934
|
}
|
|
9921
9935
|
throw new LibraryError(
|
|
@@ -11359,7 +11373,7 @@ var LedgerSigner231 = class extends LedgerSigner221 {
|
|
|
11359
11373
|
encodeCall(call) {
|
|
11360
11374
|
const toBuf = this.convertBnToLedger(call.contractAddress);
|
|
11361
11375
|
const selectorBuf = hexToBytes(addAddressPadding(getSelector(call.entrypoint)));
|
|
11362
|
-
let calldataBuf
|
|
11376
|
+
let calldataBuf;
|
|
11363
11377
|
if (call.calldata) {
|
|
11364
11378
|
const compiledCalldata = CallData.compile(call.calldata);
|
|
11365
11379
|
const calldataSizeBuf = this.convertBnToLedger(compiledCalldata.length);
|
|
@@ -14106,6 +14120,7 @@ function units(amount, simbol = "fri") {
|
|
|
14106
14120
|
RPC,
|
|
14107
14121
|
RPC0102,
|
|
14108
14122
|
RPC0103,
|
|
14123
|
+
RPC0104,
|
|
14109
14124
|
RPC09,
|
|
14110
14125
|
RPCResponseParser,
|
|
14111
14126
|
ReceiptTx,
|