@fuel-ts/account 0.0.0-rc-1815-20240322115843 → 0.0.0-rc-1889-20240322122653

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 (212) hide show
  1. package/dist/account-E9nGNf5X.d.mts +3837 -0
  2. package/dist/account-E9nGNf5X.d.ts +3837 -0
  3. package/dist/configs.d.mts +3 -0
  4. package/dist/configs.d.ts +3 -2
  5. package/dist/index.d.mts +904 -0
  6. package/dist/index.d.ts +904 -13
  7. package/dist/index.global.js +390 -515
  8. package/dist/index.global.js.map +1 -1
  9. package/dist/index.js +207 -309
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +207 -311
  12. package/dist/index.mjs.map +1 -1
  13. package/dist/test-utils.d.mts +66 -0
  14. package/dist/{test-utils/launchNode.d.ts → test-utils.d.ts} +24 -12
  15. package/dist/test-utils.global.js +294 -381
  16. package/dist/test-utils.global.js.map +1 -1
  17. package/dist/test-utils.js +107 -174
  18. package/dist/test-utils.js.map +1 -1
  19. package/dist/test-utils.mjs +107 -176
  20. package/dist/test-utils.mjs.map +1 -1
  21. package/package.json +21 -25
  22. package/dist/account.d.ts +0 -184
  23. package/dist/account.d.ts.map +0 -1
  24. package/dist/configs.d.ts.map +0 -1
  25. package/dist/connectors/fuel-connector.d.ts +0 -198
  26. package/dist/connectors/fuel-connector.d.ts.map +0 -1
  27. package/dist/connectors/fuel.d.ts +0 -133
  28. package/dist/connectors/fuel.d.ts.map +0 -1
  29. package/dist/connectors/index.d.ts +0 -5
  30. package/dist/connectors/index.d.ts.map +0 -1
  31. package/dist/connectors/types/connector-metadata.d.ts +0 -12
  32. package/dist/connectors/types/connector-metadata.d.ts.map +0 -1
  33. package/dist/connectors/types/connector-types.d.ts +0 -34
  34. package/dist/connectors/types/connector-types.d.ts.map +0 -1
  35. package/dist/connectors/types/data-type.d.ts +0 -34
  36. package/dist/connectors/types/data-type.d.ts.map +0 -1
  37. package/dist/connectors/types/events.d.ts +0 -111
  38. package/dist/connectors/types/events.d.ts.map +0 -1
  39. package/dist/connectors/types/index.d.ts +0 -7
  40. package/dist/connectors/types/index.d.ts.map +0 -1
  41. package/dist/connectors/types/local-storage.d.ts +0 -11
  42. package/dist/connectors/types/local-storage.d.ts.map +0 -1
  43. package/dist/connectors/types/target-object.d.ts +0 -14
  44. package/dist/connectors/types/target-object.d.ts.map +0 -1
  45. package/dist/connectors/utils/cache.d.ts +0 -14
  46. package/dist/connectors/utils/cache.d.ts.map +0 -1
  47. package/dist/connectors/utils/dispatch-fuel-connector-event.d.ts +0 -7
  48. package/dist/connectors/utils/dispatch-fuel-connector-event.d.ts.map +0 -1
  49. package/dist/connectors/utils/index.d.ts +0 -4
  50. package/dist/connectors/utils/index.d.ts.map +0 -1
  51. package/dist/connectors/utils/promises.d.ts +0 -8
  52. package/dist/connectors/utils/promises.d.ts.map +0 -1
  53. package/dist/hdwallet/hdwallet.d.ts +0 -58
  54. package/dist/hdwallet/hdwallet.d.ts.map +0 -1
  55. package/dist/hdwallet/index.d.ts +0 -2
  56. package/dist/hdwallet/index.d.ts.map +0 -1
  57. package/dist/index.d.ts.map +0 -1
  58. package/dist/mnemonic/index.d.ts +0 -3
  59. package/dist/mnemonic/index.d.ts.map +0 -1
  60. package/dist/mnemonic/mnemonic.d.ts +0 -85
  61. package/dist/mnemonic/mnemonic.d.ts.map +0 -1
  62. package/dist/mnemonic/utils.d.ts +0 -8
  63. package/dist/mnemonic/utils.d.ts.map +0 -1
  64. package/dist/predicate/index.d.ts +0 -3
  65. package/dist/predicate/index.d.ts.map +0 -1
  66. package/dist/predicate/predicate.d.ts +0 -94
  67. package/dist/predicate/predicate.d.ts.map +0 -1
  68. package/dist/predicate/utils/getPredicateRoot.d.ts +0 -12
  69. package/dist/predicate/utils/getPredicateRoot.d.ts.map +0 -1
  70. package/dist/predicate/utils/index.d.ts +0 -2
  71. package/dist/predicate/utils/index.d.ts.map +0 -1
  72. package/dist/providers/__generated__/operations.d.ts +0 -3477
  73. package/dist/providers/__generated__/operations.d.ts.map +0 -1
  74. package/dist/providers/assets/index.d.ts +0 -5
  75. package/dist/providers/assets/index.d.ts.map +0 -1
  76. package/dist/providers/assets/types.d.ts +0 -36
  77. package/dist/providers/assets/types.d.ts.map +0 -1
  78. package/dist/providers/assets/utils/index.d.ts +0 -4
  79. package/dist/providers/assets/utils/index.d.ts.map +0 -1
  80. package/dist/providers/assets/utils/network.d.ts +0 -33
  81. package/dist/providers/assets/utils/network.d.ts.map +0 -1
  82. package/dist/providers/assets/utils/resolveIconPaths.d.ts +0 -14
  83. package/dist/providers/assets/utils/resolveIconPaths.d.ts.map +0 -1
  84. package/dist/providers/assets/utils/url.d.ts +0 -2
  85. package/dist/providers/assets/utils/url.d.ts.map +0 -1
  86. package/dist/providers/chains.d.ts +0 -11
  87. package/dist/providers/chains.d.ts.map +0 -1
  88. package/dist/providers/coin-quantity.d.ts +0 -21
  89. package/dist/providers/coin-quantity.d.ts.map +0 -1
  90. package/dist/providers/coin.d.ts +0 -15
  91. package/dist/providers/coin.d.ts.map +0 -1
  92. package/dist/providers/fuel-graphql-subscriber.d.ts +0 -23
  93. package/dist/providers/fuel-graphql-subscriber.d.ts.map +0 -1
  94. package/dist/providers/index.d.ts +0 -13
  95. package/dist/providers/index.d.ts.map +0 -1
  96. package/dist/providers/memory-cache.d.ts +0 -11
  97. package/dist/providers/memory-cache.d.ts.map +0 -1
  98. package/dist/providers/message.d.ts +0 -60
  99. package/dist/providers/message.d.ts.map +0 -1
  100. package/dist/providers/provider.d.ts +0 -522
  101. package/dist/providers/provider.d.ts.map +0 -1
  102. package/dist/providers/resource.d.ts +0 -37
  103. package/dist/providers/resource.d.ts.map +0 -1
  104. package/dist/providers/transaction-request/create-transaction-request.d.ts +0 -73
  105. package/dist/providers/transaction-request/create-transaction-request.d.ts.map +0 -1
  106. package/dist/providers/transaction-request/errors.d.ts +0 -25
  107. package/dist/providers/transaction-request/errors.d.ts.map +0 -1
  108. package/dist/providers/transaction-request/hash-transaction.d.ts +0 -9
  109. package/dist/providers/transaction-request/hash-transaction.d.ts.map +0 -1
  110. package/dist/providers/transaction-request/index.d.ts +0 -10
  111. package/dist/providers/transaction-request/index.d.ts.map +0 -1
  112. package/dist/providers/transaction-request/input.d.ts +0 -59
  113. package/dist/providers/transaction-request/input.d.ts.map +0 -1
  114. package/dist/providers/transaction-request/output.d.ts +0 -39
  115. package/dist/providers/transaction-request/output.d.ts.map +0 -1
  116. package/dist/providers/transaction-request/script-transaction-request.d.ts +0 -106
  117. package/dist/providers/transaction-request/script-transaction-request.d.ts.map +0 -1
  118. package/dist/providers/transaction-request/scripts.d.ts +0 -6
  119. package/dist/providers/transaction-request/scripts.d.ts.map +0 -1
  120. package/dist/providers/transaction-request/storage-slot.d.ts +0 -10
  121. package/dist/providers/transaction-request/storage-slot.d.ts.map +0 -1
  122. package/dist/providers/transaction-request/transaction-request.d.ts +0 -278
  123. package/dist/providers/transaction-request/transaction-request.d.ts.map +0 -1
  124. package/dist/providers/transaction-request/types.d.ts +0 -10
  125. package/dist/providers/transaction-request/types.d.ts.map +0 -1
  126. package/dist/providers/transaction-request/utils.d.ts +0 -4
  127. package/dist/providers/transaction-request/utils.d.ts.map +0 -1
  128. package/dist/providers/transaction-request/witness.d.ts +0 -5
  129. package/dist/providers/transaction-request/witness.d.ts.map +0 -1
  130. package/dist/providers/transaction-response/getDecodedLogs.d.ts +0 -5
  131. package/dist/providers/transaction-response/getDecodedLogs.d.ts.map +0 -1
  132. package/dist/providers/transaction-response/index.d.ts +0 -3
  133. package/dist/providers/transaction-response/index.d.ts.map +0 -1
  134. package/dist/providers/transaction-response/transaction-response.d.ts +0 -106
  135. package/dist/providers/transaction-response/transaction-response.d.ts.map +0 -1
  136. package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts +0 -20
  137. package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts.map +0 -1
  138. package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts +0 -21
  139. package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts.map +0 -1
  140. package/dist/providers/transaction-summary/call.d.ts +0 -18
  141. package/dist/providers/transaction-summary/call.d.ts.map +0 -1
  142. package/dist/providers/transaction-summary/get-transaction-summary.d.ts +0 -31
  143. package/dist/providers/transaction-summary/get-transaction-summary.d.ts.map +0 -1
  144. package/dist/providers/transaction-summary/index.d.ts +0 -10
  145. package/dist/providers/transaction-summary/index.d.ts.map +0 -1
  146. package/dist/providers/transaction-summary/input.d.ts +0 -21
  147. package/dist/providers/transaction-summary/input.d.ts.map +0 -1
  148. package/dist/providers/transaction-summary/operations.d.ts +0 -40
  149. package/dist/providers/transaction-summary/operations.d.ts.map +0 -1
  150. package/dist/providers/transaction-summary/output.d.ts +0 -15
  151. package/dist/providers/transaction-summary/output.d.ts.map +0 -1
  152. package/dist/providers/transaction-summary/receipt.d.ts +0 -7
  153. package/dist/providers/transaction-summary/receipt.d.ts.map +0 -1
  154. package/dist/providers/transaction-summary/status.d.ts +0 -9
  155. package/dist/providers/transaction-summary/status.d.ts.map +0 -1
  156. package/dist/providers/transaction-summary/types.d.ts +0 -146
  157. package/dist/providers/transaction-summary/types.d.ts.map +0 -1
  158. package/dist/providers/utils/auto-retry-fetch.d.ts +0 -36
  159. package/dist/providers/utils/auto-retry-fetch.d.ts.map +0 -1
  160. package/dist/providers/utils/block-explorer.d.ts +0 -14
  161. package/dist/providers/utils/block-explorer.d.ts.map +0 -1
  162. package/dist/providers/utils/gas.d.ts +0 -38
  163. package/dist/providers/utils/gas.d.ts.map +0 -1
  164. package/dist/providers/utils/index.d.ts +0 -6
  165. package/dist/providers/utils/index.d.ts.map +0 -1
  166. package/dist/providers/utils/json.d.ts +0 -7
  167. package/dist/providers/utils/json.d.ts.map +0 -1
  168. package/dist/providers/utils/merge-quantities.d.ts +0 -3
  169. package/dist/providers/utils/merge-quantities.d.ts.map +0 -1
  170. package/dist/providers/utils/receipts.d.ts +0 -10
  171. package/dist/providers/utils/receipts.d.ts.map +0 -1
  172. package/dist/providers/utils/sleep.d.ts +0 -3
  173. package/dist/providers/utils/sleep.d.ts.map +0 -1
  174. package/dist/signer/index.d.ts +0 -2
  175. package/dist/signer/index.d.ts.map +0 -1
  176. package/dist/signer/signer.d.ts +0 -64
  177. package/dist/signer/signer.d.ts.map +0 -1
  178. package/dist/test-utils/generateTestWallet.d.ts +0 -4
  179. package/dist/test-utils/generateTestWallet.d.ts.map +0 -1
  180. package/dist/test-utils/index.d.ts +0 -4
  181. package/dist/test-utils/index.d.ts.map +0 -1
  182. package/dist/test-utils/launchNode.d.ts.map +0 -1
  183. package/dist/test-utils/seedTestWallet.d.ts +0 -4
  184. package/dist/test-utils/seedTestWallet.d.ts.map +0 -1
  185. package/dist/utils/formatTransferToContractScriptData.d.ts +0 -14
  186. package/dist/utils/formatTransferToContractScriptData.d.ts.map +0 -1
  187. package/dist/wallet/base-wallet-unlocked.d.ts +0 -73
  188. package/dist/wallet/base-wallet-unlocked.d.ts.map +0 -1
  189. package/dist/wallet/index.d.ts +0 -4
  190. package/dist/wallet/index.d.ts.map +0 -1
  191. package/dist/wallet/keystore-wallet.d.ts +0 -38
  192. package/dist/wallet/keystore-wallet.d.ts.map +0 -1
  193. package/dist/wallet/wallet.d.ts +0 -68
  194. package/dist/wallet/wallet.d.ts.map +0 -1
  195. package/dist/wallet/wallets.d.ts +0 -76
  196. package/dist/wallet/wallets.d.ts.map +0 -1
  197. package/dist/wallet-manager/index.d.ts +0 -6
  198. package/dist/wallet-manager/index.d.ts.map +0 -1
  199. package/dist/wallet-manager/storages/memory-storage.d.ts +0 -9
  200. package/dist/wallet-manager/storages/memory-storage.d.ts.map +0 -1
  201. package/dist/wallet-manager/types.d.ts +0 -42
  202. package/dist/wallet-manager/types.d.ts.map +0 -1
  203. package/dist/wallet-manager/vaults/mnemonic-vault.d.ts +0 -29
  204. package/dist/wallet-manager/vaults/mnemonic-vault.d.ts.map +0 -1
  205. package/dist/wallet-manager/vaults/privatekey-vault.d.ts +0 -29
  206. package/dist/wallet-manager/vaults/privatekey-vault.d.ts.map +0 -1
  207. package/dist/wallet-manager/wallet-manager.d.ts +0 -104
  208. package/dist/wallet-manager/wallet-manager.d.ts.map +0 -1
  209. package/dist/wordlists/index.d.ts +0 -5
  210. package/dist/wordlists/index.d.ts.map +0 -1
  211. package/dist/wordlists/words/english.d.ts +0 -2
  212. package/dist/wordlists/words/english.d.ts.map +0 -1
