@hiero-ledger/sdk 2.79.0-beta.12 → 2.79.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.
Files changed (42) hide show
  1. package/dist/umd.js +220 -2
  2. package/dist/umd.min.js +5 -5
  3. package/lib/Cache.cjs +20 -0
  4. package/lib/Cache.d.ts +10 -0
  5. package/lib/Cache.js +1 -1
  6. package/lib/Cache.js.map +1 -1
  7. package/lib/EthereumTransactionData.cjs +3 -1
  8. package/lib/EthereumTransactionData.d.ts +1 -1
  9. package/lib/EthereumTransactionData.js +1 -1
  10. package/lib/EthereumTransactionData.js.map +1 -1
  11. package/lib/EthereumTransactionDataEip7702.cjs +170 -0
  12. package/lib/EthereumTransactionDataEip7702.d.ts +71 -0
  13. package/lib/EthereumTransactionDataEip7702.js +2 -0
  14. package/lib/EthereumTransactionDataEip7702.js.map +1 -0
  15. package/lib/browser.js +1 -1
  16. package/lib/client/addressbooks/mainnet.cjs +1 -1
  17. package/lib/client/addressbooks/mainnet.d.ts +1 -1
  18. package/lib/client/addressbooks/mainnet.js +1 -1
  19. package/lib/client/addressbooks/mainnet.js.map +1 -1
  20. package/lib/client/addressbooks/previewnet.cjs +1 -1
  21. package/lib/client/addressbooks/previewnet.d.ts +1 -1
  22. package/lib/client/addressbooks/previewnet.js +1 -1
  23. package/lib/client/addressbooks/previewnet.js.map +1 -1
  24. package/lib/client/addressbooks/testnet.cjs +1 -1
  25. package/lib/client/addressbooks/testnet.d.ts +1 -1
  26. package/lib/client/addressbooks/testnet.js +1 -1
  27. package/lib/client/addressbooks/testnet.js.map +1 -1
  28. package/lib/exports.cjs +7 -0
  29. package/lib/exports.d.ts +1 -0
  30. package/lib/exports.js +1 -1
  31. package/lib/exports.js.map +1 -1
  32. package/lib/index.js +1 -1
  33. package/lib/native.js +1 -1
  34. package/lib/version.js +1 -1
  35. package/package.json +1 -1
  36. package/src/Cache.js +26 -0
  37. package/src/EthereumTransactionData.js +3 -1
  38. package/src/EthereumTransactionDataEip7702.js +193 -0
  39. package/src/client/addressbooks/mainnet.js +1 -1
  40. package/src/client/addressbooks/previewnet.js +1 -1
  41. package/src/client/addressbooks/testnet.js +1 -1
  42. package/src/exports.js +1 -0
