@fuel-ts/account 0.0.0-pr-1699-20240202183346

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.

Potentially problematic release.


This version of @fuel-ts/account might be problematic. Click here for more details.

Files changed (239) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +70 -0
  3. package/dist/account.d.ts +174 -0
  4. package/dist/account.d.ts.map +1 -0
  5. package/dist/base-wallet-unlocked.d.ts +73 -0
  6. package/dist/base-wallet-unlocked.d.ts.map +1 -0
  7. package/dist/configs.d.ts +2 -0
  8. package/dist/configs.d.ts.map +1 -0
  9. package/dist/configs.global.js +6 -0
  10. package/dist/configs.global.js.map +1 -0
  11. package/dist/configs.js +31 -0
  12. package/dist/configs.js.map +1 -0
  13. package/dist/configs.mjs +6 -0
  14. package/dist/configs.mjs.map +1 -0
  15. package/dist/connectors/default-connector.d.ts +7 -0
  16. package/dist/connectors/default-connector.d.ts.map +1 -0
  17. package/dist/connectors/fixtures/generate-accounts.d.ts +2 -0
  18. package/dist/connectors/fixtures/generate-accounts.d.ts.map +1 -0
  19. package/dist/connectors/fixtures/mocked-connector.d.ts +45 -0
  20. package/dist/connectors/fixtures/mocked-connector.d.ts.map +1 -0
  21. package/dist/connectors/fixtures/promise-callback.d.ts +7 -0
  22. package/dist/connectors/fixtures/promise-callback.d.ts.map +1 -0
  23. package/dist/connectors/fuel-connector.d.ts +187 -0
  24. package/dist/connectors/fuel-connector.d.ts.map +1 -0
  25. package/dist/connectors/fuel-wallet-connector.d.ts +54 -0
  26. package/dist/connectors/fuel-wallet-connector.d.ts.map +1 -0
  27. package/dist/connectors/fuel-wallet-development-connector.d.ts +7 -0
  28. package/dist/connectors/fuel-wallet-development-connector.d.ts.map +1 -0
  29. package/dist/connectors/fuel-wallet-locked.d.ts +13 -0
  30. package/dist/connectors/fuel-wallet-locked.d.ts.map +1 -0
  31. package/dist/connectors/fuel-wallet-provider.d.ts +14 -0
  32. package/dist/connectors/fuel-wallet-provider.d.ts.map +1 -0
  33. package/dist/connectors/fuel.d.ts +129 -0
  34. package/dist/connectors/fuel.d.ts.map +1 -0
  35. package/dist/connectors/fuelet-wallet-connector.d.ts +8 -0
  36. package/dist/connectors/fuelet-wallet-connector.d.ts.map +1 -0
  37. package/dist/connectors/types/abi.d.ts +9 -0
  38. package/dist/connectors/types/abi.d.ts.map +1 -0
  39. package/dist/connectors/types/account.d.ts +23 -0
  40. package/dist/connectors/types/account.d.ts.map +1 -0
  41. package/dist/connectors/types/asset.d.ts +16 -0
  42. package/dist/connectors/types/asset.d.ts.map +1 -0
  43. package/dist/connectors/types/coin.d.ts +6 -0
  44. package/dist/connectors/types/coin.d.ts.map +1 -0
  45. package/dist/connectors/types/connection.d.ts +7 -0
  46. package/dist/connectors/types/connection.d.ts.map +1 -0
  47. package/dist/connectors/types/connector-metadata.d.ts +12 -0
  48. package/dist/connectors/types/connector-metadata.d.ts.map +1 -0
  49. package/dist/connectors/types/connector-types.d.ts +34 -0
  50. package/dist/connectors/types/connector-types.d.ts.map +1 -0
  51. package/dist/connectors/types/constants.d.ts +7 -0
  52. package/dist/connectors/types/constants.d.ts.map +1 -0
  53. package/dist/connectors/types/data-type.d.ts +46 -0
  54. package/dist/connectors/types/data-type.d.ts.map +1 -0
  55. package/dist/connectors/types/error.d.ts +18 -0
  56. package/dist/connectors/types/error.d.ts.map +1 -0
  57. package/dist/connectors/types/events.d.ts +150 -0
  58. package/dist/connectors/types/events.d.ts.map +1 -0
  59. package/dist/connectors/types/fuel-storage.d.ts +11 -0
  60. package/dist/connectors/types/fuel-storage.d.ts.map +1 -0
  61. package/dist/connectors/types/index.d.ts +15 -0
  62. package/dist/connectors/types/index.d.ts.map +1 -0
  63. package/dist/connectors/types/message.d.ts +15 -0
  64. package/dist/connectors/types/message.d.ts.map +1 -0
  65. package/dist/connectors/types/nertwork-data.d.ts +7 -0
  66. package/dist/connectors/types/nertwork-data.d.ts.map +1 -0
  67. package/dist/connectors/types/target-object.d.ts +14 -0
  68. package/dist/connectors/types/target-object.d.ts.map +1 -0
  69. package/dist/connectors/utils/cache.d.ts +14 -0
  70. package/dist/connectors/utils/cache.d.ts.map +1 -0
  71. package/dist/connectors/utils/dispatch-fuel-connector-event.d.ts +7 -0
  72. package/dist/connectors/utils/dispatch-fuel-connector-event.d.ts.map +1 -0
  73. package/dist/connectors/utils/get-asset-by-chain.d.ts +3 -0
  74. package/dist/connectors/utils/get-asset-by-chain.d.ts.map +1 -0
  75. package/dist/connectors/utils/index.d.ts +5 -0
  76. package/dist/connectors/utils/index.d.ts.map +1 -0
  77. package/dist/connectors/utils/promises.d.ts +8 -0
  78. package/dist/connectors/utils/promises.d.ts.map +1 -0
  79. package/dist/hdwallet/hdwallet.d.ts +58 -0
  80. package/dist/hdwallet/hdwallet.d.ts.map +1 -0
  81. package/dist/hdwallet/index.d.ts +2 -0
  82. package/dist/hdwallet/index.d.ts.map +1 -0
  83. package/dist/index.d.ts +14 -0
  84. package/dist/index.d.ts.map +1 -0
  85. package/dist/index.global.js +48673 -0
  86. package/dist/index.global.js.map +1 -0
  87. package/dist/index.js +8728 -0
  88. package/dist/index.js.map +1 -0
  89. package/dist/index.mjs +8642 -0
  90. package/dist/index.mjs.map +1 -0
  91. package/dist/keystore-wallet.d.ts +38 -0
  92. package/dist/keystore-wallet.d.ts.map +1 -0
  93. package/dist/mnemonic/index.d.ts +3 -0
  94. package/dist/mnemonic/index.d.ts.map +1 -0
  95. package/dist/mnemonic/mnemonic.d.ts +85 -0
  96. package/dist/mnemonic/mnemonic.d.ts.map +1 -0
  97. package/dist/mnemonic/utils.d.ts +8 -0
  98. package/dist/mnemonic/utils.d.ts.map +1 -0
  99. package/dist/predicate/index.d.ts +3 -0
  100. package/dist/predicate/index.d.ts.map +1 -0
  101. package/dist/predicate/predicate.d.ts +93 -0
  102. package/dist/predicate/predicate.d.ts.map +1 -0
  103. package/dist/predicate/utils/getPredicateRoot.d.ts +12 -0
  104. package/dist/predicate/utils/getPredicateRoot.d.ts.map +1 -0
  105. package/dist/predicate/utils/index.d.ts +2 -0
  106. package/dist/predicate/utils/index.d.ts.map +1 -0
  107. package/dist/providers/__generated__/operations.d.ts +3539 -0
  108. package/dist/providers/__generated__/operations.d.ts.map +1 -0
  109. package/dist/providers/coin-quantity.d.ts +21 -0
  110. package/dist/providers/coin-quantity.d.ts.map +1 -0
  111. package/dist/providers/coin.d.ts +15 -0
  112. package/dist/providers/coin.d.ts.map +1 -0
  113. package/dist/providers/fuel-graphql-subscriber.d.ts +13 -0
  114. package/dist/providers/fuel-graphql-subscriber.d.ts.map +1 -0
  115. package/dist/providers/index.d.ts +11 -0
  116. package/dist/providers/index.d.ts.map +1 -0
  117. package/dist/providers/memory-cache.d.ts +11 -0
  118. package/dist/providers/memory-cache.d.ts.map +1 -0
  119. package/dist/providers/message.d.ts +61 -0
  120. package/dist/providers/message.d.ts.map +1 -0
  121. package/dist/providers/provider.d.ts +500 -0
  122. package/dist/providers/provider.d.ts.map +1 -0
  123. package/dist/providers/resource.d.ts +37 -0
  124. package/dist/providers/resource.d.ts.map +1 -0
  125. package/dist/providers/transaction-request/create-transaction-request.d.ts +73 -0
  126. package/dist/providers/transaction-request/create-transaction-request.d.ts.map +1 -0
  127. package/dist/providers/transaction-request/errors.d.ts +25 -0
  128. package/dist/providers/transaction-request/errors.d.ts.map +1 -0
  129. package/dist/providers/transaction-request/hash-transaction.d.ts +9 -0
  130. package/dist/providers/transaction-request/hash-transaction.d.ts.map +1 -0
  131. package/dist/providers/transaction-request/index.d.ts +10 -0
  132. package/dist/providers/transaction-request/index.d.ts.map +1 -0
  133. package/dist/providers/transaction-request/input.d.ts +59 -0
  134. package/dist/providers/transaction-request/input.d.ts.map +1 -0
  135. package/dist/providers/transaction-request/output.d.ts +39 -0
  136. package/dist/providers/transaction-request/output.d.ts.map +1 -0
  137. package/dist/providers/transaction-request/script-transaction-request.d.ts +107 -0
  138. package/dist/providers/transaction-request/script-transaction-request.d.ts.map +1 -0
  139. package/dist/providers/transaction-request/scripts.d.ts +6 -0
  140. package/dist/providers/transaction-request/scripts.d.ts.map +1 -0
  141. package/dist/providers/transaction-request/storage-slot.d.ts +10 -0
  142. package/dist/providers/transaction-request/storage-slot.d.ts.map +1 -0
  143. package/dist/providers/transaction-request/transaction-request.d.ts +267 -0
  144. package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -0
  145. package/dist/providers/transaction-request/types.d.ts +10 -0
  146. package/dist/providers/transaction-request/types.d.ts.map +1 -0
  147. package/dist/providers/transaction-request/utils.d.ts +4 -0
  148. package/dist/providers/transaction-request/utils.d.ts.map +1 -0
  149. package/dist/providers/transaction-request/witness.d.ts +5 -0
  150. package/dist/providers/transaction-request/witness.d.ts.map +1 -0
  151. package/dist/providers/transaction-response/getDecodedLogs.d.ts +5 -0
  152. package/dist/providers/transaction-response/getDecodedLogs.d.ts.map +1 -0
  153. package/dist/providers/transaction-response/index.d.ts +3 -0
  154. package/dist/providers/transaction-response/index.d.ts.map +1 -0
  155. package/dist/providers/transaction-response/transaction-response.d.ts +106 -0
  156. package/dist/providers/transaction-response/transaction-response.d.ts.map +1 -0
  157. package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts +20 -0
  158. package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts.map +1 -0
  159. package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts +21 -0
  160. package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts.map +1 -0
  161. package/dist/providers/transaction-summary/call.d.ts +18 -0
  162. package/dist/providers/transaction-summary/call.d.ts.map +1 -0
  163. package/dist/providers/transaction-summary/date.d.ts +3 -0
  164. package/dist/providers/transaction-summary/date.d.ts.map +1 -0
  165. package/dist/providers/transaction-summary/get-transaction-summary.d.ts +31 -0
  166. package/dist/providers/transaction-summary/get-transaction-summary.d.ts.map +1 -0
  167. package/dist/providers/transaction-summary/index.d.ts +11 -0
  168. package/dist/providers/transaction-summary/index.d.ts.map +1 -0
  169. package/dist/providers/transaction-summary/input.d.ts +21 -0
  170. package/dist/providers/transaction-summary/input.d.ts.map +1 -0
  171. package/dist/providers/transaction-summary/operations.d.ts +42 -0
  172. package/dist/providers/transaction-summary/operations.d.ts.map +1 -0
  173. package/dist/providers/transaction-summary/output.d.ts +15 -0
  174. package/dist/providers/transaction-summary/output.d.ts.map +1 -0
  175. package/dist/providers/transaction-summary/receipt.d.ts +7 -0
  176. package/dist/providers/transaction-summary/receipt.d.ts.map +1 -0
  177. package/dist/providers/transaction-summary/status.d.ts +9 -0
  178. package/dist/providers/transaction-summary/status.d.ts.map +1 -0
  179. package/dist/providers/transaction-summary/types.d.ts +147 -0
  180. package/dist/providers/transaction-summary/types.d.ts.map +1 -0
  181. package/dist/providers/utils/auto-retry-fetch.d.ts +36 -0
  182. package/dist/providers/utils/auto-retry-fetch.d.ts.map +1 -0
  183. package/dist/providers/utils/block-explorer.d.ts +14 -0
  184. package/dist/providers/utils/block-explorer.d.ts.map +1 -0
  185. package/dist/providers/utils/gas.d.ts +38 -0
  186. package/dist/providers/utils/gas.d.ts.map +1 -0
  187. package/dist/providers/utils/index.d.ts +7 -0
  188. package/dist/providers/utils/index.d.ts.map +1 -0
  189. package/dist/providers/utils/json.d.ts +7 -0
  190. package/dist/providers/utils/json.d.ts.map +1 -0
  191. package/dist/providers/utils/merge-quantities.d.ts +3 -0
  192. package/dist/providers/utils/merge-quantities.d.ts.map +1 -0
  193. package/dist/providers/utils/receipts.d.ts +10 -0
  194. package/dist/providers/utils/receipts.d.ts.map +1 -0
  195. package/dist/providers/utils/sleep.d.ts +3 -0
  196. package/dist/providers/utils/sleep.d.ts.map +1 -0
  197. package/dist/providers/utils/time.d.ts +40 -0
  198. package/dist/providers/utils/time.d.ts.map +1 -0
  199. package/dist/signer/index.d.ts +2 -0
  200. package/dist/signer/index.d.ts.map +1 -0
  201. package/dist/signer/signer.d.ts +64 -0
  202. package/dist/signer/signer.d.ts.map +1 -0
  203. package/dist/test-utils/generateTestWallet.d.ts +4 -0
  204. package/dist/test-utils/generateTestWallet.d.ts.map +1 -0
  205. package/dist/test-utils/launchNode.d.ts +54 -0
  206. package/dist/test-utils/launchNode.d.ts.map +1 -0
  207. package/dist/test-utils/seedTestWallet.d.ts +4 -0
  208. package/dist/test-utils/seedTestWallet.d.ts.map +1 -0
  209. package/dist/test-utils.d.ts +4 -0
  210. package/dist/test-utils.d.ts.map +1 -0
  211. package/dist/test-utils.global.js +51455 -0
  212. package/dist/test-utils.global.js.map +1 -0
  213. package/dist/test-utils.js +7885 -0
  214. package/dist/test-utils.js.map +1 -0
  215. package/dist/test-utils.mjs +7890 -0
  216. package/dist/test-utils.mjs.map +1 -0
  217. package/dist/utils/formatTransferToContractScriptData.d.ts +15 -0
  218. package/dist/utils/formatTransferToContractScriptData.d.ts.map +1 -0
  219. package/dist/wallet-manager/index.d.ts +3 -0
  220. package/dist/wallet-manager/index.d.ts.map +1 -0
  221. package/dist/wallet-manager/storages/memory-storage.d.ts +10 -0
  222. package/dist/wallet-manager/storages/memory-storage.d.ts.map +1 -0
  223. package/dist/wallet-manager/types.d.ts +44 -0
  224. package/dist/wallet-manager/types.d.ts.map +1 -0
  225. package/dist/wallet-manager/vaults/mnemonic-vault.d.ts +33 -0
  226. package/dist/wallet-manager/vaults/mnemonic-vault.d.ts.map +1 -0
  227. package/dist/wallet-manager/vaults/privatekey-vault.d.ts +33 -0
  228. package/dist/wallet-manager/vaults/privatekey-vault.d.ts.map +1 -0
  229. package/dist/wallet-manager/wallet-manager.d.ts +104 -0
  230. package/dist/wallet-manager/wallet-manager.d.ts.map +1 -0
  231. package/dist/wallet.d.ts +69 -0
  232. package/dist/wallet.d.ts.map +1 -0
  233. package/dist/wallets.d.ts +76 -0
  234. package/dist/wallets.d.ts.map +1 -0
  235. package/dist/wordlists/index.d.ts +5 -0
  236. package/dist/wordlists/index.d.ts.map +1 -0
  237. package/dist/wordlists/words/english.d.ts +2 -0
  238. package/dist/wordlists/words/english.d.ts.map +1 -0
  239. package/package.json +91 -0