@@ -1,34 +0,0 @@
1
- export declare enum FuelConnectorMethods {
2
- ping = "ping",
3
- version = "version",
4
- connect = "connect",
5
- disconnect = "disconnect",
6
- isConnected = "isConnected",
7
- accounts = "accounts",
8
- currentAccount = "currentAccount",
9
- signMessage = "signMessage",
10
- sendTransaction = "sendTransaction",
11
- assets = "assets",
12
- addAsset = "addAsset",
13
- addAssets = "addAssets",
14
- networks = "networks",
15
- currentNetwork = "currentNetwork",
16
- addNetwork = "addNetwork",
17
- selectNetwork = "selectNetwork",
18
- addABI = "addABI",
19
- getABI = "getABI",
20
- hasABI = "hasABI"
21
- }
22
- export declare enum FuelConnectorEventTypes {
23
- connectors = "connectors",
24
- currentConnector = "currentConnector",
25
- connection = "connection",
26
- accounts = "accounts",
27
- currentAccount = "currentAccount",
28
- networks = "networks",
29
- currentNetwork = "currentNetwork",
30
- assets = "assets",
31
- abis = "abis"
32
- }
33
- export declare const FuelConnectorEventType = "FuelConnector";
34
- //# sourceMappingURL=connector-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"connector-types.d.ts","sourceRoot":"","sources":["../../../src/connectors/types/connector-types.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAE9B,IAAI,SAAS;IACb,OAAO,YAAY;IAEnB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAE3B,QAAQ,aAAa;IACrB,cAAc,mBAAmB;IAEjC,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IAEnC,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,SAAS,cAAc;IAEvB,QAAQ,aAAa;IACrB,cAAc,mBAAmB;IACjC,UAAU,eAAe;IACzB,aAAa,kBAAkB;IAE/B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,uBAAuB;IACjC,UAAU,eAAe;IACzB,gBAAgB,qBAAqB;IACrC,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,cAAc,mBAAmB;IACjC,QAAQ,aAAa;IACrB,cAAc,mBAAmB;IACjC,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,eAAO,MAAM,sBAAsB,kBAAkB,CAAC"}
@@ -1,34 +0,0 @@
1
- import type { JsonAbi } from '@fuel-ts/abi-coder';
2
- /**
3
- * @name Version
4
- */
5
- export type Version = {
6
- app: string;
7
- /**
8
- * Version selection this allow
9
- * Caret Ranges ^1.2.3 ^0.2.5 ^0.0.4
10
- * Tilde Ranges ~1.2.3 ~1.2 ~1
11
- * And Exact Versions 1.0.0
12
- */
13
- network: string;
14
- };
15
- /**
16
- * @name Network
17
- */
18
- export type Network = {
19
- /**
20
- * The name of the network.
21
- */
22
- url: string;
23
- /**
24
- * The chain id of the network.
25
- */
26
- chainId: number;
27
- };
28
- /**
29
- * ABI that represents a binary code interface from Sway.
30
- *
31
- * Read more at: https://docs.fuel.network/docs/specs/abi/json-abi-format/
32
- */
33
- export type FuelABI = JsonAbi;
34
- //# sourceMappingURL=data-type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-type.d.ts","sourceRoot":"","sources":["../../../src/connectors/types/data-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,OAAO,CAAC"}
@@ -1,111 +0,0 @@
1
- import type { Asset } from '../../providers/assets/types';
2
- import type { FuelConnector } from '../fuel-connector';
3
- import type { FuelConnectorEventTypes } from './connector-types';
4
- import type { Network } from './data-type';
5
- /** **
6
- * ========================================================================================
7
- * Helpers
8
- * ========================================================================================
9
- */
10
- /**
11
- * Extract the event argument type from the event type.
12
- */
13
- export type FuelEventArg<T extends FuelConnectorEvents['type']> = Extract<FuelConnectorEventTypes, {
14
- type: T;
15
- }>['data'];
16
- /**
17
- * Event trigger when the accounts available to the
18
- * connection changes.
19
- *
20
- * @property type - The event type.
21
- * @property accounts - The accounts addresses
22
- */
23
- export type AccountsEvent = {
24
- type: FuelConnectorEventTypes.accounts;
25
- data: Array<string>;
26
- };
27
- /**
28
- * Event trigger when the current account on the connector is changed
29
- * if the account is not authorized for the connection it should trigger with value null.
30
- *
31
- * @property type - The event type.
32
- * @property data - The current account selected or null.
33
- */
34
- export type AccountEvent = {
35
- type: FuelConnectorEventTypes.currentAccount;
36
- data: string | null;
37
- };
38
- /**
39
- * Event trigger when connection status changes. With the new connection status.
40
- *
41
- * @event ConnectionEvent
42
- * @property type - The event type.
43
- * @property data - The new connection status.
44
- */
45
- export type ConnectionEvent = {
46
- type: FuelConnectorEventTypes.connection;
47
- data: boolean;
48
- };
49
- /**
50
- * Event trigger when the network selected on the connector is changed.
51
- * It should trigger even if the network is not available for the connection.
52
- *
53
- * @event NetworkEvent
54
- * @property type - The event type.
55
- * @property data - The network information
56
- */
57
- export type NetworkEvent = {
58
- type: FuelConnectorEventTypes.currentNetwork;
59
- data: Network;
60
- };
61
- /**
62
- * Event trigger when the network selected on the connector is changed.
63
- * It should trigger even if the network is not available for the connection.
64
- *
65
- * @event NetworksEvent
66
- * @property type - The event type.
67
- * @property data - The network information
68
- */
69
- export type NetworksEvent = {
70
- type: FuelConnectorEventTypes.networks;
71
- data: Network;
72
- };
73
- /**
74
- * Event trigger when the list of connectors has changed.
75
- *
76
- * @event ConnectorsEvent
77
- * @property type - The event type.
78
- * @property data - The list of connectors
79
- */
80
- export type ConnectorsEvent = {
81
- type: FuelConnectorEventTypes.connectors;
82
- data: Array<FuelConnector>;
83
- };
84
- /**
85
- * Event trigger when the current connector has changed.
86
- *
87
- * @event ConnectorEvent
88
- * @property type - The event type.
89
- * @property data - The list of connectors
90
- */
91
- export type ConnectorEvent = {
92
- type: FuelConnectorEventTypes.currentConnector;
93
- data: FuelConnector;
94
- };
95
- /**
96
- * Event trigger when the assets list of metadata changed.
97
- *
98
- * @event AssetsEvent
99
- * @property type - The event type.
100
- * @property data - The list of assets
101
- */
102
- export type AssetsEvent = {
103
- type: FuelConnectorEventTypes.assets;
104
- data: Array<Asset>;
105
- };
106
- /**
107
- * All the events available to the connector.
108
- */
109
- export type FuelConnectorEvents = ConnectionEvent | NetworkEvent | NetworksEvent | AccountEvent | AccountsEvent | ConnectorsEvent | ConnectorEvent | AssetsEvent;
110
- export type FuelConnectorEventsType = FuelConnectorEvents['type'];
111
- //# sourceMappingURL=events.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/connectors/types/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,mBAAmB,CAAC,MAAM,CAAC,IAAI,OAAO,CACvE,uBAAuB,EACvB;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,CACZ,CAAC,MAAM,CAAC,CAAC;AAEV;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,uBAAuB,CAAC,QAAQ,CAAC;IACvC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,uBAAuB,CAAC,cAAc,CAAC;IAC7C,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,uBAAuB,CAAC,UAAU,CAAC;IACzC,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,uBAAuB,CAAC,cAAc,CAAC;IAC7C,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,uBAAuB,CAAC,QAAQ,CAAC;IACvC,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,uBAAuB,CAAC,UAAU,CAAC;IACzC,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;CAC5B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,uBAAuB,CAAC,gBAAgB,CAAC;IAC/C,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,eAAe,GACf,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,aAAa,GACb,eAAe,GACf,cAAc,GACd,WAAW,CAAC;AAEhB,MAAM,MAAM,uBAAuB,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- export * from './connector-metadata';
2
- export * from './connector-types';
3
- export * from './data-type';
4
- export * from './events';
5
- export * from './local-storage';
6
- export * from './target-object';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connectors/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
@@ -1,11 +0,0 @@
1
- /// <reference types="web" />
2
- import type { StorageAbstract } from '../../wallet-manager';
3
- export declare class LocalStorage implements StorageAbstract {
4
- private storage;
5
- constructor(localStorage: Storage);
6
- setItem(key: string, value: string): Promise<void>;
7
- getItem(key: string): Promise<string | null | undefined>;
8
- removeItem(key: string): Promise<void>;
9
- clear(): Promise<void>;
10
- }
11
- //# sourceMappingURL=local-storage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"local-storage.d.ts","sourceRoot":"","sources":["../../../src/connectors/types/local-storage.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,qBAAa,YAAa,YAAW,eAAe;IAClD,OAAO,CAAC,OAAO,CAAU;gBAEb,YAAY,EAAE,OAAO;IAI3B,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlD,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAIxD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAItC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
@@ -1,14 +0,0 @@
1
- /**
2
- * Target Object that represents the global event bus used by Fuel Connector Manager.
3
- * On browser the default target is the window or document. For other environments
4
- * the event bus should be provided.
5
- */
6
- export interface TargetObject {
7
- on?: (event: string, callback: any) => void;
8
- off?: (event: string, callback: any) => void;
9
- emit?: (event: string, data: any) => void;
10
- addEventListener?: (event: string, callback: any) => void;
11
- removeEventListener?: (event: string, callback: any) => void;
12
- postMessage?: (message: string) => void;
13
- }
14
- //# sourceMappingURL=target-object.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"target-object.d.ts","sourceRoot":"","sources":["../../../src/connectors/types/target-object.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5C,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAC;IAC7C,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC1C,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAC;IAC1D,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAC;IAC7D,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC"}
@@ -1,14 +0,0 @@
1
- export type CacheFor = {
2
- [key: string]: {
3
- timeout: number;
4
- value: unknown;
5
- } | null;
6
- };
7
- type CacheForOptions = {
8
- key: string;
9
- cache: CacheFor;
10
- cacheTime: number;
11
- };
12
- export declare function cacheFor<F extends (...args: unknown[]) => Promise<unknown>>(fn: F, { cache, cacheTime, key }: CacheForOptions): F;
13
- export {};
14
- //# sourceMappingURL=cache.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/connectors/utils/cache.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAAG;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,OAAO,CAAC;KAChB,GAAG,IAAI,CAAC;CACV,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,QAAQ,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,EACzE,EAAE,EAAE,CAAC,EACL,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,eAAe,GACzC,CAAC,CAqBH"}
@@ -1,7 +0,0 @@
1
- import type { FuelConnector } from '../fuel-connector';
2
- /**
3
- * Fuel Connector Event is a custom event that can be used by the connector to
4
- * inform the Fuel Connector Manager that a new connector is available.
5
- */
6
- export declare function dispatchFuelConnectorEvent(connector: FuelConnector): void;
7
- //# sourceMappingURL=dispatch-fuel-connector-event.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dispatch-fuel-connector-event.d.ts","sourceRoot":"","sources":["../../../src/connectors/utils/dispatch-fuel-connector-event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvD;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,aAAa,QAMlE"}
@@ -1,4 +0,0 @@
1
- export * from './cache';
2
- export * from './dispatch-fuel-connector-event';
3
- export * from './promises';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connectors/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,iCAAiC,CAAC;AAChD,cAAc,YAAY,CAAC"}
@@ -1,8 +0,0 @@
1
- export type DeferPromise<R = unknown> = {
2
- promise: Promise<R>;
3
- resolve: (value: R) => void;
4
- reject: (error: unknown) => void;
5
- };
6
- export declare function deferPromise<R = unknown>(): DeferPromise<R>;
7
- export declare function withTimeout<F extends Promise<unknown>, RT = Awaited<F>>(promise: F, timeout?: number): Promise<RT>;
8
- //# sourceMappingURL=promises.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"promises.d.ts","sourceRoot":"","sources":["../../../src/connectors/utils/promises.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,OAAO,IAAI;IACtC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC5B,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAClC,CAAC;AAEF,wBAAgB,YAAY,CAAC,CAAC,GAAG,OAAO,qBASvC;AAGD,wBAAsB,WAAW,CAAC,CAAC,SAAS,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,EAC3E,OAAO,EAAE,CAAC,EACV,OAAO,GAAE,MAAa,GACrB,OAAO,CAAC,EAAE,CAAC,CAOb"}
@@ -1,58 +0,0 @@
1
- import type { BytesLike } from '@fuel-ts/interfaces';
2
- type HDWalletConfig = {
3
- privateKey?: BytesLike;
4
- publicKey?: BytesLike;
5
- chainCode: BytesLike;
6
- depth?: number;
7
- index?: number;
8
- parentFingerprint?: string;
9
- };
10
- declare class HDWallet {
11
- depth: number;
12
- index: number;
13
- fingerprint: string;
14
- parentFingerprint: string;
15
- privateKey?: string;
16
- publicKey: string;
17
- chainCode: BytesLike;
18
- /**
19
- * HDWallet is a implementation of the BIP-0044 and BIP-0032, Multi-Account Hierarchy for Deterministic Wallets
20
- *
21
- * @param config - Wallet configurations
22
- */
23
- constructor(config: HDWalletConfig);
24
- get extendedKey(): string;
25
- /**
26
- * Derive the current HDWallet instance navigating only on the index.
27
- * `Ex.: m/44'/0 -> Ex.: m/44'/1 -> m/44'/2`. [Learn more](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki)
28
- *
29
- * @param index - Index of the child HDWallet.
30
- * @returns A new instance of HDWallet on the derived index
31
- */
32
- deriveIndex(index: number): HDWallet;
33
- /**
34
- * Derive the current HDWallet instance to the path. [Learn more](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki)
35
- *
36
- * @param path - The string representation of the child HDWallet. `Ex.: m/44'/0'/0'/0/0`
37
- * @returns A new instance of HDWallet on the derived path
38
- */
39
- derivePath(path: string): HDWallet;
40
- /**
41
- * Get the extendKey as defined on BIP-32 from the provided seed
42
- *
43
- * @param isPublic - enable to export public extendedKey, it not required when HDWallet didn't have the privateKey.
44
- * @param testnet - Inform if should use testnet or mainnet prefix, default value is true (`mainnet`).
45
- * @returns BIP-32 extended private key
46
- */
47
- toExtendedKey(isPublic?: boolean, testnet?: boolean): string;
48
- /**
49
- * Create HDWallet instance from seed
50
- *
51
- * @param seed - Seed
52
- * @returns A new instance of HDWallet
53
- */
54
- static fromSeed(seed: string): HDWallet;
55
- static fromExtendedKey(extendedKey: string): HDWallet;
56
- }
57
- export default HDWallet;
58
- //# sourceMappingURL=hdwallet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hdwallet.d.ts","sourceRoot":"","sources":["../../src/hdwallet/hdwallet.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAsDrD,KAAK,cAAc,GAAG;IACpB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,cAAM,QAAQ;IACZ,KAAK,EAAE,MAAM,CAAK;IAClB,KAAK,EAAE,MAAM,CAAK;IAClB,WAAW,EAAE,MAAM,CAAyB;IAC5C,iBAAiB,EAAE,MAAM,CAAyB;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IAErB;;;;OAIG;gBACS,MAAM,EAAE,cAAc;IAwBlC,IAAI,WAAW,WAEd;IAED;;;;;;OAMG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM;IAqDzB;;;;;OAKG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM;IAMvB;;;;;;OAMG;IACH,aAAa,CAAC,QAAQ,GAAE,OAAe,EAAE,OAAO,GAAE,OAAe,GAAG,MAAM;IAqB1E;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM;IAS5B,MAAM,CAAC,eAAe,CAAC,WAAW,EAAE,MAAM;CAmD3C;AAED,eAAe,QAAQ,CAAC"}
@@ -1,2 +0,0 @@
1
- export { default as HDWallet } from './hdwallet';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hdwallet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
@@ -1,3 +0,0 @@
1
- export { default as Mnemonic, MNEMONIC_SIZES } from './mnemonic';
2
- export type { MnemonicPhrase } from './utils';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mnemonic/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
@@ -1,85 +0,0 @@
1
- import type { BytesLike } from '@fuel-ts/interfaces';
2
- import type { MnemonicPhrase } from './utils';
3
- export declare const MNEMONIC_SIZES: number[];
4
- declare class Mnemonic {
5
- wordlist: Array<string>;
6
- /**
7
- *
8
- * @param wordlist - Provide a wordlist with the list of words used to generate the mnemonic phrase. The default value is the English list.
9
- * @returns Mnemonic instance
10
- */
11
- constructor(wordlist?: Array<string>);
12
- /**
13
- *
14
- * @param phrase - Mnemonic phrase composed by words from the provided wordlist
15
- * @returns Entropy hash
16
- */
17
- mnemonicToEntropy(phrase: MnemonicPhrase): string;
18
- /**
19
- *
20
- * @param entropy - Entropy source to the mnemonic phrase.
21
- * @returns Mnemonic phrase
22
- */
23
- entropyToMnemonic(entropy: BytesLike): string;
24
- /**
25
- *
26
- * @param phrase - Mnemonic phrase composed by words from the provided wordlist
27
- * @param wordlist - Provide a wordlist with the list of words used to generate the mnemonic phrase. The default value is the English list.
28
- * @returns Mnemonic phrase
29
- */
30
- static mnemonicToEntropy(phrase: MnemonicPhrase, wordlist?: Array<string>): string;
31
- /**
32
- * @param entropy - Entropy source to the mnemonic phrase.
33
- * @param testnet - Inform if should use testnet or mainnet prefix, default value is true (`mainnet`).
34
- * @returns 64-byte array contains privateKey and chainCode as described on BIP39
35
- */
36
- static entropyToMnemonic(entropy: BytesLike, wordlist?: Array<string>): string;
37
- /**
38
- * @param phrase - Mnemonic phrase composed by words from the provided wordlist
39
- * @param passphrase - Add additional security to protect the generated seed with a memorized passphrase. `Note: if the owner forgot the passphrase, all wallets and accounts derive from the phrase will be lost.`
40
- * @returns 64-byte array contains privateKey and chainCode as described on BIP39
41
- */
42
- static mnemonicToSeed(phrase: MnemonicPhrase, passphrase?: BytesLike): string;
43
- /**
44
- * @param phrase - Mnemonic phrase composed by words from the provided wordlist
45
- * @param passphrase - Add additional security to protect the generated seed with a memorized passphrase. `Note: if the owner forgot the passphrase, all wallets and accounts derive from the phrase will be lost.`
46
- * @returns 64-byte array contains privateKey and chainCode as described on BIP39
47
- */
48
- static mnemonicToMasterKeys(phrase: MnemonicPhrase, passphrase?: BytesLike): Uint8Array;
49
- /**
50
- * Validates if given mnemonic is valid
51
- * @param phrase - Mnemonic phrase composed by words from the provided wordlist
52
- * @returns true if phrase is a valid mnemonic
53
- */
54
- static isMnemonicValid(phrase: string): boolean;
55
- static binarySearch(target: string): boolean;
56
- /**
57
- * @param seed - BIP39 seed
58
- * @param testnet - Inform if should use testnet or mainnet prefix, the default value is true (`mainnet`).
59
- * @returns 64-byte array contains privateKey and chainCode as described on BIP39
60
- */
61
- static masterKeysFromSeed(seed: string): Uint8Array;
62
- /**
63
- * Get the extendKey as defined on BIP-32 from the provided seed
64
- *
65
- * @param seed - BIP39 seed
66
- * @param testnet - Inform if should use testnet or mainnet prefix, default value is true (`mainnet`).
67
- * @returns BIP-32 extended private key
68
- */
69
- static seedToExtendedKey(seed: string, testnet?: boolean): string;
70
- /**
71
- * Create a new mnemonic using a randomly generated number as entropy.
72
- * As defined in BIP39, the entropy must be a multiple of 32 bits, and its size must be between 128 and 256 bits.
73
- * Therefore, the possible values for `strength` are 128, 160, 192, 224, and 256.
74
- * If not provided, the default entropy length will be set to 256 bits.
75
- * The return is a list of words that encodes the generated entropy.
76
- *
77
- *
78
- * @param size - Number of bytes used as an entropy
79
- * @param extraEntropy - Optional extra entropy to increase randomness
80
- * @returns A randomly generated mnemonic
81
- */
82
- static generate(size?: number, extraEntropy?: BytesLike): string;
83
- }
84
- export default Mnemonic;
85
- //# sourceMappingURL=mnemonic.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mnemonic.d.ts","sourceRoot":"","sources":["../../src/mnemonic/mnemonic.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAMrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAiB9C,eAAO,MAAM,cAAc,UAAuB,CAAC;AA8BnD,cAAM,QAAQ;IACZ,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAExB;;;;OAIG;gBACS,QAAQ,GAAE,KAAK,CAAC,MAAM,CAAW;IAM7C;;;;OAIG;IACH,iBAAiB,CAAC,MAAM,EAAE,cAAc;IAIxC;;;;OAIG;IACH,iBAAiB,CAAC,OAAO,EAAE,SAAS;IAIpC;;;;;OAKG;IACH,MAAM,CAAC,iBAAiB,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,GAAE,KAAK,CAAC,MAAM,CAAW,GAAG,MAAM;IAQ3F;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,GAAE,KAAK,CAAC,MAAM,CAAW,GAAG,MAAM;IAWvF;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,UAAU,GAAE,SAAc;IASxE;;;;OAIG;IACH,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE,cAAc,EAAE,UAAU,GAAE,SAAc;IAK9E;;;;OAIG;IACH,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM;IAqBrC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAqB5C;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;IAanD;;;;;;OAMG;IACH,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,OAAe,GAAG,MAAM;IAuBxE;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAE,MAAW,EAAE,YAAY,GAAE,SAAc;CAMhE;AAED,eAAe,QAAQ,CAAC"}
@@ -1,8 +0,0 @@
1
- import type { BytesLike } from '@fuel-ts/interfaces';
2
- export type MnemonicPhrase = string | Array<string>;
3
- export declare function toUtf8Bytes(stri: string): Uint8Array;
4
- export declare function getWords(mnemonic: MnemonicPhrase): Array<string>;
5
- export declare function getPhrase(mnemonic: MnemonicPhrase): string;
6
- export declare function entropyToMnemonicIndices(entropy: Uint8Array): Array<number>;
7
- export declare function mnemonicWordsToEntropy(words: Array<string>, wordlist: Array<string>): BytesLike;
8
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/mnemonic/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAEpD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAqCpD;AAYD,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,KAAK,CAAC,MAAM,CAAC,CAKhE;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CAK1D;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,CA+B3E;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAkC/F"}
@@ -1,3 +0,0 @@
1
- export * from './predicate';
2
- export * from './utils/getPredicateRoot';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/predicate/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC"}
@@ -1,94 +0,0 @@
1
- import type { JsonAbi, InputValue } from '@fuel-ts/abi-coder';
2
- import { Interface } from '@fuel-ts/abi-coder';
3
- import type { AbstractAddress, BytesLike } from '@fuel-ts/interfaces';
4
- import type { BigNumberish } from '@fuel-ts/math';
5
- import { Account } from '../account';
6
- import type { TxParamsType } from '../account';
7
- import type { CallResult, Provider, ProviderSendTxParams, TransactionRequest, TransactionRequestLike, TransactionResponse } from '../providers';
8
- export type PredicateParams<T = InputValue[]> = {
9
- bytecode: BytesLike;
10
- provider: Provider;
11
- abi?: JsonAbi;
12
- inputData?: T;
13
- configurableConstants?: {
14
- [name: string]: unknown;
15
- };
16
- };
17
- /**
18
- * `Predicate` provides methods to populate transaction data with predicate information and sending transactions with them.
19
- */
20
- export declare class Predicate<TInputData extends InputValue[]> extends Account {
21
- bytes: Uint8Array;
22
- predicateDataBytes: Uint8Array;
23
- predicateData: TInputData;
24
- interface?: Interface;
25
- /**
26
- * Creates an instance of the Predicate class.
27
- *
28
- * @param bytecode - The bytecode of the predicate.
29
- * @param abi - The JSON ABI of the predicate.
30
- * @param provider - The provider used to interact with the blockchain.
31
- * @param inputData - The predicate input data (optional).
32
- * @param configurableConstants - Optional configurable constants for the predicate.
33
- */
34
- constructor({ bytecode, abi, provider, inputData, configurableConstants, }: PredicateParams<TInputData>);
35
- /**
36
- * Populates the transaction data with predicate data.
37
- *
38
- * @param transactionRequestLike - The transaction request-like object.
39
- * @returns The transaction request with predicate data.
40
- */
41
- populateTransactionPredicateData(transactionRequestLike: TransactionRequestLike): TransactionRequest;
42
- /**
43
- * A helper that creates a transfer transaction request and returns it.
44
- *
45
- * @param destination - The address of the destination.
46
- * @param amount - The amount of coins to transfer.
47
- * @param assetId - The asset ID of the coins to transfer.
48
- * @param txParams - The transaction parameters (gasLimit, gasPrice, maturity).
49
- * @returns A promise that resolves to the prepared transaction request.
50
- */
51
- createTransfer(
52
- /** Address of the destination */
53
- destination: AbstractAddress,
54
- /** Amount of coins */
55
- amount: BigNumberish,
56
- /** Asset ID of coins */
57
- assetId?: BytesLike,
58
- /** Tx Params */
59
- txParams?: TxParamsType): Promise<TransactionRequest>;
60
- /**
61
- * Sends a transaction with the populated predicate data.
62
- *
63
- * @param transactionRequestLike - The transaction request-like object.
64
- * @returns A promise that resolves to the transaction response.
65
- */
66
- sendTransaction(transactionRequestLike: TransactionRequestLike, options?: Pick<ProviderSendTxParams, 'awaitExecution'>): Promise<TransactionResponse>;
67
- /**
68
- * Simulates a transaction with the populated predicate data.
69
- *
70
- * @param transactionRequestLike - The transaction request-like object.
71
- * @returns A promise that resolves to the call result.
72
- */
73
- simulateTransaction(transactionRequestLike: TransactionRequestLike): Promise<CallResult>;
74
- private getPredicateData;
75
- /**
76
- * Processes the predicate data and returns the altered bytecode and interface.
77
- *
78
- * @param bytes - The bytes of the predicate.
79
- * @param jsonAbi - The JSON ABI of the predicate.
80
- * @param configurableConstants - Optional configurable constants for the predicate.
81
- * @returns An object containing the new predicate bytes and interface.
82
- */
83
- private static processPredicateData;
84
- /**
85
- * Sets the configurable constants for the predicate.
86
- *
87
- * @param bytes - The bytes of the predicate.
88
- * @param configurableConstants - Configurable constants to be set.
89
- * @param abiInterface - The ABI interface of the predicate.
90
- * @returns The mutated bytes with the configurable constants set.
91
- */
92
- private static setConfigurableConstants;
93
- }
94
- //# sourceMappingURL=predicate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"predicate.d.ts","sourceRoot":"","sources":["../../src/predicate/predicate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EACL,SAAS,EAKV,MAAM,oBAAoB,CAAC;AAI5B,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAIlD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAItB,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,UAAU,EAAE,IAAI;IAC9C,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,qBAAqB,CAAC,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACrD,CAAC;AAEF;;GAEG;AACH,qBAAa,SAAS,CAAC,UAAU,SAAS,UAAU,EAAE,CAAE,SAAQ,OAAO;IACrE,KAAK,EAAE,UAAU,CAAC;IAClB,kBAAkB,EAAE,UAAU,CAAuB;IACrD,aAAa,EAAE,UAAU,CAA+B;IACxD,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;;;;;;OAQG;gBACS,EACV,QAAQ,EACR,GAAG,EACH,QAAQ,EACR,SAAS,EACT,qBAAqB,GACtB,EAAE,eAAe,CAAC,UAAU,CAAC;IAgB9B;;;;;OAKG;IACH,gCAAgC,CAAC,sBAAsB,EAAE,sBAAsB;IAiB/E;;;;;;;;OAQG;IACG,cAAc;IAClB,iCAAiC;IACjC,WAAW,EAAE,eAAe;IAC5B,sBAAsB;IACtB,MAAM,EAAE,YAAY;IACpB,wBAAwB;IACxB,OAAO,GAAE,SAAuB;IAChC,gBAAgB;IAChB,QAAQ,GAAE,YAAiB,GAC1B,OAAO,CAAC,kBAAkB,CAAC;IAK9B;;;;;OAKG;IACH,eAAe,CACb,sBAAsB,EAAE,sBAAsB,EAC9C,OAAO,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,GACrD,OAAO,CAAC,mBAAmB,CAAC;IAK/B;;;;;OAKG;IACH,mBAAmB,CAAC,sBAAsB,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC;IAKxF,OAAO,CAAC,gBAAgB;IAsBxB;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAgCnC;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,wBAAwB;CAsCxC"}
@@ -1,12 +0,0 @@
1
- import type { BytesLike } from '@fuel-ts/interfaces';
2
- /**
3
- * @hidden
4
- *
5
- * Calculates the predicate root for a given bytecode and chain ID.
6
- *
7
- * @param bytecode - The bytecode represented as a BytesLike object.
8
- * @param chainId - The ID of the chain associated with the bytecode.
9
- * @returns The predicate root as a string.
10
- */
11
- export declare const getPredicateRoot: (bytecode: BytesLike) => string;
12
- //# sourceMappingURL=getPredicateRoot.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getPredicateRoot.d.ts","sourceRoot":"","sources":["../../../src/predicate/utils/getPredicateRoot.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,aAAc,SAAS,KAAG,MAQtD,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './getPredicateRoot';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/predicate/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}