opnet 1.0.13 → 1.0.15

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 (253) hide show
  1. package/CONTRIBUTING.md +71 -0
  2. package/README.md +6 -7
  3. package/browser/_version.d.ts +1 -1
  4. package/browser/abi/BaseContractProperty.d.ts +3 -0
  5. package/browser/abi/BitcoinAbiTypes.d.ts +4 -0
  6. package/browser/abi/BitcoinInterface.d.ts +9 -0
  7. package/browser/abi/interfaces/BaseContractProperties.d.ts +4 -0
  8. package/browser/abi/interfaces/BitcoinAbiValue.d.ts +5 -0
  9. package/browser/abi/interfaces/BitcoinInterfaceAbi.d.ts +11 -0
  10. package/browser/bitcoin/UTXOs.d.ts +1 -6
  11. package/browser/bitcoin/interfaces/IUTXO.d.ts +7 -0
  12. package/browser/common/CommonTypes.d.ts +1 -0
  13. package/browser/contracts/CallResult.d.ts +6 -3
  14. package/browser/contracts/Contract.d.ts +28 -0
  15. package/browser/contracts/interfaces/ICallResult.d.ts +2 -3
  16. package/browser/contracts/interfaces/IContract.d.ts +4 -0
  17. package/browser/crypto/crypto-browser.d.ts +7 -0
  18. package/browser/index.js +1 -1
  19. package/browser/opnet.d.ts +11 -0
  20. package/browser/scripts/testContract.d.ts +1 -0
  21. package/browser/scripts/testMethods.d.ts +1 -0
  22. package/browser/utils/BitcoinUtils.d.ts +4 -0
  23. package/build/_version.d.ts +1 -1
  24. package/build/_version.js +1 -1
  25. package/build/abi/BaseContractProperty.d.ts +3 -0
  26. package/build/abi/BaseContractProperty.js +1 -0
  27. package/build/abi/BitcoinAbiTypes.d.ts +4 -0
  28. package/build/abi/BitcoinAbiTypes.js +5 -0
  29. package/build/abi/BitcoinInterface.d.ts +9 -0
  30. package/build/abi/BitcoinInterface.js +45 -0
  31. package/build/abi/BitcoinInterfaceAbi.d.ts +3 -0
  32. package/build/abi/BitcoinInterfaceAbi.js +1 -0
  33. package/build/abi/enums/ParamTypes.d.ts +0 -0
  34. package/build/abi/enums/ParamTypes.js +1 -0
  35. package/build/abi/interface/BitcoinInterface.d.ts +6 -0
  36. package/build/abi/interface/BitcoinInterface.js +12 -0
  37. package/build/abi/interface/BitcoinInterfaceAbi.d.ts +3 -0
  38. package/build/abi/interface/BitcoinInterfaceAbi.js +1 -0
  39. package/build/abi/interfaces/BaseContractProperties.d.ts +4 -0
  40. package/build/abi/interfaces/BaseContractProperties.js +1 -0
  41. package/build/abi/interfaces/BaseContractProperty.d.ts +2 -0
  42. package/build/abi/interfaces/BaseContractProperty.js +1 -0
  43. package/build/abi/interfaces/BitcoinAbiInput.d.ts +5 -0
  44. package/build/abi/interfaces/BitcoinAbiInput.js +1 -0
  45. package/build/abi/interfaces/BitcoinAbiValue.d.ts +5 -0
  46. package/build/abi/interfaces/BitcoinAbiValue.js +1 -0
  47. package/build/abi/interfaces/BitcoinInterfaceAbi.d.ts +11 -0
  48. package/build/abi/interfaces/BitcoinInterfaceAbi.js +1 -0
  49. package/build/bitcoin/UTXOs.d.ts +1 -6
  50. package/build/bitcoin/interfaces/IUTXO.d.ts +7 -0
  51. package/build/bitcoin/interfaces/IUTXO.js +1 -0
  52. package/build/common/CommonTypes.d.ts +1 -0
  53. package/build/contracts/CallResult.d.ts +6 -3
  54. package/build/contracts/CallResult.js +9 -2
  55. package/build/contracts/Contract.d.ts +28 -0
  56. package/build/contracts/Contract.js +206 -0
  57. package/build/contracts/interfaces/ICallResult.d.ts +2 -3
  58. package/build/contracts/interfaces/IContract.d.ts +4 -0
  59. package/build/contracts/interfaces/IContract.js +1 -0
  60. package/build/interface/BitcoinInterface.d.ts +6 -0
  61. package/build/interface/BitcoinInterface.js +12 -0
  62. package/build/interface/BitcoinInterfaceAbi.d.ts +3 -0
  63. package/build/interface/BitcoinInterfaceAbi.js +1 -0
  64. package/build/interface/Interface.d.ts +2 -0
  65. package/build/interface/Interface.js +2 -0
  66. package/build/interface.d.ts +0 -0
  67. package/build/interface.js +1 -0
  68. package/build/opnet.d.ts +11 -0
  69. package/build/opnet.js +11 -0
  70. package/build/scripts/test.js +12 -0
  71. package/build/scripts/testContract.d.ts +1 -0
  72. package/build/scripts/testContract.js +28 -0
  73. package/build/scripts/testMethods.d.ts +1 -0
  74. package/build/scripts/testMethods.js +24 -0
  75. package/build/utils/BitcoinUtils.d.ts +4 -0
  76. package/build/utils/BitcoinUtils.js +7 -0
  77. package/cjs/_version.d.ts +1 -0
  78. package/cjs/_version.js +4 -0
  79. package/cjs/abi/BaseContractProperty.d.ts +3 -0
  80. package/cjs/abi/BaseContractProperty.js +2 -0
  81. package/cjs/abi/BitcoinAbiTypes.d.ts +4 -0
  82. package/cjs/abi/BitcoinAbiTypes.js +8 -0
  83. package/cjs/abi/BitcoinInterface.d.ts +9 -0
  84. package/cjs/abi/BitcoinInterface.js +49 -0
  85. package/cjs/abi/interfaces/BaseContractProperties.d.ts +4 -0
  86. package/cjs/abi/interfaces/BaseContractProperties.js +2 -0
  87. package/cjs/abi/interfaces/BitcoinAbiValue.d.ts +5 -0
  88. package/cjs/abi/interfaces/BitcoinAbiValue.js +2 -0
  89. package/cjs/abi/interfaces/BitcoinInterfaceAbi.d.ts +11 -0
  90. package/cjs/abi/interfaces/BitcoinInterfaceAbi.js +2 -0
  91. package/cjs/bitcoin/BitcoinAddress.d.ts +20 -0
  92. package/cjs/bitcoin/BitcoinAddress.js +116 -0
  93. package/cjs/bitcoin/UTXOs.d.ts +15 -0
  94. package/cjs/bitcoin/UTXOs.js +16 -0
  95. package/cjs/block/Block.d.ts +2 -3
  96. package/cjs/block/Block.js +3 -28
  97. package/cjs/block/interfaces/IBlock.d.ts +28 -0
  98. package/cjs/block/interfaces/IBlock.js +2 -0
  99. package/cjs/common/CommonTypes.d.ts +4 -0
  100. package/cjs/common/CommonTypes.js +2 -0
  101. package/cjs/contracts/CallResult.d.ts +13 -0
  102. package/cjs/contracts/CallResult.js +25 -0
  103. package/cjs/contracts/Contract.d.ts +28 -0
  104. package/cjs/contracts/Contract.js +212 -0
  105. package/cjs/contracts/ContractData.d.ts +15 -0
  106. package/cjs/contracts/ContractData.js +36 -0
  107. package/cjs/contracts/interfaces/IAccessList.d.ts +6 -0
  108. package/cjs/contracts/interfaces/IAccessList.js +2 -0
  109. package/cjs/contracts/interfaces/ICallResult.d.ts +11 -0
  110. package/cjs/contracts/interfaces/ICallResult.js +2 -0
  111. package/cjs/contracts/interfaces/IContract.d.ts +4 -0
  112. package/cjs/contracts/interfaces/IContract.js +2 -0
  113. package/cjs/contracts/interfaces/IRawContract.d.ts +13 -0
  114. package/cjs/contracts/interfaces/IRawContract.js +2 -0
  115. package/cjs/crypto/crypto.d.ts +2 -0
  116. package/cjs/crypto/crypto.js +8 -0
  117. package/cjs/index.d.ts +3 -11
  118. package/cjs/index.js +16 -11
  119. package/cjs/opnet.d.ts +36 -0
  120. package/cjs/opnet.js +54 -0
  121. package/cjs/providers/AbstractRpcProvider.d.ts +34 -0
  122. package/cjs/providers/AbstractRpcProvider.js +161 -0
  123. package/cjs/providers/JSONRpcProvider.d.ts +5 -9
  124. package/cjs/providers/JSONRpcProvider.js +4 -29
  125. package/cjs/providers/WebsocketRpcProvider.d.ts +8 -0
  126. package/cjs/providers/WebsocketRpcProvider.js +27 -0
  127. package/cjs/scripts/testContract.d.ts +1 -0
  128. package/cjs/scripts/testContract.js +30 -0
  129. package/cjs/scripts/testMethods.d.ts +1 -0
  130. package/cjs/scripts/testMethods.js +26 -0
  131. package/cjs/serialize/BigInt.d.ts +6 -0
  132. package/cjs/serialize/BigInt.js +5 -0
  133. package/cjs/storage/StoredValue.d.ts +10 -0
  134. package/cjs/storage/StoredValue.js +28 -0
  135. package/cjs/storage/interfaces/IStorageValue.d.ts +9 -0
  136. package/cjs/storage/interfaces/IStorageValue.js +2 -0
  137. package/cjs/transactions/DeploymentTransaction.d.ts +10 -1
  138. package/cjs/transactions/DeploymentTransaction.js +16 -0
  139. package/cjs/transactions/GenericTransaction.d.ts +1 -1
  140. package/cjs/transactions/InteractionTransaction.d.ts +1 -1
  141. package/cjs/transactions/Transaction.d.ts +1 -1
  142. package/cjs/transactions/Transaction.js +1 -1
  143. package/cjs/transactions/TransactionParser.d.ts +7 -0
  144. package/cjs/transactions/TransactionParser.js +32 -0
  145. package/cjs/transactions/TransactionReceipt.d.ts +10 -0
  146. package/cjs/transactions/TransactionReceipt.js +16 -0
  147. package/cjs/transactions/interfaces/ITransaction.d.ts +39 -0
  148. package/cjs/transactions/interfaces/ITransaction.js +2 -0
  149. package/cjs/transactions/interfaces/ITransactionReceipt.d.ts +8 -0
  150. package/cjs/transactions/interfaces/ITransactionReceipt.js +2 -0
  151. package/cjs/utils/BitcoinUtils.d.ts +4 -0
  152. package/cjs/utils/BitcoinUtils.js +14 -0
  153. package/docs/assets/navigation.js +1 -1
  154. package/docs/assets/search.js +1 -1
  155. package/docs/classes/AbstractRpcProvider.html +15 -15
  156. package/docs/classes/BaseContract.html +187 -0
  157. package/docs/classes/BitcoinAddress.html +5 -2
  158. package/docs/classes/BitcoinInterface.html +182 -0
  159. package/docs/classes/BitcoinUtils.html +183 -0
  160. package/docs/classes/Block.html +5 -3
  161. package/docs/classes/CallResult.html +6 -2
  162. package/docs/classes/ContractData.html +4 -2
  163. package/docs/classes/DeploymentTransaction.html +4 -2
  164. package/docs/classes/GenericTransaction.html +4 -2
  165. package/docs/classes/IBaseContract.html +192 -0
  166. package/docs/classes/InteractionTransaction.html +3 -2
  167. package/docs/classes/JSONRpcProvider.html +14 -14
  168. package/docs/classes/StoredValue.html +4 -2
  169. package/docs/classes/TransactionBase.html +4 -2
  170. package/docs/classes/TransactionInput.html +3 -2
  171. package/docs/classes/TransactionOutput.html +3 -2
  172. package/docs/classes/TransactionParser.html +3 -2
  173. package/docs/classes/TransactionReceipt.html +3 -2
  174. package/docs/classes/UTXO.html +4 -2
  175. package/docs/classes/WebSocketRpcProvider.html +14 -14
  176. package/docs/enums/ABIDataTypes.html +183 -0
  177. package/docs/enums/BitcoinAbiTypes.html +178 -0
  178. package/docs/enums/OPNetTransactionTypes.html +2 -2
  179. package/docs/functions/getContract.html +180 -0
  180. package/docs/hierarchy.html +1 -1
  181. package/docs/index.html +4 -5
  182. package/docs/interfaces/BaseContractProperties.html +176 -0
  183. package/docs/interfaces/BitcoinAbiValue.html +180 -0
  184. package/docs/interfaces/BitcoinInterfaceAbiBase.html +182 -0
  185. package/docs/interfaces/IAccessList.html +3 -1
  186. package/docs/interfaces/IAccessListItem.html +3 -1
  187. package/docs/interfaces/IBlock.html +5 -3
  188. package/docs/interfaces/IBlockCommon.html +5 -3
  189. package/docs/interfaces/ICallRequestError.html +4 -2
  190. package/docs/interfaces/ICallResultData.html +4 -2
  191. package/docs/interfaces/IContract.html +177 -0
  192. package/docs/interfaces/IDeploymentTransaction.html +4 -2
  193. package/docs/interfaces/IGenericTransaction.html +4 -2
  194. package/docs/interfaces/IInteractionTransaction.html +4 -2
  195. package/docs/interfaces/IRawContract.html +5 -2
  196. package/docs/interfaces/IStorageValue.html +4 -2
  197. package/docs/interfaces/ITransactionBase.html +4 -2
  198. package/docs/interfaces/ITransactionInput.html +3 -2
  199. package/docs/interfaces/ITransactionOutput.html +3 -2
  200. package/docs/interfaces/ITransactionReceipt.html +4 -2
  201. package/docs/interfaces/IUTXO.html +4 -2
  202. package/docs/modules.html +38 -24
  203. package/docs/types/BaseContractProperty.html +176 -0
  204. package/docs/types/BitcoinAddressLike.html +1 -1
  205. package/docs/types/BitcoinInterfaceAbi.html +174 -0
  206. package/docs/types/BlockHeaderChecksumProof.html +1 -1
  207. package/docs/types/DecodedCallResult.html +174 -0
  208. package/docs/types/ICallResult.html +2 -1
  209. package/docs/types/ITransaction.html +2 -1
  210. package/docs/types/PointerLike.html +1 -1
  211. package/docs/types/UTXOs.html +3 -1
  212. package/docs/variables/version.html +1 -1
  213. package/package.json +6 -4
  214. package/src/_version.ts +1 -1
  215. package/src/abi/BaseContractProperty.ts +8 -0
  216. package/src/abi/BitcoinAbiTypes.ts +9 -0
  217. package/src/abi/BitcoinInterface.ts +63 -0
  218. package/src/abi/interfaces/BaseContractProperties.ts +9 -0
  219. package/src/abi/interfaces/BitcoinAbiValue.ts +18 -0
  220. package/src/abi/interfaces/BitcoinInterfaceAbi.ts +19 -0
  221. package/src/bitcoin/BitcoinAddress.ts +5 -0
  222. package/src/bitcoin/UTXOs.ts +28 -26
  223. package/src/bitcoin/interfaces/IUTXO.ts +12 -0
  224. package/src/block/Block.ts +5 -0
  225. package/src/block/interfaces/IBlock.ts +46 -38
  226. package/src/common/CommonTypes.ts +16 -4
  227. package/src/contracts/CallResult.ts +34 -20
  228. package/src/contracts/Contract.ts +321 -0
  229. package/src/contracts/ContractData.ts +46 -41
  230. package/src/contracts/interfaces/IAccessList.ts +17 -7
  231. package/src/contracts/interfaces/ICallResult.ts +29 -15
  232. package/src/contracts/interfaces/IContract.ts +10 -0
  233. package/src/contracts/interfaces/IRawContract.ts +17 -12
  234. package/src/crypto/crypto-browser.js +71 -60
  235. package/src/opnet.ts +17 -0
  236. package/src/providers/AbstractRpcProvider.ts +352 -351
  237. package/src/scripts/testContract.ts +51 -0
  238. package/src/scripts/{test.ts → testMethods.ts} +52 -54
  239. package/src/scripts/test_abi.json +31 -0
  240. package/src/storage/StoredValue.ts +35 -30
  241. package/src/storage/interfaces/IStorageValue.ts +15 -10
  242. package/src/transactions/DeploymentTransaction.ts +41 -36
  243. package/src/transactions/GenericTransaction.ts +19 -12
  244. package/src/transactions/InteractionTransaction.ts +44 -40
  245. package/src/transactions/Transaction.ts +8 -0
  246. package/src/transactions/TransactionInput.ts +8 -0
  247. package/src/transactions/TransactionOutput.ts +8 -0
  248. package/src/transactions/TransactionParser.ts +47 -43
  249. package/src/transactions/TransactionReceipt.ts +22 -18
  250. package/src/transactions/interfaces/ITransaction.ts +78 -52
  251. package/src/transactions/interfaces/ITransactionReceipt.ts +14 -9
  252. package/src/utils/BitcoinUtils.ts +22 -0
  253. package/webpack.config.js +71 -75
