@secondlayer/stacks 6.1.0 → 6.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/dist/shared/stacks-esm-0pc6tmf0.js +50 -0
  2. package/dist/shared/{stacks-esm-743jfh10.js.map → stacks-esm-0pc6tmf0.js.map} +2 -2
  3. package/dist/shared/{stacks-esm-0rdxcta7.js → stacks-esm-16d82wyc.js} +10 -10
  4. package/dist/shared/{stacks-esm-0rdxcta7.js.map → stacks-esm-16d82wyc.js.map} +2 -2
  5. package/dist/shared/{stacks-esm-cvhazvhd.js → stacks-esm-7a0ehykf.js} +43 -43
  6. package/dist/shared/{stacks-esm-cvhazvhd.js.map → stacks-esm-7a0ehykf.js.map} +2 -2
  7. package/dist/shared/{stacks-esm-1jae0a3r.js → stacks-esm-7v18h5dk.js} +4 -4
  8. package/dist/shared/{stacks-esm-1jae0a3r.js.map → stacks-esm-7v18h5dk.js.map} +2 -2
  9. package/dist/shared/{stacks-esm-9rnx0zxr.js → stacks-esm-8f5catbf.js} +126 -126
  10. package/dist/shared/{stacks-esm-9rnx0zxr.js.map → stacks-esm-8f5catbf.js.map} +2 -2
  11. package/dist/shared/{stacks-esm-7fpqgtyx.js → stacks-esm-8jt6k8p3.js} +13 -13
  12. package/dist/shared/{stacks-esm-7fpqgtyx.js.map → stacks-esm-8jt6k8p3.js.map} +2 -2
  13. package/dist/shared/{stacks-esm-hr7fpxtj.js → stacks-esm-a20wyky3.js} +92 -92
  14. package/dist/shared/{stacks-esm-hr7fpxtj.js.map → stacks-esm-a20wyky3.js.map} +2 -2
  15. package/dist/shared/{stacks-esm-3pv5avgr.js → stacks-esm-b54n1jdx.js} +54 -54
  16. package/dist/shared/{stacks-esm-3pv5avgr.js.map → stacks-esm-b54n1jdx.js.map} +2 -2
  17. package/dist/shared/{stacks-esm-r9q4wnyw.js → stacks-esm-cmtj5vky.js} +162 -162
  18. package/dist/shared/{stacks-esm-r9q4wnyw.js.map → stacks-esm-cmtj5vky.js.map} +2 -2
  19. package/dist/shared/{stacks-esm-wv67m4g6.js → stacks-esm-e2qhfgke.js} +36 -36
  20. package/dist/shared/{stacks-esm-wv67m4g6.js.map → stacks-esm-e2qhfgke.js.map} +2 -2
  21. package/dist/shared/{stacks-esm-qk0p9fr6.js → stacks-esm-ea4m4bk7.js} +117 -117
  22. package/dist/shared/{stacks-esm-qk0p9fr6.js.map → stacks-esm-ea4m4bk7.js.map} +2 -2
  23. package/dist/shared/{stacks-esm-fcfdn2zx.js → stacks-esm-hkw1kvd4.js} +140 -140
  24. package/dist/shared/{stacks-esm-fcfdn2zx.js.map → stacks-esm-hkw1kvd4.js.map} +2 -2
  25. package/dist/shared/{stacks-esm-qkj67g80.js → stacks-esm-k108pemv.js} +4 -4
  26. package/dist/shared/{stacks-esm-qkj67g80.js.map → stacks-esm-k108pemv.js.map} +2 -2
  27. package/dist/shared/stacks-esm-kbz5s6v8.js +84 -0
  28. package/dist/shared/{stacks-esm-2mc7ebrm.js.map → stacks-esm-kbz5s6v8.js.map} +2 -2
  29. package/dist/shared/{stacks-esm-n53kvwmt.js → stacks-esm-mt1thm7k.js} +9 -9
  30. package/dist/shared/{stacks-esm-n53kvwmt.js.map → stacks-esm-mt1thm7k.js.map} +2 -2
  31. package/dist/shared/{stacks-esm-v45990hx.js → stacks-esm-n1mekwnb.js} +9 -9
  32. package/dist/shared/{stacks-esm-v45990hx.js.map → stacks-esm-n1mekwnb.js.map} +2 -2
  33. package/dist/shared/{stacks-esm-r6dejrgr.js → stacks-esm-nt5hf8ht.js} +34 -34
  34. package/dist/shared/{stacks-esm-r6dejrgr.js.map → stacks-esm-nt5hf8ht.js.map} +2 -2
  35. package/dist/shared/{stacks-esm-skmcf5n2.js → stacks-esm-phgy8yqf.js} +210 -210
  36. package/dist/shared/{stacks-esm-skmcf5n2.js.map → stacks-esm-phgy8yqf.js.map} +2 -2
  37. package/dist/shared/{stacks-esm-kds4n82p.js → stacks-esm-pxv6ny92.js} +116 -116
  38. package/dist/shared/{stacks-esm-kds4n82p.js.map → stacks-esm-pxv6ny92.js.map} +2 -2
  39. package/dist/shared/{stacks-esm-3g33bqsm.js → stacks-esm-qfzxhdqz.js} +19 -19
  40. package/dist/shared/{stacks-esm-3g33bqsm.js.map → stacks-esm-qfzxhdqz.js.map} +2 -2
  41. package/dist/shared/{stacks-esm-aw2mj3sj.js → stacks-esm-snj9s2q8.js} +43 -43
  42. package/dist/shared/{stacks-esm-aw2mj3sj.js.map → stacks-esm-snj9s2q8.js.map} +2 -2
  43. package/dist/shared/{stacks-esm-q19a17fd.js → stacks-esm-ss9ap75h.js} +28 -28
  44. package/dist/shared/{stacks-esm-q19a17fd.js.map → stacks-esm-ss9ap75h.js.map} +2 -2
  45. package/dist/shared/{stacks-esm-x1r01353.js → stacks-esm-t88hc019.js} +18 -18
  46. package/dist/shared/{stacks-esm-x1r01353.js.map → stacks-esm-t88hc019.js.map} +2 -2
  47. package/dist/shared/stacks-esm-tdrdye4y.js +48 -0
  48. package/dist/shared/{stacks-esm-pxhfqfff.js.map → stacks-esm-tdrdye4y.js.map} +2 -2
  49. package/dist/src/accounts/index.cjs +15 -13
  50. package/dist/src/accounts/index.cjs.map +2 -2
  51. package/dist/src/accounts/index.d.cts +1 -1
  52. package/dist/src/accounts/index.d.ts +1 -1
  53. package/dist/src/accounts/index.js +26 -26
  54. package/dist/src/accounts/index.js.map +2 -2
  55. package/dist/src/actions/index.cjs +83 -81
  56. package/dist/src/actions/index.cjs.map +2 -2
  57. package/dist/src/actions/index.d.cts +1 -1
  58. package/dist/src/actions/index.d.ts +1 -1
  59. package/dist/src/actions/index.js +102 -103
  60. package/dist/src/actions/index.js.map +1 -1
  61. package/dist/src/bitcoin/index.cjs +2035 -2036
  62. package/dist/src/bitcoin/index.cjs.map +8 -8
  63. package/dist/src/bitcoin/index.d.cts +92 -92
  64. package/dist/src/bitcoin/index.d.ts +92 -92
  65. package/dist/src/bitcoin/index.js +88 -90
  66. package/dist/src/bitcoin/index.js.map +2 -2
  67. package/dist/src/bns/index.cjs +3313 -3310
  68. package/dist/src/bns/index.cjs.map +13 -13
  69. package/dist/src/bns/index.d.cts +1 -1
  70. package/dist/src/bns/index.d.ts +1 -1
  71. package/dist/src/bns/index.js +39 -41
  72. package/dist/src/bns/index.js.map +2 -2
  73. package/dist/src/chains/index.cjs +14 -12
  74. package/dist/src/chains/index.cjs.map +2 -2
  75. package/dist/src/chains/index.d.cts +1 -1
  76. package/dist/src/chains/index.d.ts +1 -1
  77. package/dist/src/chains/index.js +12 -12
  78. package/dist/src/chains/index.js.map +1 -1
  79. package/dist/src/clarity/index.cjs +98 -96
  80. package/dist/src/clarity/index.cjs.map +2 -2
  81. package/dist/src/clarity/index.d.cts +1 -1
  82. package/dist/src/clarity/index.d.ts +1 -1
  83. package/dist/src/clarity/index.js +170 -171
  84. package/dist/src/clarity/index.js.map +1 -1
  85. package/dist/src/connect/index.cjs +27 -20
  86. package/dist/src/connect/index.cjs.map +3 -3
  87. package/dist/src/connect/index.d.cts +1 -1
  88. package/dist/src/connect/index.d.ts +1 -1
  89. package/dist/src/connect/index.js +27 -20
  90. package/dist/src/connect/index.js.map +3 -3
  91. package/dist/src/connect/walletconnect/index.cjs +6 -46
  92. package/dist/src/connect/walletconnect/index.cjs.map +3 -4
  93. package/dist/src/connect/walletconnect/index.d.cts +1 -1
  94. package/dist/src/connect/walletconnect/index.d.ts +1 -1
  95. package/dist/src/connect/walletconnect/index.js +6 -46
  96. package/dist/src/connect/walletconnect/index.js.map +3 -4
  97. package/dist/src/filters/index.cjs +22 -20
  98. package/dist/src/filters/index.cjs.map +2 -2
  99. package/dist/src/filters/index.d.cts +1 -1
  100. package/dist/src/filters/index.d.ts +1 -1
  101. package/dist/src/filters/index.js +30 -30
  102. package/dist/src/filters/index.js.map +1 -1
  103. package/dist/src/index.cjs +1411 -1410
  104. package/dist/src/index.cjs.map +11 -11
  105. package/dist/src/index.d.cts +724 -724
  106. package/dist/src/index.d.ts +724 -724
  107. package/dist/src/index.js +219 -219
  108. package/dist/src/index.js.map +2 -2
  109. package/dist/src/postconditions/index.cjs +26 -24
  110. package/dist/src/postconditions/index.cjs.map +2 -2
  111. package/dist/src/postconditions/index.d.cts +1 -1
  112. package/dist/src/postconditions/index.d.ts +1 -1
  113. package/dist/src/postconditions/index.js +16 -17
  114. package/dist/src/postconditions/index.js.map +1 -1
  115. package/dist/src/pox/index.cjs +722 -721
  116. package/dist/src/pox/index.cjs.map +9 -9
  117. package/dist/src/pox/index.d.cts +1 -1
  118. package/dist/src/pox/index.d.ts +1 -1
  119. package/dist/src/pox/index.js +40 -41
  120. package/dist/src/pox/index.js.map +2 -2
  121. package/dist/src/pox5/index.cjs +141 -137
  122. package/dist/src/pox5/index.cjs.map +3 -3
  123. package/dist/src/pox5/index.d.cts +9 -1
  124. package/dist/src/pox5/index.d.ts +9 -1
  125. package/dist/src/pox5/index.js +210 -209
  126. package/dist/src/pox5/index.js.map +3 -3
  127. package/dist/src/sbtc/index.cjs +71 -69
  128. package/dist/src/sbtc/index.cjs.map +2 -2
  129. package/dist/src/sbtc/index.d.cts +1 -1
  130. package/dist/src/sbtc/index.d.ts +1 -1
  131. package/dist/src/sbtc/index.js +39 -40
  132. package/dist/src/sbtc/index.js.map +2 -2
  133. package/dist/src/simnet/index.cjs +16 -16
  134. package/dist/src/simnet/index.cjs.map +2 -2
  135. package/dist/src/simnet/index.d.cts +1 -1
  136. package/dist/src/simnet/index.d.ts +1 -1
  137. package/dist/src/simnet/index.js +16 -16
  138. package/dist/src/simnet/index.js.map +2 -2
  139. package/dist/src/stackingdao/index.cjs +716 -715
  140. package/dist/src/stackingdao/index.cjs.map +9 -9
  141. package/dist/src/stackingdao/index.d.cts +1 -1
  142. package/dist/src/stackingdao/index.d.ts +1 -1
  143. package/dist/src/stackingdao/index.js +26 -27
  144. package/dist/src/stackingdao/index.js.map +2 -2
  145. package/dist/src/subscriptions/index.cjs +15 -13
  146. package/dist/src/subscriptions/index.cjs.map +2 -2
  147. package/dist/src/subscriptions/index.d.cts +1 -1
  148. package/dist/src/subscriptions/index.d.ts +1 -1
  149. package/dist/src/subscriptions/index.js +14 -15
  150. package/dist/src/subscriptions/index.js.map +1 -1
  151. package/dist/src/transactions/index.cjs +79 -77
  152. package/dist/src/transactions/index.cjs.map +2 -2
  153. package/dist/src/transactions/index.d.cts +1 -1
  154. package/dist/src/transactions/index.d.ts +1 -1
  155. package/dist/src/transactions/index.js +104 -105
  156. package/dist/src/transactions/index.js.map +1 -1
  157. package/dist/src/utils/index.cjs +76 -74
  158. package/dist/src/utils/index.cjs.map +2 -2
  159. package/dist/src/utils/index.d.cts +1 -1
  160. package/dist/src/utils/index.d.ts +1 -1
  161. package/dist/src/utils/index.js +131 -131
  162. package/dist/src/utils/index.js.map +2 -2
  163. package/package.json +1 -1
  164. package/dist/shared/stacks-esm-2mc7ebrm.js +0 -84
  165. package/dist/shared/stacks-esm-743jfh10.js +0 -50
  166. package/dist/shared/stacks-esm-pxhfqfff.js +0 -48
