@fuel-ts/account 0.0.0-rc-1889-20240322122653 → 0.0.0-rc-1356-20240322130951

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 (218) hide show
  1. package/dist/account.d.ts +177 -0
  2. package/dist/account.d.ts.map +1 -0
  3. package/dist/configs.d.ts +2 -3
  4. package/dist/configs.d.ts.map +1 -0
  5. package/dist/connectors/fuel-connector.d.ts +188 -0
  6. package/dist/connectors/fuel-connector.d.ts.map +1 -0
  7. package/dist/connectors/fuel.d.ts +133 -0
  8. package/dist/connectors/fuel.d.ts.map +1 -0
  9. package/dist/connectors/index.d.ts +5 -0
  10. package/dist/connectors/index.d.ts.map +1 -0
  11. package/dist/connectors/types/connector-metadata.d.ts +12 -0
  12. package/dist/connectors/types/connector-metadata.d.ts.map +1 -0
  13. package/dist/connectors/types/connector-types.d.ts +34 -0
  14. package/dist/connectors/types/connector-types.d.ts.map +1 -0
  15. package/dist/connectors/types/data-type.d.ts +34 -0
  16. package/dist/connectors/types/data-type.d.ts.map +1 -0
  17. package/dist/connectors/types/events.d.ts +111 -0
  18. package/dist/connectors/types/events.d.ts.map +1 -0
  19. package/dist/connectors/types/index.d.ts +7 -0
  20. package/dist/connectors/types/index.d.ts.map +1 -0
  21. package/dist/connectors/types/local-storage.d.ts +11 -0
  22. package/dist/connectors/types/local-storage.d.ts.map +1 -0
  23. package/dist/connectors/types/target-object.d.ts +14 -0
  24. package/dist/connectors/types/target-object.d.ts.map +1 -0
  25. package/dist/connectors/utils/cache.d.ts +14 -0
  26. package/dist/connectors/utils/cache.d.ts.map +1 -0
  27. package/dist/connectors/utils/dispatch-fuel-connector-event.d.ts +7 -0
  28. package/dist/connectors/utils/dispatch-fuel-connector-event.d.ts.map +1 -0
  29. package/dist/connectors/utils/index.d.ts +4 -0
  30. package/dist/connectors/utils/index.d.ts.map +1 -0
  31. package/dist/connectors/utils/promises.d.ts +8 -0
  32. package/dist/connectors/utils/promises.d.ts.map +1 -0
  33. package/dist/hdwallet/hdwallet.d.ts +58 -0
  34. package/dist/hdwallet/hdwallet.d.ts.map +1 -0
  35. package/dist/hdwallet/index.d.ts +2 -0
  36. package/dist/hdwallet/index.d.ts.map +1 -0
  37. package/dist/index.d.ts +13 -904
  38. package/dist/index.d.ts.map +1 -0
  39. package/dist/index.global.js +461 -394
  40. package/dist/index.global.js.map +1 -1
  41. package/dist/index.js +350 -314
  42. package/dist/index.js.map +1 -1
  43. package/dist/index.mjs +251 -212
  44. package/dist/index.mjs.map +1 -1
  45. package/dist/mnemonic/index.d.ts +3 -0
  46. package/dist/mnemonic/index.d.ts.map +1 -0
  47. package/dist/mnemonic/mnemonic.d.ts +85 -0
  48. package/dist/mnemonic/mnemonic.d.ts.map +1 -0
  49. package/dist/mnemonic/utils.d.ts +8 -0
  50. package/dist/mnemonic/utils.d.ts.map +1 -0
  51. package/dist/predicate/index.d.ts +3 -0
  52. package/dist/predicate/index.d.ts.map +1 -0
  53. package/dist/predicate/predicate.d.ts +94 -0
  54. package/dist/predicate/predicate.d.ts.map +1 -0
  55. package/dist/predicate/utils/getPredicateRoot.d.ts +12 -0
  56. package/dist/predicate/utils/getPredicateRoot.d.ts.map +1 -0
  57. package/dist/predicate/utils/index.d.ts +2 -0
  58. package/dist/predicate/utils/index.d.ts.map +1 -0
  59. package/dist/providers/__generated__/operations.d.ts +3477 -0
  60. package/dist/providers/__generated__/operations.d.ts.map +1 -0
  61. package/dist/providers/assets/index.d.ts +5 -0
  62. package/dist/providers/assets/index.d.ts.map +1 -0
  63. package/dist/providers/assets/types.d.ts +36 -0
  64. package/dist/providers/assets/types.d.ts.map +1 -0
  65. package/dist/providers/assets/utils/index.d.ts +4 -0
  66. package/dist/providers/assets/utils/index.d.ts.map +1 -0
  67. package/dist/providers/assets/utils/network.d.ts +33 -0
  68. package/dist/providers/assets/utils/network.d.ts.map +1 -0
  69. package/dist/providers/assets/utils/resolveIconPaths.d.ts +14 -0
  70. package/dist/providers/assets/utils/resolveIconPaths.d.ts.map +1 -0
  71. package/dist/providers/assets/utils/url.d.ts +2 -0
  72. package/dist/providers/assets/utils/url.d.ts.map +1 -0
  73. package/dist/providers/chains.d.ts +11 -0
  74. package/dist/providers/chains.d.ts.map +1 -0
  75. package/dist/providers/coin-quantity.d.ts +21 -0
  76. package/dist/providers/coin-quantity.d.ts.map +1 -0
  77. package/dist/providers/coin.d.ts +15 -0
  78. package/dist/providers/coin.d.ts.map +1 -0
  79. package/dist/providers/fuel-graphql-subscriber.d.ts +23 -0
  80. package/dist/providers/fuel-graphql-subscriber.d.ts.map +1 -0
  81. package/dist/providers/index.d.ts +13 -0
  82. package/dist/providers/index.d.ts.map +1 -0
  83. package/dist/providers/memory-cache.d.ts +11 -0
  84. package/dist/providers/memory-cache.d.ts.map +1 -0
  85. package/dist/providers/message.d.ts +60 -0
  86. package/dist/providers/message.d.ts.map +1 -0
  87. package/dist/providers/provider.d.ts +522 -0
  88. package/dist/providers/provider.d.ts.map +1 -0
  89. package/dist/providers/resource.d.ts +37 -0
  90. package/dist/providers/resource.d.ts.map +1 -0
  91. package/dist/providers/transaction-request/create-transaction-request.d.ts +73 -0
  92. package/dist/providers/transaction-request/create-transaction-request.d.ts.map +1 -0
  93. package/dist/providers/transaction-request/errors.d.ts +25 -0
  94. package/dist/providers/transaction-request/errors.d.ts.map +1 -0
  95. package/dist/providers/transaction-request/hash-transaction.d.ts +9 -0
  96. package/dist/providers/transaction-request/hash-transaction.d.ts.map +1 -0
  97. package/dist/providers/transaction-request/index.d.ts +10 -0
  98. package/dist/providers/transaction-request/index.d.ts.map +1 -0
  99. package/dist/providers/transaction-request/input.d.ts +59 -0
  100. package/dist/providers/transaction-request/input.d.ts.map +1 -0
  101. package/dist/providers/transaction-request/output.d.ts +39 -0
  102. package/dist/providers/transaction-request/output.d.ts.map +1 -0
  103. package/dist/providers/transaction-request/script-transaction-request.d.ts +106 -0
  104. package/dist/providers/transaction-request/script-transaction-request.d.ts.map +1 -0
  105. package/dist/providers/transaction-request/scripts.d.ts +6 -0
  106. package/dist/providers/transaction-request/scripts.d.ts.map +1 -0
  107. package/dist/providers/transaction-request/storage-slot.d.ts +10 -0
  108. package/dist/providers/transaction-request/storage-slot.d.ts.map +1 -0
  109. package/dist/providers/transaction-request/transaction-request.d.ts +259 -0
  110. package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -0
  111. package/dist/providers/transaction-request/types.d.ts +10 -0
  112. package/dist/providers/transaction-request/types.d.ts.map +1 -0
  113. package/dist/providers/transaction-request/utils.d.ts +4 -0
  114. package/dist/providers/transaction-request/utils.d.ts.map +1 -0
  115. package/dist/providers/transaction-request/witness.d.ts +5 -0
  116. package/dist/providers/transaction-request/witness.d.ts.map +1 -0
  117. package/dist/providers/transaction-response/getDecodedLogs.d.ts +5 -0
  118. package/dist/providers/transaction-response/getDecodedLogs.d.ts.map +1 -0
  119. package/dist/providers/transaction-response/index.d.ts +3 -0
  120. package/dist/providers/transaction-response/index.d.ts.map +1 -0
  121. package/dist/providers/transaction-response/transaction-response.d.ts +106 -0
  122. package/dist/providers/transaction-response/transaction-response.d.ts.map +1 -0
  123. package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts +20 -0
  124. package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts.map +1 -0
  125. package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts +21 -0
  126. package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts.map +1 -0
  127. package/dist/providers/transaction-summary/call.d.ts +18 -0
  128. package/dist/providers/transaction-summary/call.d.ts.map +1 -0
  129. package/dist/providers/transaction-summary/get-transaction-summary.d.ts +31 -0
  130. package/dist/providers/transaction-summary/get-transaction-summary.d.ts.map +1 -0
  131. package/dist/providers/transaction-summary/index.d.ts +10 -0
  132. package/dist/providers/transaction-summary/index.d.ts.map +1 -0
  133. package/dist/providers/transaction-summary/input.d.ts +21 -0
  134. package/dist/providers/transaction-summary/input.d.ts.map +1 -0
  135. package/dist/providers/transaction-summary/operations.d.ts +40 -0
  136. package/dist/providers/transaction-summary/operations.d.ts.map +1 -0
  137. package/dist/providers/transaction-summary/output.d.ts +15 -0
  138. package/dist/providers/transaction-summary/output.d.ts.map +1 -0
  139. package/dist/providers/transaction-summary/receipt.d.ts +7 -0
  140. package/dist/providers/transaction-summary/receipt.d.ts.map +1 -0
  141. package/dist/providers/transaction-summary/status.d.ts +9 -0
  142. package/dist/providers/transaction-summary/status.d.ts.map +1 -0
  143. package/dist/providers/transaction-summary/types.d.ts +146 -0
  144. package/dist/providers/transaction-summary/types.d.ts.map +1 -0
  145. package/dist/providers/utils/auto-retry-fetch.d.ts +36 -0
  146. package/dist/providers/utils/auto-retry-fetch.d.ts.map +1 -0
  147. package/dist/providers/utils/block-explorer.d.ts +14 -0
  148. package/dist/providers/utils/block-explorer.d.ts.map +1 -0
  149. package/dist/providers/utils/gas.d.ts +38 -0
  150. package/dist/providers/utils/gas.d.ts.map +1 -0
  151. package/dist/providers/utils/index.d.ts +5 -0
  152. package/dist/providers/utils/index.d.ts.map +1 -0
  153. package/dist/providers/utils/json.d.ts +7 -0
  154. package/dist/providers/utils/json.d.ts.map +1 -0
  155. package/dist/providers/utils/merge-quantities.d.ts +3 -0
  156. package/dist/providers/utils/merge-quantities.d.ts.map +1 -0
  157. package/dist/providers/utils/receipts.d.ts +10 -0
  158. package/dist/providers/utils/receipts.d.ts.map +1 -0
  159. package/dist/signer/index.d.ts +2 -0
  160. package/dist/signer/index.d.ts.map +1 -0
  161. package/dist/signer/signer.d.ts +64 -0
  162. package/dist/signer/signer.d.ts.map +1 -0
  163. package/dist/test-utils/asset-id.d.ts +9 -0
  164. package/dist/test-utils/asset-id.d.ts.map +1 -0
  165. package/dist/test-utils/generateTestWallet.d.ts +4 -0
  166. package/dist/test-utils/generateTestWallet.d.ts.map +1 -0
  167. package/dist/test-utils/index.d.ts +8 -0
  168. package/dist/test-utils/index.d.ts.map +1 -0
  169. package/dist/{test-utils.d.ts → test-utils/launchNode.d.ts} +19 -24
  170. package/dist/test-utils/launchNode.d.ts.map +1 -0
  171. package/dist/test-utils/seedTestWallet.d.ts +4 -0
  172. package/dist/test-utils/seedTestWallet.d.ts.map +1 -0
  173. package/dist/test-utils/setup-test-provider-and-wallets.d.ts +33 -0
  174. package/dist/test-utils/setup-test-provider-and-wallets.d.ts.map +1 -0
  175. package/dist/test-utils/test-message.d.ts +28 -0
  176. package/dist/test-utils/test-message.d.ts.map +1 -0
  177. package/dist/test-utils/wallet-config.d.ts +49 -0
  178. package/dist/test-utils/wallet-config.d.ts.map +1 -0
  179. package/dist/test-utils.global.js +655 -310
  180. package/dist/test-utils.global.js.map +1 -1
  181. package/dist/test-utils.js +452 -217
  182. package/dist/test-utils.js.map +1 -1
  183. package/dist/test-utils.mjs +357 -124
  184. package/dist/test-utils.mjs.map +1 -1
  185. package/dist/utils/formatTransferToContractScriptData.d.ts +14 -0
  186. package/dist/utils/formatTransferToContractScriptData.d.ts.map +1 -0
  187. package/dist/wallet/base-wallet-unlocked.d.ts +73 -0
  188. package/dist/wallet/base-wallet-unlocked.d.ts.map +1 -0
  189. package/dist/wallet/index.d.ts +4 -0
  190. package/dist/wallet/index.d.ts.map +1 -0
  191. package/dist/wallet/keystore-wallet.d.ts +38 -0
  192. package/dist/wallet/keystore-wallet.d.ts.map +1 -0
  193. package/dist/wallet/wallet.d.ts +68 -0
  194. package/dist/wallet/wallet.d.ts.map +1 -0
  195. package/dist/wallet/wallets.d.ts +76 -0
  196. package/dist/wallet/wallets.d.ts.map +1 -0
  197. package/dist/wallet-manager/index.d.ts +6 -0
  198. package/dist/wallet-manager/index.d.ts.map +1 -0
  199. package/dist/wallet-manager/storages/memory-storage.d.ts +9 -0
  200. package/dist/wallet-manager/storages/memory-storage.d.ts.map +1 -0
  201. package/dist/wallet-manager/types.d.ts +42 -0
  202. package/dist/wallet-manager/types.d.ts.map +1 -0
  203. package/dist/wallet-manager/vaults/mnemonic-vault.d.ts +29 -0
  204. package/dist/wallet-manager/vaults/mnemonic-vault.d.ts.map +1 -0
  205. package/dist/wallet-manager/vaults/privatekey-vault.d.ts +29 -0
  206. package/dist/wallet-manager/vaults/privatekey-vault.d.ts.map +1 -0
  207. package/dist/wallet-manager/wallet-manager.d.ts +104 -0
  208. package/dist/wallet-manager/wallet-manager.d.ts.map +1 -0
  209. package/dist/wordlists/index.d.ts +5 -0
  210. package/dist/wordlists/index.d.ts.map +1 -0
  211. package/dist/wordlists/words/english.d.ts +2 -0
  212. package/dist/wordlists/words/english.d.ts.map +1 -0
  213. package/package.json +26 -21
  214. package/dist/account-E9nGNf5X.d.mts +0 -3837
  215. package/dist/account-E9nGNf5X.d.ts +0 -3837
  216. package/dist/configs.d.mts +0 -3
  217. package/dist/index.d.mts +0 -904
  218. package/dist/test-utils.d.mts +0 -66
