starknet 10.0.4 → 10.2.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 +12 -0
- package/README.md +2 -2
- package/dist/index.d.ts +245 -211
- package/dist/index.global.js +187 -59
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +105 -65
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +103 -64
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -99,12 +99,13 @@ __export(index_exports, {
|
|
|
99
99
|
Provider: () => RpcProvider,
|
|
100
100
|
ProviderInterface: () => ProviderInterface,
|
|
101
101
|
RPC: () => api_exports,
|
|
102
|
-
|
|
102
|
+
RPC0102: () => rpc_0_10_2_exports,
|
|
103
|
+
RPC0103: () => rpc_0_10_3_exports,
|
|
103
104
|
RPC09: () => rpc_0_9_0_exports,
|
|
104
105
|
RPCResponseParser: () => RPCResponseParser,
|
|
105
106
|
ReceiptTx: () => ReceiptTx,
|
|
106
107
|
ResponseParser: () => ResponseParser,
|
|
107
|
-
RpcChannel: () =>
|
|
108
|
+
RpcChannel: () => RpcChannel3,
|
|
108
109
|
RpcError: () => RpcError,
|
|
109
110
|
RpcProvider: () => RpcProvider,
|
|
110
111
|
Signer: () => Signer,
|
|
@@ -250,8 +251,8 @@ __export(constants_exports, {
|
|
|
250
251
|
var api_exports = {};
|
|
251
252
|
__export(api_exports, {
|
|
252
253
|
JRPC: () => jsonrpc_exports,
|
|
253
|
-
PAYMASTER_API: () =>
|
|
254
|
-
|
|
254
|
+
PAYMASTER_API: () => import_starknet_types_0103.PAYMASTER_API,
|
|
255
|
+
RPCSPEC0103: () => RPCSPEC0103,
|
|
255
256
|
RPCSPEC09: () => RPCSPEC09
|
|
256
257
|
});
|
|
257
258
|
|
|
@@ -260,12 +261,12 @@ var jsonrpc_exports = {};
|
|
|
260
261
|
|
|
261
262
|
// src/types/api/index.ts
|
|
262
263
|
var RPCSPEC09 = __toESM(require("@starknet-io/starknet-types-09"));
|
|
263
|
-
var
|
|
264
|
-
var
|
|
264
|
+
var RPCSPEC0103 = __toESM(require("@starknet-io/starknet-types-0103"));
|
|
265
|
+
var import_starknet_types_0103 = require("@starknet-io/starknet-types-0103");
|
|
265
266
|
|
|
266
267
|
// src/types/api/rpc.ts
|
|
267
268
|
var rpc_exports = {};
|
|
268
|
-
__reExport(rpc_exports, require("@starknet-io/starknet-types-
|
|
269
|
+
__reExport(rpc_exports, require("@starknet-io/starknet-types-0103"));
|
|
269
270
|
|
|
270
271
|
// src/types/api/index.ts
|
|
271
272
|
__reExport(api_exports, rpc_exports);
|
|
@@ -274,19 +275,19 @@ __reExport(api_exports, rpc_exports);
|
|
|
274
275
|
var { ETransactionVersion } = RPCSPEC09;
|
|
275
276
|
var { ETransactionVersion2 } = RPCSPEC09;
|
|
276
277
|
var { ETransactionVersion3 } = RPCSPEC09;
|
|
277
|
-
var { EDataAvailabilityMode } =
|
|
278
|
-
var { EDAMode } =
|
|
278
|
+
var { EDataAvailabilityMode } = RPCSPEC0103;
|
|
279
|
+
var { EDAMode } = RPCSPEC0103;
|
|
279
280
|
function isRPC08Plus_ResourceBounds(entry) {
|
|
280
281
|
return "l1_data_gas" in entry;
|
|
281
282
|
}
|
|
282
283
|
function isRPC08Plus_ResourceBoundsBN(entry) {
|
|
283
284
|
return "l1_data_gas" in entry;
|
|
284
285
|
}
|
|
285
|
-
var { ETxnResponseFlag } =
|
|
286
|
-
var { ETraceFlag } =
|
|
287
|
-
var { ESubscriptionTag } =
|
|
288
|
-
var { ETransactionStatus } =
|
|
289
|
-
var { ETransactionExecutionStatus } =
|
|
286
|
+
var { ETxnResponseFlag } = RPCSPEC0103;
|
|
287
|
+
var { ETraceFlag } = RPCSPEC0103;
|
|
288
|
+
var { ESubscriptionTag } = RPCSPEC0103;
|
|
289
|
+
var { ETransactionStatus } = RPCSPEC0103;
|
|
290
|
+
var { ETransactionExecutionStatus } = RPCSPEC0103;
|
|
290
291
|
var { ETransactionType: TransactionType } = RPCSPEC09;
|
|
291
292
|
var { EBlockStatus: BlockStatus } = RPCSPEC09;
|
|
292
293
|
var { ETransactionFinalityStatus: TransactionFinalityStatus } = RPCSPEC09;
|
|
@@ -501,9 +502,11 @@ var _SupportedRpcVersion = {
|
|
|
501
502
|
"0.9.0": "0.9.0",
|
|
502
503
|
"0.10.0": "0.10.0",
|
|
503
504
|
"0.10.2": "0.10.2",
|
|
505
|
+
"0.10.3": "0.10.3",
|
|
504
506
|
v0_9_0: "0.9.0",
|
|
505
507
|
v0_10_0: "0.10.0",
|
|
506
|
-
v0_10_2: "0.10.2"
|
|
508
|
+
v0_10_2: "0.10.2",
|
|
509
|
+
v0_10_3: "0.10.3"
|
|
507
510
|
};
|
|
508
511
|
var DEFAULT_GLOBAL_CONFIG = {
|
|
509
512
|
rpcVersion: "0.10.0",
|
|
@@ -2029,6 +2032,24 @@ var CairoBytes31 = class _CairoBytes31 {
|
|
|
2029
2032
|
}
|
|
2030
2033
|
};
|
|
2031
2034
|
|
|
2035
|
+
// src/utils/ec.ts
|
|
2036
|
+
var ec_exports = {};
|
|
2037
|
+
__export(ec_exports, {
|
|
2038
|
+
starkCurve: () => starkCurve,
|
|
2039
|
+
weierstrass: () => weierstrass
|
|
2040
|
+
});
|
|
2041
|
+
var starkCurve = __toESM(require("@scure/starknet"));
|
|
2042
|
+
var weierstrass = __toESM(require("@noble/curves/abstract/weierstrass"));
|
|
2043
|
+
|
|
2044
|
+
// src/utils/hash/pedersenCore.ts
|
|
2045
|
+
function computePedersenHash(a, b) {
|
|
2046
|
+
return starkCurve.pedersen(BigInt(a), BigInt(b));
|
|
2047
|
+
}
|
|
2048
|
+
function computeHashOnElements(data) {
|
|
2049
|
+
return [...data, data.length].reduce((x, y) => starkCurve.pedersen(BigInt(x), BigInt(y)), 0).toString();
|
|
2050
|
+
}
|
|
2051
|
+
var computePedersenHashOnElements = computeHashOnElements;
|
|
2052
|
+
|
|
2032
2053
|
// src/utils/errors/rpc.ts
|
|
2033
2054
|
var errorCodes = {
|
|
2034
2055
|
FAILED_TO_RECEIVE_TXN: 1,
|
|
@@ -2323,6 +2344,31 @@ var CairoByteArray = class _CairoByteArray {
|
|
|
2323
2344
|
const allBytes = concatenateArrayBuffer(this.toElements());
|
|
2324
2345
|
return buffer_default.from(allBytes);
|
|
2325
2346
|
}
|
|
2347
|
+
/**
|
|
2348
|
+
* Compute the Pedersen hash of this ByteArray, following OpenZeppelin's `hash_byte_array` algorithm.
|
|
2349
|
+
*
|
|
2350
|
+
* Serializes the ByteArray to its felt252 components (data array length, each data chunk,
|
|
2351
|
+
* pending_word, pending_word_len), then chains Pedersen hash over all elements starting
|
|
2352
|
+
* from 0, and finalizes with the total element count.
|
|
2353
|
+
*
|
|
2354
|
+
* @returns {string} hex-string felt252 Pedersen hash of the ByteArray
|
|
2355
|
+
* @example
|
|
2356
|
+
* ```typescript
|
|
2357
|
+
* const ba = new CairoByteArray('Hello');
|
|
2358
|
+
* const result = ba.hash();
|
|
2359
|
+
* // result = 0x15d19ad651ffaf8e90a13938db2081fa3ff01de0712e00cbe69891bace66c51
|
|
2360
|
+
* ```
|
|
2361
|
+
*/
|
|
2362
|
+
hash() {
|
|
2363
|
+
this.assertInitialized();
|
|
2364
|
+
const serialized = [
|
|
2365
|
+
addHexPrefix(this.data.length.toString(16)),
|
|
2366
|
+
...this.data.flatMap((bytes31) => bytes31.toApiRequest()),
|
|
2367
|
+
...this.pending_word.toApiRequest(),
|
|
2368
|
+
...this.pending_word_len.toApiRequest()
|
|
2369
|
+
];
|
|
2370
|
+
return computeHashOnElements(serialized);
|
|
2371
|
+
}
|
|
2326
2372
|
/**
|
|
2327
2373
|
* returns an array of all the data chunks and the pending word
|
|
2328
2374
|
* when concatenated, represents the original bytes sequence
|
|
@@ -4883,7 +4929,7 @@ __export(hash_exports, {
|
|
|
4883
4929
|
computeCompiledClassHashBlake: () => computeCompiledClassHashBlake,
|
|
4884
4930
|
computeCompiledClassHashPoseidon: () => computeCompiledClassHashPoseidon,
|
|
4885
4931
|
computeContractClassHash: () => computeContractClassHash,
|
|
4886
|
-
computeHashOnElements: () =>
|
|
4932
|
+
computeHashOnElements: () => computeHashOnElements,
|
|
4887
4933
|
computeHintedClassHash: () => computeHintedClassHash,
|
|
4888
4934
|
computeLegacyContractClassHash: () => computeLegacyContractClassHash,
|
|
4889
4935
|
computePedersenHash: () => computePedersenHash,
|
|
@@ -5023,24 +5069,13 @@ __export(v2_exports, {
|
|
|
5023
5069
|
calculateL2MessageTxHash: () => calculateL2MessageTxHash,
|
|
5024
5070
|
calculateTransactionHash: () => calculateTransactionHash,
|
|
5025
5071
|
calculateTransactionHashCommon: () => calculateTransactionHashCommon2,
|
|
5026
|
-
computeHashOnElements: () =>
|
|
5072
|
+
computeHashOnElements: () => computeHashOnElements2
|
|
5027
5073
|
});
|
|
5028
|
-
|
|
5029
|
-
// src/utils/ec.ts
|
|
5030
|
-
var ec_exports = {};
|
|
5031
|
-
__export(ec_exports, {
|
|
5032
|
-
starkCurve: () => starkCurve,
|
|
5033
|
-
weierstrass: () => weierstrass
|
|
5034
|
-
});
|
|
5035
|
-
var starkCurve = __toESM(require("@scure/starknet"));
|
|
5036
|
-
var weierstrass = __toESM(require("@noble/curves/abstract/weierstrass"));
|
|
5037
|
-
|
|
5038
|
-
// src/utils/hash/transactionHash/v2.ts
|
|
5039
|
-
function computeHashOnElements(data) {
|
|
5074
|
+
function computeHashOnElements2(data) {
|
|
5040
5075
|
return [...data, data.length].reduce((x, y) => starkCurve.pedersen(toBigInt(x), toBigInt(y)), 0).toString();
|
|
5041
5076
|
}
|
|
5042
5077
|
function calculateTransactionHashCommon2(txHashPrefix, version, contractAddress, entryPointSelector, calldata, maxFee, chainId, additionalData = []) {
|
|
5043
|
-
const calldataHash =
|
|
5078
|
+
const calldataHash = computeHashOnElements2(calldata);
|
|
5044
5079
|
const dataToHash = [
|
|
5045
5080
|
txHashPrefix,
|
|
5046
5081
|
version,
|
|
@@ -5051,7 +5086,7 @@ function calculateTransactionHashCommon2(txHashPrefix, version, contractAddress,
|
|
|
5051
5086
|
chainId,
|
|
5052
5087
|
...additionalData
|
|
5053
5088
|
];
|
|
5054
|
-
return
|
|
5089
|
+
return computeHashOnElements2(dataToHash);
|
|
5055
5090
|
}
|
|
5056
5091
|
function calculateDeclareTransactionHash2(classHash, senderAddress, version, maxFee, chainId, nonce, compiledClassHash) {
|
|
5057
5092
|
return calculateTransactionHashCommon2(
|
|
@@ -5210,18 +5245,11 @@ function flattenEntryPointData(data, encodedBuiltinsArray) {
|
|
|
5210
5245
|
}
|
|
5211
5246
|
|
|
5212
5247
|
// src/utils/hash/classHash/pedersen.ts
|
|
5213
|
-
function computePedersenHash(a, b) {
|
|
5214
|
-
return starkCurve.pedersen(BigInt(a), BigInt(b));
|
|
5215
|
-
}
|
|
5216
|
-
function computeHashOnElements2(data) {
|
|
5217
|
-
return [...data, data.length].reduce((x, y) => starkCurve.pedersen(BigInt(x), BigInt(y)), 0).toString();
|
|
5218
|
-
}
|
|
5219
|
-
var computePedersenHashOnElements = computeHashOnElements2;
|
|
5220
5248
|
function calculateContractAddressFromHash(salt, classHash, constructorCalldata, deployerAddress) {
|
|
5221
5249
|
const compiledCalldata = CallData.compile(constructorCalldata);
|
|
5222
|
-
const constructorCalldataHash =
|
|
5250
|
+
const constructorCalldataHash = computeHashOnElements(compiledCalldata);
|
|
5223
5251
|
const CONTRACT_ADDRESS_PREFIX = felt("0x535441524b4e45545f434f4e54524143545f41444452455353");
|
|
5224
|
-
const hash =
|
|
5252
|
+
const hash = computeHashOnElements([
|
|
5225
5253
|
CONTRACT_ADDRESS_PREFIX,
|
|
5226
5254
|
deployerAddress,
|
|
5227
5255
|
salt,
|
|
@@ -5239,21 +5267,21 @@ function computeHintedClassHash(compiledContract) {
|
|
|
5239
5267
|
function computeLegacyContractClassHash(contract) {
|
|
5240
5268
|
const compiledContract = isString(contract) ? parse2(contract) : contract;
|
|
5241
5269
|
const apiVersion = toHex(API_VERSION);
|
|
5242
|
-
const externalEntryPointsHash =
|
|
5270
|
+
const externalEntryPointsHash = computeHashOnElements(
|
|
5243
5271
|
compiledContract.entry_points_by_type.EXTERNAL.flatMap((e) => [e.selector, e.offset])
|
|
5244
5272
|
);
|
|
5245
|
-
const l1HandlerEntryPointsHash =
|
|
5273
|
+
const l1HandlerEntryPointsHash = computeHashOnElements(
|
|
5246
5274
|
compiledContract.entry_points_by_type.L1_HANDLER.flatMap((e) => [e.selector, e.offset])
|
|
5247
5275
|
);
|
|
5248
|
-
const constructorEntryPointHash =
|
|
5276
|
+
const constructorEntryPointHash = computeHashOnElements(
|
|
5249
5277
|
compiledContract.entry_points_by_type.CONSTRUCTOR.flatMap((e) => [e.selector, e.offset])
|
|
5250
5278
|
);
|
|
5251
|
-
const builtinsHash =
|
|
5279
|
+
const builtinsHash = computeHashOnElements(
|
|
5252
5280
|
compiledContract.program.builtins.map((s) => encodeShortString(s))
|
|
5253
5281
|
);
|
|
5254
5282
|
const hintedClassHash = computeHintedClassHash(compiledContract);
|
|
5255
|
-
const dataHash =
|
|
5256
|
-
return
|
|
5283
|
+
const dataHash = computeHashOnElements(compiledContract.program.data);
|
|
5284
|
+
return computeHashOnElements([
|
|
5257
5285
|
apiVersion,
|
|
5258
5286
|
externalEntryPointsHash,
|
|
5259
5287
|
l1HandlerEntryPointsHash,
|
|
@@ -6729,6 +6757,7 @@ var rpc_0_10_2_exports = {};
|
|
|
6729
6757
|
__export(rpc_0_10_2_exports, {
|
|
6730
6758
|
RpcChannel: () => RpcChannel2
|
|
6731
6759
|
});
|
|
6760
|
+
var RPC = __toESM(require("@starknet-io/starknet-types-0101"));
|
|
6732
6761
|
var RpcChannel2 = class {
|
|
6733
6762
|
id = "RPC0.10.2";
|
|
6734
6763
|
/**
|
|
@@ -6948,7 +6977,7 @@ var RpcChannel2 = class {
|
|
|
6948
6977
|
*/
|
|
6949
6978
|
getBlockWithTxs(blockIdentifier = this.blockIdentifier, options) {
|
|
6950
6979
|
const block_id = new Block(blockIdentifier).identifier;
|
|
6951
|
-
const response_flags = options?.includeProofFacts ? [
|
|
6980
|
+
const response_flags = options?.includeProofFacts ? [RPC.ETxnResponseFlag.INCLUDE_PROOF_FACTS] : void 0;
|
|
6952
6981
|
return this.fetchEndpoint("starknet_getBlockWithTxs", {
|
|
6953
6982
|
block_id,
|
|
6954
6983
|
...response_flags && { response_flags }
|
|
@@ -6962,7 +6991,7 @@ var RpcChannel2 = class {
|
|
|
6962
6991
|
*/
|
|
6963
6992
|
getBlockWithReceipts(blockIdentifier = this.blockIdentifier, options) {
|
|
6964
6993
|
const block_id = new Block(blockIdentifier).identifier;
|
|
6965
|
-
const response_flags = options?.includeProofFacts ? [
|
|
6994
|
+
const response_flags = options?.includeProofFacts ? [RPC.ETxnResponseFlag.INCLUDE_PROOF_FACTS] : void 0;
|
|
6966
6995
|
return this.fetchEndpoint("starknet_getBlockWithReceipts", {
|
|
6967
6996
|
block_id,
|
|
6968
6997
|
...response_flags && { response_flags }
|
|
@@ -6985,7 +7014,7 @@ var RpcChannel2 = class {
|
|
|
6985
7014
|
*/
|
|
6986
7015
|
getBlockTransactionsTraces(blockIdentifier = this.blockIdentifier, options) {
|
|
6987
7016
|
const block_id = new Block(blockIdentifier).identifier;
|
|
6988
|
-
const trace_flags = options?.returnInitialReads ? [
|
|
7017
|
+
const trace_flags = options?.returnInitialReads ? [RPC.ETraceFlag.RETURN_INITIAL_READS] : void 0;
|
|
6989
7018
|
return this.fetchEndpoint("starknet_traceBlockTransactions", {
|
|
6990
7019
|
block_id,
|
|
6991
7020
|
...trace_flags && { trace_flags }
|
|
@@ -7003,7 +7032,7 @@ var RpcChannel2 = class {
|
|
|
7003
7032
|
*/
|
|
7004
7033
|
getTransactionByHash(txHash, options) {
|
|
7005
7034
|
const transaction_hash = toHex(txHash);
|
|
7006
|
-
const response_flags = options?.includeProofFacts ? [
|
|
7035
|
+
const response_flags = options?.includeProofFacts ? [RPC.ETxnResponseFlag.INCLUDE_PROOF_FACTS] : void 0;
|
|
7007
7036
|
return this.fetchEndpoint("starknet_getTransactionByHash", {
|
|
7008
7037
|
transaction_hash,
|
|
7009
7038
|
...response_flags && { response_flags }
|
|
@@ -7018,7 +7047,7 @@ var RpcChannel2 = class {
|
|
|
7018
7047
|
*/
|
|
7019
7048
|
getTransactionByBlockIdAndIndex(blockIdentifier, index, options) {
|
|
7020
7049
|
const block_id = new Block(blockIdentifier).identifier;
|
|
7021
|
-
const response_flags = options?.includeProofFacts ? [
|
|
7050
|
+
const response_flags = options?.includeProofFacts ? [RPC.ETxnResponseFlag.INCLUDE_PROOF_FACTS] : void 0;
|
|
7022
7051
|
return this.fetchEndpoint("starknet_getTransactionByBlockIdAndIndex", {
|
|
7023
7052
|
block_id,
|
|
7024
7053
|
index,
|
|
@@ -7059,9 +7088,9 @@ var RpcChannel2 = class {
|
|
|
7059
7088
|
} = simulateTransactionOptions;
|
|
7060
7089
|
const block_id = new Block(blockIdentifier).identifier;
|
|
7061
7090
|
const simulationFlags = [];
|
|
7062
|
-
if (skipValidate) simulationFlags.push(
|
|
7063
|
-
if (skipFeeCharge) simulationFlags.push(
|
|
7064
|
-
const trace_flags = returnInitialReads ? [
|
|
7091
|
+
if (skipValidate) simulationFlags.push(RPC.ESimulationFlag.SKIP_VALIDATE);
|
|
7092
|
+
if (skipFeeCharge) simulationFlags.push(RPC.ESimulationFlag.SKIP_FEE_CHARGE);
|
|
7093
|
+
const trace_flags = returnInitialReads ? [RPC.ETraceFlag.RETURN_INITIAL_READS] : void 0;
|
|
7065
7094
|
return this.fetchEndpoint("starknet_simulateTransactions", {
|
|
7066
7095
|
block_id,
|
|
7067
7096
|
transactions: await Promise.all(invocations.map((it) => this.buildTransaction(it))),
|
|
@@ -7079,13 +7108,13 @@ var RpcChannel2 = class {
|
|
|
7079
7108
|
const errorStates = options?.errorStates ?? [];
|
|
7080
7109
|
const successStates = options?.successStates ?? [
|
|
7081
7110
|
// RPC.ETransactionExecutionStatus.SUCCEEDED, // UDC on SUCCEEDED + pre_confirmed had no proper events to parse UDC
|
|
7082
|
-
|
|
7083
|
-
|
|
7111
|
+
RPC.ETransactionFinalityStatus.ACCEPTED_ON_L2,
|
|
7112
|
+
RPC.ETransactionFinalityStatus.ACCEPTED_ON_L1
|
|
7084
7113
|
];
|
|
7085
7114
|
const errorMessages = {
|
|
7086
|
-
[
|
|
7087
|
-
[
|
|
7088
|
-
[
|
|
7115
|
+
[RPC.ETransactionStatus.RECEIVED]: SYSTEM_MESSAGES.txEvictedFromMempool,
|
|
7116
|
+
[RPC.ETransactionStatus.PRE_CONFIRMED]: SYSTEM_MESSAGES.consensusFailed,
|
|
7117
|
+
[RPC.ETransactionStatus.CANDIDATE]: SYSTEM_MESSAGES.txFailsBlockBuildingValidation
|
|
7089
7118
|
};
|
|
7090
7119
|
const txLife = [];
|
|
7091
7120
|
let txStatus;
|
|
@@ -7182,7 +7211,7 @@ var RpcChannel2 = class {
|
|
|
7182
7211
|
const { blockIdentifier = this.blockIdentifier, skipValidate = methodDefaults.skipValidate } = options;
|
|
7183
7212
|
const block_id = new Block(blockIdentifier).identifier;
|
|
7184
7213
|
const flags = {
|
|
7185
|
-
simulation_flags: skipValidate ? [
|
|
7214
|
+
simulation_flags: skipValidate ? [RPC.ESimulationFlag.SKIP_VALIDATE] : []
|
|
7186
7215
|
};
|
|
7187
7216
|
return this.fetchEndpoint("starknet_estimateFee", {
|
|
7188
7217
|
request: await Promise.all(invocations.map((it) => this.buildTransaction(it, "fee"))),
|
|
@@ -7296,7 +7325,7 @@ var RpcChannel2 = class {
|
|
|
7296
7325
|
};
|
|
7297
7326
|
if (invocation.type === api_exports.ETransactionType.INVOKE) {
|
|
7298
7327
|
const btx = {
|
|
7299
|
-
type:
|
|
7328
|
+
type: RPC.ETransactionType.INVOKE,
|
|
7300
7329
|
sender_address: invocation.contractAddress,
|
|
7301
7330
|
calldata: CallData.toHex(invocation.calldata),
|
|
7302
7331
|
...details,
|
|
@@ -7338,6 +7367,16 @@ var RpcChannel2 = class {
|
|
|
7338
7367
|
}
|
|
7339
7368
|
};
|
|
7340
7369
|
|
|
7370
|
+
// src/channel/rpc_0_10_3.ts
|
|
7371
|
+
var rpc_0_10_3_exports = {};
|
|
7372
|
+
__export(rpc_0_10_3_exports, {
|
|
7373
|
+
RpcChannel: () => RpcChannel3
|
|
7374
|
+
});
|
|
7375
|
+
var RpcChannel3 = class extends RpcChannel2 {
|
|
7376
|
+
id = "RPC0.10.3";
|
|
7377
|
+
channelSpecVersion = _SupportedRpcVersion.v0_10_3;
|
|
7378
|
+
};
|
|
7379
|
+
|
|
7341
7380
|
// src/utils/eventEmitter.ts
|
|
7342
7381
|
var EventEmitter = class {
|
|
7343
7382
|
listeners = {};
|
|
@@ -9609,12 +9648,12 @@ var RpcProvider = class {
|
|
|
9609
9648
|
if (isVersion("0.9", options.specVersion)) {
|
|
9610
9649
|
this.channel = new rpc_0_9_0_exports.RpcChannel({ ...options, waitMode: false });
|
|
9611
9650
|
} else if (isVersion("0.10", options.specVersion)) {
|
|
9612
|
-
this.channel = new
|
|
9651
|
+
this.channel = new rpc_0_10_3_exports.RpcChannel({ ...options, waitMode: false });
|
|
9613
9652
|
} else throw new Error(`unsupported channel for spec version: ${options.specVersion}`);
|
|
9614
9653
|
} else if (isVersion("0.9", config.get("rpcVersion"))) {
|
|
9615
9654
|
this.channel = new rpc_0_9_0_exports.RpcChannel({ ...options, waitMode: false });
|
|
9616
9655
|
} else if (isVersion("0.10", config.get("rpcVersion"))) {
|
|
9617
|
-
this.channel = new
|
|
9656
|
+
this.channel = new rpc_0_10_3_exports.RpcChannel({ ...options, waitMode: false });
|
|
9618
9657
|
} else throw new Error("unable to define spec version for channel");
|
|
9619
9658
|
this.responseParser = new RPCResponseParser(options?.resourceBoundsOverhead);
|
|
9620
9659
|
const plugins = options?.plugins === false ? [] : options?.plugins ?? defaultPlugins;
|
|
@@ -9643,7 +9682,7 @@ var RpcProvider = class {
|
|
|
9643
9682
|
if (isVersion("0.10", spec)) {
|
|
9644
9683
|
return new this({
|
|
9645
9684
|
...optionsOrProvider,
|
|
9646
|
-
specVersion: _SupportedRpcVersion.
|
|
9685
|
+
specVersion: _SupportedRpcVersion.v0_10_3
|
|
9647
9686
|
});
|
|
9648
9687
|
}
|
|
9649
9688
|
throw new LibraryError(
|
|
@@ -13424,7 +13463,8 @@ function units(amount, simbol = "fri") {
|
|
|
13424
13463
|
Provider,
|
|
13425
13464
|
ProviderInterface,
|
|
13426
13465
|
RPC,
|
|
13427
|
-
|
|
13466
|
+
RPC0102,
|
|
13467
|
+
RPC0103,
|
|
13428
13468
|
RPC09,
|
|
13429
13469
|
RPCResponseParser,
|
|
13430
13470
|
ReceiptTx,
|