@@ -0,0 +1,161 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AbstractRpcProvider = void 0;
4
+ require("../serialize/BigInt.js");
5
+ const bsi_binary_1 = require("@btc-vision/bsi-binary");
6
+ const bitcoinjs_lib_1 = require("bitcoinjs-lib");
7
+ const UTXOs_js_1 = require("../bitcoin/UTXOs.js");
8
+ const Block_js_1 = require("../block/Block.js");
9
+ const CallResult_js_1 = require("../contracts/CallResult.js");
10
+ const ContractData_js_1 = require("../contracts/ContractData.js");
11
+ const StoredValue_js_1 = require("../storage/StoredValue.js");
12
+ const TransactionParser_js_1 = require("../transactions/TransactionParser.js");
13
+ const TransactionReceipt_js_1 = require("../transactions/TransactionReceipt.js");
14
+ class AbstractRpcProvider {
15
+ nextId = 0;
16
+ constructor() { }
17
+ async getBlockNumber() {
18
+ return await this.provider.getBlockNumber();
19
+ }
20
+ async getBlock(blockNumberOrHash, prefetchTxs = false) {
21
+ const method = typeof blockNumberOrHash === 'string' ? 'btc_getBlockByHash' : 'btc_getBlockByNumber';
22
+ const payload = this.buildJsonRpcPayload(method, [
23
+ blockNumberOrHash,
24
+ prefetchTxs,
25
+ ]);
26
+ const block = await this.callPayloadSingle(payload);
27
+ const result = block.result;
28
+ return new Block_js_1.Block(result);
29
+ }
30
+ async getBlockByHash(blockHash) {
31
+ return await this.getBlock(blockHash);
32
+ }
33
+ async getBalance(addressLike) {
34
+ const address = addressLike.toString();
35
+ const payload = this.buildJsonRpcPayload('btc_getBalance', [address]);
36
+ const rawBalance = await this.callPayloadSingle(payload);
37
+ const result = rawBalance.result;
38
+ if (!result || (result && !result.startsWith('0x'))) {
39
+ throw new Error(`Invalid balance returned from provider: ${result}`);
40
+ }
41
+ return BigInt(result);
42
+ }
43
+ async getUXTOs(address, optimize = false) {
44
+ const addressStr = address.toString();
45
+ const payload = this.buildJsonRpcPayload('btc_getUTXOs', [
46
+ addressStr,
47
+ optimize,
48
+ ]);
49
+ const rawUXTOs = await this.callPayloadSingle(payload);
50
+ const result = rawUXTOs.result || [];
51
+ return result.map((utxo) => {
52
+ return new UTXOs_js_1.UTXO(utxo);
53
+ });
54
+ }
55
+ async getTransaction(txHash) {
56
+ const payload = this.buildJsonRpcPayload('btc_getTransactionByHash', [
57
+ txHash,
58
+ ]);
59
+ const rawTransaction = await this.callPayloadSingle(payload);
60
+ const result = rawTransaction.result;
61
+ return TransactionParser_js_1.TransactionParser.parseTransaction(result);
62
+ }
63
+ async getTransactionReceipt(txHash) {
64
+ const payload = this.buildJsonRpcPayload('btc_getTransactionReceipt', [
65
+ txHash,
66
+ ]);
67
+ const rawTransaction = await this.callPayloadSingle(payload);
68
+ return new TransactionReceipt_js_1.TransactionReceipt(rawTransaction.result);
69
+ }
70
+ async getNetwork() {
71
+ const network = await this.provider.getNetwork();
72
+ switch (network.chainId) {
73
+ case 1n:
74
+ return bitcoinjs_lib_1.networks.bitcoin;
75
+ case 2n:
76
+ return bitcoinjs_lib_1.networks.testnet;
77
+ case 3n:
78
+ return bitcoinjs_lib_1.networks.regtest;
79
+ default:
80
+ throw new Error(`Invalid chain id: ${network.chainId}`);
81
+ }
82
+ }
83
+ async getCode(address, onlyBytecode = false) {
84
+ const addressStr = address.toString();
85
+ const payload = this.buildJsonRpcPayload('btc_getCode', [
86
+ addressStr,
87
+ onlyBytecode,
88
+ ]);
89
+ const rawCode = await this.callPayloadSingle(payload);
90
+ const result = rawCode.result;
91
+ if ('contractAddress' in result) {
92
+ return new ContractData_js_1.ContractData(result);
93
+ }
94
+ else {
95
+ return Buffer.from(result.bytecode, 'base64');
96
+ }
97
+ }
98
+ async getStorageAt(address, rawPointer, proofs = true, height) {
99
+ const addressStr = address.toString();
100
+ const pointer = typeof rawPointer === 'string' ? rawPointer : this.bigintToBase64(rawPointer);
101
+ const params = [addressStr, pointer, proofs];
102
+ if (height) {
103
+ params.push(height.toString());
104
+ }
105
+ const payload = this.buildJsonRpcPayload('btc_getStorageAt', params);
106
+ const rawStorage = await this.callPayloadSingle(payload);
107
+ const result = rawStorage.result;
108
+ return new StoredValue_js_1.StoredValue(result);
109
+ }
110
+ async call(to, data, from, height) {
111
+ const toStr = to.toString();
112
+ const fromStr = from ? from.toString() : null;
113
+ let dataStr = Buffer.isBuffer(data) ? this.bufferToHex(data) : data;
114
+ if (dataStr.startsWith('0x')) {
115
+ dataStr = dataStr.slice(2);
116
+ }
117
+ const params = [toStr, dataStr];
118
+ if (fromStr) {
119
+ params.push(fromStr);
120
+ }
121
+ if (height) {
122
+ params.push(height.toString());
123
+ }
124
+ const payload = this.buildJsonRpcPayload('btc_call', params);
125
+ const rawCall = await this.callPayloadSingle(payload);
126
+ const result = rawCall.result;
127
+ if ('error' in result) {
128
+ return result;
129
+ }
130
+ return new CallResult_js_1.CallResult(result);
131
+ }
132
+ bufferToHex(buffer) {
133
+ return buffer.toString('hex');
134
+ }
135
+ bigintToBase64(bigint) {
136
+ return Buffer.from(bsi_binary_1.BufferHelper.pointerToUint8Array(bigint)).toString('base64');
137
+ }
138
+ async callPayloadSingle(payload) {
139
+ const rawData = await this.provider._send(payload);
140
+ if (rawData.length !== 1) {
141
+ throw new Error(`Unexpected response length for get block request: ${rawData.length}`);
142
+ }
143
+ const data = rawData.shift();
144
+ if (!data) {
145
+ throw new Error('Block not found');
146
+ }
147
+ if ('error' in data) {
148
+ throw new Error(`Something went wrong while fetching: ${data.error.message}`);
149
+ }
150
+ return data;
151
+ }
152
+ buildJsonRpcPayload(method, params) {
153
+ return {
154
+ method: method,
155
+ params: params,
156
+ id: this.nextId++,
157
+ jsonrpc: '2.0',
158
+ };
159
+ }
160
+ }
161
+ exports.AbstractRpcProvider = AbstractRpcProvider;
@@ -1,12 +1,8 @@
1
- import { BlockTag } from 'ethers';
2
- import { Block } from '../block/Block.js';
3
- export declare class JSONRpcProvider {
4
- private readonly provider;
1
+ import { JsonRpcProvider } from 'ethers';
2
+ import { AbstractRpcProvider } from './AbstractRpcProvider.js';
3
+ export declare class JSONRpcProvider extends AbstractRpcProvider {
5
4
  private readonly url;
6
- private nextId;
5
+ protected readonly provider: JsonRpcProvider;
7
6
  constructor(url: string);
8
- private providerUrl;
9
- getBlockNumber(): Promise<number>;
10
- getBlock(blockNumber: BlockTag | string, prefetchTxs?: boolean): Promise<Block>;
11
- private buildJsonRpcPayload;
7
+ protected providerUrl(url: string): string;
12
8
  }
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.JSONRpcProvider = void 0;
4
4
  const ethers_1 = require("ethers");
5
- const Block_js_1 = require("../block/Block.js");
6
- class JSONRpcProvider {
7
- provider;
5
+ const AbstractRpcProvider_js_1 = require("./AbstractRpcProvider.js");
6
+ class JSONRpcProvider extends AbstractRpcProvider_js_1.AbstractRpcProvider {
8
7
  url;
9
- nextId = 0;
8
+ provider;
10
9
  constructor(url) {
10
+ super();
11
11
  this.url = this.providerUrl(url);
12
12
  this.provider = new ethers_1.JsonRpcProvider(this.url);
13
13
  }
@@ -23,30 +23,5 @@ class JSONRpcProvider {
23
23
  return `${url}/api/v1/json-rpc`;
24
24
  }
25
25
  }
26
- async getBlockNumber() {
27
- return await this.provider.getBlockNumber();
28
- }
29
- async getBlock(blockNumber, prefetchTxs = false) {
30
- const method = typeof blockNumber === 'string' ? 'btc_getBlockByHash' : 'btc_getBlockByNumber';
31
- const payload = this.buildJsonRpcPayload(method, [
32
- blockNumber,
33
- prefetchTxs,
34
- ]);
35
- const blockData = await this.provider._send(payload);
36
- const block = blockData.shift();
37
- if (!block) {
38
- throw new Error('Block not found');
39
- }
40
- const result = block.result;
41
- return new Block_js_1.Block(result);
42
- }
43
- buildJsonRpcPayload(method, params) {
44
- return {
45
- method: method,
46
- params: params,
47
- id: this.nextId++,
48
- jsonrpc: '2.0',
49
- };
50
- }
51
26
  }
52
27
  exports.JSONRpcProvider = JSONRpcProvider;
@@ -0,0 +1,8 @@
1
+ import { WebSocketProvider } from 'ethers';
2
+ import { AbstractRpcProvider } from './AbstractRpcProvider.js';
3
+ export declare class WebSocketRpcProvider extends AbstractRpcProvider {
4
+ private readonly wsUrl;
5
+ protected readonly provider: WebSocketProvider;
6
+ constructor(url: string);
7
+ protected providerUrl(url: string): string;
8
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebSocketRpcProvider = void 0;
4
+ const ethers_1 = require("ethers");
5
+ const AbstractRpcProvider_js_1 = require("./AbstractRpcProvider.js");
6
+ class WebSocketRpcProvider extends AbstractRpcProvider_js_1.AbstractRpcProvider {
7
+ wsUrl;
8
+ provider;
9
+ constructor(url) {
10
+ super();
11
+ this.wsUrl = this.providerUrl(url);
12
+ this.provider = new ethers_1.WebSocketProvider(this.wsUrl);
13
+ }
14
+ providerUrl(url) {
15
+ url = url.trim();
16
+ if (url.endsWith('/')) {
17
+ return url.slice(0, -1);
18
+ }
19
+ if (url.includes('api/v1/json-rpc-ws')) {
20
+ return url;
21
+ }
22
+ else {
23
+ return `${url}/api/v1/json-rpc-ws`;
24
+ }
25
+ }
26
+ }
27
+ exports.WebSocketRpcProvider = WebSocketRpcProvider;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const bsi_binary_1 = require("@btc-vision/bsi-binary");
4
+ const BitcoinAbiTypes_js_1 = require("../abi/BitcoinAbiTypes.js");
5
+ const Contract_js_1 = require("../contracts/Contract.js");
6
+ const JSONRpcProvider_js_1 = require("../providers/JSONRpcProvider.js");
7
+ const provider = new JSONRpcProvider_js_1.JSONRpcProvider('https://testnet.opnet.org');
8
+ (async () => {
9
+ const abi = [
10
+ {
11
+ name: 'balanceOf',
12
+ inputs: [
13
+ {
14
+ name: 'address',
15
+ type: bsi_binary_1.ABIDataTypes.ADDRESS,
16
+ },
17
+ ],
18
+ outputs: [
19
+ {
20
+ name: 'balance',
21
+ type: bsi_binary_1.ABIDataTypes.UINT256,
22
+ },
23
+ ],
24
+ type: BitcoinAbiTypes_js_1.BitcoinAbiTypes.Function,
25
+ },
26
+ ];
27
+ const contract = (0, Contract_js_1.getContract)('tb1pth90usc4f528aqphpjrfkkdm4vy8hxnt5gps6aau2nva6pxeshtqqzlt3a', abi, provider);
28
+ const res = (await contract.balanceOf('bc1p134a291b21a4ef28c961daee77a75e81cd7c0f00733a152930f76746a3e9'));
29
+ console.log('Balance:', res.decoded);
30
+ })();
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const JSONRpcProvider_js_1 = require("../providers/JSONRpcProvider.js");
4
+ const provider = new JSONRpcProvider_js_1.JSONRpcProvider('https://testnet.opnet.org');
5
+ (async () => {
6
+ const blockNumber = await provider.getBlockNumber();
7
+ console.log('Current network height:', blockNumber);
8
+ const block = await provider.getBlock(2810101n, true);
9
+ console.log('Block ->', block.transactions[2]);
10
+ const balance = await provider.getBalance('tb1qcfszz8dcvsz9mcp70ezw5zy2r3ydr0cfz60d3t');
11
+ console.log('Balance out:', balance);
12
+ const utxos = await provider.getUXTOs('tb1qcfszz8dcvsz9mcp70ezw5zy2r3ydr0cfz60d3t');
13
+ console.log('UTXOs:', utxos);
14
+ const transaction = await provider.getTransaction('63e77ba9fa4262b3d4d0d9d97fa8a7359534606c3f3af096284662e3f619f374');
15
+ console.log('Transaction:', transaction);
16
+ const receipt = await provider.getTransactionReceipt('63e77ba9fa4262b3d4d0d9d97fa8a7359534606c3f3af096284662e3f619f374');
17
+ console.log('Receipt:', receipt);
18
+ const net = await provider.getNetwork();
19
+ console.log(net);
20
+ const code = await provider.getCode('tb1pth90usc4f528aqphpjrfkkdm4vy8hxnt5gps6aau2nva6pxeshtqqzlt3a');
21
+ console.log('Code:', code);
22
+ const pointerValue = await provider.getStorageAt('tb1pth90usc4f528aqphpjrfkkdm4vy8hxnt5gps6aau2nva6pxeshtqqzlt3a', 'EXLK/QhEQMI5d9DrthLvozT+UcDQ7WuSPaz7g8GV3AQ=', true);
23
+ console.log('Pointer value:', pointerValue);
24
+ const callResult = await provider.call('tb1pth90usc4f528aqphpjrfkkdm4vy8hxnt5gps6aau2nva6pxeshtqqzlt3a', '82d62f3d3133734251714a646e416463377635746e583369665971414d6f4658373956664c79000000000000000000000000000000000000000000000000000000000000');
25
+ console.log('Call result:', callResult);
26
+ })();
@@ -0,0 +1,6 @@
1
+ export {};
2
+ declare global {
3
+ interface BigInt {
4
+ toJSON(): string;
5
+ }
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ BigInt.prototype.toJSON = function () {
4
+ return this.toString();
5
+ };
@@ -0,0 +1,10 @@
1
+ /// <reference types="node" />
2
+ import { IStorageValue } from './interfaces/IStorageValue.js';
3
+ export declare class StoredValue implements IStorageValue {
4
+ readonly pointer: bigint;
5
+ readonly value: Buffer;
6
+ readonly height: bigint;
7
+ readonly proofs: string[];
8
+ constructor(iStoredValue: IStorageValue);
9
+ private base64ToBigInt;
10
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StoredValue = void 0;
4
+ const bsi_binary_1 = require("@btc-vision/bsi-binary");
5
+ class StoredValue {
6
+ pointer;
7
+ value;
8
+ height;
9
+ proofs;
10
+ constructor(iStoredValue) {
11
+ this.pointer =
12
+ typeof iStoredValue.pointer === 'string'
13
+ ? this.base64ToBigInt(iStoredValue.pointer)
14
+ : iStoredValue.pointer;
15
+ if (iStoredValue.value instanceof Buffer) {
16
+ this.value = iStoredValue.value;
17
+ }
18
+ else {
19
+ this.value = Buffer.from(iStoredValue.value, 'base64');
20
+ }
21
+ this.height = BigInt(iStoredValue.height);
22
+ this.proofs = iStoredValue.proofs || [];
23
+ }
24
+ base64ToBigInt(base64) {
25
+ return bsi_binary_1.BufferHelper.uint8ArrayToPointer(Buffer.from(base64, 'base64'));
26
+ }
27
+ }
28
+ exports.StoredValue = StoredValue;
@@ -0,0 +1,9 @@
1
+ /// <reference types="node" />
2
+ import { BigNumberish } from 'ethers';
3
+ import { PointerLike } from '../../common/CommonTypes.js';
4
+ export interface IStorageValue {
5
+ readonly pointer: PointerLike;
6
+ readonly value: string | Buffer;
7
+ readonly height: BigNumberish;
8
+ readonly proofs?: string[];
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,15 @@
1
+ /// <reference types="node" />
1
2
  import { OPNetTransactionTypes } from '../interfaces/opnet/OPNetTransactionTypes.js';
2
- import { IDeploymentTransaction } from '../interfaces/transactions/ITransaction.js';
3
+ import { IDeploymentTransaction } from './interfaces/ITransaction.js';
3
4
  import { TransactionBase } from './Transaction.js';
4
5
  export declare class DeploymentTransaction extends TransactionBase<OPNetTransactionTypes.Deployment> implements IDeploymentTransaction {
6
+ readonly contractAddress: string;
7
+ readonly virtualAddress: string;
8
+ readonly bytecode: Buffer;
9
+ readonly wasCompressed: boolean;
10
+ readonly deployerPubKey: Buffer;
11
+ readonly deployerAddress: string;
12
+ readonly contractSeed: Buffer;
13
+ readonly contractSaltHash: Buffer;
5
14
  constructor(transaction: IDeploymentTransaction);
6
15
  }
@@ -3,8 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DeploymentTransaction = void 0;
4
4
  const Transaction_js_1 = require("./Transaction.js");
5
5
  class DeploymentTransaction extends Transaction_js_1.TransactionBase {
6
+ contractAddress;
7
+ virtualAddress;
8
+ bytecode;
9
+ wasCompressed;
10
+ deployerPubKey;
11
+ deployerAddress;
12
+ contractSeed;
13
+ contractSaltHash;
6
14
  constructor(transaction) {
7
15
  super(transaction);
16
+ this.contractAddress = transaction.contractAddress;
17
+ this.virtualAddress = transaction.virtualAddress;
18
+ this.bytecode = Buffer.from(transaction.bytecode, 'base64');
19
+ this.wasCompressed = transaction.wasCompressed;
20
+ this.deployerPubKey = Buffer.from(transaction.deployerPubKey, 'base64');
21
+ this.deployerAddress = transaction.deployerAddress;
22
+ this.contractSeed = Buffer.from(transaction.contractSeed, 'base64');
23
+ this.contractSaltHash = Buffer.from(transaction.contractSaltHash, 'base64');
8
24
  }
9
25
  }
10
26
  exports.DeploymentTransaction = DeploymentTransaction;
@@ -1,5 +1,5 @@
1
1
  import { OPNetTransactionTypes } from '../interfaces/opnet/OPNetTransactionTypes.js';
2
- import { IGenericTransaction } from '../interfaces/transactions/ITransaction.js';
2
+ import { IGenericTransaction } from './interfaces/ITransaction.js';
3
3
  import { TransactionBase } from './Transaction.js';
4
4
  export declare class GenericTransaction extends TransactionBase<OPNetTransactionTypes.Generic> implements IGenericTransaction {
5
5
  constructor(transaction: IGenericTransaction);
@@ -2,7 +2,7 @@
2
2
  import { NetEvent } from '@btc-vision/bsi-binary';
3
3
  import { Buffer } from 'buffer';
4
4
  import { OPNetTransactionTypes } from '../interfaces/opnet/OPNetTransactionTypes.js';
5
- import { IInteractionTransaction } from '../interfaces/transactions/ITransaction.js';
5
+ import { IInteractionTransaction } from './interfaces/ITransaction.js';
6
6
  import { TransactionBase } from './Transaction.js';
7
7
  export declare class InteractionTransaction extends TransactionBase<OPNetTransactionTypes.Interaction> implements IInteractionTransaction {
8
8
  readonly calldata: Buffer;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  import { BigNumberish } from 'ethers';
3
3
  import { OPNetTransactionTypes } from '../interfaces/opnet/OPNetTransactionTypes.js';
4
- import { ITransactionBase } from '../interfaces/transactions/ITransaction.js';
4
+ import { ITransactionBase } from './interfaces/ITransaction.js';
5
5
  import { TransactionInput } from './TransactionInput.js';
6
6
  import { TransactionOutput } from './TransactionOutput.js';
7
7
  export declare abstract class TransactionBase<T extends OPNetTransactionTypes> implements ITransactionBase<T> {
@@ -16,7 +16,7 @@ class TransactionBase {
16
16
  this.id = transaction.id;
17
17
  this.hash = transaction.hash;
18
18
  this.index = transaction.index;
19
- this.burnedBitcoin = transaction.burnedBitcoin;
19
+ this.burnedBitcoin = BigInt(transaction.burnedBitcoin) || 0n;
20
20
  this.inputs = transaction.inputs.map((input) => new TransactionInput_js_1.TransactionInput(input));
21
21
  this.outputs = transaction.outputs.map((output) => new TransactionOutput_js_1.TransactionOutput(output));
22
22
  this.revert = transaction.revert
@@ -0,0 +1,7 @@
1
+ import { OPNetTransactionTypes } from '../interfaces/opnet/OPNetTransactionTypes.js';
2
+ import { ITransaction } from './interfaces/ITransaction.js';
3
+ import { TransactionBase } from './Transaction.js';
4
+ export declare class TransactionParser {
5
+ static parseTransactions(transactions: ITransaction[]): TransactionBase<OPNetTransactionTypes>[];
6
+ static parseTransaction(transaction: ITransaction): TransactionBase<OPNetTransactionTypes>;
7
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionParser = void 0;
4
+ const OPNetTransactionTypes_js_1 = require("../interfaces/opnet/OPNetTransactionTypes.js");
5
+ const DeploymentTransaction_js_1 = require("./DeploymentTransaction.js");
6
+ const GenericTransaction_js_1 = require("./GenericTransaction.js");
7
+ const InteractionTransaction_js_1 = require("./InteractionTransaction.js");
8
+ class TransactionParser {
9
+ static parseTransactions(transactions) {
10
+ if (!transactions) {
11
+ return [];
12
+ }
13
+ const transactionArray = [];
14
+ for (let transaction of transactions) {
15
+ transactionArray.push(this.parseTransaction(transaction));
16
+ }
17
+ return transactionArray;
18
+ }
19
+ static parseTransaction(transaction) {
20
+ switch (transaction.OPNetType) {
21
+ case OPNetTransactionTypes_js_1.OPNetTransactionTypes.Generic:
22
+ return new GenericTransaction_js_1.GenericTransaction(transaction);
23
+ case OPNetTransactionTypes_js_1.OPNetTransactionTypes.Interaction:
24
+ return new InteractionTransaction_js_1.InteractionTransaction(transaction);
25
+ case OPNetTransactionTypes_js_1.OPNetTransactionTypes.Deployment:
26
+ return new DeploymentTransaction_js_1.DeploymentTransaction(transaction);
27
+ default:
28
+ throw new Error('Unknown transaction type');
29
+ }
30
+ }
31
+ }
32
+ exports.TransactionParser = TransactionParser;
@@ -0,0 +1,10 @@
1
+ /// <reference types="node" />
2
+ import { NetEvent } from '@btc-vision/bsi-binary';
3
+ import { ITransactionReceipt } from './interfaces/ITransactionReceipt.js';
4
+ export declare class TransactionReceipt implements ITransactionReceipt {
5
+ readonly receipt: Buffer | null;
6
+ readonly receiptProofs: string[];
7
+ readonly events: NetEvent[];
8
+ readonly revert?: Buffer;
9
+ constructor(receipt: ITransactionReceipt);
10
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionReceipt = void 0;
4
+ class TransactionReceipt {
5
+ receipt;
6
+ receiptProofs;
7
+ events;
8
+ revert;
9
+ constructor(receipt) {
10
+ this.receipt = receipt.receipt ? Buffer.from(receipt.receipt, 'base64') : null;
11
+ this.receiptProofs = receipt.receiptProofs || [];
12
+ this.events = receipt.events || [];
13
+ this.revert = receipt.revert ? Buffer.from(receipt.revert, 'base64') : undefined;
14
+ }
15
+ }
16
+ exports.TransactionReceipt = TransactionReceipt;
@@ -0,0 +1,39 @@
1
+ /// <reference types="node" />
2
+ import { NetEvent } from '@btc-vision/bsi-binary';
3
+ import { BigNumberish } from 'ethers';
4
+ import { OPNetTransactionTypes } from '../../interfaces/opnet/OPNetTransactionTypes.js';
5
+ import { ITransactionInput, TransactionInput } from '../TransactionInput.js';
6
+ import { ITransactionOutput, TransactionOutput } from '../TransactionOutput.js';
7
+ export interface ITransactionBase<T extends OPNetTransactionTypes> {
8
+ readonly id: string;
9
+ readonly hash: string;
10
+ readonly index: number;
11
+ readonly burnedBitcoin: string | BigNumberish;
12
+ readonly revert?: string | Buffer;
13
+ readonly inputs: ITransactionInput[] | TransactionInput[];
14
+ readonly outputs: ITransactionOutput[] | TransactionOutput[];
15
+ readonly OPNetType: T;
16
+ }
17
+ export interface IGenericTransaction extends ITransactionBase<OPNetTransactionTypes.Generic> {
18
+ }
19
+ export interface IDeploymentTransaction extends ITransactionBase<OPNetTransactionTypes.Deployment> {
20
+ readonly contractAddress: string;
21
+ readonly virtualAddress: string;
22
+ readonly bytecode: Buffer | string;
23
+ readonly wasCompressed: boolean;
24
+ readonly deployerPubKey: Buffer | string;
25
+ readonly deployerAddress: string;
26
+ readonly contractSeed: Buffer | string;
27
+ readonly contractSaltHash: Buffer | string;
28
+ }
29
+ export interface IInteractionTransaction extends ITransactionBase<OPNetTransactionTypes.Interaction> {
30
+ readonly calldata: string | Buffer;
31
+ readonly senderPubKeyHash: string | Buffer;
32
+ readonly contractSecret: string | Buffer;
33
+ readonly interactionPubKey: string | Buffer;
34
+ readonly wasCompressed: boolean;
35
+ readonly events: NetEvent[];
36
+ readonly receipt?: string | Buffer;
37
+ readonly receiptProofs?: string[];
38
+ }
39
+ export type ITransaction = IDeploymentTransaction | IInteractionTransaction | IGenericTransaction;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /// <reference types="node" />
2
+ import { NetEvent } from '@btc-vision/bsi-binary';
3
+ export interface ITransactionReceipt {
4
+ readonly receipt: string | null | Buffer;
5
+ readonly receiptProofs: string[];
6
+ readonly events: NetEvent[];
7
+ readonly revert?: string | Buffer;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { BigNumberish } from 'ethers';
2
+ export declare class BitcoinUtils {
3
+ static formatUnits(value: BigNumberish, decimals?: number): string;
4
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BitcoinUtils = void 0;
7
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
8
+ class BitcoinUtils {
9
+ static formatUnits(value, decimals = 8) {
10
+ const bn = new bignumber_js_1.default(value.toString());
11
+ return bn.dividedBy(new bignumber_js_1.default(10).pow(decimals)).toString();
12
+ }
13
+ }
14
+ exports.BitcoinUtils = BitcoinUtils;
@@ -1 +1 @@
1
- window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAACo3WXW/TMBQG4P/i64qyovHRu65DEDStUVs+JMSF65xRK4kdbKcwof13lLajjn18ktv49aN82G/8/S9z8MexOVvl9+C2hivLhZNabR8bsGzCGu72bM5AtbWdoqEXe1dXbMJKqQo2f/s0+W8udtYZLty6EbnRB1mAuYii4taCnSKhvng1880b6YSWalEUBqyNuf44KVValAjQXabmLXlVrcG2lYsnX8ZIQavjI99yxxHDG6WUW2gq/ViD8r9IzKExyv0ACowUJBpnKDFTDsx5xVAqnqPkT5vVPbm6ggBlbZw2UHzhVQux4w1ShnfbN9wiThAYaWWqaZHVFiZGaqvWDXGnyEgv58Zi7z6KjPTWIEA29A2eM5T4efttFRvdVWrWV9httCiBLi0sRe6AhRBg7Z203mPJbrk/cNGt/Mt4n5ldv8aZzEE9RHUZkgsq0FeQGsQmL3Vd+1s5Ik4BEjqV5q8WrHtvjDa4FqZGkF0P9zs2Bp8zJDdQtb46om4DnOpbXx7q3IAdKl2fHlO8Ab/mv59/VLjpBUioa1b+E4Le9SU/QVLJ9vU1soHTYFDBCRGp4TQZ9nDCxLo4jUblmVDRAg3YfoP6UNyi/an9U9idLL2P4bpD4zROBN7Ld2+urmfhee0j8ALMcg+itG2dG60fIjmRG/Iz7GB3IrPUuQ5R0M12ZtKbK3JyfXzf2KvzhoaU7jvZcP7x4tDMAxjbe4QDN5LvKrDT81BfeDV7+vEPYyErXU4MAAA="
1
+ window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAACpXX0W7TMBQG4HfxdUfZYAN613UIgqa16jpAQly4ztlmNYmD7YxVaO8+Je1Wxz4+Mbc5v78mqetf/fWPWXi0bMKm59kFt3y1rcGwEau5vWcTBlVTmrE7e3Nvy4KN2EZWOZt8HDFRcGPYhFmTH0lzBI8WdMUL9jR6tc+lFUpW07VEeW/sfYLjzBdXYFeaV4YLK1WFamgobk7Xxmou7LIWC60eZA76IHbPBmaMhPri8YlrnnMDM1V1S0LMnZLK/rXkuQZjEKc3T5CyyoK+5QKi1msiQbuxsojfVTcllUKJDbK8vUytm/GiWIJpCuTNHmaksH/37ZZGDGdKKRdQF2pbQuXutZBDY5T7BSrQUpBomKHEjN6OWep+7DbH/jdF3R2eo+Rv1/Mr8vfnBSjr2ioN+XdeNMg2d4aU4dx2+3JCxwskWllVN8gX4CcStXljh7hdJNFbcG2wdx9EEr0lCJA1fYP7DCXerH7OQ6O9Sq36AetrJTZAH+tYKvVcX2hVg7bSLSD5cnz2D/lDtI+fnJ6hJeltXlftZxK41xN9upb9vRyyfpbis6kQYMylNBYlnXkik1koh6g2Q3Jeq7gK0izY4pkqS/dUC4hdgIR2PfSnAWM/a600rvmpBLKttn5theBLhuaCOuhBaBt4xEABul5CCXo41YKuPNSEHjtUYS6dUmMev+R/6RfrBEio7Sl+B/GDoJcgqWiXuRrZZ3HQK7SIiJRanPRbLWJizRZHgyqKqGgdeWy/j1wo7CTvRA4rYXuQbPs3BauNrWe+/fTh+PQk+j/hUm4gUINEouk2QgR1I4Nqe35+BZ6Dnt2D2JimXGilbgM6khvyL0CoHHLsL8IODgJDYha3sv9Q0MNmz8QPl8BZqG6/YV+xMxpS2n1q/PXdxaGVD6BN7xEeuJZ8XYAZ70d94Z27+A5seDjeNlX35GbsjPvI2fun38/2HutrpxAAAA=="