@@ -19,13 +19,15 @@ var __toESM = (mod, isNodeMode, target) => {
19
19
  return cached;
20
20
  }
21
21
  target = mod != null ? __create(__getProtoOf(mod)) : {};
22
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
23
- for (let key of __getOwnPropNames(mod))
24
- if (!__hasOwnProp.call(to, key))
25
- __defProp(to, key, {
26
- get: __accessProp.bind(mod, key),
27
- enumerable: true
28
- });
22
+ const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
23
+ if (mod && typeof mod === "object" || typeof mod === "function") {
24
+ for (let key of __getOwnPropNames(mod))
25
+ if (!__hasOwnProp.call(to, key))
26
+ __defProp(to, key, {
27
+ get: __accessProp.bind(mod, key),
28
+ enumerable: true
29
+ });
30
+ }
29
31
  if (canCache)
30
32
  cache.set(mod, to);
31
33
  return to;
@@ -64,50 +66,50 @@ var __export = (target, all) => {
64
66
  // src/actions/index.ts
65
67
  var exports_actions = {};
66
68
  __export(exports_actions, {
67
- watchTransaction: () => watchTransaction,
68
- watchNftEvent: () => watchNftEvent,
69
- watchMempool: () => watchMempool,
70
- watchBlocks: () => watchBlocks,
71
- watchAddressBalance: () => watchAddressBalance,
72
- watchAddress: () => watchAddress,
73
- waitForTransactionReceipt: () => waitForTransactionReceipt,
74
- transferStx: () => transferStx,
75
- sponsorTransaction: () => sponsorTransaction,
76
- simulateTransaction: () => simulateTransaction,
77
- simulateCall: () => simulateCall,
78
- signTransactionAction: () => signTransactionAction,
79
- signMessage: () => signMessage,
80
- sendTransaction: () => sendTransaction,
81
- resolveFee: () => resolveFee,
82
- readContract: () => readContract,
83
- multicall: () => multicall,
84
- minimumFee: () => minimumFee,
85
- isResponseOutput: () => isResponseOutput,
86
- isProviderAccount: () => isProviderAccount,
87
- isNoEstimateAvailable: () => isNoEstimateAvailable,
88
- isFeeTier: () => isFeeTier,
89
- indexTxSource: () => indexTxSource,
90
- getTransaction: () => getTransaction,
91
- getRawBlock: () => getRawBlock,
92
- getNonce: () => getNonce,
93
- getNftHoldings: () => getNftHoldings,
94
- getMempoolStats: () => getMempoolStats,
95
- getMapEntry: () => getMapEntry,
96
- getDataVar: () => getDataVar,
97
- getContractSource: () => getContractSource,
98
- getContractAbi: () => getContractAbi,
99
- getContract: () => getContract,
100
- getBlockHeight: () => getBlockHeight,
101
- getBlock: () => getBlock,
102
- getBalance: () => getBalance,
103
- getAccountInfo: () => getAccountInfo,
104
- getAccountHistory: () => getAccountHistory,
105
- extendedApiSource: () => extendedApiSource,
106
- estimateFee: () => estimateFee,
107
- deployContract: () => deployContract,
108
- callContract: () => callContract,
69
+ ContractResponseError: () => ContractResponseError,
109
70
  buildFunctionArgs: () => buildFunctionArgs,
110
- ContractResponseError: () => ContractResponseError
71
+ callContract: () => callContract,
72
+ deployContract: () => deployContract,
73
+ estimateFee: () => estimateFee,
74
+ extendedApiSource: () => extendedApiSource,
75
+ getAccountHistory: () => getAccountHistory,
76
+ getAccountInfo: () => getAccountInfo,
77
+ getBalance: () => getBalance,
78
+ getBlock: () => getBlock,
79
+ getBlockHeight: () => getBlockHeight,
80
+ getContract: () => getContract,
81
+ getContractAbi: () => getContractAbi,
82
+ getContractSource: () => getContractSource,
83
+ getDataVar: () => getDataVar,
84
+ getMapEntry: () => getMapEntry,
85
+ getMempoolStats: () => getMempoolStats,
86
+ getNftHoldings: () => getNftHoldings,
87
+ getNonce: () => getNonce,
88
+ getRawBlock: () => getRawBlock,
89
+ getTransaction: () => getTransaction,
90
+ indexTxSource: () => indexTxSource,
91
+ isFeeTier: () => isFeeTier,
92
+ isNoEstimateAvailable: () => isNoEstimateAvailable,
93
+ isProviderAccount: () => isProviderAccount,
94
+ isResponseOutput: () => isResponseOutput,
95
+ minimumFee: () => minimumFee,
96
+ multicall: () => multicall,
97
+ readContract: () => readContract,
98
+ resolveFee: () => resolveFee,
99
+ sendTransaction: () => sendTransaction,
100
+ signMessage: () => signMessage,
101
+ signTransactionAction: () => signTransactionAction,
102
+ simulateCall: () => simulateCall,
103
+ simulateTransaction: () => simulateTransaction,
104
+ sponsorTransaction: () => sponsorTransaction,
105
+ transferStx: () => transferStx,
106
+ waitForTransactionReceipt: () => waitForTransactionReceipt,
107
+ watchAddress: () => watchAddress,
108
+ watchAddressBalance: () => watchAddressBalance,
109
+ watchBlocks: () => watchBlocks,
110
+ watchMempool: () => watchMempool,
111
+ watchNftEvent: () => watchNftEvent,
112
+ watchTransaction: () => watchTransaction
111
113
  });
112
114
  module.exports = __toCommonJS(exports_actions);
113
115
 
@@ -707,8 +709,8 @@ function withTypeId(type, bytes) {
707
709
  return concatBytes(new Uint8Array([typeIdByte(type)]), bytes);
708
710
  }
709
711
  function serializeAddress(c32Address) {
710
- const [version, hash1602] = c32addressDecode(c32Address);
711
- return concatBytes(new Uint8Array([version]), hexToBytes(hash1602));
712
+ const [version, hash160] = c32addressDecode(c32Address);
713
+ return concatBytes(new Uint8Array([version]), hexToBytes(hash160));
712
714
  }
713
715
  function serializeLPString(str, prefixBytes = 1) {
714
716
  const content = utf8ToBytes(str);
@@ -815,13 +817,13 @@ function bufferCV(buffer) {
815
817
  return { type: "buffer", value: bytesToHex(buffer) };
816
818
  }
817
819
  function standardPrincipalCV(address) {
818
- const [version, hash1602] = c32addressDecode(address);
819
- const normalized = c32address(version, hash1602);
820
+ const [version, hash160] = c32addressDecode(address);
821
+ const normalized = c32address(version, hash160);
820
822
  return { type: "address", value: normalized };
821
823
  }
822
824
  function contractPrincipalCV(address, contractName) {
823
- const [version, hash1602] = c32addressDecode(address);
824
- const normalized = c32address(version, hash1602);
825
+ const [version, hash160] = c32addressDecode(address);
826
+ const normalized = c32address(version, hash160);
825
827
  if (utf8ToBytes(contractName).byteLength >= 128) {
826
828
  throw new Error("Contract name must be less than 128 bytes");
827
829
  }
@@ -892,8 +894,8 @@ var Cl = {
892
894
  // src/clarity/deserialize.ts
893
895
  function readAddress(reader) {
894
896
  const version = reader.readUInt8();
895
- const hash1602 = bytesToHex(reader.readBytes(20));
896
- return c32address(version, hash1602);
897
+ const hash160 = bytesToHex(reader.readBytes(20));
898
+ return c32address(version, hash160);
897
899
  }
898
900
  function readLPString(reader, prefixBytes = 1) {
899
901
  let length = 0;
@@ -1145,8 +1147,8 @@ var TenureChangeCause = {
1145
1147
 
1146
1148
  // src/transactions/wire/serialize.ts
1147
1149
  function serializeAddress2(c32Address) {
1148
- const [version, hash1602] = c32addressDecode(c32Address);
1149
- return concatBytes(new Uint8Array([version]), hexToBytes(hash1602));
1150
+ const [version, hash160] = c32addressDecode(c32Address);
1151
+ return concatBytes(new Uint8Array([version]), hexToBytes(hash160));
1150
1152
  }
1151
1153
  function serializeLPString2(str, prefixBytes = 1) {
1152
1154
  const content = utf8ToBytes(str);
@@ -1185,8 +1187,8 @@ function serializeSpendingCondition(condition) {
1185
1187
  }
1186
1188
  function serializeAuthField(field) {
1187
1189
  if (field.type === "publicKey") {
1188
- const typeId2 = field.pubKeyEncoding === 0 ? 0 : 1;
1189
- return concatBytes(writeUInt8(typeId2), hexToBytes(field.data));
1190
+ const typeId = field.pubKeyEncoding === 0 ? 0 : 1;
1191
+ return concatBytes(writeUInt8(typeId), hexToBytes(field.data));
1190
1192
  }
1191
1193
  const typeId = field.pubKeyEncoding === 0 ? 2 : 3;
1192
1194
  return concatBytes(writeUInt8(typeId), hexToBytes(field.data));
@@ -1455,7 +1457,7 @@ async function simulateTransaction(client, params) {
1455
1457
  if (payload.payloadType === PayloadType.ContractCall) {
1456
1458
  const sender = params.sender ?? extractSender(transaction, client);
1457
1459
  const contract = `${payload.contractAddress}.${payload.contractName}`;
1458
- const [execution, fees2] = await Promise.all([
1460
+ const [execution, fees] = await Promise.all([
1459
1461
  simulateCall(client, {
1460
1462
  contract,
1461
1463
  functionName: payload.functionName,
@@ -1465,7 +1467,7 @@ async function simulateTransaction(client, params) {
1465
1467
  }),
1466
1468
  estimateFee(client, { transaction })
1467
1469
  ]);
1468
- return { type: "contract-call", execution, fees: fees2 };
1470
+ return { type: "contract-call", execution, fees };
1469
1471
  }
1470
1472
  const fees = await estimateFee(client, { transaction });
1471
1473
  if (payload.payloadType === PayloadType.SmartContract || payload.payloadType === PayloadType.VersionedSmartContract) {
@@ -2075,11 +2077,11 @@ function replayMultiSigSigHash(tx) {
2075
2077
  const condition = tx.auth.spendingCondition;
2076
2078
  if (isNonSequential(condition.hashMode)) {
2077
2079
  const preSign = nonSequentialPreSignHash(tx);
2078
- let curSigHash2 = preSign;
2080
+ let curSigHash = preSign;
2079
2081
  for (const field of condition.fields) {
2080
- curSigHash2 = sigHashPostSign(curSigHash2, field.pubKeyEncoding, field.data);
2082
+ curSigHash = sigHashPostSign(curSigHash, field.pubKeyEncoding, field.data);
2081
2083
  }
2082
- return curSigHash2;
2084
+ return curSigHash;
2083
2085
  }
2084
2086
  let curSigHash = initialSigHash(tx);
2085
2087
  for (const field of condition.fields) {
@@ -2200,8 +2202,8 @@ async function signSequentialWithAccount(tx, condition, account, publicKeys, sig
2200
2202
  const fields = [...condition.fields];
2201
2203
  let curSigHash = initialSigHash(tx);
2202
2204
  for (const field of fields) {
2203
- const preSign2 = sigHashPreSign(curSigHash, AuthType.Standard, condition.fee, condition.nonce);
2204
- curSigHash = sigHashPostSign(preSign2, field.pubKeyEncoding, field.data);
2205
+ const preSign = sigHashPreSign(curSigHash, AuthType.Standard, condition.fee, condition.nonce);
2206
+ curSigHash = sigHashPostSign(preSign, field.pubKeyEncoding, field.data);
2205
2207
  }
2206
2208
  for (let i = fields.length;i < signerIndex; i++) {
2207
2209
  const pubKeyField = {
@@ -2210,8 +2212,8 @@ async function signSequentialWithAccount(tx, condition, account, publicKeys, sig
2210
2212
  data: publicKeys[i]
2211
2213
  };
2212
2214
  fields.push(pubKeyField);
2213
- const preSign2 = sigHashPreSign(curSigHash, AuthType.Standard, condition.fee, condition.nonce);
2214
- curSigHash = sigHashPostSign(preSign2, pubKeyField.pubKeyEncoding, pubKeyField.data);
2215
+ const preSign = sigHashPreSign(curSigHash, AuthType.Standard, condition.fee, condition.nonce);
2216
+ curSigHash = sigHashPostSign(preSign, pubKeyField.pubKeyEncoding, pubKeyField.data);
2215
2217
  }
2216
2218
  const preSign = sigHashPreSign(curSigHash, AuthType.Standard, condition.fee, condition.nonce);
2217
2219
  const sigBytes = await account.sign(hexToBytes(preSign));
@@ -2347,9 +2349,9 @@ function getOriginSigHash(tx) {
2347
2349
  if ("fields" in condition) {
2348
2350
  return replayMultiSigSigHash(tx);
2349
2351
  }
2350
- const initialSigHash2 = signBegin(tx);
2352
+ const initialSigHash = signBegin(tx);
2351
2353
  const sc = condition;
2352
- const preSign = sigHashPreSign(initialSigHash2, AuthType.Standard, sc.fee, sc.nonce);
2354
+ const preSign = sigHashPreSign(initialSigHash, AuthType.Standard, sc.fee, sc.nonce);
2353
2355
  return sigHashPostSign(preSign, sc.keyEncoding, sc.signature);
2354
2356
  }
2355
2357
  function signSponsor(tx, privateKey) {
@@ -2415,11 +2417,11 @@ async function sendTransaction(client, params) {
2415
2417
  throw error;
2416
2418
  }
2417
2419
  } else if (error instanceof TimeoutError) {
2418
- const txid3 = getTransactionId(params.transaction);
2419
- const receipt = await getTransaction(client, { txid: txid3 }).catch(() => null);
2420
+ const txid = getTransactionId(params.transaction);
2421
+ const receipt = await getTransaction(client, { txid }).catch(() => null);
2420
2422
  if (receipt === null)
2421
2423
  throw error;
2422
- data = { txid: txid3 };
2424
+ data = { txid };
2423
2425
  } else {
2424
2426
  throw error;
2425
2427
  }
@@ -2431,16 +2433,16 @@ async function sendTransaction(client, params) {
2431
2433
  txid: data.txid ?? getTransactionId(params.transaction)
2432
2434
  });
2433
2435
  }
2434
- const txid2 = typeof data === "string" ? data.replace(/"/g, "") : data.txid ?? getTransactionId(params.transaction);
2436
+ const txid = typeof data === "string" ? data.replace(/"/g, "") : data.txid ?? getTransactionId(params.transaction);
2435
2437
  if (params.wait) {
2436
2438
  const confirmations = params.wait === true ? 1 : params.wait;
2437
2439
  const receipt = await waitForTransactionReceipt(client, {
2438
- txid: txid2,
2440
+ txid,
2439
2441
  confirmations
2440
2442
  });
2441
- return { txid: txid2, receipt };
2443
+ return { txid, receipt };
2442
2444
  }
2443
- return { txid: txid2 };
2445
+ return { txid };
2444
2446
  }
2445
2447
  // src/transactions/wire/deserialize.ts
2446
2448
  function readSpendingCondition(r) {
@@ -3862,5 +3864,5 @@ class ContractResponseError extends Error {
3862
3864
  }
3863
3865
  }
3864
3866
 
3865
- //# debugId=08253C9C7060E82C64756E2164756E21
3867
+ //# debugId=6C9CD0240204CF6764756E2164756E21
3866
3868
  //# sourceMappingURL=index.cjs.map