package/lib/Cache.cjs CHANGED
@@ -89,6 +89,9 @@ class Cache {
89
89
  /** @type {((bytes: Uint8Array) => EthereumTransactionData) | null} */
90
90
  this._ethereumTransactionDataEip2930FromBytes = null;
91
91
 
92
+ /** @type {((bytes: Uint8Array) => EthereumTransactionData) | null} */
93
+ this._ethereumTransactionDataEip7702FromBytes = null;
94
+
92
95
  /** @type {(() => TransactionReceiptQuery) | null} */
93
96
  this._transactionReceiptQueryConstructor = null;
94
97
 
@@ -334,6 +337,23 @@ class Cache {
334
337
  return this._ethereumTransactionDataEip2930FromBytes;
335
338
  }
336
339
 
340
+ /**
341
+ * @param {((bytes: Uint8Array) => EthereumTransactionData)} ethereumTransactionDataEip7702FromBytes
342
+ */
343
+ setEthereumTransactionDataEip7702FromBytes(ethereumTransactionDataEip7702FromBytes) {
344
+ this._ethereumTransactionDataEip7702FromBytes = ethereumTransactionDataEip7702FromBytes;
345
+ }
346
+
347
+ /**
348
+ * @returns {((bytes: Uint8Array) => EthereumTransactionData)}
349
+ */
350
+ get ethereumTransactionDataEip7702FromBytes() {
351
+ if (this._ethereumTransactionDataEip7702FromBytes == null) {
352
+ throw new Error("Cache.ethereumTransactionDataEip7702FromBytes was used before it was set");
353
+ }
354
+ return this._ethereumTransactionDataEip7702FromBytes;
355
+ }
356
+
337
357
  /**
338
358
  * @param {(() => TransactionReceiptQuery)} transactionReceiptQueryConstructor
339
359
  */
package/lib/Cache.d.ts CHANGED
@@ -93,6 +93,8 @@ declare class Cache {
93
93
  _ethereumTransactionDataEip1559FromBytes: ((bytes: Uint8Array) => EthereumTransactionData) | null;
94
94
  /** @type {((bytes: Uint8Array) => EthereumTransactionData) | null} */
95
95
  _ethereumTransactionDataEip2930FromBytes: ((bytes: Uint8Array) => EthereumTransactionData) | null;
96
+ /** @type {((bytes: Uint8Array) => EthereumTransactionData) | null} */
97
+ _ethereumTransactionDataEip7702FromBytes: ((bytes: Uint8Array) => EthereumTransactionData) | null;
96
98
  /** @type {(() => TransactionReceiptQuery) | null} */
97
99
  _transactionReceiptQueryConstructor: (() => TransactionReceiptQuery) | null;
98
100
  /** @type {(() => TransactionRecordQuery) | null} */
@@ -209,6 +211,14 @@ declare class Cache {
209
211
  * @returns {((bytes: Uint8Array) => EthereumTransactionData)}
210
212
  */
211
213
  get ethereumTransactionDataEip2930FromBytes(): ((bytes: Uint8Array) => EthereumTransactionData);
214
+ /**
215
+ * @param {((bytes: Uint8Array) => EthereumTransactionData)} ethereumTransactionDataEip7702FromBytes
216
+ */
217
+ setEthereumTransactionDataEip7702FromBytes(ethereumTransactionDataEip7702FromBytes: ((bytes: Uint8Array) => EthereumTransactionData)): void;
218
+ /**
219
+ * @returns {((bytes: Uint8Array) => EthereumTransactionData)}
220
+ */
221
+ get ethereumTransactionDataEip7702FromBytes(): ((bytes: Uint8Array) => EthereumTransactionData);
212
222
  /**
213
223
  * @param {(() => TransactionReceiptQuery)} transactionReceiptQueryConstructor
214
224
  */
package/lib/Cache.js CHANGED
@@ -1,2 +1,2 @@
1
- const t=new class{constructor(){this._timeDrift=0,this._contractId=null,this._keyList=null,this._thresholdKey=null,this._publicKeyED25519=null,this._publicKeyECDSA=null,this._privateKeyConstructor=null,this._mnemonicFromString=null,this._accountIdConstructor=null,this._delegateContractId=null,this._evmAddress=null,this._ethereumTransactionDataLegacyFromBytes=null,this._ethereumTransactionDataEip1559FromBytes=null,this._ethereumTransactionDataEip2930FromBytes=null,this._transactionReceiptQueryConstructor=null,this._transactionRecordQueryConstructor=null}setTimeDrift(t){this._timeDrift=t}get timeDrift(){if(null==this._timeDrift)throw new Error("Cache.timeDrift was used before it was set");return this._timeDrift}setContractId(t){this._contractId=t}get contractId(){if(null==this._contractId)throw new Error("Cache.contractId was used before it was set");return this._contractId}setKeyList(t){this._keyList=t}get keyList(){if(null==this._keyList)throw new Error("Cache.keyList was used before it was set");return this._keyList}setThresholdKey(t){this._thresholdKey=t}get thresholdKey(){if(null==this._thresholdKey)throw new Error("Cache.thresholdKey was used before it was set");return this._thresholdKey}setPublicKeyED25519(t){this._publicKeyED25519=t}get publicKeyED25519(){if(null==this._publicKeyED25519)throw new Error("Cache.publicKeyED25519 was used before it was set");return this._publicKeyED25519}setPublicKeyECDSA(t){this._publicKeyECDSA=t}get publicKeyECDSA(){if(null==this._publicKeyECDSA)throw new Error("Cache.publicKeyECDSA was used before it was set");return this._publicKeyECDSA}setPrivateKeyConstructor(t){this._privateKeyConstructor=t}get privateKeyConstructor(){if(null==this._privateKeyConstructor)throw new Error("Cache.privateKeyConstructor was used before it was set");return this._privateKeyConstructor}setMnemonicFromString(t){this._mnemonicFromString=t}get mnemonicFromString(){if(null==this._mnemonicFromString)throw new Error("Cache.mnemonicFromString was used before it was set");return this.mnemonicFromString}setAccountIdConstructor(t){this._accountIdConstructor=t}get accountIdConstructor(){if(null==this._accountIdConstructor)throw new Error("Cache.accountIdConstructor was used before it was set");return this._accountIdConstructor}setDelegateContractId(t){this._delegateContractId=t}get delegateContractId(){if(null==this._delegateContractId)throw new Error("Cache.delegateContractId was used before it was set");return this._delegateContractId}setEvmAddress(t){this._evmAddress=t}get evmAddress(){if(null==this._evmAddress)throw new Error("Cache.evmAddress was used before it was set");return this._evmAddress}setEthereumTransactionDataLegacyFromBytes(t){this._ethereumTransactionDataLegacyFromBytes=t}get ethereumTransactionDataLegacyFromBytes(){if(null==this._ethereumTransactionDataLegacyFromBytes)throw new Error("Cache.ethereumTransactionDataLegacyFromBytes was used before it was set");return this._ethereumTransactionDataLegacyFromBytes}setEthereumTransactionDataEip1559FromBytes(t){this._ethereumTransactionDataEip1559FromBytes=t}get ethereumTransactionDataEip1559FromBytes(){if(null==this._ethereumTransactionDataEip1559FromBytes)throw new Error("Cache.ethereumTransactionDataEip1559FromBytes was used before it was set");return this._ethereumTransactionDataEip1559FromBytes}setEthereumTransactionDataEip2930FromBytes(t){this._ethereumTransactionDataEip2930FromBytes=t}get ethereumTransactionDataEip2930FromBytes(){if(null==this._ethereumTransactionDataEip2930FromBytes)throw new Error("Cache.ethereumTransactionDataEip2930FromBytes was used before it was set");return this._ethereumTransactionDataEip2930FromBytes}setTransactionReceiptQueryConstructor(t){this._transactionReceiptQueryConstructor=t}get transactionReceiptQueryConstructor(){if(null==this._transactionReceiptQueryConstructor)throw new Error("Cache.transactionReceiptQueryConstructor was used before it was set");return this._transactionReceiptQueryConstructor}setTransactionRecordQueryConstructor(t){this._transactionRecordQueryConstructor=t}get transactionRecordQueryConstructor(){if(null==this._transactionRecordQueryConstructor)throw new Error("Cache.transactionRecordQueryConstructor was used before it was set");return this._transactionRecordQueryConstructor}};export{t as default};
1
+ const t=new class{constructor(){this._timeDrift=0,this._contractId=null,this._keyList=null,this._thresholdKey=null,this._publicKeyED25519=null,this._publicKeyECDSA=null,this._privateKeyConstructor=null,this._mnemonicFromString=null,this._accountIdConstructor=null,this._delegateContractId=null,this._evmAddress=null,this._ethereumTransactionDataLegacyFromBytes=null,this._ethereumTransactionDataEip1559FromBytes=null,this._ethereumTransactionDataEip2930FromBytes=null,this._ethereumTransactionDataEip7702FromBytes=null,this._transactionReceiptQueryConstructor=null,this._transactionRecordQueryConstructor=null}setTimeDrift(t){this._timeDrift=t}get timeDrift(){if(null==this._timeDrift)throw new Error("Cache.timeDrift was used before it was set");return this._timeDrift}setContractId(t){this._contractId=t}get contractId(){if(null==this._contractId)throw new Error("Cache.contractId was used before it was set");return this._contractId}setKeyList(t){this._keyList=t}get keyList(){if(null==this._keyList)throw new Error("Cache.keyList was used before it was set");return this._keyList}setThresholdKey(t){this._thresholdKey=t}get thresholdKey(){if(null==this._thresholdKey)throw new Error("Cache.thresholdKey was used before it was set");return this._thresholdKey}setPublicKeyED25519(t){this._publicKeyED25519=t}get publicKeyED25519(){if(null==this._publicKeyED25519)throw new Error("Cache.publicKeyED25519 was used before it was set");return this._publicKeyED25519}setPublicKeyECDSA(t){this._publicKeyECDSA=t}get publicKeyECDSA(){if(null==this._publicKeyECDSA)throw new Error("Cache.publicKeyECDSA was used before it was set");return this._publicKeyECDSA}setPrivateKeyConstructor(t){this._privateKeyConstructor=t}get privateKeyConstructor(){if(null==this._privateKeyConstructor)throw new Error("Cache.privateKeyConstructor was used before it was set");return this._privateKeyConstructor}setMnemonicFromString(t){this._mnemonicFromString=t}get mnemonicFromString(){if(null==this._mnemonicFromString)throw new Error("Cache.mnemonicFromString was used before it was set");return this.mnemonicFromString}setAccountIdConstructor(t){this._accountIdConstructor=t}get accountIdConstructor(){if(null==this._accountIdConstructor)throw new Error("Cache.accountIdConstructor was used before it was set");return this._accountIdConstructor}setDelegateContractId(t){this._delegateContractId=t}get delegateContractId(){if(null==this._delegateContractId)throw new Error("Cache.delegateContractId was used before it was set");return this._delegateContractId}setEvmAddress(t){this._evmAddress=t}get evmAddress(){if(null==this._evmAddress)throw new Error("Cache.evmAddress was used before it was set");return this._evmAddress}setEthereumTransactionDataLegacyFromBytes(t){this._ethereumTransactionDataLegacyFromBytes=t}get ethereumTransactionDataLegacyFromBytes(){if(null==this._ethereumTransactionDataLegacyFromBytes)throw new Error("Cache.ethereumTransactionDataLegacyFromBytes was used before it was set");return this._ethereumTransactionDataLegacyFromBytes}setEthereumTransactionDataEip1559FromBytes(t){this._ethereumTransactionDataEip1559FromBytes=t}get ethereumTransactionDataEip1559FromBytes(){if(null==this._ethereumTransactionDataEip1559FromBytes)throw new Error("Cache.ethereumTransactionDataEip1559FromBytes was used before it was set");return this._ethereumTransactionDataEip1559FromBytes}setEthereumTransactionDataEip2930FromBytes(t){this._ethereumTransactionDataEip2930FromBytes=t}get ethereumTransactionDataEip2930FromBytes(){if(null==this._ethereumTransactionDataEip2930FromBytes)throw new Error("Cache.ethereumTransactionDataEip2930FromBytes was used before it was set");return this._ethereumTransactionDataEip2930FromBytes}setEthereumTransactionDataEip7702FromBytes(t){this._ethereumTransactionDataEip7702FromBytes=t}get ethereumTransactionDataEip7702FromBytes(){if(null==this._ethereumTransactionDataEip7702FromBytes)throw new Error("Cache.ethereumTransactionDataEip7702FromBytes was used before it was set");return this._ethereumTransactionDataEip7702FromBytes}setTransactionReceiptQueryConstructor(t){this._transactionReceiptQueryConstructor=t}get transactionReceiptQueryConstructor(){if(null==this._transactionReceiptQueryConstructor)throw new Error("Cache.transactionReceiptQueryConstructor was used before it was set");return this._transactionReceiptQueryConstructor}setTransactionRecordQueryConstructor(t){this._transactionRecordQueryConstructor=t}get transactionRecordQueryConstructor(){if(null==this._transactionRecordQueryConstructor)throw new Error("Cache.transactionRecordQueryConstructor was used before it was set");return this._transactionRecordQueryConstructor}};export{t as default};
2
2
  //# sourceMappingURL=Cache.js.map
package/lib/Cache.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Cache.js","sources":["../src/Cache.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @typedef {import(\"./contract/ContractId.js\").default} ContractId\n * @typedef {import(\"./account/AccountId.js\").default} AccountId\n * @typedef {import(\"./KeyList.js\").default} KeyList\n * @typedef {import(\"./PublicKey.js\").default} PublicKey\n * @typedef {import(\"./PrivateKey.js\").default} PrivateKey\n * @typedef {import(\"./Mnemonic.js\").default} Mnemonic\n * @typedef {import(\"./EvmAddress.js\").default} EvmAddress\n * @typedef {import(\"./EthereumTransactionData.js\").default} EthereumTransactionData\n * @typedef {import(\"./transaction/TransactionReceiptQuery.js\").default} TransactionReceiptQuery\n * @typedef {import(\"./transaction/TransactionRecordQuery.js\").default} TransactionRecordQuery\n * @typedef {import(\"./network/AddressBookQuery.js\").default} AddressBookQuery\n */\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.IKey} HieroProto.proto.IKey\n * @typedef {import(\"@hiero-ledger/proto\").proto.IKeyList} HieroProto.proto.IKeyList\n * @typedef {import(\"@hiero-ledger/proto\").proto.IThresholdKey} HieroProto.proto.IThresholdKey\n * @typedef {import(\"@hiero-ledger/proto\").proto.IContractID} HieroProto.proto.IContractID\n */\n\n/**\n * @namespace cryptography\n * @typedef {import(\"@hiero-ledger/cryptography\").PrivateKey} cryptography.PrivateKey\n * @typedef {import(\"@hiero-ledger/cryptography\").Mnemonic} cryptography.Mnemonic\n */\n\n/**\n * @template {object} ProtobufT\n * @template {object} SdkT\n * @typedef {{ (proto: ProtobufT): SdkT }} FromProtobufKeyFuncT\n */\n\n/**\n * Cache class is designed to prevent cyclic dependencies in the Hiero JavaScript SDK.\n * It stores various conversion functions and configuration values that are used across\n * different parts of the SDK.\n */\nclass Cache {\n constructor() {\n /** @type {number} */\n this._timeDrift = 0;\n\n /** @type {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId> | null} */\n this._contractId = null;\n\n /** @type {FromProtobufKeyFuncT<HieroProto.proto.IKeyList, KeyList> | null} */\n this._keyList = null;\n\n /** @type {FromProtobufKeyFuncT<HieroProto.proto.IThresholdKey, KeyList> | null} */\n this._thresholdKey = null;\n\n /** @type {FromProtobufKeyFuncT<Uint8Array, PublicKey> | null} */\n this._publicKeyED25519 = null;\n\n /** @type {FromProtobufKeyFuncT<Uint8Array, PublicKey> | null} */\n this._publicKeyECDSA = null;\n\n /** @type {((key: cryptography.PrivateKey) => PrivateKey) | null} */\n this._privateKeyConstructor = null;\n\n /** @type {((key: cryptography.Mnemonic) => Mnemonic) | null} */\n this._mnemonicFromString = null;\n\n /** @type {((shard: Long | number, realm: Long | number, key: PublicKey) => AccountId) | null} */\n this._accountIdConstructor = null;\n\n /** @type {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId> | null} */\n this._delegateContractId = null;\n\n /** @type {FromProtobufKeyFuncT<Uint8Array, EvmAddress> | null} */\n this._evmAddress = null;\n\n /** @type {((bytes: Uint8Array) => EthereumTransactionData) | null} */\n this._ethereumTransactionDataLegacyFromBytes = null;\n\n /** @type {((bytes: Uint8Array) => EthereumTransactionData) | null} */\n this._ethereumTransactionDataEip1559FromBytes = null;\n\n /** @type {((bytes: Uint8Array) => EthereumTransactionData) | null} */\n this._ethereumTransactionDataEip2930FromBytes = null;\n\n /** @type {(() => TransactionReceiptQuery) | null} */\n this._transactionReceiptQueryConstructor = null;\n\n /** @type {(() => TransactionRecordQuery) | null} */\n this._transactionRecordQueryConstructor = null;\n }\n\n /**\n * @param {number} timeDrift\n */\n setTimeDrift(timeDrift) {\n this._timeDrift = timeDrift;\n }\n\n /**\n * @returns {number}\n */\n get timeDrift() {\n if (this._timeDrift == null) {\n throw new Error(\"Cache.timeDrift was used before it was set\");\n }\n\n return this._timeDrift;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId>} contractId\n */\n setContractId(contractId) {\n this._contractId = contractId;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId>}\n */\n get contractId() {\n if (this._contractId == null) {\n throw new Error(\"Cache.contractId was used before it was set\");\n }\n\n return this._contractId;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<HieroProto.proto.IKeyList, KeyList>} keyList\n */\n setKeyList(keyList) {\n this._keyList = keyList;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<HieroProto.proto.IKeyList, KeyList>}\n */\n get keyList() {\n if (this._keyList == null) {\n throw new Error(\"Cache.keyList was used before it was set\");\n }\n\n return this._keyList;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<HieroProto.proto.IThresholdKey, KeyList>} thresholdKey\n */\n setThresholdKey(thresholdKey) {\n this._thresholdKey = thresholdKey;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<HieroProto.proto.IThresholdKey, KeyList>}\n */\n get thresholdKey() {\n if (this._thresholdKey == null) {\n throw new Error(\"Cache.thresholdKey was used before it was set\");\n }\n\n return this._thresholdKey;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<Uint8Array, PublicKey>} publicKeyED25519\n */\n setPublicKeyED25519(publicKeyED25519) {\n this._publicKeyED25519 = publicKeyED25519;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<Uint8Array, PublicKey>}\n */\n get publicKeyED25519() {\n if (this._publicKeyED25519 == null) {\n throw new Error(\n \"Cache.publicKeyED25519 was used before it was set\",\n );\n }\n\n return this._publicKeyED25519;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<Uint8Array, PublicKey>} publicKeyECDSA\n */\n setPublicKeyECDSA(publicKeyECDSA) {\n this._publicKeyECDSA = publicKeyECDSA;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<Uint8Array, PublicKey>}\n */\n get publicKeyECDSA() {\n if (this._publicKeyECDSA == null) {\n throw new Error(\"Cache.publicKeyECDSA was used before it was set\");\n }\n\n return this._publicKeyECDSA;\n }\n\n /**\n * @param {((key: cryptography.PrivateKey) => PrivateKey)} privateKeyConstructor\n */\n setPrivateKeyConstructor(privateKeyConstructor) {\n this._privateKeyConstructor = privateKeyConstructor;\n }\n\n /**\n * @returns {((key: cryptography.PrivateKey) => PrivateKey)}\n */\n get privateKeyConstructor() {\n if (this._privateKeyConstructor == null) {\n throw new Error(\n \"Cache.privateKeyConstructor was used before it was set\",\n );\n }\n\n return this._privateKeyConstructor;\n }\n\n /**\n * @param {((key: cryptography.Mnemonic) => Mnemonic)} mnemonicFromString\n */\n setMnemonicFromString(mnemonicFromString) {\n this._mnemonicFromString = mnemonicFromString;\n }\n\n /**\n * @returns {((key: cryptography.PrivateKey) => PrivateKey)}\n */\n get mnemonicFromString() {\n if (this._mnemonicFromString == null) {\n throw new Error(\n \"Cache.mnemonicFromString was used before it was set\",\n );\n }\n\n return this.mnemonicFromString;\n }\n\n /**\n * @param {((shard: Long | number, realm: Long | number, key: PublicKey) => AccountId)} accountIdConstructor\n */\n setAccountIdConstructor(accountIdConstructor) {\n this._accountIdConstructor = accountIdConstructor;\n }\n\n /**\n * @returns {((shard: Long | number, realm: Long | number, key: PublicKey) => AccountId)}\n */\n get accountIdConstructor() {\n if (this._accountIdConstructor == null) {\n throw new Error(\n \"Cache.accountIdConstructor was used before it was set\",\n );\n }\n\n return this._accountIdConstructor;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId>} delegateContractId\n */\n setDelegateContractId(delegateContractId) {\n this._delegateContractId = delegateContractId;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId>}\n */\n get delegateContractId() {\n if (this._delegateContractId == null) {\n throw new Error(\n \"Cache.delegateContractId was used before it was set\",\n );\n }\n\n return this._delegateContractId;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<Uint8Array, EvmAddress>} evmAddress\n */\n setEvmAddress(evmAddress) {\n this._evmAddress = evmAddress;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<Uint8Array, EvmAddress>}\n */\n get evmAddress() {\n if (this._evmAddress == null) {\n throw new Error(\"Cache.evmAddress was used before it was set\");\n }\n\n return this._evmAddress;\n }\n\n /**\n * @param {((bytes: Uint8Array) => EthereumTransactionData)} ethereumTransactionDataLegacyFromBytes\n */\n setEthereumTransactionDataLegacyFromBytes(\n ethereumTransactionDataLegacyFromBytes,\n ) {\n this._ethereumTransactionDataLegacyFromBytes =\n ethereumTransactionDataLegacyFromBytes;\n }\n\n /**\n * @returns {((bytes: Uint8Array) => EthereumTransactionData)}\n */\n get ethereumTransactionDataLegacyFromBytes() {\n if (this._ethereumTransactionDataLegacyFromBytes == null) {\n throw new Error(\n \"Cache.ethereumTransactionDataLegacyFromBytes was used before it was set\",\n );\n }\n\n return this._ethereumTransactionDataLegacyFromBytes;\n }\n\n /**\n * @param {((bytes: Uint8Array) => EthereumTransactionData)} ethereumTransactionDataEip1559FromBytes\n */\n setEthereumTransactionDataEip1559FromBytes(\n ethereumTransactionDataEip1559FromBytes,\n ) {\n this._ethereumTransactionDataEip1559FromBytes =\n ethereumTransactionDataEip1559FromBytes;\n }\n\n /**\n * @returns {((bytes: Uint8Array) => EthereumTransactionData)}\n */\n get ethereumTransactionDataEip1559FromBytes() {\n if (this._ethereumTransactionDataEip1559FromBytes == null) {\n throw new Error(\n \"Cache.ethereumTransactionDataEip1559FromBytes was used before it was set\",\n );\n }\n\n return this._ethereumTransactionDataEip1559FromBytes;\n }\n\n /**\n * @param {((bytes: Uint8Array) => EthereumTransactionData)} ethereumTransactionDataEip2930FromBytes\n */\n setEthereumTransactionDataEip2930FromBytes(\n ethereumTransactionDataEip2930FromBytes,\n ) {\n this._ethereumTransactionDataEip2930FromBytes =\n ethereumTransactionDataEip2930FromBytes;\n }\n\n /**\n * @returns {((bytes: Uint8Array) => EthereumTransactionData)}\n */\n get ethereumTransactionDataEip2930FromBytes() {\n if (this._ethereumTransactionDataEip2930FromBytes == null) {\n throw new Error(\n \"Cache.ethereumTransactionDataEip2930FromBytes was used before it was set\",\n );\n }\n\n return this._ethereumTransactionDataEip2930FromBytes;\n }\n\n /**\n * @param {(() => TransactionReceiptQuery)} transactionReceiptQueryConstructor\n */\n setTransactionReceiptQueryConstructor(transactionReceiptQueryConstructor) {\n this._transactionReceiptQueryConstructor =\n transactionReceiptQueryConstructor;\n }\n\n /**\n * @returns {(() => TransactionReceiptQuery)}\n */\n get transactionReceiptQueryConstructor() {\n if (this._transactionReceiptQueryConstructor == null) {\n throw new Error(\n \"Cache.transactionReceiptQueryConstructor was used before it was set\",\n );\n }\n\n return this._transactionReceiptQueryConstructor;\n }\n\n /**\n * @param {(() => TransactionRecordQuery)} transactionRecordQueryConstructor\n */\n setTransactionRecordQueryConstructor(transactionRecordQueryConstructor) {\n this._transactionRecordQueryConstructor =\n transactionRecordQueryConstructor;\n }\n\n /**\n * @returns {(() => TransactionRecordQuery)}\n */\n get transactionRecordQueryConstructor() {\n if (this._transactionRecordQueryConstructor == null) {\n throw new Error(\n \"Cache.transactionRecordQueryConstructor was used before it was set\",\n );\n }\n\n return this._transactionRecordQueryConstructor;\n }\n}\n\n/**\n * This variable is strictly designed to prevent cyclic dependencies.\n */\nconst CACHE = new Cache();\n\nexport default CACHE;\n"],"names":["CACHE","constructor","this","_timeDrift","_contractId","_keyList","_thresholdKey","_publicKeyED25519","_publicKeyECDSA","_privateKeyConstructor","_mnemonicFromString","_accountIdConstructor","_delegateContractId","_evmAddress","_ethereumTransactionDataLegacyFromBytes","_ethereumTransactionDataEip1559FromBytes","_ethereumTransactionDataEip2930FromBytes","_transactionReceiptQueryConstructor","_transactionRecordQueryConstructor","setTimeDrift","timeDrift","Error","setContractId","contractId","setKeyList","keyList","setThresholdKey","thresholdKey","setPublicKeyED25519","publicKeyED25519","setPublicKeyECDSA","publicKeyECDSA","setPrivateKeyConstructor","privateKeyConstructor","setMnemonicFromString","mnemonicFromString","setAccountIdConstructor","accountIdConstructor","setDelegateContractId","delegateContractId","setEvmAddress","evmAddress","setEthereumTransactionDataLegacyFromBytes","ethereumTransactionDataLegacyFromBytes","setEthereumTransactionDataEip1559FromBytes","ethereumTransactionDataEip1559FromBytes","setEthereumTransactionDataEip2930FromBytes","ethereumTransactionDataEip2930FromBytes","setTransactionReceiptQueryConstructor","transactionReceiptQueryConstructor","setTransactionRecordQueryConstructor","transactionRecordQueryConstructor"],"mappings":"AA+ZK,MAACA,EAAQ,IAtXd,MACI,WAAAC,GAEIC,KAAKC,WAAa,EAGlBD,KAAKE,YAAc,KAGnBF,KAAKG,SAAW,KAGhBH,KAAKI,cAAgB,KAGrBJ,KAAKK,kBAAoB,KAGzBL,KAAKM,gBAAkB,KAGvBN,KAAKO,uBAAyB,KAG9BP,KAAKQ,oBAAsB,KAG3BR,KAAKS,sBAAwB,KAG7BT,KAAKU,oBAAsB,KAG3BV,KAAKW,YAAc,KAGnBX,KAAKY,wCAA0C,KAG/CZ,KAAKa,yCAA2C,KAGhDb,KAAKc,yCAA2C,KAGhDd,KAAKe,oCAAsC,KAG3Cf,KAAKgB,mCAAqC,IAClD,CAKI,YAAAC,CAAaC,GACTlB,KAAKC,WAAaiB,CAC1B,CAKI,aAAIA,GACA,GAAuB,MAAnBlB,KAAKC,WACL,MAAM,IAAIkB,MAAM,8CAGpB,OAAOnB,KAAKC,UACpB,CAKI,aAAAmB,CAAcC,GACVrB,KAAKE,YAAcmB,CAC3B,CAKI,cAAIA,GACA,GAAwB,MAApBrB,KAAKE,YACL,MAAM,IAAIiB,MAAM,+CAGpB,OAAOnB,KAAKE,WACpB,CAKI,UAAAoB,CAAWC,GACPvB,KAAKG,SAAWoB,CACxB,CAKI,WAAIA,GACA,GAAqB,MAAjBvB,KAAKG,SACL,MAAM,IAAIgB,MAAM,4CAGpB,OAAOnB,KAAKG,QACpB,CAKI,eAAAqB,CAAgBC,GACZzB,KAAKI,cAAgBqB,CAC7B,CAKI,gBAAIA,GACA,GAA0B,MAAtBzB,KAAKI,cACL,MAAM,IAAIe,MAAM,iDAGpB,OAAOnB,KAAKI,aACpB,CAKI,mBAAAsB,CAAoBC,GAChB3B,KAAKK,kBAAoBsB,CACjC,CAKI,oBAAIA,GACA,GAA8B,MAA1B3B,KAAKK,kBACL,MAAM,IAAIc,MACN,qDAIR,OAAOnB,KAAKK,iBACpB,CAKI,iBAAAuB,CAAkBC,GACd7B,KAAKM,gBAAkBuB,CAC/B,CAKI,kBAAIA,GACA,GAA4B,MAAxB7B,KAAKM,gBACL,MAAM,IAAIa,MAAM,mDAGpB,OAAOnB,KAAKM,eACpB,CAKI,wBAAAwB,CAAyBC,GACrB/B,KAAKO,uBAAyBwB,CACtC,CAKI,yBAAIA,GACA,GAAmC,MAA/B/B,KAAKO,uBACL,MAAM,IAAIY,MACN,0DAIR,OAAOnB,KAAKO,sBACpB,CAKI,qBAAAyB,CAAsBC,GAClBjC,KAAKQ,oBAAsByB,CACnC,CAKI,sBAAIA,GACA,GAAgC,MAA5BjC,KAAKQ,oBACL,MAAM,IAAIW,MACN,uDAIR,OAAOnB,KAAKiC,kBACpB,CAKI,uBAAAC,CAAwBC,GACpBnC,KAAKS,sBAAwB0B,CACrC,CAKI,wBAAIA,GACA,GAAkC,MAA9BnC,KAAKS,sBACL,MAAM,IAAIU,MACN,yDAIR,OAAOnB,KAAKS,qBACpB,CAKI,qBAAA2B,CAAsBC,GAClBrC,KAAKU,oBAAsB2B,CACnC,CAKI,sBAAIA,GACA,GAAgC,MAA5BrC,KAAKU,oBACL,MAAM,IAAIS,MACN,uDAIR,OAAOnB,KAAKU,mBACpB,CAKI,aAAA4B,CAAcC,GACVvC,KAAKW,YAAc4B,CAC3B,CAKI,cAAIA,GACA,GAAwB,MAApBvC,KAAKW,YACL,MAAM,IAAIQ,MAAM,+CAGpB,OAAOnB,KAAKW,WACpB,CAKI,yCAAA6B,CACIC,GAEAzC,KAAKY,wCACD6B,CACZ,CAKI,0CAAIA,GACA,GAAoD,MAAhDzC,KAAKY,wCACL,MAAM,IAAIO,MACN,2EAIR,OAAOnB,KAAKY,uCACpB,CAKI,0CAAA8B,CACIC,GAEA3C,KAAKa,yCACD8B,CACZ,CAKI,2CAAIA,GACA,GAAqD,MAAjD3C,KAAKa,yCACL,MAAM,IAAIM,MACN,4EAIR,OAAOnB,KAAKa,wCACpB,CAKI,0CAAA+B,CACIC,GAEA7C,KAAKc,yCACD+B,CACZ,CAKI,2CAAIA,GACA,GAAqD,MAAjD7C,KAAKc,yCACL,MAAM,IAAIK,MACN,4EAIR,OAAOnB,KAAKc,wCACpB,CAKI,qCAAAgC,CAAsCC,GAClC/C,KAAKe,oCACDgC,CACZ,CAKI,sCAAIA,GACA,GAAgD,MAA5C/C,KAAKe,oCACL,MAAM,IAAII,MACN,uEAIR,OAAOnB,KAAKe,mCACpB,CAKI,oCAAAiC,CAAqCC,GACjCjD,KAAKgB,mCACDiC,CACZ,CAKI,qCAAIA,GACA,GAA+C,MAA3CjD,KAAKgB,mCACL,MAAM,IAAIG,MACN,sEAIR,OAAOnB,KAAKgB,kCACpB"}
1
+ {"version":3,"file":"Cache.js","sources":["../src/Cache.js"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * @typedef {import(\"./contract/ContractId.js\").default} ContractId\n * @typedef {import(\"./account/AccountId.js\").default} AccountId\n * @typedef {import(\"./KeyList.js\").default} KeyList\n * @typedef {import(\"./PublicKey.js\").default} PublicKey\n * @typedef {import(\"./PrivateKey.js\").default} PrivateKey\n * @typedef {import(\"./Mnemonic.js\").default} Mnemonic\n * @typedef {import(\"./EvmAddress.js\").default} EvmAddress\n * @typedef {import(\"./EthereumTransactionData.js\").default} EthereumTransactionData\n * @typedef {import(\"./transaction/TransactionReceiptQuery.js\").default} TransactionReceiptQuery\n * @typedef {import(\"./transaction/TransactionRecordQuery.js\").default} TransactionRecordQuery\n * @typedef {import(\"./network/AddressBookQuery.js\").default} AddressBookQuery\n */\n\n/**\n * @namespace proto\n * @typedef {import(\"@hiero-ledger/proto\").proto.IKey} HieroProto.proto.IKey\n * @typedef {import(\"@hiero-ledger/proto\").proto.IKeyList} HieroProto.proto.IKeyList\n * @typedef {import(\"@hiero-ledger/proto\").proto.IThresholdKey} HieroProto.proto.IThresholdKey\n * @typedef {import(\"@hiero-ledger/proto\").proto.IContractID} HieroProto.proto.IContractID\n */\n\n/**\n * @namespace cryptography\n * @typedef {import(\"@hiero-ledger/cryptography\").PrivateKey} cryptography.PrivateKey\n * @typedef {import(\"@hiero-ledger/cryptography\").Mnemonic} cryptography.Mnemonic\n */\n\n/**\n * @template {object} ProtobufT\n * @template {object} SdkT\n * @typedef {{ (proto: ProtobufT): SdkT }} FromProtobufKeyFuncT\n */\n\n/**\n * Cache class is designed to prevent cyclic dependencies in the Hiero JavaScript SDK.\n * It stores various conversion functions and configuration values that are used across\n * different parts of the SDK.\n */\nclass Cache {\n constructor() {\n /** @type {number} */\n this._timeDrift = 0;\n\n /** @type {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId> | null} */\n this._contractId = null;\n\n /** @type {FromProtobufKeyFuncT<HieroProto.proto.IKeyList, KeyList> | null} */\n this._keyList = null;\n\n /** @type {FromProtobufKeyFuncT<HieroProto.proto.IThresholdKey, KeyList> | null} */\n this._thresholdKey = null;\n\n /** @type {FromProtobufKeyFuncT<Uint8Array, PublicKey> | null} */\n this._publicKeyED25519 = null;\n\n /** @type {FromProtobufKeyFuncT<Uint8Array, PublicKey> | null} */\n this._publicKeyECDSA = null;\n\n /** @type {((key: cryptography.PrivateKey) => PrivateKey) | null} */\n this._privateKeyConstructor = null;\n\n /** @type {((key: cryptography.Mnemonic) => Mnemonic) | null} */\n this._mnemonicFromString = null;\n\n /** @type {((shard: Long | number, realm: Long | number, key: PublicKey) => AccountId) | null} */\n this._accountIdConstructor = null;\n\n /** @type {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId> | null} */\n this._delegateContractId = null;\n\n /** @type {FromProtobufKeyFuncT<Uint8Array, EvmAddress> | null} */\n this._evmAddress = null;\n\n /** @type {((bytes: Uint8Array) => EthereumTransactionData) | null} */\n this._ethereumTransactionDataLegacyFromBytes = null;\n\n /** @type {((bytes: Uint8Array) => EthereumTransactionData) | null} */\n this._ethereumTransactionDataEip1559FromBytes = null;\n\n /** @type {((bytes: Uint8Array) => EthereumTransactionData) | null} */\n this._ethereumTransactionDataEip2930FromBytes = null;\n\n /** @type {((bytes: Uint8Array) => EthereumTransactionData) | null} */\n this._ethereumTransactionDataEip7702FromBytes = null;\n\n /** @type {(() => TransactionReceiptQuery) | null} */\n this._transactionReceiptQueryConstructor = null;\n\n /** @type {(() => TransactionRecordQuery) | null} */\n this._transactionRecordQueryConstructor = null;\n }\n\n /**\n * @param {number} timeDrift\n */\n setTimeDrift(timeDrift) {\n this._timeDrift = timeDrift;\n }\n\n /**\n * @returns {number}\n */\n get timeDrift() {\n if (this._timeDrift == null) {\n throw new Error(\"Cache.timeDrift was used before it was set\");\n }\n\n return this._timeDrift;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId>} contractId\n */\n setContractId(contractId) {\n this._contractId = contractId;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId>}\n */\n get contractId() {\n if (this._contractId == null) {\n throw new Error(\"Cache.contractId was used before it was set\");\n }\n\n return this._contractId;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<HieroProto.proto.IKeyList, KeyList>} keyList\n */\n setKeyList(keyList) {\n this._keyList = keyList;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<HieroProto.proto.IKeyList, KeyList>}\n */\n get keyList() {\n if (this._keyList == null) {\n throw new Error(\"Cache.keyList was used before it was set\");\n }\n\n return this._keyList;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<HieroProto.proto.IThresholdKey, KeyList>} thresholdKey\n */\n setThresholdKey(thresholdKey) {\n this._thresholdKey = thresholdKey;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<HieroProto.proto.IThresholdKey, KeyList>}\n */\n get thresholdKey() {\n if (this._thresholdKey == null) {\n throw new Error(\"Cache.thresholdKey was used before it was set\");\n }\n\n return this._thresholdKey;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<Uint8Array, PublicKey>} publicKeyED25519\n */\n setPublicKeyED25519(publicKeyED25519) {\n this._publicKeyED25519 = publicKeyED25519;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<Uint8Array, PublicKey>}\n */\n get publicKeyED25519() {\n if (this._publicKeyED25519 == null) {\n throw new Error(\n \"Cache.publicKeyED25519 was used before it was set\",\n );\n }\n\n return this._publicKeyED25519;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<Uint8Array, PublicKey>} publicKeyECDSA\n */\n setPublicKeyECDSA(publicKeyECDSA) {\n this._publicKeyECDSA = publicKeyECDSA;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<Uint8Array, PublicKey>}\n */\n get publicKeyECDSA() {\n if (this._publicKeyECDSA == null) {\n throw new Error(\"Cache.publicKeyECDSA was used before it was set\");\n }\n\n return this._publicKeyECDSA;\n }\n\n /**\n * @param {((key: cryptography.PrivateKey) => PrivateKey)} privateKeyConstructor\n */\n setPrivateKeyConstructor(privateKeyConstructor) {\n this._privateKeyConstructor = privateKeyConstructor;\n }\n\n /**\n * @returns {((key: cryptography.PrivateKey) => PrivateKey)}\n */\n get privateKeyConstructor() {\n if (this._privateKeyConstructor == null) {\n throw new Error(\n \"Cache.privateKeyConstructor was used before it was set\",\n );\n }\n\n return this._privateKeyConstructor;\n }\n\n /**\n * @param {((key: cryptography.Mnemonic) => Mnemonic)} mnemonicFromString\n */\n setMnemonicFromString(mnemonicFromString) {\n this._mnemonicFromString = mnemonicFromString;\n }\n\n /**\n * @returns {((key: cryptography.PrivateKey) => PrivateKey)}\n */\n get mnemonicFromString() {\n if (this._mnemonicFromString == null) {\n throw new Error(\n \"Cache.mnemonicFromString was used before it was set\",\n );\n }\n\n return this.mnemonicFromString;\n }\n\n /**\n * @param {((shard: Long | number, realm: Long | number, key: PublicKey) => AccountId)} accountIdConstructor\n */\n setAccountIdConstructor(accountIdConstructor) {\n this._accountIdConstructor = accountIdConstructor;\n }\n\n /**\n * @returns {((shard: Long | number, realm: Long | number, key: PublicKey) => AccountId)}\n */\n get accountIdConstructor() {\n if (this._accountIdConstructor == null) {\n throw new Error(\n \"Cache.accountIdConstructor was used before it was set\",\n );\n }\n\n return this._accountIdConstructor;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId>} delegateContractId\n */\n setDelegateContractId(delegateContractId) {\n this._delegateContractId = delegateContractId;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<HieroProto.proto.IContractID, ContractId>}\n */\n get delegateContractId() {\n if (this._delegateContractId == null) {\n throw new Error(\n \"Cache.delegateContractId was used before it was set\",\n );\n }\n\n return this._delegateContractId;\n }\n\n /**\n * @param {FromProtobufKeyFuncT<Uint8Array, EvmAddress>} evmAddress\n */\n setEvmAddress(evmAddress) {\n this._evmAddress = evmAddress;\n }\n\n /**\n * @returns {FromProtobufKeyFuncT<Uint8Array, EvmAddress>}\n */\n get evmAddress() {\n if (this._evmAddress == null) {\n throw new Error(\"Cache.evmAddress was used before it was set\");\n }\n\n return this._evmAddress;\n }\n\n /**\n * @param {((bytes: Uint8Array) => EthereumTransactionData)} ethereumTransactionDataLegacyFromBytes\n */\n setEthereumTransactionDataLegacyFromBytes(\n ethereumTransactionDataLegacyFromBytes,\n ) {\n this._ethereumTransactionDataLegacyFromBytes =\n ethereumTransactionDataLegacyFromBytes;\n }\n\n /**\n * @returns {((bytes: Uint8Array) => EthereumTransactionData)}\n */\n get ethereumTransactionDataLegacyFromBytes() {\n if (this._ethereumTransactionDataLegacyFromBytes == null) {\n throw new Error(\n \"Cache.ethereumTransactionDataLegacyFromBytes was used before it was set\",\n );\n }\n\n return this._ethereumTransactionDataLegacyFromBytes;\n }\n\n /**\n * @param {((bytes: Uint8Array) => EthereumTransactionData)} ethereumTransactionDataEip1559FromBytes\n */\n setEthereumTransactionDataEip1559FromBytes(\n ethereumTransactionDataEip1559FromBytes,\n ) {\n this._ethereumTransactionDataEip1559FromBytes =\n ethereumTransactionDataEip1559FromBytes;\n }\n\n /**\n * @returns {((bytes: Uint8Array) => EthereumTransactionData)}\n */\n get ethereumTransactionDataEip1559FromBytes() {\n if (this._ethereumTransactionDataEip1559FromBytes == null) {\n throw new Error(\n \"Cache.ethereumTransactionDataEip1559FromBytes was used before it was set\",\n );\n }\n\n return this._ethereumTransactionDataEip1559FromBytes;\n }\n\n /**\n * @param {((bytes: Uint8Array) => EthereumTransactionData)} ethereumTransactionDataEip2930FromBytes\n */\n setEthereumTransactionDataEip2930FromBytes(\n ethereumTransactionDataEip2930FromBytes,\n ) {\n this._ethereumTransactionDataEip2930FromBytes =\n ethereumTransactionDataEip2930FromBytes;\n }\n\n /**\n * @returns {((bytes: Uint8Array) => EthereumTransactionData)}\n */\n get ethereumTransactionDataEip2930FromBytes() {\n if (this._ethereumTransactionDataEip2930FromBytes == null) {\n throw new Error(\n \"Cache.ethereumTransactionDataEip2930FromBytes was used before it was set\",\n );\n }\n\n return this._ethereumTransactionDataEip2930FromBytes;\n }\n\n /**\n * @param {((bytes: Uint8Array) => EthereumTransactionData)} ethereumTransactionDataEip7702FromBytes\n */\n setEthereumTransactionDataEip7702FromBytes(\n ethereumTransactionDataEip7702FromBytes,\n ) {\n this._ethereumTransactionDataEip7702FromBytes =\n ethereumTransactionDataEip7702FromBytes;\n }\n\n /**\n * @returns {((bytes: Uint8Array) => EthereumTransactionData)}\n */\n get ethereumTransactionDataEip7702FromBytes() {\n if (this._ethereumTransactionDataEip7702FromBytes == null) {\n throw new Error(\n \"Cache.ethereumTransactionDataEip7702FromBytes was used before it was set\",\n );\n }\n\n return this._ethereumTransactionDataEip7702FromBytes;\n }\n\n /**\n * @param {(() => TransactionReceiptQuery)} transactionReceiptQueryConstructor\n */\n setTransactionReceiptQueryConstructor(transactionReceiptQueryConstructor) {\n this._transactionReceiptQueryConstructor =\n transactionReceiptQueryConstructor;\n }\n\n /**\n * @returns {(() => TransactionReceiptQuery)}\n */\n get transactionReceiptQueryConstructor() {\n if (this._transactionReceiptQueryConstructor == null) {\n throw new Error(\n \"Cache.transactionReceiptQueryConstructor was used before it was set\",\n );\n }\n\n return this._transactionReceiptQueryConstructor;\n }\n\n /**\n * @param {(() => TransactionRecordQuery)} transactionRecordQueryConstructor\n */\n setTransactionRecordQueryConstructor(transactionRecordQueryConstructor) {\n this._transactionRecordQueryConstructor =\n transactionRecordQueryConstructor;\n }\n\n /**\n * @returns {(() => TransactionRecordQuery)}\n */\n get transactionRecordQueryConstructor() {\n if (this._transactionRecordQueryConstructor == null) {\n throw new Error(\n \"Cache.transactionRecordQueryConstructor was used before it was set\",\n );\n }\n\n return this._transactionRecordQueryConstructor;\n }\n}\n\n/**\n * This variable is strictly designed to prevent cyclic dependencies.\n */\nconst CACHE = new Cache();\n\nexport default CACHE;\n"],"names":["CACHE","constructor","this","_timeDrift","_contractId","_keyList","_thresholdKey","_publicKeyED25519","_publicKeyECDSA","_privateKeyConstructor","_mnemonicFromString","_accountIdConstructor","_delegateContractId","_evmAddress","_ethereumTransactionDataLegacyFromBytes","_ethereumTransactionDataEip1559FromBytes","_ethereumTransactionDataEip2930FromBytes","_ethereumTransactionDataEip7702FromBytes","_transactionReceiptQueryConstructor","_transactionRecordQueryConstructor","setTimeDrift","timeDrift","Error","setContractId","contractId","setKeyList","keyList","setThresholdKey","thresholdKey","setPublicKeyED25519","publicKeyED25519","setPublicKeyECDSA","publicKeyECDSA","setPrivateKeyConstructor","privateKeyConstructor","setMnemonicFromString","mnemonicFromString","setAccountIdConstructor","accountIdConstructor","setDelegateContractId","delegateContractId","setEvmAddress","evmAddress","setEthereumTransactionDataLegacyFromBytes","ethereumTransactionDataLegacyFromBytes","setEthereumTransactionDataEip1559FromBytes","ethereumTransactionDataEip1559FromBytes","setEthereumTransactionDataEip2930FromBytes","ethereumTransactionDataEip2930FromBytes","setEthereumTransactionDataEip7702FromBytes","ethereumTransactionDataEip7702FromBytes","setTransactionReceiptQueryConstructor","transactionReceiptQueryConstructor","setTransactionRecordQueryConstructor","transactionRecordQueryConstructor"],"mappings":"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"}
@@ -9,7 +9,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
9
9
  /**
10
10
  * Represents the base class for Ethereum transaction data.
11
11
  * This class provides the foundation for different types of Ethereum transactions
12
- * including Legacy, EIP-1559, and EIP-2930 transactions.
12
+ * including Legacy, EIP-1559, EIP-2930, and EIP-7702 transactions.
13
13
  */
14
14
  class EthereumTransactionData {
15
15
  /**
@@ -34,6 +34,8 @@ class EthereumTransactionData {
34
34
  return _Cache.default.ethereumTransactionDataEip2930FromBytes(bytes);
35
35
  case 2:
36
36
  return _Cache.default.ethereumTransactionDataEip1559FromBytes(bytes);
37
+ case 4:
38
+ return _Cache.default.ethereumTransactionDataEip7702FromBytes(bytes);
37
39
  default:
38
40
  return _Cache.default.ethereumTransactionDataLegacyFromBytes(bytes);
39
41
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Represents the base class for Ethereum transaction data.
3
3
  * This class provides the foundation for different types of Ethereum transactions
4
- * including Legacy, EIP-1559, and EIP-2930 transactions.
4
+ * including Legacy, EIP-1559, EIP-2930, and EIP-7702 transactions.
5
5
  */
6
6
  export default class EthereumTransactionData {
7
7
  /**
@@ -1,2 +1,2 @@
1
- import t from"./Cache.js";class e{constructor(t){this.callData=t.callData}static fromBytes(e){if(0===e.length)throw new Error("empty bytes");switch(e[0]){case 1:return t.ethereumTransactionDataEip2930FromBytes(e);case 2:return t.ethereumTransactionDataEip1559FromBytes(e);default:return t.ethereumTransactionDataLegacyFromBytes(e)}}toBytes(){throw new Error("not implemented")}toString(){throw new Error("not implemented")}toJSON(){throw new Error("not implemented")}}export{e as default};
1
+ import t from"./Cache.js";class e{constructor(t){this.callData=t.callData}static fromBytes(e){if(0===e.length)throw new Error("empty bytes");switch(e[0]){case 1:return t.ethereumTransactionDataEip2930FromBytes(e);case 2:return t.ethereumTransactionDataEip1559FromBytes(e);case 4:return t.ethereumTransactionDataEip7702FromBytes(e);default:return t.ethereumTransactionDataLegacyFromBytes(e)}}toBytes(){throw new Error("not implemented")}toString(){throw new Error("not implemented")}toJSON(){throw new Error("not implemented")}}export{e as default};
2
2
  //# sourceMappingURL=EthereumTransactionData.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EthereumTransactionData.js","sources":["../src/EthereumTransactionData.js"],"sourcesContent":["import CACHE from \"./Cache.js\";\n\n/**\n * Represents the base class for Ethereum transaction data.\n * This class provides the foundation for different types of Ethereum transactions\n * including Legacy, EIP-1559, and EIP-2930 transactions.\n */\nexport default class EthereumTransactionData {\n /**\n * @protected\n * @param {object} props\n * @param {Uint8Array} props.callData\n */\n constructor(props) {\n this.callData = props.callData;\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {EthereumTransactionData}\n */\n static fromBytes(bytes) {\n if (bytes.length === 0) {\n throw new Error(\"empty bytes\");\n }\n\n switch (bytes[0]) {\n case 1:\n return CACHE.ethereumTransactionDataEip2930FromBytes(bytes);\n case 2:\n return CACHE.ethereumTransactionDataEip1559FromBytes(bytes);\n default:\n return CACHE.ethereumTransactionDataLegacyFromBytes(bytes);\n }\n }\n\n // eslint-disable-next-line jsdoc/require-returns-check\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n throw new Error(\"not implemented\");\n }\n\n // eslint-disable-next-line jsdoc/require-returns-check\n /**\n * @returns {string}\n */\n toString() {\n throw new Error(\"not implemented\");\n }\n\n // eslint-disable-next-line jsdoc/require-returns-check\n /**\n * @returns {{[key: string]: any}}\n */\n toJSON() {\n throw new Error(\"not implemented\");\n }\n}\n"],"names":["EthereumTransactionData","constructor","props","this","callData","fromBytes","bytes","length","Error","CACHE","ethereumTransactionDataEip2930FromBytes","ethereumTransactionDataEip1559FromBytes","ethereumTransactionDataLegacyFromBytes","toBytes","toString","toJSON"],"mappings":"0BAOe,MAAMA,EAMjB,WAAAC,CAAYC,GACRC,KAAKC,SAAWF,EAAME,QAC9B,CAMI,gBAAOC,CAAUC,GACb,GAAqB,IAAjBA,EAAMC,OACN,MAAM,IAAIC,MAAM,eAGpB,OAAQF,EAAM,IACV,KAAK,EACD,OAAOG,EAAMC,wCAAwCJ,GACzD,KAAK,EACD,OAAOG,EAAME,wCAAwCL,GACzD,QACI,OAAOG,EAAMG,uCAAuCN,GAEpE,CAMI,OAAAO,GACI,MAAM,IAAIL,MAAM,kBACxB,CAMI,QAAAM,GACI,MAAM,IAAIN,MAAM,kBACxB,CAMI,MAAAO,GACI,MAAM,IAAIP,MAAM,kBACxB"}
1
+ {"version":3,"file":"EthereumTransactionData.js","sources":["../src/EthereumTransactionData.js"],"sourcesContent":["import CACHE from \"./Cache.js\";\n\n/**\n * Represents the base class for Ethereum transaction data.\n * This class provides the foundation for different types of Ethereum transactions\n * including Legacy, EIP-1559, EIP-2930, and EIP-7702 transactions.\n */\nexport default class EthereumTransactionData {\n /**\n * @protected\n * @param {object} props\n * @param {Uint8Array} props.callData\n */\n constructor(props) {\n this.callData = props.callData;\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {EthereumTransactionData}\n */\n static fromBytes(bytes) {\n if (bytes.length === 0) {\n throw new Error(\"empty bytes\");\n }\n\n switch (bytes[0]) {\n case 1:\n return CACHE.ethereumTransactionDataEip2930FromBytes(bytes);\n case 2:\n return CACHE.ethereumTransactionDataEip1559FromBytes(bytes);\n case 4:\n return CACHE.ethereumTransactionDataEip7702FromBytes(bytes);\n default:\n return CACHE.ethereumTransactionDataLegacyFromBytes(bytes);\n }\n }\n\n // eslint-disable-next-line jsdoc/require-returns-check\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n throw new Error(\"not implemented\");\n }\n\n // eslint-disable-next-line jsdoc/require-returns-check\n /**\n * @returns {string}\n */\n toString() {\n throw new Error(\"not implemented\");\n }\n\n // eslint-disable-next-line jsdoc/require-returns-check\n /**\n * @returns {{[key: string]: any}}\n */\n toJSON() {\n throw new Error(\"not implemented\");\n }\n}\n"],"names":["EthereumTransactionData","constructor","props","this","callData","fromBytes","bytes","length","Error","CACHE","ethereumTransactionDataEip2930FromBytes","ethereumTransactionDataEip1559FromBytes","ethereumTransactionDataEip7702FromBytes","ethereumTransactionDataLegacyFromBytes","toBytes","toString","toJSON"],"mappings":"0BAOe,MAAMA,EAMjB,WAAAC,CAAYC,GACRC,KAAKC,SAAWF,EAAME,QAC9B,CAMI,gBAAOC,CAAUC,GACb,GAAqB,IAAjBA,EAAMC,OACN,MAAM,IAAIC,MAAM,eAGpB,OAAQF,EAAM,IACV,KAAK,EACD,OAAOG,EAAMC,wCAAwCJ,GACzD,KAAK,EACD,OAAOG,EAAME,wCAAwCL,GACzD,KAAK,EACD,OAAOG,EAAMG,wCAAwCN,GACzD,QACI,OAAOG,EAAMI,uCAAuCP,GAEpE,CAMI,OAAAQ,GACI,MAAM,IAAIN,MAAM,kBACxB,CAMI,QAAAO,GACI,MAAM,IAAIP,MAAM,kBACxB,CAMI,MAAAQ,GACI,MAAM,IAAIR,MAAM,kBACxB"}
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var rlp = _interopRequireWildcard(require("@ethersproject/rlp"));
8
+ var hex = _interopRequireWildcard(require("./encoding/hex.cjs"));
9
+ var _EthereumTransactionData = _interopRequireDefault(require("./EthereumTransactionData.cjs"));
10
+ var _Cache = _interopRequireDefault(require("./Cache.cjs"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
+ /**
14
+ * @typedef {object} EthereumTransactionDataEip7702JSON
15
+ * @property {string} chainId
16
+ * @property {string} nonce
17
+ * @property {string} maxPriorityGas
18
+ * @property {string} maxGas
19
+ * @property {string} gasLimit
20
+ * @property {string} to
21
+ * @property {string} value
22
+ * @property {string} callData
23
+ * @property {Array<[string, string, string, string, string, string]>} authorizationList - Array of [chainId, contractAddress, nonce, yParity, r, s] tuples
24
+ * @property {string[]} accessList
25
+ * @property {string} recId
26
+ * @property {string} r
27
+ * @property {string} s
28
+ */
29
+
30
+ class EthereumTransactionDataEip7702 extends _EthereumTransactionData.default {
31
+ /**
32
+ * @private
33
+ * @param {object} props
34
+ * @param {Uint8Array} props.chainId
35
+ * @param {Uint8Array} props.nonce
36
+ * @param {Uint8Array} props.maxPriorityGas
37
+ * @param {Uint8Array} props.maxGas
38
+ * @param {Uint8Array} props.gasLimit
39
+ * @param {Uint8Array} props.to
40
+ * @param {Uint8Array} props.value
41
+ * @param {Uint8Array} props.callData
42
+ * @param {Array<[Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array]>} props.authorizationList - Array of [chainId, contractAddress, nonce, yParity, r, s] tuples
43
+ * @param {Uint8Array[]} props.accessList
44
+ * @param {Uint8Array} props.recId
45
+ * @param {Uint8Array} props.r
46
+ * @param {Uint8Array} props.s
47
+ */
48
+ constructor(props) {
49
+ super(props);
50
+ this.chainId = props.chainId;
51
+ this.nonce = props.nonce;
52
+ this.maxPriorityGas = props.maxPriorityGas;
53
+ this.maxGas = props.maxGas;
54
+ this.gasLimit = props.gasLimit;
55
+ this.to = props.to;
56
+ this.value = props.value;
57
+ this.callData = props.callData;
58
+ this.authorizationList = props.authorizationList;
59
+ this.accessList = props.accessList;
60
+ this.recId = props.recId;
61
+ this.r = props.r;
62
+ this.s = props.s;
63
+ }
64
+
65
+ /**
66
+ * @param {Uint8Array} bytes
67
+ * @returns {EthereumTransactionData}
68
+ */
69
+ static fromBytes(bytes) {
70
+ if (bytes.length === 0) {
71
+ throw new Error("empty bytes");
72
+ }
73
+
74
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
75
+ const decoded = /** @type {string[]} */rlp.decode(bytes.subarray(1));
76
+ if (!Array.isArray(decoded)) {
77
+ throw new Error("ethereum data is not a list");
78
+ }
79
+ if (decoded.length !== 13) {
80
+ throw new Error("invalid ethereum transaction data");
81
+ }
82
+
83
+ // Decode authorization list: array of [chainId, contractAddress, nonce, yParity, r, s] tuples
84
+ // Authorization list can be empty (empty array is valid)
85
+ if (!Array.isArray(decoded[9])) {
86
+ throw new Error("authorization list must be an array");
87
+ }
88
+ // @ts-ignore
89
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
90
+ const authorizationList = /** @type {string[]} */decoded[9].map(authTuple => {
91
+ if (!Array.isArray(authTuple) || authTuple.length !== 6) {
92
+ throw new Error("invalid authorization list entry: must be [chainId, contractAddress, nonce, yParity, r, s]");
93
+ }
94
+ return [
95
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
96
+ hex.decode(/** @type {string} */authTuple[0]),
97
+ // chainId
98
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
99
+ hex.decode(/** @type {string} */authTuple[1]),
100
+ // contractAddress (20 bytes)
101
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
102
+ hex.decode(/** @type {string} */authTuple[2]),
103
+ // nonce
104
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
105
+ hex.decode(/** @type {string} */authTuple[3]),
106
+ // yParity (0 or 1)
107
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
108
+ hex.decode(/** @type {string} */authTuple[4]),
109
+ // r (32 bytes)
110
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
111
+ hex.decode(/** @type {string} */authTuple[5]) // s (32 bytes)
112
+ ];
113
+ });
114
+ return new EthereumTransactionDataEip7702({
115
+ chainId: hex.decode(/** @type {string} */decoded[0]),
116
+ nonce: hex.decode(/** @type {string} */decoded[1]),
117
+ maxPriorityGas: hex.decode(/** @type {string} */decoded[2]),
118
+ maxGas: hex.decode(/** @type {string} */decoded[3]),
119
+ gasLimit: hex.decode(/** @type {string} */decoded[4]),
120
+ to: hex.decode(/** @type {string} */decoded[5]),
121
+ value: hex.decode(/** @type {string} */decoded[6]),
122
+ callData: hex.decode(/** @type {string} */decoded[7]),
123
+ // @ts-ignore
124
+ accessList: /** @type {string[]} */decoded[8].map(v => hex.decode(v)),
125
+ // @ts-ignore
126
+ authorizationList: authorizationList,
127
+ recId: hex.decode(/** @type {string} */decoded[10]),
128
+ r: hex.decode(/** @type {string} */decoded[11]),
129
+ s: hex.decode(/** @type {string} */decoded[12])
130
+ });
131
+ }
132
+
133
+ /**
134
+ * @returns {Uint8Array}
135
+ */
136
+ toBytes() {
137
+ const encoded = rlp.encode([this.chainId, this.nonce, this.maxPriorityGas, this.maxGas, this.gasLimit, this.to, this.value, this.callData, this.accessList, this.authorizationList, this.recId, this.r, this.s]);
138
+ return hex.decode("04" + encoded.substring(2));
139
+ }
140
+
141
+ /**
142
+ * @returns {string}
143
+ */
144
+ toString() {
145
+ return JSON.stringify(this.toJSON(), null, 2);
146
+ }
147
+
148
+ /**
149
+ * @returns {EthereumTransactionDataEip7702JSON}
150
+ */
151
+ toJSON() {
152
+ return {
153
+ chainId: hex.encode(this.chainId),
154
+ nonce: hex.encode(this.nonce),
155
+ maxPriorityGas: hex.encode(this.maxPriorityGas),
156
+ maxGas: hex.encode(this.maxGas),
157
+ gasLimit: hex.encode(this.gasLimit),
158
+ to: hex.encode(this.to),
159
+ value: hex.encode(this.value),
160
+ callData: hex.encode(this.callData),
161
+ authorizationList: this.authorizationList.map(([chainId, contractAddress, nonce, yParity, r, s]) => [hex.encode(chainId), hex.encode(contractAddress), hex.encode(nonce), hex.encode(yParity), hex.encode(r), hex.encode(s)]),
162
+ accessList: this.accessList.map(v => hex.encode(v)),
163
+ recId: hex.encode(this.recId),
164
+ r: hex.encode(this.r),
165
+ s: hex.encode(this.s)
166
+ };
167
+ }
168
+ }
169
+ exports.default = EthereumTransactionDataEip7702;
170
+ _Cache.default.setEthereumTransactionDataEip7702FromBytes(bytes => EthereumTransactionDataEip7702.fromBytes(bytes));
@@ -0,0 +1,71 @@
1
+ /**
2
+ * @typedef {object} EthereumTransactionDataEip7702JSON
3
+ * @property {string} chainId
4
+ * @property {string} nonce
5
+ * @property {string} maxPriorityGas
6
+ * @property {string} maxGas
7
+ * @property {string} gasLimit
8
+ * @property {string} to
9
+ * @property {string} value
10
+ * @property {string} callData
11
+ * @property {Array<[string, string, string, string, string, string]>} authorizationList - Array of [chainId, contractAddress, nonce, yParity, r, s] tuples
12
+ * @property {string[]} accessList
13
+ * @property {string} recId
14
+ * @property {string} r
15
+ * @property {string} s
16
+ */
17
+ export default class EthereumTransactionDataEip7702 extends EthereumTransactionData {
18
+ /**
19
+ * @private
20
+ * @param {object} props
21
+ * @param {Uint8Array} props.chainId
22
+ * @param {Uint8Array} props.nonce
23
+ * @param {Uint8Array} props.maxPriorityGas
24
+ * @param {Uint8Array} props.maxGas
25
+ * @param {Uint8Array} props.gasLimit
26
+ * @param {Uint8Array} props.to
27
+ * @param {Uint8Array} props.value
28
+ * @param {Uint8Array} props.callData
29
+ * @param {Array<[Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array]>} props.authorizationList - Array of [chainId, contractAddress, nonce, yParity, r, s] tuples
30
+ * @param {Uint8Array[]} props.accessList
31
+ * @param {Uint8Array} props.recId
32
+ * @param {Uint8Array} props.r
33
+ * @param {Uint8Array} props.s
34
+ */
35
+ private constructor();
36
+ chainId: Uint8Array<ArrayBufferLike>;
37
+ nonce: Uint8Array<ArrayBufferLike>;
38
+ maxPriorityGas: Uint8Array<ArrayBufferLike>;
39
+ maxGas: Uint8Array<ArrayBufferLike>;
40
+ gasLimit: Uint8Array<ArrayBufferLike>;
41
+ to: Uint8Array<ArrayBufferLike>;
42
+ value: Uint8Array<ArrayBufferLike>;
43
+ authorizationList: [Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>][];
44
+ accessList: Uint8Array<ArrayBufferLike>[];
45
+ recId: Uint8Array<ArrayBufferLike>;
46
+ r: Uint8Array<ArrayBufferLike>;
47
+ s: Uint8Array<ArrayBufferLike>;
48
+ /**
49
+ * @returns {EthereumTransactionDataEip7702JSON}
50
+ */
51
+ toJSON(): EthereumTransactionDataEip7702JSON;
52
+ }
53
+ export type EthereumTransactionDataEip7702JSON = {
54
+ chainId: string;
55
+ nonce: string;
56
+ maxPriorityGas: string;
57
+ maxGas: string;
58
+ gasLimit: string;
59
+ to: string;
60
+ value: string;
61
+ callData: string;
62
+ /**
63
+ * - Array of [chainId, contractAddress, nonce, yParity, r, s] tuples
64
+ */
65
+ authorizationList: Array<[string, string, string, string, string, string]>;
66
+ accessList: string[];
67
+ recId: string;
68
+ r: string;
69
+ s: string;
70
+ };
71
+ import EthereumTransactionData from "./EthereumTransactionData.js";
@@ -0,0 +1,2 @@
1
+ import*as t from"@ethersproject/rlp";import{decode as i,encode as s}from"./encoding/hex.js";import a from"./EthereumTransactionData.js";import r from"./Cache.js";class e extends a{constructor(t){super(t),this.chainId=t.chainId,this.nonce=t.nonce,this.maxPriorityGas=t.maxPriorityGas,this.maxGas=t.maxGas,this.gasLimit=t.gasLimit,this.to=t.to,this.value=t.value,this.callData=t.callData,this.authorizationList=t.authorizationList,this.accessList=t.accessList,this.recId=t.recId,this.r=t.r,this.s=t.s}static fromBytes(s){if(0===s.length)throw new Error("empty bytes");const a=t.decode(s.subarray(1));if(!Array.isArray(a))throw new Error("ethereum data is not a list");if(13!==a.length)throw new Error("invalid ethereum transaction data");if(!Array.isArray(a[9]))throw new Error("authorization list must be an array");const r=a[9].map(t=>{if(!Array.isArray(t)||6!==t.length)throw new Error("invalid authorization list entry: must be [chainId, contractAddress, nonce, yParity, r, s]");return[i(t[0]),i(t[1]),i(t[2]),i(t[3]),i(t[4]),i(t[5])]});return new e({chainId:i(a[0]),nonce:i(a[1]),maxPriorityGas:i(a[2]),maxGas:i(a[3]),gasLimit:i(a[4]),to:i(a[5]),value:i(a[6]),callData:i(a[7]),accessList:a[8].map(t=>i(t)),authorizationList:r,recId:i(a[10]),r:i(a[11]),s:i(a[12])})}toBytes(){const s=t.encode([this.chainId,this.nonce,this.maxPriorityGas,this.maxGas,this.gasLimit,this.to,this.value,this.callData,this.accessList,this.authorizationList,this.recId,this.r,this.s]);return i("04"+s.substring(2))}toString(){return JSON.stringify(this.toJSON(),null,2)}toJSON(){return{chainId:s(this.chainId),nonce:s(this.nonce),maxPriorityGas:s(this.maxPriorityGas),maxGas:s(this.maxGas),gasLimit:s(this.gasLimit),to:s(this.to),value:s(this.value),callData:s(this.callData),authorizationList:this.authorizationList.map(([t,i,a,r,e,o])=>[s(t),s(i),s(a),s(r),s(e),s(o)]),accessList:this.accessList.map(t=>s(t)),recId:s(this.recId),r:s(this.r),s:s(this.s)}}}r.setEthereumTransactionDataEip7702FromBytes(t=>e.fromBytes(t));export{e as default};
2
+ //# sourceMappingURL=EthereumTransactionDataEip7702.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EthereumTransactionDataEip7702.js","sources":["../src/EthereumTransactionDataEip7702.js"],"sourcesContent":["import * as rlp from \"@ethersproject/rlp\";\nimport * as hex from \"./encoding/hex.js\";\nimport EthereumTransactionData from \"./EthereumTransactionData.js\";\nimport CACHE from \"./Cache.js\";\n\n/**\n * @typedef {object} EthereumTransactionDataEip7702JSON\n * @property {string} chainId\n * @property {string} nonce\n * @property {string} maxPriorityGas\n * @property {string} maxGas\n * @property {string} gasLimit\n * @property {string} to\n * @property {string} value\n * @property {string} callData\n * @property {Array<[string, string, string, string, string, string]>} authorizationList - Array of [chainId, contractAddress, nonce, yParity, r, s] tuples\n * @property {string[]} accessList\n * @property {string} recId\n * @property {string} r\n * @property {string} s\n */\n\nexport default class EthereumTransactionDataEip7702 extends EthereumTransactionData {\n /**\n * @private\n * @param {object} props\n * @param {Uint8Array} props.chainId\n * @param {Uint8Array} props.nonce\n * @param {Uint8Array} props.maxPriorityGas\n * @param {Uint8Array} props.maxGas\n * @param {Uint8Array} props.gasLimit\n * @param {Uint8Array} props.to\n * @param {Uint8Array} props.value\n * @param {Uint8Array} props.callData\n * @param {Array<[Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array]>} props.authorizationList - Array of [chainId, contractAddress, nonce, yParity, r, s] tuples\n * @param {Uint8Array[]} props.accessList\n * @param {Uint8Array} props.recId\n * @param {Uint8Array} props.r\n * @param {Uint8Array} props.s\n */\n constructor(props) {\n super(props);\n\n this.chainId = props.chainId;\n this.nonce = props.nonce;\n this.maxPriorityGas = props.maxPriorityGas;\n this.maxGas = props.maxGas;\n this.gasLimit = props.gasLimit;\n this.to = props.to;\n this.value = props.value;\n this.callData = props.callData;\n this.authorizationList = props.authorizationList;\n this.accessList = props.accessList;\n this.recId = props.recId;\n this.r = props.r;\n this.s = props.s;\n }\n\n /**\n * @param {Uint8Array} bytes\n * @returns {EthereumTransactionData}\n */\n static fromBytes(bytes) {\n if (bytes.length === 0) {\n throw new Error(\"empty bytes\");\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const decoded = /** @type {string[]} */ (rlp.decode(bytes.subarray(1)));\n\n if (!Array.isArray(decoded)) {\n throw new Error(\"ethereum data is not a list\");\n }\n\n if (decoded.length !== 13) {\n throw new Error(\"invalid ethereum transaction data\");\n }\n\n // Decode authorization list: array of [chainId, contractAddress, nonce, yParity, r, s] tuples\n // Authorization list can be empty (empty array is valid)\n if (!Array.isArray(decoded[9])) {\n throw new Error(\"authorization list must be an array\");\n }\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n const authorizationList = /** @type {string[]} */ (decoded[9]).map(\n (authTuple) => {\n if (!Array.isArray(authTuple) || authTuple.length !== 6) {\n throw new Error(\n \"invalid authorization list entry: must be [chainId, contractAddress, nonce, yParity, r, s]\",\n );\n }\n return [\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n hex.decode(/** @type {string} */ (authTuple[0])), // chainId\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n hex.decode(/** @type {string} */ (authTuple[1])), // contractAddress (20 bytes)\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n hex.decode(/** @type {string} */ (authTuple[2])), // nonce\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n hex.decode(/** @type {string} */ (authTuple[3])), // yParity (0 or 1)\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n hex.decode(/** @type {string} */ (authTuple[4])), // r (32 bytes)\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n hex.decode(/** @type {string} */ (authTuple[5])), // s (32 bytes)\n ];\n },\n );\n\n return new EthereumTransactionDataEip7702({\n chainId: hex.decode(/** @type {string} */ (decoded[0])),\n nonce: hex.decode(/** @type {string} */ (decoded[1])),\n maxPriorityGas: hex.decode(/** @type {string} */ (decoded[2])),\n maxGas: hex.decode(/** @type {string} */ (decoded[3])),\n gasLimit: hex.decode(/** @type {string} */ (decoded[4])),\n to: hex.decode(/** @type {string} */ (decoded[5])),\n value: hex.decode(/** @type {string} */ (decoded[6])),\n callData: hex.decode(/** @type {string} */ (decoded[7])),\n // @ts-ignore\n accessList: /** @type {string[]} */ (decoded[8]).map((v) =>\n hex.decode(v),\n ),\n // @ts-ignore\n authorizationList: authorizationList,\n recId: hex.decode(/** @type {string} */ (decoded[10])),\n r: hex.decode(/** @type {string} */ (decoded[11])),\n s: hex.decode(/** @type {string} */ (decoded[12])),\n });\n }\n\n /**\n * @returns {Uint8Array}\n */\n toBytes() {\n const encoded = rlp.encode([\n this.chainId,\n this.nonce,\n this.maxPriorityGas,\n this.maxGas,\n this.gasLimit,\n this.to,\n this.value,\n this.callData,\n this.accessList,\n this.authorizationList,\n this.recId,\n this.r,\n this.s,\n ]);\n return hex.decode(\"04\" + encoded.substring(2));\n }\n\n /**\n * @returns {string}\n */\n toString() {\n return JSON.stringify(this.toJSON(), null, 2);\n }\n\n /**\n * @returns {EthereumTransactionDataEip7702JSON}\n */\n toJSON() {\n return {\n chainId: hex.encode(this.chainId),\n nonce: hex.encode(this.nonce),\n maxPriorityGas: hex.encode(this.maxPriorityGas),\n maxGas: hex.encode(this.maxGas),\n gasLimit: hex.encode(this.gasLimit),\n to: hex.encode(this.to),\n value: hex.encode(this.value),\n callData: hex.encode(this.callData),\n authorizationList: this.authorizationList.map(\n ([chainId, contractAddress, nonce, yParity, r, s]) => [\n hex.encode(chainId),\n hex.encode(contractAddress),\n hex.encode(nonce),\n hex.encode(yParity),\n hex.encode(r),\n hex.encode(s),\n ],\n ),\n accessList: this.accessList.map((v) => hex.encode(v)),\n recId: hex.encode(this.recId),\n r: hex.encode(this.r),\n s: hex.encode(this.s),\n };\n }\n}\n\nCACHE.setEthereumTransactionDataEip7702FromBytes((bytes) =>\n EthereumTransactionDataEip7702.fromBytes(bytes),\n);\n"],"names":["EthereumTransactionDataEip7702","EthereumTransactionData","constructor","props","super","this","chainId","nonce","maxPriorityGas","maxGas","gasLimit","to","value","callData","authorizationList","accessList","recId","r","s","fromBytes","bytes","length","Error","decoded","rlp","decode","subarray","Array","isArray","map","authTuple","hex.decode","v","toBytes","encoded","encode","substring","toString","JSON","stringify","toJSON","hex.encode","contractAddress","yParity","CACHE","setEthereumTransactionDataEip7702FromBytes"],"mappings":"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"}
package/lib/browser.js CHANGED
@@ -1,2 +1,2 @@
1
- export{NetworkName}from"./exports.js";export{default as Client,default as WebClient}from"./client/WebClient.js";export{default as LocalProvider}from"./LocalProviderWeb.js";export{default as AddressBookQuery}from"./network/AddressBookQueryWeb.js";export{default as Cache}from"./Cache.js";export{default as PrivateKey}from"./PrivateKey.js";export{default as PublicKey}from"./PublicKey.js";export{default as KeyList}from"./KeyList.js";export{default as Key}from"./Key.js";export{default as Mnemonic}from"./Mnemonic.js";export{default as TokenAirdropTransaction}from"./token/TokenAirdropTransaction.js";export{default as TokenClaimAirdropTransaction}from"./token/TokenClaimAirdropTransaction.js";export{default as TokenCancelAirdropTransaction}from"./token/TokenCancelAirdropTransaction.js";export{default as AccountAllowanceAdjustTransaction}from"./account/AccountAllowanceAdjustTransaction.js";export{default as AccountAllowanceApproveTransaction}from"./account/AccountAllowanceApproveTransaction.js";export{default as AccountAllowanceDeleteTransaction}from"./account/AccountAllowanceDeleteTransaction.js";export{default as AccountBalance}from"./account/AccountBalance.js";export{default as AccountBalanceQuery}from"./account/AccountBalanceQuery.js";export{default as AccountCreateTransaction}from"./account/AccountCreateTransaction.js";export{default as AccountDeleteTransaction}from"./account/AccountDeleteTransaction.js";export{default as AccountId}from"./account/AccountId.js";export{default as AccountInfo}from"./account/AccountInfo.js";export{default as AccountInfoFlow}from"./account/AccountInfoFlow.js";export{default as AccountInfoQuery}from"./account/AccountInfoQuery.js";export{default as AccountRecordsQuery}from"./account/AccountRecordsQuery.js";export{default as AccountUpdateTransaction}from"./account/AccountUpdateTransaction.js";export{default as AssessedCustomFee}from"./token/AssessedCustomFee.js";export{default as BatchTransaction}from"./transaction/BatchTransaction.js";export{default as ContractByteCodeQuery}from"./contract/ContractByteCodeQuery.js";export{default as ContractCallQuery}from"./contract/ContractCallQuery.js";export{default as ContractCreateFlow}from"./contract/ContractCreateFlow.js";export{default as ContractCreateTransaction}from"./contract/ContractCreateTransaction.js";export{default as ContractDeleteTransaction}from"./contract/ContractDeleteTransaction.js";export{default as ContractExecuteTransaction}from"./contract/ContractExecuteTransaction.js";export{default as ContractFunctionParameters}from"./contract/ContractFunctionParameters.js";export{default as ContractFunctionResult}from"./contract/ContractFunctionResult.js";export{default as ContractFunctionSelector}from"./contract/ContractFunctionSelector.js";export{default as ContractId}from"./contract/ContractId.js";export{default as ContractInfo}from"./contract/ContractInfo.js";export{default as ContractInfoQuery}from"./contract/ContractInfoQuery.js";export{default as ContractLogInfo}from"./contract/ContractLogInfo.js";export{default as ContractNonceInfo}from"./contract/ContractNonceInfo.js";export{default as ContractUpdateTransaction}from"./contract/ContractUpdateTransaction.js";export{default as CustomFee}from"./token/CustomFee.js";export{default as CustomFixedFee}from"./token/CustomFixedFee.js";export{default as CustomFractionalFee}from"./token/CustomFractionalFee.js";export{default as CustomRoyaltyFee}from"./token/CustomRoyaltyFee.js";export{default as DelegateContractId}from"./contract/DelegateContractId.js";export{default as EthereumTransaction}from"./EthereumTransaction.js";export{default as EthereumTransactionDataLegacy}from"./EthereumTransactionDataLegacy.js";export{default as EthereumTransactionDataEip1559}from"./EthereumTransactionDataEip1559.js";export{default as EthereumTransactionDataEip2930}from"./EthereumTransactionDataEip2930.js";export{default as EthereumTransactionData}from"./EthereumTransactionData.js";export{default as EthereumFlow}from"./EthereumFlow.js";export{default as EvmAddress}from"./EvmAddress.js";export{default as ExchangeRate}from"./ExchangeRate.js";export{default as ExchangeRates}from"./ExchangeRates.js";export{default as Executable}from"./Executable.js";export{default as FeeAssessmentMethod}from"./token/FeeAssessmentMethod.js";export{default as FeeComponents}from"./FeeComponents.js";export{default as FeeData}from"./FeeData.js";export{default as FeeDataType}from"./FeeDataType.js";export{default as FeeSchedule}from"./FeeSchedule.js";export{default as FeeSchedules}from"./FeeSchedules.js";export{default as FileAppendTransaction}from"./file/FileAppendTransaction.js";export{default as FileContentsQuery}from"./file/FileContentsQuery.js";export{default as FileCreateTransaction}from"./file/FileCreateTransaction.js";export{default as FileDeleteTransaction}from"./file/FileDeleteTransaction.js";export{default as FileId}from"./file/FileId.js";export{default as FileInfo}from"./file/FileInfo.js";export{default as FileInfoQuery}from"./file/FileInfoQuery.js";export{default as FileUpdateTransaction}from"./file/FileUpdateTransaction.js";export{default as FreezeTransaction}from"./system/FreezeTransaction.js";export{default as Hbar}from"./Hbar.js";export{default as HbarAllowance}from"./account/HbarAllowance.js";export{default as HbarUnit}from"./HbarUnit.js";export{default as LiveHash}from"./account/LiveHash.js";export{default as LiveHashAddTransaction}from"./account/LiveHashAddTransaction.js";export{default as LiveHashDeleteTransaction}from"./account/LiveHashDeleteTransaction.js";export{default as LiveHashQuery}from"./account/LiveHashQuery.js";export{default as MaxQueryPaymentExceeded}from"./MaxQueryPaymentExceeded.js";export{default as MirrorNodeContractCallQuery}from"./query/MirrorNodeContractCallQuery.js";export{default as MirrorNodeContractEstimateQuery}from"./query/MirrorNodeContractEstimateQuery.js";export{default as NodeAddressBook}from"./address_book/NodeAddressBook.js";export{default as NetworkVersionInfo}from"./network/NetworkVersionInfo.js";export{default as NetworkVersionInfoQuery}from"./network/NetworkVersionInfoQuery.js";export{default as NftId}from"./token/NftId.js";export{default as PendingAirdropId}from"./token/PendingAirdropId.js";export{default as PrngTransaction}from"./PrngTransaction.js";export{default as ProxyStaker}from"./account/ProxyStaker.js";export{default as Query}from"./query/Query.js";export{default as RequestType}from"./RequestType.js";export{default as ScheduleCreateTransaction}from"./schedule/ScheduleCreateTransaction.js";export{default as ScheduleDeleteTransaction}from"./schedule/ScheduleDeleteTransaction.js";export{default as ScheduleId}from"./schedule/ScheduleId.js";export{default as ScheduleInfo}from"./schedule/ScheduleInfo.js";export{default as ScheduleInfoQuery}from"./schedule/ScheduleInfoQuery.js";export{default as ScheduleSignTransaction}from"./schedule/ScheduleSignTransaction.js";export{default as SemanticVersion}from"./network/SemanticVersion.js";export{default as SignatureMap}from"./transaction/SignatureMap.js";export{default as SignerSignature}from"./SignerSignature.js";export{default as Status}from"./Status.js";export{default as SubscriptionHandle}from"./topic/SubscriptionHandle.js";export{default as SystemDeleteTransaction}from"./system/SystemDeleteTransaction.js";export{default as SystemUndeleteTransaction}from"./system/SystemUndeleteTransaction.js";export{default as Timestamp}from"./Timestamp.js";export{default as TokenAllowance}from"./account/TokenAllowance.js";export{default as TokenAssociateTransaction}from"./token/TokenAssociateTransaction.js";export{default as TokenBurnTransaction}from"./token/TokenBurnTransaction.js";export{default as TokenRejectTransaction}from"./token/TokenRejectTransaction.js";export{default as TokenRejectFlow}from"./token/TokenRejectFlow.js";export{default as TokenCreateTransaction}from"./token/TokenCreateTransaction.js";export{default as TokenDeleteTransaction}from"./token/TokenDeleteTransaction.js";export{default as TokenDissociateTransaction}from"./token/TokenDissociateTransaction.js";export{default as TokenFeeScheduleUpdateTransaction}from"./token/TokenFeeScheduleUpdateTransaction.js";export{default as TokenFreezeTransaction}from"./token/TokenFreezeTransaction.js";export{default as TokenGrantKycTransaction}from"./token/TokenGrantKycTransaction.js";export{default as TokenId}from"./token/TokenId.js";export{default as TokenInfo}from"./token/TokenInfo.js";export{default as TokenInfoQuery}from"./token/TokenInfoQuery.js";export{default as TokenMintTransaction}from"./token/TokenMintTransaction.js";export{default as TokenNftAllowance}from"./account/TokenNftAllowance.js";export{default as TokenNftInfo}from"./token/TokenNftInfo.js";export{default as TokenNftInfoQuery}from"./token/TokenNftInfoQuery.js";export{default as TokenPauseTransaction}from"./token/TokenPauseTransaction.js";export{default as TokenRevokeKycTransaction}from"./token/TokenRevokeKycTransaction.js";export{default as TokenSupplyType}from"./token/TokenSupplyType.js";export{default as TokenType}from"./token/TokenType.js";export{default as TokenUnfreezeTransaction}from"./token/TokenUnfreezeTransaction.js";export{default as TokenUnpauseTransaction}from"./token/TokenUnpauseTransaction.js";export{default as TokenUpdateTransaction}from"./token/TokenUpdateTransaction.js";export{default as TokenWipeTransaction}from"./token/TokenWipeTransaction.js";export{default as TopicCreateTransaction}from"./topic/TopicCreateTransaction.js";export{default as TopicDeleteTransaction}from"./topic/TopicDeleteTransaction.js";export{default as TopicId}from"./topic/TopicId.js";export{default as TopicInfo}from"./topic/TopicInfo.js";export{default as TopicInfoQuery}from"./topic/TopicInfoQuery.js";export{default as TopicMessage}from"./topic/TopicMessage.js";export{default as TopicMessageChunk}from"./topic/TopicMessageChunk.js";export{default as TopicMessageQuery}from"./topic/TopicMessageQuery.js";export{default as TopicMessageSubmitTransaction}from"./topic/TopicMessageSubmitTransaction.js";export{default as TopicUpdateTransaction}from"./topic/TopicUpdateTransaction.js";export{default as CustomFeeLimit}from"./transaction/CustomFeeLimit.js";export{default as Transaction}from"./transaction/Transaction.js";export{default as TransactionFeeSchedule}from"./TransactionFeeSchedule.js";export{default as TransactionId}from"./transaction/TransactionId.js";export{default as TransactionReceipt}from"./transaction/TransactionReceipt.js";export{default as TransactionReceiptQuery}from"./transaction/TransactionReceiptQuery.js";export{default as TransactionRecord}from"./transaction/TransactionRecord.js";export{default as TransactionRecordQuery}from"./transaction/TransactionRecordQuery.js";export{default as TransactionResponse}from"./transaction/TransactionResponse.js";export{default as Transfer}from"./Transfer.js";export{default as TransferTransaction}from"./account/TransferTransaction.js";export{default as Wallet}from"./Wallet.js";export{default as Logger}from"./logger/Logger.js";export{default as LogLevel}from"./logger/LogLevel.js";export{default as FreezeType}from"./FreezeType.js";export{default as TokenKeyValidation}from"./token/TokenKeyValidation.js";export{default as StatusError}from"./StatusError.js";export{default as MaxAttemptsOrTimeoutError}from"./MaxAttemptsOrTimeoutError.js";export{default as PrecheckStatusError}from"./PrecheckStatusError.js";export{default as ReceiptStatusError}from"./ReceiptStatusError.js";export{default as LedgerId}from"./LedgerId.js";export{default as TokenUpdateNftsTransaction}from"./token/TokenUpdateNftsTransaction.js";export{default as NodeCreateTransaction}from"./node/NodeCreateTransaction.js";export{default as ServiceEndpoint}from"./node/ServiceEndpoint.js";export{default as NodeDeleteTransaction}from"./node/NodeDeleteTransaction.js";export{default as NodeUpdateTransaction}from"./node/NodeUpdateTransaction.js";export{BadKeyError,BadMnemonicError,BadMnemonicReason,HEDERA_PATH,SLIP44_ECDSA_ETH_PATH,SLIP44_ECDSA_HEDERA_PATH}from"@hiero-ledger/cryptography";export{default as Provider}from"./Provider.js";export{default as Signer}from"./Signer.js";export{default as Long}from"long";import*as e from"./EntityIdHelper.js";export{e as EntityIdHelper};
1
+ export{NetworkName}from"./exports.js";export{default as Client,default as WebClient}from"./client/WebClient.js";export{default as LocalProvider}from"./LocalProviderWeb.js";export{default as AddressBookQuery}from"./network/AddressBookQueryWeb.js";export{default as Cache}from"./Cache.js";export{default as PrivateKey}from"./PrivateKey.js";export{default as PublicKey}from"./PublicKey.js";export{default as KeyList}from"./KeyList.js";export{default as Key}from"./Key.js";export{default as Mnemonic}from"./Mnemonic.js";export{default as TokenAirdropTransaction}from"./token/TokenAirdropTransaction.js";export{default as TokenClaimAirdropTransaction}from"./token/TokenClaimAirdropTransaction.js";export{default as TokenCancelAirdropTransaction}from"./token/TokenCancelAirdropTransaction.js";export{default as AccountAllowanceAdjustTransaction}from"./account/AccountAllowanceAdjustTransaction.js";export{default as AccountAllowanceApproveTransaction}from"./account/AccountAllowanceApproveTransaction.js";export{default as AccountAllowanceDeleteTransaction}from"./account/AccountAllowanceDeleteTransaction.js";export{default as AccountBalance}from"./account/AccountBalance.js";export{default as AccountBalanceQuery}from"./account/AccountBalanceQuery.js";export{default as AccountCreateTransaction}from"./account/AccountCreateTransaction.js";export{default as AccountDeleteTransaction}from"./account/AccountDeleteTransaction.js";export{default as AccountId}from"./account/AccountId.js";export{default as AccountInfo}from"./account/AccountInfo.js";export{default as AccountInfoFlow}from"./account/AccountInfoFlow.js";export{default as AccountInfoQuery}from"./account/AccountInfoQuery.js";export{default as AccountRecordsQuery}from"./account/AccountRecordsQuery.js";export{default as AccountUpdateTransaction}from"./account/AccountUpdateTransaction.js";export{default as AssessedCustomFee}from"./token/AssessedCustomFee.js";export{default as BatchTransaction}from"./transaction/BatchTransaction.js";export{default as ContractByteCodeQuery}from"./contract/ContractByteCodeQuery.js";export{default as ContractCallQuery}from"./contract/ContractCallQuery.js";export{default as ContractCreateFlow}from"./contract/ContractCreateFlow.js";export{default as ContractCreateTransaction}from"./contract/ContractCreateTransaction.js";export{default as ContractDeleteTransaction}from"./contract/ContractDeleteTransaction.js";export{default as ContractExecuteTransaction}from"./contract/ContractExecuteTransaction.js";export{default as ContractFunctionParameters}from"./contract/ContractFunctionParameters.js";export{default as ContractFunctionResult}from"./contract/ContractFunctionResult.js";export{default as ContractFunctionSelector}from"./contract/ContractFunctionSelector.js";export{default as ContractId}from"./contract/ContractId.js";export{default as ContractInfo}from"./contract/ContractInfo.js";export{default as ContractInfoQuery}from"./contract/ContractInfoQuery.js";export{default as ContractLogInfo}from"./contract/ContractLogInfo.js";export{default as ContractNonceInfo}from"./contract/ContractNonceInfo.js";export{default as ContractUpdateTransaction}from"./contract/ContractUpdateTransaction.js";export{default as CustomFee}from"./token/CustomFee.js";export{default as CustomFixedFee}from"./token/CustomFixedFee.js";export{default as CustomFractionalFee}from"./token/CustomFractionalFee.js";export{default as CustomRoyaltyFee}from"./token/CustomRoyaltyFee.js";export{default as DelegateContractId}from"./contract/DelegateContractId.js";export{default as EthereumTransaction}from"./EthereumTransaction.js";export{default as EthereumTransactionDataLegacy}from"./EthereumTransactionDataLegacy.js";export{default as EthereumTransactionDataEip1559}from"./EthereumTransactionDataEip1559.js";export{default as EthereumTransactionDataEip2930}from"./EthereumTransactionDataEip2930.js";export{default as EthereumTransactionDataEip7702}from"./EthereumTransactionDataEip7702.js";export{default as EthereumTransactionData}from"./EthereumTransactionData.js";export{default as EthereumFlow}from"./EthereumFlow.js";export{default as EvmAddress}from"./EvmAddress.js";export{default as ExchangeRate}from"./ExchangeRate.js";export{default as ExchangeRates}from"./ExchangeRates.js";export{default as Executable}from"./Executable.js";export{default as FeeAssessmentMethod}from"./token/FeeAssessmentMethod.js";export{default as FeeComponents}from"./FeeComponents.js";export{default as FeeData}from"./FeeData.js";export{default as FeeDataType}from"./FeeDataType.js";export{default as FeeSchedule}from"./FeeSchedule.js";export{default as FeeSchedules}from"./FeeSchedules.js";export{default as FileAppendTransaction}from"./file/FileAppendTransaction.js";export{default as FileContentsQuery}from"./file/FileContentsQuery.js";export{default as FileCreateTransaction}from"./file/FileCreateTransaction.js";export{default as FileDeleteTransaction}from"./file/FileDeleteTransaction.js";export{default as FileId}from"./file/FileId.js";export{default as FileInfo}from"./file/FileInfo.js";export{default as FileInfoQuery}from"./file/FileInfoQuery.js";export{default as FileUpdateTransaction}from"./file/FileUpdateTransaction.js";export{default as FreezeTransaction}from"./system/FreezeTransaction.js";export{default as Hbar}from"./Hbar.js";export{default as HbarAllowance}from"./account/HbarAllowance.js";export{default as HbarUnit}from"./HbarUnit.js";export{default as LiveHash}from"./account/LiveHash.js";export{default as LiveHashAddTransaction}from"./account/LiveHashAddTransaction.js";export{default as LiveHashDeleteTransaction}from"./account/LiveHashDeleteTransaction.js";export{default as LiveHashQuery}from"./account/LiveHashQuery.js";export{default as MaxQueryPaymentExceeded}from"./MaxQueryPaymentExceeded.js";export{default as MirrorNodeContractCallQuery}from"./query/MirrorNodeContractCallQuery.js";export{default as MirrorNodeContractEstimateQuery}from"./query/MirrorNodeContractEstimateQuery.js";export{default as NodeAddressBook}from"./address_book/NodeAddressBook.js";export{default as NetworkVersionInfo}from"./network/NetworkVersionInfo.js";export{default as NetworkVersionInfoQuery}from"./network/NetworkVersionInfoQuery.js";export{default as NftId}from"./token/NftId.js";export{default as PendingAirdropId}from"./token/PendingAirdropId.js";export{default as PrngTransaction}from"./PrngTransaction.js";export{default as ProxyStaker}from"./account/ProxyStaker.js";export{default as Query}from"./query/Query.js";export{default as RequestType}from"./RequestType.js";export{default as ScheduleCreateTransaction}from"./schedule/ScheduleCreateTransaction.js";export{default as ScheduleDeleteTransaction}from"./schedule/ScheduleDeleteTransaction.js";export{default as ScheduleId}from"./schedule/ScheduleId.js";export{default as ScheduleInfo}from"./schedule/ScheduleInfo.js";export{default as ScheduleInfoQuery}from"./schedule/ScheduleInfoQuery.js";export{default as ScheduleSignTransaction}from"./schedule/ScheduleSignTransaction.js";export{default as SemanticVersion}from"./network/SemanticVersion.js";export{default as SignatureMap}from"./transaction/SignatureMap.js";export{default as SignerSignature}from"./SignerSignature.js";export{default as Status}from"./Status.js";export{default as SubscriptionHandle}from"./topic/SubscriptionHandle.js";export{default as SystemDeleteTransaction}from"./system/SystemDeleteTransaction.js";export{default as SystemUndeleteTransaction}from"./system/SystemUndeleteTransaction.js";export{default as Timestamp}from"./Timestamp.js";export{default as TokenAllowance}from"./account/TokenAllowance.js";export{default as TokenAssociateTransaction}from"./token/TokenAssociateTransaction.js";export{default as TokenBurnTransaction}from"./token/TokenBurnTransaction.js";export{default as TokenRejectTransaction}from"./token/TokenRejectTransaction.js";export{default as TokenRejectFlow}from"./token/TokenRejectFlow.js";export{default as TokenCreateTransaction}from"./token/TokenCreateTransaction.js";export{default as TokenDeleteTransaction}from"./token/TokenDeleteTransaction.js";export{default as TokenDissociateTransaction}from"./token/TokenDissociateTransaction.js";export{default as TokenFeeScheduleUpdateTransaction}from"./token/TokenFeeScheduleUpdateTransaction.js";export{default as TokenFreezeTransaction}from"./token/TokenFreezeTransaction.js";export{default as TokenGrantKycTransaction}from"./token/TokenGrantKycTransaction.js";export{default as TokenId}from"./token/TokenId.js";export{default as TokenInfo}from"./token/TokenInfo.js";export{default as TokenInfoQuery}from"./token/TokenInfoQuery.js";export{default as TokenMintTransaction}from"./token/TokenMintTransaction.js";export{default as TokenNftAllowance}from"./account/TokenNftAllowance.js";export{default as TokenNftInfo}from"./token/TokenNftInfo.js";export{default as TokenNftInfoQuery}from"./token/TokenNftInfoQuery.js";export{default as TokenPauseTransaction}from"./token/TokenPauseTransaction.js";export{default as TokenRevokeKycTransaction}from"./token/TokenRevokeKycTransaction.js";export{default as TokenSupplyType}from"./token/TokenSupplyType.js";export{default as TokenType}from"./token/TokenType.js";export{default as TokenUnfreezeTransaction}from"./token/TokenUnfreezeTransaction.js";export{default as TokenUnpauseTransaction}from"./token/TokenUnpauseTransaction.js";export{default as TokenUpdateTransaction}from"./token/TokenUpdateTransaction.js";export{default as TokenWipeTransaction}from"./token/TokenWipeTransaction.js";export{default as TopicCreateTransaction}from"./topic/TopicCreateTransaction.js";export{default as TopicDeleteTransaction}from"./topic/TopicDeleteTransaction.js";export{default as TopicId}from"./topic/TopicId.js";export{default as TopicInfo}from"./topic/TopicInfo.js";export{default as TopicInfoQuery}from"./topic/TopicInfoQuery.js";export{default as TopicMessage}from"./topic/TopicMessage.js";export{default as TopicMessageChunk}from"./topic/TopicMessageChunk.js";export{default as TopicMessageQuery}from"./topic/TopicMessageQuery.js";export{default as TopicMessageSubmitTransaction}from"./topic/TopicMessageSubmitTransaction.js";export{default as TopicUpdateTransaction}from"./topic/TopicUpdateTransaction.js";export{default as CustomFeeLimit}from"./transaction/CustomFeeLimit.js";export{default as Transaction}from"./transaction/Transaction.js";export{default as TransactionFeeSchedule}from"./TransactionFeeSchedule.js";export{default as TransactionId}from"./transaction/TransactionId.js";export{default as TransactionReceipt}from"./transaction/TransactionReceipt.js";export{default as TransactionReceiptQuery}from"./transaction/TransactionReceiptQuery.js";export{default as TransactionRecord}from"./transaction/TransactionRecord.js";export{default as TransactionRecordQuery}from"./transaction/TransactionRecordQuery.js";export{default as TransactionResponse}from"./transaction/TransactionResponse.js";export{default as Transfer}from"./Transfer.js";export{default as TransferTransaction}from"./account/TransferTransaction.js";export{default as Wallet}from"./Wallet.js";export{default as Logger}from"./logger/Logger.js";export{default as LogLevel}from"./logger/LogLevel.js";export{default as FreezeType}from"./FreezeType.js";export{default as TokenKeyValidation}from"./token/TokenKeyValidation.js";export{default as StatusError}from"./StatusError.js";export{default as MaxAttemptsOrTimeoutError}from"./MaxAttemptsOrTimeoutError.js";export{default as PrecheckStatusError}from"./PrecheckStatusError.js";export{default as ReceiptStatusError}from"./ReceiptStatusError.js";export{default as LedgerId}from"./LedgerId.js";export{default as TokenUpdateNftsTransaction}from"./token/TokenUpdateNftsTransaction.js";export{default as NodeCreateTransaction}from"./node/NodeCreateTransaction.js";export{default as ServiceEndpoint}from"./node/ServiceEndpoint.js";export{default as NodeDeleteTransaction}from"./node/NodeDeleteTransaction.js";export{default as NodeUpdateTransaction}from"./node/NodeUpdateTransaction.js";export{BadKeyError,BadMnemonicError,BadMnemonicReason,HEDERA_PATH,SLIP44_ECDSA_ETH_PATH,SLIP44_ECDSA_HEDERA_PATH}from"@hiero-ledger/cryptography";export{default as Provider}from"./Provider.js";export{default as Signer}from"./Signer.js";export{default as Long}from"long";import*as e from"./EntityIdHelper.js";export{e as EntityIdHelper};
2
2
  //# sourceMappingURL=browser.js.map