@@ -0,0 +1,9 @@
1
+ import type { TransactionRequest } from './types';
2
+ /**
3
+ * Hash transaction request with sha256. [Read more](https://github.com/FuelLabs/fuel-specs/blob/master/specs/protocol/identifiers.md#transaction-id)
4
+ *
5
+ * @param transactionRequest - Transaction request to be hashed
6
+ * @returns sha256 hash of the transaction
7
+ */
8
+ export declare function hashTransaction(transactionRequest: TransactionRequest, chainId: number): string;
9
+ //# sourceMappingURL=hash-transaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash-transaction.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/hash-transaction.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,UA2EtF"}
@@ -0,0 +1,10 @@
1
+ export * from './input';
2
+ export * from './output';
3
+ export * from './transaction-request';
4
+ export * from './create-transaction-request';
5
+ export * from './script-transaction-request';
6
+ export * from './errors';
7
+ export * from './scripts';
8
+ export * from './types';
9
+ export * from './utils';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,59 @@
1
+ import type { BytesLike } from '@fuel-ts/interfaces';
2
+ import type { BigNumberish } from '@fuel-ts/math';
3
+ import type { Input } from '@fuel-ts/transactions';
4
+ import { InputType } from '@fuel-ts/transactions';
5
+ export type CoinTransactionRequestInput = {
6
+ type: InputType.Coin;
7
+ /** UTXO ID */
8
+ id: BytesLike;
9
+ /** Owning address or script hash */
10
+ owner: BytesLike;
11
+ /** Amount of coins */
12
+ amount: BigNumberish;
13
+ /** Asset ID of the coins */
14
+ assetId: BytesLike;
15
+ /** Points to the TX whose output is being spent. (TxPointer) */
16
+ txPointer: BytesLike;
17
+ /** Index of witness that authorizes spending the coin */
18
+ witnessIndex: number;
19
+ /** UTXO being spent must have been created at least this many blocks ago */
20
+ maturity?: number;
21
+ /** Gas used by predicate */
22
+ predicateGasUsed?: BigNumberish;
23
+ /** Predicate bytecode */
24
+ predicate?: BytesLike;
25
+ /** Predicate input data (parameters) */
26
+ predicateData?: BytesLike;
27
+ };
28
+ export type MessageTransactionRequestInput = {
29
+ type: InputType.Message;
30
+ /** Address of sender */
31
+ sender: BytesLike;
32
+ /** Address of recipient */
33
+ recipient: BytesLike;
34
+ /** Amount of coins */
35
+ amount: BigNumberish;
36
+ /** Index of witness that authorizes the message */
37
+ witnessIndex: number;
38
+ /** Unique nonce of message */
39
+ nonce: BytesLike;
40
+ /** Gas used by predicate */
41
+ predicateGasUsed?: BigNumberish;
42
+ /** Predicate bytecode */
43
+ predicate?: BytesLike;
44
+ /** Predicate input data (parameters) */
45
+ predicateData?: BytesLike;
46
+ /** data of message */
47
+ data?: BytesLike;
48
+ };
49
+ export type ContractTransactionRequestInput = {
50
+ type: InputType.Contract;
51
+ /** Points to the TX whose output is being spent. (TxPointer) */
52
+ txPointer: BytesLike;
53
+ /** Contract ID */
54
+ contractId: BytesLike;
55
+ };
56
+ export type TransactionRequestInput = CoinTransactionRequestInput | ContractTransactionRequestInput | MessageTransactionRequestInput;
57
+ /** @hidden */
58
+ export declare const inputify: (value: TransactionRequestInput) => Input;
59
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/input.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC;IAErB,cAAc;IACd,EAAE,EAAE,SAAS,CAAC;IAEd,oCAAoC;IACpC,KAAK,EAAE,SAAS,CAAC;IAEjB,sBAAsB;IACtB,MAAM,EAAE,YAAY,CAAC;IAErB,4BAA4B;IAC5B,OAAO,EAAE,SAAS,CAAC;IAEnB,gEAAgE;IAChE,SAAS,EAAE,SAAS,CAAC;IAErB,yDAAyD;IACzD,YAAY,EAAE,MAAM,CAAC;IAErB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,4BAA4B;IAC5B,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAEhC,yBAAyB;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,wCAAwC;IACxC,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC;IAExB,wBAAwB;IACxB,MAAM,EAAE,SAAS,CAAC;IAElB,2BAA2B;IAC3B,SAAS,EAAE,SAAS,CAAC;IAErB,sBAAsB;IACtB,MAAM,EAAE,YAAY,CAAC;IAErB,mDAAmD;IACnD,YAAY,EAAE,MAAM,CAAC;IAErB,8BAA8B;IAC9B,KAAK,EAAE,SAAS,CAAC;IAEjB,4BAA4B;IAC5B,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAEhC,yBAAyB;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,wCAAwC;IACxC,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B,sBAAsB;IACtB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC;IAEzB,gEAAgE;IAChE,SAAS,EAAE,SAAS,CAAC;IAErB,kBAAkB;IAClB,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AACF,MAAM,MAAM,uBAAuB,GAC/B,2BAA2B,GAC3B,+BAA+B,GAC/B,8BAA8B,CAAC;AAEnC,cAAc;AACd,eAAO,MAAM,QAAQ,UAAW,uBAAuB,KAAG,KAoEzD,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { BytesLike } from '@fuel-ts/interfaces';
2
+ import type { BigNumberish } from '@fuel-ts/math';
3
+ import type { Output } from '@fuel-ts/transactions';
4
+ import { OutputType } from '@fuel-ts/transactions';
5
+ export type CoinTransactionRequestOutput = {
6
+ type: OutputType.Coin;
7
+ /** Receiving address or script hash */
8
+ to: BytesLike;
9
+ /** Amount of coins to send */
10
+ amount: BigNumberish;
11
+ /** Asset ID of coins */
12
+ assetId: BytesLike;
13
+ };
14
+ export type ContractTransactionRequestOutput = {
15
+ type: OutputType.Contract;
16
+ /** Index of input contract */
17
+ inputIndex: number;
18
+ };
19
+ export type ChangeTransactionRequestOutput = {
20
+ type: OutputType.Change;
21
+ /** Receiving address or script hash */
22
+ to: BytesLike;
23
+ /** Asset ID of coins */
24
+ assetId: BytesLike;
25
+ };
26
+ export type VariableTransactionRequestOutput = {
27
+ type: OutputType.Variable;
28
+ };
29
+ export type ContractCreatedTransactionRequestOutput = {
30
+ type: OutputType.ContractCreated;
31
+ /** Contract ID */
32
+ contractId: BytesLike;
33
+ /** State Root */
34
+ stateRoot: BytesLike;
35
+ };
36
+ export type TransactionRequestOutput = CoinTransactionRequestOutput | ContractTransactionRequestOutput | ChangeTransactionRequestOutput | VariableTransactionRequestOutput | ContractCreatedTransactionRequestOutput;
37
+ /** @hidden */
38
+ export declare const outputify: (value: TransactionRequestOutput) => Output;
39
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/output.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC;IACtB,uCAAuC;IACvC,EAAE,EAAE,SAAS,CAAC;IACd,8BAA8B;IAC9B,MAAM,EAAE,YAAY,CAAC;IACrB,wBAAwB;IACxB,OAAO,EAAE,SAAS,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,gCAAgC,GAAG;IAC7C,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC;IAC1B,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC;IACxB,uCAAuC;IACvC,EAAE,EAAE,SAAS,CAAC;IACd,wBAAwB;IACxB,OAAO,EAAE,SAAS,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,gCAAgC,GAAG;IAC7C,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC;CAC3B,CAAC;AACF,MAAM,MAAM,uCAAuC,GAAG;IACpD,IAAI,EAAE,UAAU,CAAC,eAAe,CAAC;IACjC,kBAAkB;IAClB,UAAU,EAAE,SAAS,CAAC;IACtB,iBAAiB;IACjB,SAAS,EAAE,SAAS,CAAC;CACtB,CAAC;AACF,MAAM,MAAM,wBAAwB,GAChC,4BAA4B,GAC5B,gCAAgC,GAChC,8BAA8B,GAC9B,gCAAgC,GAChC,uCAAuC,CAAC;AAE5C,cAAc;AACd,eAAO,MAAM,SAAS,UAAW,wBAAwB,KAAG,MAkD3D,CAAC"}
@@ -0,0 +1,106 @@
1
+ import type { InputValue, JsonAbi } from '@fuel-ts/abi-coder';
2
+ import type { AbstractScriptRequest, ContractIdLike, BytesLike } from '@fuel-ts/interfaces';
3
+ import type { BN, BigNumberish } from '@fuel-ts/math';
4
+ import type { TransactionScript } from '@fuel-ts/transactions';
5
+ import { TransactionType } from '@fuel-ts/transactions';
6
+ import type { GqlGasCosts } from '../__generated__/operations';
7
+ import type { ChainInfo } from '../provider';
8
+ import type { ContractTransactionRequestInput } from './input';
9
+ import type { ContractTransactionRequestOutput, VariableTransactionRequestOutput } from './output';
10
+ import type { BaseTransactionRequestLike } from './transaction-request';
11
+ import { BaseTransactionRequest } from './transaction-request';
12
+ /**
13
+ * @hidden
14
+ */
15
+ export interface ScriptTransactionRequestLike extends BaseTransactionRequestLike {
16
+ /** Gas limit for transaction */
17
+ gasLimit?: BigNumberish;
18
+ /** Script to execute */
19
+ script?: BytesLike;
20
+ /** Script input data (parameters) */
21
+ scriptData?: BytesLike;
22
+ }
23
+ /**
24
+ * `ScriptTransactionRequest` provides functionalities for creating a transaction request that uses a script.
25
+ */
26
+ export declare class ScriptTransactionRequest extends BaseTransactionRequest {
27
+ static from(obj: ScriptTransactionRequestLike): ScriptTransactionRequest;
28
+ /** Type of the transaction */
29
+ type: TransactionType.Script;
30
+ /** Gas limit for transaction */
31
+ gasLimit: BN;
32
+ /** Script to execute */
33
+ script: Uint8Array;
34
+ /** Script input data (parameters) */
35
+ scriptData: Uint8Array;
36
+ /**
37
+ * Constructor for `ScriptTransactionRequest`.
38
+ *
39
+ * @param scriptTransactionRequestLike - The initial values for the instance.
40
+ */
41
+ constructor({ script, scriptData, gasLimit, ...rest }?: ScriptTransactionRequestLike);
42
+ /**
43
+ * Converts the transaction request to a `TransactionScript`.
44
+ *
45
+ * @returns The transaction script object.
46
+ */
47
+ toTransaction(): TransactionScript;
48
+ /**
49
+ * Get contract inputs for the transaction.
50
+ *
51
+ * @returns An array of contract transaction request inputs.
52
+ */
53
+ getContractInputs(): ContractTransactionRequestInput[];
54
+ /**
55
+ * Get contract outputs for the transaction.
56
+ *
57
+ * @returns An array of contract transaction request outputs.
58
+ */
59
+ getContractOutputs(): ContractTransactionRequestOutput[];
60
+ /**
61
+ * Get variable outputs for the transaction.
62
+ *
63
+ * @returns An array of variable transaction request outputs.
64
+ */
65
+ getVariableOutputs(): VariableTransactionRequestOutput[];
66
+ /**
67
+ * Set the script and its data.
68
+ *
69
+ * @param script - The abstract script request.
70
+ * @param data - The script data.
71
+ */
72
+ setScript<T>(script: AbstractScriptRequest<T>, data: T): void;
73
+ /**
74
+ * Adds variable outputs to the transaction request.
75
+ *
76
+ * @param numberOfVariables - The number of variables to add.
77
+ * @returns The new length of the outputs array.
78
+ */
79
+ addVariableOutputs(numberOfVariables?: number): number;
80
+ calculateMaxGas(chainInfo: ChainInfo, minGas: BN): BN;
81
+ /**
82
+ * Adds a contract input and output to the transaction request.
83
+ *
84
+ * @param contract - The contract ID.
85
+ * @returns The current instance of the `ScriptTransactionRequest`.
86
+ */
87
+ addContractInputAndOutput(contract: ContractIdLike): ScriptTransactionRequest;
88
+ /**
89
+ * Gets the Transaction Request by hashing the transaction.
90
+ *
91
+ * @param chainId - The chain ID.
92
+ *
93
+ * @returns - A hash of the transaction, which is the transaction ID.
94
+ */
95
+ getTransactionId(chainId: number): string;
96
+ /**
97
+ * Sets the data for the transaction request.
98
+ *
99
+ * @param abi - Script JSON ABI.
100
+ * @param args - The input arguments.
101
+ * @returns The current instance of the `ScriptTransactionRequest`.
102
+ */
103
+ setData(abi: JsonAbi, args: InputValue[]): ScriptTransactionRequest;
104
+ metadataGas(gasCosts: GqlGasCosts): BN;
105
+ }
106
+ //# sourceMappingURL=script-transaction-request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"script-transaction-request.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/script-transaction-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAI9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAE5F,OAAO,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAyB,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,KAAK,EAAE,gCAAgC,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAEnG,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;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H,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,wBAAwB;IAMnE,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,EAAE;CAMvC"}
@@ -0,0 +1,6 @@
1
+ import type { AbstractScriptRequest } from '@fuel-ts/interfaces';
2
+ /** @hidden */
3
+ export declare const returnZeroScript: AbstractScriptRequest<void>;
4
+ /** @hidden */
5
+ export declare const withdrawScript: AbstractScriptRequest<void>;
6
+ //# sourceMappingURL=scripts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scripts.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAKjE,cAAc;AACd,eAAO,MAAM,gBAAgB,EAAE,qBAAqB,CAAC,IAAI,CAQxD,CAAC;AAEF,cAAc;AACd,eAAO,MAAM,cAAc,EAAE,qBAAqB,CAAC,IAAI,CAatD,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { BytesLike } from '@fuel-ts/interfaces';
2
+ import type { StorageSlot } from '@fuel-ts/transactions';
3
+ export type TransactionRequestStorageSlot = {
4
+ /** Key */
5
+ key: BytesLike;
6
+ /** Value */
7
+ value: BytesLike;
8
+ } | [key: BytesLike, value: BytesLike];
9
+ export declare const storageSlotify: (storageSlot: TransactionRequestStorageSlot) => StorageSlot;
10
+ //# sourceMappingURL=storage-slot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage-slot.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/storage-slot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD,MAAM,MAAM,6BAA6B,GACrC;IACE,UAAU;IACV,GAAG,EAAE,SAAS,CAAC;IACf,YAAY;IACZ,KAAK,EAAE,SAAS,CAAC;CAClB,GACD,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;AASvC,eAAO,MAAM,cAAc,gBAAiB,6BAA6B,KAAG,WAgB3E,CAAC"}
@@ -0,0 +1,259 @@
1
+ import type { InputValue } from '@fuel-ts/abi-coder';
2
+ import type { AddressLike, AbstractAddress, BytesLike } from '@fuel-ts/interfaces';
3
+ import type { BN, BigNumberish } from '@fuel-ts/math';
4
+ import type { TransactionScript, Policy, TransactionCreate } from '@fuel-ts/transactions';
5
+ import { TransactionType } from '@fuel-ts/transactions';
6
+ import type { Predicate } from '../../predicate';
7
+ import type { GqlGasCosts } from '../__generated__/operations';
8
+ import type { Coin } from '../coin';
9
+ import type { CoinQuantity, CoinQuantityLike } from '../coin-quantity';
10
+ import type { MessageCoin } from '../message';
11
+ import type { ChainInfo } from '../provider';
12
+ import type { Resource } from '../resource';
13
+ import type { TransactionRequestInput, CoinTransactionRequestInput } from './input';
14
+ import type { TransactionRequestOutput, ChangeTransactionRequestOutput, CoinTransactionRequestOutput } from './output';
15
+ import type { TransactionRequestWitness } from './witness';
16
+ export {
17
+ /**
18
+ * @hidden
19
+ */
20
+ TransactionType, };
21
+ /**
22
+ * @hidden
23
+ *
24
+ * Interface defining a like structure for a base transaction request.
25
+ */
26
+ export interface BaseTransactionRequestLike {
27
+ /** Gas price for transaction */
28
+ gasPrice?: BigNumberish;
29
+ /** Block until which tx cannot be included */
30
+ maturity?: number;
31
+ /** The maximum fee payable by this transaction using BASE_ASSET. */
32
+ maxFee?: BigNumberish;
33
+ /** The maximum amount of witness data allowed for the transaction */
34
+ witnessLimit?: BigNumberish;
35
+ /** List of inputs */
36
+ inputs?: TransactionRequestInput[];
37
+ /** List of outputs */
38
+ outputs?: TransactionRequestOutput[];
39
+ /** List of witnesses */
40
+ witnesses?: TransactionRequestWitness[];
41
+ }
42
+ type ToBaseTransactionResponse = Pick<TransactionScript, 'inputs' | 'inputsCount' | 'outputs' | 'outputsCount' | 'witnesses' | 'witnessesCount' | 'policies' | 'policyTypes'>;
43
+ /**
44
+ * Abstract class to define the functionalities of a transaction request transaction request.
45
+ */
46
+ export declare abstract class BaseTransactionRequest implements BaseTransactionRequestLike {
47
+ /** Type of the transaction */
48
+ abstract type: TransactionType;
49
+ /** Gas price for transaction */
50
+ gasPrice: BN;
51
+ /** Block until which tx cannot be included */
52
+ maturity: number;
53
+ /** The maximum fee payable by this transaction using BASE_ASSET. */
54
+ maxFee?: BN;
55
+ /** The maximum amount of witness data allowed for the transaction */
56
+ witnessLimit?: BN | undefined;
57
+ /** List of inputs */
58
+ inputs: TransactionRequestInput[];
59
+ /** List of outputs */
60
+ outputs: TransactionRequestOutput[];
61
+ /** List of witnesses */
62
+ witnesses: TransactionRequestWitness[];
63
+ /**
64
+ * Constructor for initializing a base transaction request.
65
+ *
66
+ * @param baseTransactionRequest - Optional object containing properties to initialize the transaction request.
67
+ */
68
+ constructor({ gasPrice, maturity, maxFee, witnessLimit, inputs, outputs, witnesses, }?: BaseTransactionRequestLike);
69
+ static getPolicyMeta(req: BaseTransactionRequest): {
70
+ policyTypes: number;
71
+ policies: Policy[];
72
+ };
73
+ /**
74
+ * Method to obtain the base transaction details.
75
+ *
76
+ * @returns The base transaction details.
77
+ */
78
+ protected getBaseTransaction(): ToBaseTransactionResponse;
79
+ abstract toTransaction(): TransactionCreate | TransactionScript;
80
+ /**
81
+ * Converts the transaction request to a byte array.
82
+ *
83
+ * @returns The transaction bytes.
84
+ */
85
+ toTransactionBytes(): Uint8Array;
86
+ /**
87
+ * @hidden
88
+ *
89
+ * Pushes an input to the list without any side effects and returns the index
90
+ */
91
+ protected pushInput(input: TransactionRequestInput): number;
92
+ /**
93
+ * @hidden
94
+ *
95
+ * Pushes an output to the list without any side effects and returns the index
96
+ */
97
+ protected pushOutput(output: TransactionRequestOutput): number;
98
+ /**
99
+ * @hidden
100
+ *
101
+ * Creates an empty witness without any side effects and returns the index
102
+ */
103
+ protected createWitness(): number;
104
+ /**
105
+ * Updates the witness for a given owner and signature.
106
+ *
107
+ * @param address - The address to get the coin input witness index for.
108
+ * @param signature - The signature to update the witness with.
109
+ */
110
+ updateWitnessByOwner(address: string | AbstractAddress, signature: BytesLike): void;
111
+ /**
112
+ * Updates an existing witness without any side effects.
113
+ *
114
+ * @param index - The index of the witness to update.
115
+ * @param witness - The new witness.
116
+ * @throws If the witness does not exist.
117
+ */
118
+ updateWitness(index: number, witness: TransactionRequestWitness): void;
119
+ /**
120
+ * Gets the coin inputs for a transaction.
121
+ *
122
+ * @returns The coin inputs.
123
+ */
124
+ getCoinInputs(): CoinTransactionRequestInput[];
125
+ /**
126
+ * Gets the coin outputs for a transaction.
127
+ *
128
+ * @returns The coin outputs.
129
+ */
130
+ getCoinOutputs(): CoinTransactionRequestOutput[];
131
+ /**
132
+ * Gets the change outputs for a transaction.
133
+ *
134
+ * @returns The change outputs.
135
+ */
136
+ getChangeOutputs(): ChangeTransactionRequestOutput[];
137
+ /**
138
+ * @hidden
139
+ *
140
+ * Returns the witnessIndex of the found CoinInput.
141
+ */
142
+ getCoinInputWitnessIndexByOwner(owner: AddressLike): number | undefined;
143
+ /**
144
+ * Adds a single coin input to the transaction and a change output for the related
145
+ * assetId, if one it was not added yet.
146
+ *
147
+ * @param coin - Coin resource.
148
+ * @param predicate - Predicate bytes.
149
+ * @param predicateData - Predicate data bytes.
150
+ */
151
+ addCoinInput(coin: Coin, predicate?: Predicate<InputValue[]>): void;
152
+ /**
153
+ * Adds a single message input to the transaction and a change output for the
154
+ * baseAssetId, if one it was not added yet.
155
+ *
156
+ * @param message - Message resource.
157
+ * @param predicate - Predicate bytes.
158
+ * @param predicateData - Predicate data bytes.
159
+ */
160
+ addMessageInput(message: MessageCoin, predicate?: Predicate<InputValue[]>): void;
161
+ /**
162
+ * Adds a single resource to the transaction by adding a coin/message input and a
163
+ * change output for the related assetId, if one it was not added yet.
164
+ *
165
+ * @param resource - The resource to add.
166
+ * @returns This transaction.
167
+ */
168
+ addResource(resource: Resource): this;
169
+ /**
170
+ * Adds multiple resources to the transaction by adding coin/message inputs and change
171
+ * outputs from the related assetIds.
172
+ *
173
+ * @param resources - The resources to add.
174
+ * @returns This transaction.
175
+ */
176
+ addResources(resources: ReadonlyArray<Resource>): this;
177
+ /**
178
+ * Adds multiple resources to the transaction by adding coin/message inputs and change
179
+ * outputs from the related assetIds.
180
+ *
181
+ * @param resources - The resources to add.
182
+ * @returns This transaction.
183
+ */
184
+ addPredicateResource(resource: Resource, predicate: Predicate<InputValue[]>): this;
185
+ /**
186
+ * Adds multiple predicate coin/message inputs to the transaction and change outputs
187
+ * from the related assetIds.
188
+ *
189
+ * @param resources - The resources to add.
190
+ * @returns This transaction.
191
+ */
192
+ addPredicateResources(resources: Resource[], predicate: Predicate<InputValue[]>): this;
193
+ /**
194
+ * Adds a coin output to the transaction.
195
+ *
196
+ * @param to - Address of the owner.
197
+ * @param amount - Amount of coin.
198
+ * @param assetId - Asset ID of coin.
199
+ */
200
+ addCoinOutput(to: AddressLike, amount: BigNumberish, assetId?: BytesLike): this;
201
+ /**
202
+ * Adds multiple coin outputs to the transaction.
203
+ *
204
+ * @param to - Address of the destination.
205
+ * @param quantities - Quantities of coins.
206
+ */
207
+ addCoinOutputs(to: AddressLike, quantities: CoinQuantityLike[]): this;
208
+ /**
209
+ * Adds a change output to the transaction.
210
+ *
211
+ * @param to - Address of the owner.
212
+ * @param assetId - Asset ID of coin.
213
+ */
214
+ addChangeOutput(to: AddressLike, assetId?: BytesLike): void;
215
+ /**
216
+ * @hidden
217
+ */
218
+ byteSize(): number;
219
+ /**
220
+ * @hidden
221
+ */
222
+ metadataGas(_gasCosts: GqlGasCosts): BN;
223
+ /**
224
+ * @hidden
225
+ */
226
+ calculateMinGas(chainInfo: ChainInfo): BN;
227
+ calculateMaxGas(chainInfo: ChainInfo, minGas: BN): BN;
228
+ /**
229
+ * Funds the transaction with fake UTXOs for each assetId and amount in the
230
+ * quantities array.
231
+ *
232
+ * @param quantities - CoinQuantity Array.
233
+ */
234
+ fundWithFakeUtxos(quantities: CoinQuantity[], resourcesOwner?: AbstractAddress): void;
235
+ /**
236
+ * Retrieves an array of CoinQuantity for each coin output present in the transaction.
237
+ * a transaction.
238
+ *
239
+ * @returns CoinQuantity array.
240
+ */
241
+ getCoinOutputsQuantities(): CoinQuantity[];
242
+ /**
243
+ * Gets the Transaction Request by hashing the transaction.
244
+ *
245
+ * @param chainId - The chain ID.
246
+ *
247
+ * @returns - A hash of the transaction, which is the transaction ID.
248
+ */
249
+ abstract getTransactionId(chainId: number): string;
250
+ /**
251
+ * Return the minimum amount in native coins required to create
252
+ * a transaction.
253
+ *
254
+ * @returns The transaction as a JSON object.
255
+ */
256
+ toJSON(): any;
257
+ updatePredicateInputs(inputs: TransactionRequestInput[]): void;
258
+ }
259
+ //# sourceMappingURL=transaction-request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction-request.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/transaction-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EAKL,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,kB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AAM,GAAG,MAAM;IAElD;;;;;OAKG;IACH,MAAM;IAIN,qBAAqB,CAAC,MAAM,EAAE,uBAAuB,EAAE;CA6BxD"}
@@ -0,0 +1,10 @@
1
+ import type { TransactionType } from '@fuel-ts/transactions';
2
+ import type { CreateTransactionRequest, CreateTransactionRequestLike } from './create-transaction-request';
3
+ import type { ScriptTransactionRequest, ScriptTransactionRequestLike } from './script-transaction-request';
4
+ export type TransactionRequest = ScriptTransactionRequest | CreateTransactionRequest;
5
+ export type TransactionRequestLike = ({
6
+ type: TransactionType.Script;
7
+ } & ScriptTransactionRequestLike) | ({
8
+ type: TransactionType.Create;
9
+ } & CreateTransactionRequestLike);
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EACV,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG,wBAAwB,CAAC;AACrF,MAAM,MAAM,sBAAsB,GAC9B,CAAC;IAAE,IAAI,EAAE,eAAe,CAAC,MAAM,CAAA;CAAE,GAAG,4BAA4B,CAAC,GACjE,CAAC;IAAE,IAAI,EAAE,eAAe,CAAC,MAAM,CAAA;CAAE,GAAG,4BAA4B,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { TransactionRequestLike, TransactionRequest } from './types';
2
+ /** @hidden */
3
+ export declare const transactionRequestify: (obj: TransactionRequestLike) => TransactionRequest;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE1E,cAAc;AACd,eAAO,MAAM,qBAAqB,QAAS,sBAAsB,KAAG,kBAkBnE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { BytesLike } from '@fuel-ts/interfaces';
2
+ import type { Witness } from '@fuel-ts/transactions';
3
+ export type TransactionRequestWitness = BytesLike;
4
+ export declare const witnessify: (value: TransactionRequestWitness) => Witness;
5
+ //# sourceMappingURL=witness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"witness.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/witness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGrD,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAAC;AAElD,eAAO,MAAM,UAAU,UAAW,yBAAyB,KAAG,OAO7D,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Interface } from '@fuel-ts/abi-coder';
2
+ import type { TransactionResultReceipt } from './transaction-response';
3
+ /** @hidden */
4
+ export declare function getDecodedLogs<T = unknown>(receipts: Array<TransactionResultReceipt>, abiInterface: Interface): T[];
5
+ //# sourceMappingURL=getDecodedLogs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDecodedLogs.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-response/getDecodedLogs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAIpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,cAAc;AACd,wBAAgB,cAAc,CAAC,CAAC,GAAG,OAAO,EACxC,QAAQ,EAAE,KAAK,CAAC,wBAAwB,CAAC,EACzC,YAAY,EAAE,SAAS,GACtB,CAAC,EAAE,CAcL"}
@@ -0,0 +1,3 @@
1
+ export * from './transaction-response';
2
+ export * from './getDecodedLogs';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-response/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC"}