@@ -0,0 +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C,EAAE,EAAE,CAAC;CACf;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,gBAAgB,MAUjD;AAED,wBAAgB,+BAA+B,CAAC,EAC9C,QAAQ,EACR,aAAa,EACb,WAAW,EACX,iBAAiB,GAClB,EAAE;IACD,QAAQ,EAAE,WAAW,CAAC;IACtB,iBAAiB,EAAE,EAAE,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,MASA;AAED,wBAAgB,+BAA+B,CAAC,EAC9C,QAAQ,EACR,WAAW,GACZ,EAAE;IACD,QAAQ,EAAE,WAAW,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,MAEA"}
@@ -0,0 +1,7 @@
1
+ export * from './receipts';
2
+ export * from './block-explorer';
3
+ export * from './gas';
4
+ export * from './json';
5
+ export * from './sleep';
6
+ export * from './time';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Stringify Transaction to a JSON object
3
+ * compatible with the Transaction class constructor.
4
+ */
5
+ /** @hidden */
6
+ export declare function normalizeJSON(root: any): any;
7
+ //# sourceMappingURL=json.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../src/providers/utils/json.ts"],"names":[],"mappings":"AAkCA;;;GAGG;AACH,cAAc;AACd,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,OAKtC"}
@@ -0,0 +1,3 @@
1
+ import type { CoinQuantity } from '../coin-quantity';
2
+ export declare const mergeQuantities: (arr1: CoinQuantity[], arr2: CoinQuantity[]) => CoinQuantity[];
3
+ //# sourceMappingURL=merge-quantities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-quantities.d.ts","sourceRoot":"","sources":["../../../src/providers/utils/merge-quantities.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,eAAO,MAAM,eAAe,SAAU,YAAY,EAAE,QAAQ,YAAY,EAAE,KAAG,YAAY,EAiBxF,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { ReceiptBurn, ReceiptCall, ReceiptLog, ReceiptLogData, ReceiptMessageOut, ReceiptMint, ReceiptPanic, ReceiptReturn, ReceiptReturnData, ReceiptRevert, ReceiptScriptResult, ReceiptTransfer, ReceiptTransferOut } from '@fuel-ts/transactions';
2
+ import type { GqlReceipt } from '../__generated__/operations';
3
+ import type { TransactionResultReceipt } from '../transaction-response';
4
+ /** @hidden */
5
+ export declare const getReceiptsWithMissingData: (receipts: Array<TransactionResultReceipt>) => {
6
+ missingOutputVariables: Array<ReceiptRevert>;
7
+ missingOutputContractIds: Array<ReceiptPanic>;
8
+ };
9
+ export declare function assembleReceiptByType(receipt: GqlReceipt): ReceiptCall | ReceiptReturn | ReceiptReturnData | ReceiptPanic | ReceiptRevert | ReceiptLog | ReceiptLogData | ReceiptTransfer | ReceiptTransferOut | ReceiptScriptResult | ReceiptMessageOut | ReceiptMint | ReceiptBurn;
10
+ //# sourceMappingURL=receipts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"receipts.d.ts","sourceRoot":"","sources":["../../../src/providers/utils/receipts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAU/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAgBxE,cAAc;AACd,eAAO,MAAM,0BAA0B,aAAc,MAAM,wBAAwB,CAAC;4BAExD,MAAM,aAAa,CAAC;8BAClB,MAAM,YAAY,CAAC;CAe9C,CAAC;AAIJ,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,UAAU,6NA+MxD"}
@@ -0,0 +1,3 @@
1
+ /** @hidden */
2
+ export declare function sleep(time: number): Promise<unknown>;
3
+ //# sourceMappingURL=sleep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../../src/providers/utils/sleep.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,oBAMjC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @hidden
3
+ *
4
+ * Converts a TAI64 timestamp to a Unix timestamp in milliseconds.
5
+ *
6
+ * TAI64 is a 64-bit unsigned integer format that represents a point in time
7
+ * as the number of TAI seconds elapsed since 00:00:00 TAI, January 1, 1970.
8
+ *
9
+ * Unix timestamp, on the other hand, represents the number of milliseconds
10
+ * elapsed since 00:00:00 UTC, January 1, 1970.
11
+ *
12
+ * To convert a TAI64 timestamp to a Unix timestamp, we need to subtract the
13
+ * TAI64 epoch time (00:00:00 TAI, January 1, 1970) from the TAI64 timestamp
14
+ * and then add the Unix epoch time (00:00:00 UTC, January 1, 1970). The epoch
15
+ * time difference between TAI64 and Unix is 2 ** 62 + 10.
16
+ *
17
+ * @param tai64Timestamp - The TAI64 timestamp to convert.
18
+ * @returns - The Unix timestamp in milliseconds.
19
+ */
20
+ export declare const fromTai64ToUnix: (tai64Timestamp: string) => number;
21
+ /**
22
+ * @hidden
23
+ *
24
+ * Converts a Unix timestamp in milliseconds to a TAI64 timestamp.
25
+ *
26
+ * Unix timestamp represents the number of milliseconds elapsed since
27
+ * 00:00:00 UTC, January 1, 1970. TAI64 timestamp is a 64-bit unsigned
28
+ * integer format that represents a point in time as the number of TAI
29
+ * seconds elapsed since 00:00:00 TAI, January 1, 1970.
30
+ *
31
+ * To convert a Unix timestamp to a TAI64 timestamp, we need to add the
32
+ * TAI64 epoch time (00:00:00 TAI, January 1, 1970) to the Unix timestamp
33
+ * and then subtract the Unix epoch time (00:00:00 UTC, January 1, 1970).
34
+ * The epoch time difference between TAI64 and Unix is 2 ** 62 + 10.
35
+ *
36
+ * @param unixTimestampMs - The Unix timestamp in milliseconds to convert.
37
+ * @returns - The TAI64 timestamp as a string.
38
+ */
39
+ export declare const fromUnixToTai64: (unixTimestampMs: number) => string;
40
+ //# sourceMappingURL=time.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../src/providers/utils/time.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,eAAe,mBAAoB,MAAM,WACS,CAAC;AAEhE;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,oBAAqB,MAAM,WACc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './signer';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/signer/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1,64 @@
1
+ import { Address } from '@fuel-ts/address';
2
+ import type { BytesLike } from 'ethers';
3
+ export declare class Signer {
4
+ readonly address: Address;
5
+ readonly publicKey: string;
6
+ readonly compressedPublicKey: string;
7
+ readonly privateKey: string;
8
+ /**
9
+ * Create a Signer instance from a given private key
10
+ *
11
+ * @param privateKey - The private key to use for signing
12
+ * @returns A new Signer instance
13
+ */
14
+ constructor(privateKey: BytesLike);
15
+ /**
16
+ * Sign data using the Signer instance
17
+ *
18
+ * Signature is a 64 byte array of the concatenated r and s values with the compressed recoveryParam byte.
19
+ * @ignore
20
+ * [Read more](FuelLabs/fuel-specs/specs/protocol/cryptographic_primitives.md#public-key-cryptography)
21
+ *
22
+ * @param data - The data to be sign
23
+ * @returns hashed signature
24
+ */
25
+ sign(data: BytesLike): string;
26
+ /**
27
+ * Add point on the current elliptic curve
28
+ *
29
+ * @param point - Point to add on the curve
30
+ * @returns compressed point on the curve
31
+ */
32
+ addPoint(point: BytesLike): string;
33
+ /**
34
+ * Recover the public key from a signature performed with [`sign`](#sign).
35
+ *
36
+ * @param data - Data
37
+ * @param signature - hashed signature
38
+ * @returns public key from signature from the
39
+ */
40
+ static recoverPublicKey(data: BytesLike, signature: BytesLike): string;
41
+ /**
42
+ * Recover the address from a signature performed with [`sign`](#sign).
43
+ *
44
+ * @param data - Data
45
+ * @param signature - Signature
46
+ * @returns Address from signature
47
+ */
48
+ static recoverAddress(data: BytesLike, signature: BytesLike): Address;
49
+ /**
50
+ * Generate a random privateKey
51
+ *
52
+ * @param entropy - Adds extra entropy to generate the privateKey
53
+ * @returns random 32-byte hashed
54
+ */
55
+ static generatePrivateKey(entropy?: BytesLike): string | Uint8Array;
56
+ /**
57
+ * Extended publicKey from a compact publicKey
58
+ *
59
+ * @param publicKey - Compact publicKey
60
+ * @returns extended publicKey
61
+ */
62
+ static extendPublicKey(publicKey: BytesLike): string;
63
+ }
64
+ //# sourceMappingURL=signer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../src/signer/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAK3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGxC,qBAAa,MAAM;IACjB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IAErC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;;;;OAKG;gBACS,UAAU,EAAE,SAAS;IAoBjC;;;;;;;;;OASG;IACH,IAAI,CAAC,IAAI,EAAE,SAAS;IAYpB;;;;;OAKG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS;IAOzB;;;;;;OAMG;IACH,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM;IAiBtE;;;;;;OAMG;IACH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO;IAIrE;;;;;OAKG;IACH,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,SAAS;IAI7C;;;;;OAKG;IACH,MAAM,CAAC,eAAe,CAAC,SAAS,EAAE,SAAS;CAI5C"}
@@ -0,0 +1,4 @@
1
+ import type { Provider, CoinQuantityLike } from '../providers';
2
+ import type { WalletUnlocked } from '../wallets';
3
+ export declare const generateTestWallet: (provider: Provider, quantities?: CoinQuantityLike[]) => Promise<WalletUnlocked>;
4
+ //# sourceMappingURL=generateTestWallet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateTestWallet.d.ts","sourceRoot":"","sources":["../../src/test-utils/generateTestWallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjD,eAAO,MAAM,kBAAkB,aACnB,QAAQ,eACL,gBAAgB,EAAE,KAC9B,QAAQ,cAAc,CAMxB,CAAC"}
@@ -0,0 +1,54 @@
1
+ /// <reference types="node" />
2
+ import type { ChildProcessWithoutNullStreams } from 'child_process';
3
+ import { Provider } from '../providers';
4
+ import type { WalletUnlocked } from '../wallets';
5
+ export type LaunchNodeOptions = {
6
+ ip?: string;
7
+ port?: string;
8
+ args?: string[];
9
+ useSystemFuelCore?: boolean;
10
+ loggingEnabled?: boolean;
11
+ debugEnabled?: boolean;
12
+ basePath?: string;
13
+ };
14
+ export type LaunchNodeResult = Promise<{
15
+ cleanup: () => void;
16
+ ip: string;
17
+ port: string;
18
+ chainConfigPath: string;
19
+ }>;
20
+ export type KillNodeParams = {
21
+ child: ChildProcessWithoutNullStreams;
22
+ configPath: string;
23
+ killFn: (pid: number) => void;
24
+ state: {
25
+ isDead: boolean;
26
+ };
27
+ };
28
+ export declare const killNode: (params: KillNodeParams) => void;
29
+ /**
30
+ * Launches a fuel-core node.
31
+ * @param ip - the ip to bind to. (optional, defaults to 0.0.0.0)
32
+ * @param port - the port to bind to. (optional, defaults to 4000 or the next available port)
33
+ * @param args - additional arguments to pass to fuel-core.
34
+ * @param useSystemFuelCore - whether to use the system fuel-core binary or the one provided by the \@fuel-ts/fuel-core package.
35
+ * @param loggingEnabled - whether the node should output logs. (optional, defaults to true)
36
+ * @param debugEnabled - whether the node should log debug messages. (optional, defaults to false)
37
+ * @param basePath - the base path to use for the temporary folder. (optional, defaults to os.tmpdir())
38
+ * */
39
+ export declare const launchNode: ({ ip, port, args, useSystemFuelCore, loggingEnabled, debugEnabled, basePath, }: LaunchNodeOptions) => LaunchNodeResult;
40
+ export type LaunchNodeAndGetWalletsResult = Promise<{
41
+ wallets: WalletUnlocked[];
42
+ stop: () => void;
43
+ provider: Provider;
44
+ }>;
45
+ /**
46
+ * Launches a fuel-core node and returns a provider, 10 wallets, and a cleanup function to stop the node.
47
+ * @param launchNodeOptions - options to launch the fuel-core node with.
48
+ * @param walletCount - the number of wallets to generate. (optional, defaults to 10)
49
+ * */
50
+ export declare const launchNodeAndGetWallets: ({ launchNodeOptions, walletCount, }?: {
51
+ launchNodeOptions?: Partial<LaunchNodeOptions> | undefined;
52
+ walletCount?: number | undefined;
53
+ }) => LaunchNodeAndGetWalletsResult;
54
+ //# sourceMappingURL=launchNode.d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;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC,CAAC;AAEH;;;;KAIK;AACL,eAAO,MAAM,uBAAuB;;;mCAiBnC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Account } from '../account';
2
+ import type { CoinQuantityLike } from '../providers';
3
+ export declare const seedTestWallet: (wallet: Account, quantities: CoinQuantityLike[]) => Promise<void>;
4
+ //# sourceMappingURL=seedTestWallet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seedTestWallet.d.ts","sourceRoot":"","sources":["../../src/test-utils/seedTestWallet.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGrD,eAAO,MAAM,cAAc,WAAkB,OAAO,cAAc,gBAAgB,EAAE,kBAuBnF,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './test-utils/generateTestWallet';
2
+ export * from './test-utils/seedTestWallet';
3
+ export * from './test-utils/launchNode';
4
+ //# sourceMappingURL=test-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../src/test-utils.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC"}