@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 +1,15 @@
1
+ import type { B256Address } from '@fuel-ts/interfaces';
2
+ import { type BigNumberish } from '@fuel-ts/math';
3
+ import { type BytesLike } from 'ethers';
4
+ interface IAssembleTransferToContractScriptParams {
5
+ hexelifiedContractId: B256Address;
6
+ amountToTransfer: BigNumberish;
7
+ assetId: BytesLike;
8
+ }
9
+ export declare const formatTransferToContractScriptData: (params: IAssembleTransferToContractScriptParams) => Uint8Array;
10
+ export declare const assembleTransferToContractScript: (params: IAssembleTransferToContractScriptParams) => Promise<{
11
+ script: Uint8Array;
12
+ scriptData: Uint8Array;
13
+ }>;
14
+ export {};
15
+ //# sourceMappingURL=formatTransferToContractScriptData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatTransferToContractScriptData.d.ts","sourceRoot":"","sources":["../../src/utils/formatTransferToContractScriptData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEtD,UAAU,uCAAuC;IAC/C,oBAAoB,EAAE,WAAW,CAAC;IAClC,gBAAgB,EAAE,YAAY,CAAC;IAC/B,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,eAAO,MAAM,kCAAkC,WACrC,uCAAuC,eAehD,CAAC;AAEF,eAAO,MAAM,gCAAgC,WACnC,uCAAuC;;;EAmChD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './wallet-manager';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wallet-manager/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { StorageAbstract } from '../types';
2
+ declare class MemoryStorage implements StorageAbstract {
3
+ storage: Map<string, unknown>;
4
+ getItem<T>(key: string): Promise<T | null>;
5
+ setItem(key: string, value: string): Promise<void>;
6
+ removeItem(key: string): Promise<void>;
7
+ clear(): Promise<void>;
8
+ }
9
+ export default MemoryStorage;
10
+ //# sourceMappingURL=memory-storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-storage.d.ts","sourceRoot":"","sources":["../../../src/wallet-manager/storages/memory-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,cAAM,aAAc,YAAW,eAAe;IAC5C,OAAO,uBAA8B;IAE/B,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAK1C,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAIlC,UAAU,CAAC,GAAG,EAAE,MAAM;IAItB,KAAK;CAGZ;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { AbstractAddress } from '@fuel-ts/interfaces';
2
+ import type { Provider } from '../providers';
3
+ import type { WalletUnlocked } from '../wallets';
4
+ export type WalletManagerAccount = {
5
+ address: AbstractAddress;
6
+ publicKey: string;
7
+ vaultId?: number;
8
+ };
9
+ export type WalletManagerOptions = {
10
+ storage: StorageAbstract;
11
+ };
12
+ export type VaultConfig = {
13
+ type: string;
14
+ title?: string;
15
+ secret?: string;
16
+ provider: Provider;
17
+ };
18
+ export type VaultsState = Array<{
19
+ type: string;
20
+ title?: string;
21
+ data?: VaultConfig;
22
+ vault: Vault;
23
+ }>;
24
+ export interface WalletManagerState {
25
+ vaults: VaultsState;
26
+ }
27
+ export declare abstract class Vault<TOptions = {
28
+ secret?: string;
29
+ }> {
30
+ static readonly type: string;
31
+ constructor(_options: TOptions);
32
+ serialize(): TOptions;
33
+ getAccounts(): WalletManagerAccount[];
34
+ addAccount(): WalletManagerAccount;
35
+ exportAccount(_address: AbstractAddress): string;
36
+ getWallet(_address: AbstractAddress): WalletUnlocked;
37
+ }
38
+ export declare abstract class StorageAbstract {
39
+ abstract setItem(key: string, value: string): Promise<void>;
40
+ abstract getItem(key: string): Promise<string | null | undefined>;
41
+ abstract removeItem(key: string): Promise<void>;
42
+ abstract clear(): Promise<void>;
43
+ }
44
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/wallet-manager/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,eAAe,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC,CAAC;AAEH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,8BAAsB,KAAK,CAAC,QAAQ,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;IACxD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEjB,QAAQ,EAAE,QAAQ;IAI9B,SAAS,IAAI,QAAQ;IAIrB,WAAW,IAAI,oBAAoB,EAAE;IAIrC,UAAU,IAAI,oBAAoB;IAIlC,aAAa,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM;IAIhD,SAAS,CAAC,QAAQ,EAAE,eAAe,GAAG,cAAc;CAGrD;AAED,8BAAsB,eAAe;IACnC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAC3D,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjE,QAAQ,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAC/C,QAAQ,CAAC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAChC"}
@@ -0,0 +1,33 @@
1
+ import type { AbstractAddress } from '@fuel-ts/interfaces';
2
+ import type { Provider } from '../../providers';
3
+ import type { WalletUnlocked } from '../../wallets';
4
+ import type { Vault } from '../types';
5
+ interface MnemonicVaultOptions {
6
+ secret?: string;
7
+ rootPath?: string;
8
+ numberOfAccounts?: number | null;
9
+ provider: Provider;
10
+ }
11
+ export declare class MnemonicVault implements Vault<MnemonicVaultOptions> {
12
+ #private;
13
+ static readonly type = "mnemonic";
14
+ pathKey: string;
15
+ rootPath: string;
16
+ numberOfAccounts: number;
17
+ provider: Provider;
18
+ constructor(options: MnemonicVaultOptions);
19
+ getDerivePath(index: number): string;
20
+ serialize(): MnemonicVaultOptions;
21
+ getAccounts(): {
22
+ publicKey: string;
23
+ address: AbstractAddress;
24
+ }[];
25
+ addAccount(): {
26
+ publicKey: string;
27
+ address: AbstractAddress;
28
+ };
29
+ exportAccount(address: string | AbstractAddress): string;
30
+ getWallet(address: string | AbstractAddress): WalletUnlocked;
31
+ }
32
+ export {};
33
+ //# sourceMappingURL=mnemonic-vault.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mnemonic-vault.d.ts","sourceRoot":"","sources":["../../../src/wallet-manager/vaults/mnemonic-vault.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,UAAU,oBAAoB;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,qBAAa,aAAc,YAAW,KAAK,CAAC,oBAAoB,CAAC;;IAC/D,MAAM,CAAC,QAAQ,CAAC,IAAI,cAAc;IAGlC,OAAO,SAAQ;IACf,QAAQ,EAAE,MAAM,CAA4C;IAC5D,gBAAgB,EAAE,MAAM,CAAK;IAC7B,QAAQ,EAAE,QAAQ,CAAC;gBAEP,OAAO,EAAE,oBAAoB;IAQzC,aAAa,CAAC,KAAK,EAAE,MAAM;IAO3B,SAAS,IAAI,oBAAoB;IASjC,WAAW;;;;IAqBX,UAAU;;;;IAcV,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,MAAM;IAsBxD,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,cAAc;CAI7D"}
@@ -0,0 +1,33 @@
1
+ import type { AbstractAddress } from '@fuel-ts/interfaces';
2
+ import type { Provider } from '../../providers';
3
+ import type { WalletUnlocked } from '../../wallets';
4
+ import type { WalletManagerAccount, Vault } from '../types';
5
+ interface PkVaultOptions {
6
+ secret?: string;
7
+ accounts?: Array<string>;
8
+ provider: Provider;
9
+ }
10
+ export declare class PrivateKeyVault implements Vault<PkVaultOptions> {
11
+ #private;
12
+ static readonly type = "privateKey";
13
+ provider: Provider;
14
+ /**
15
+ * If privateKey vault is initialized with a secretKey, it creates
16
+ * one account with the fallowing secret
17
+ */
18
+ constructor(options: PkVaultOptions);
19
+ serialize(): PkVaultOptions;
20
+ getPublicAccount(privateKey: string): {
21
+ address: AbstractAddress;
22
+ publicKey: string;
23
+ };
24
+ getAccounts(): WalletManagerAccount[];
25
+ addAccount(): {
26
+ address: AbstractAddress;
27
+ publicKey: string;
28
+ };
29
+ exportAccount(address: string | AbstractAddress): string;
30
+ getWallet(address: string | AbstractAddress): WalletUnlocked;
31
+ }
32
+ export {};
33
+ //# sourceMappingURL=privatekey-vault.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"privatekey-vault.d.ts","sourceRoot":"","sources":["../../../src/wallet-manager/vaults/privatekey-vault.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE5D,UAAU,cAAc;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,qBAAa,eAAgB,YAAW,KAAK,CAAC,cAAc,CAAC;;IAC3D,MAAM,CAAC,QAAQ,CAAC,IAAI,gBAAgB;IACpC,QAAQ,EAAE,QAAQ,CAAC;IAInB;;;OAGG;gBACS,OAAO,EAAE,cAAc;IAanC,SAAS,IAAI,cAAc;IAO3B,gBAAgB,CAAC,UAAU,EAAE,MAAM;;;;IAQnC,WAAW,IAAI,oBAAoB,EAAE;IAIrC,UAAU;;;;IAUV,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,MAAM;IAgBxD,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,cAAc;CAI7D"}
@@ -0,0 +1,104 @@
1
+ /// <reference types="node" />
2
+ import type { AbstractAddress } from '@fuel-ts/interfaces';
3
+ import { EventEmitter } from 'events';
4
+ import type { WalletUnlocked } from '../wallets';
5
+ import type { StorageAbstract, WalletManagerAccount, VaultConfig, WalletManagerOptions, Vault } from './types';
6
+ import { MnemonicVault } from './vaults/mnemonic-vault';
7
+ import { PrivateKeyVault } from './vaults/privatekey-vault';
8
+ /**
9
+ * WalletManager is a upper package to manage multiple vaults like mnemonic and privateKeys.
10
+ *
11
+ * - VaultTypes can be add to `WalletManager.Vaults` enabling to add custom Vault types.
12
+ * - Storage can be instantiate when initializing enabling custom storage types.
13
+ */
14
+ export declare class WalletManager extends EventEmitter {
15
+ #private;
16
+ /**
17
+ * Vaults
18
+ *
19
+ * Vaults are responsible to store secret keys and return an `Wallet` instance,
20
+ * to interact with the network.
21
+ *
22
+ * Each vault has access to its own state
23
+ *
24
+ */
25
+ static Vaults: (typeof MnemonicVault | typeof PrivateKeyVault)[];
26
+ /**
27
+ * Storage
28
+ *
29
+ * Persistent encrypted data. `The default storage works only on memory`.
30
+ */
31
+ readonly storage: StorageAbstract;
32
+ readonly STORAGE_KEY: string;
33
+ constructor(options?: WalletManagerOptions);
34
+ get isLocked(): boolean;
35
+ /**
36
+ * Return the vault serialized object containing all the privateKeys,
37
+ * the format of the return depends on the Vault type.
38
+ */
39
+ exportVault<T extends Vault>(vaultId: number): ReturnType<T['serialize']>;
40
+ /**
41
+ * List all vaults on the Wallet Manager, this function not return secret's
42
+ */
43
+ getVaults(): Array<{
44
+ title?: string;
45
+ type: string;
46
+ vaultId: number;
47
+ }>;
48
+ /**
49
+ * List all accounts on the Wallet Manager not vault information is revealed
50
+ */
51
+ getAccounts(): Array<WalletManagerAccount>;
52
+ /**
53
+ * Create a Wallet instance for the specific account
54
+ */
55
+ getWallet(address: string | AbstractAddress): WalletUnlocked;
56
+ /**
57
+ * Export specific account privateKey
58
+ */
59
+ exportPrivateKey(address: string | AbstractAddress): string;
60
+ /**
61
+ * Add account to a selected vault or on the first vault as default.
62
+ * If not vaults are adds it will return error
63
+ */
64
+ addAccount(options?: {
65
+ vaultId: number;
66
+ }): Promise<WalletManagerAccount>;
67
+ /**
68
+ * Remove vault by index, by remove the vault you also remove all accounts
69
+ * created by the vault.
70
+ */
71
+ removeVault(index: number): Promise<void>;
72
+ /**
73
+ * Add Vault, the `vaultConfig.type` will look for the Vaults supported if
74
+ * didn't found it will throw.
75
+ */
76
+ addVault(vaultConfig: VaultConfig): Promise<void>;
77
+ /**
78
+ * Lock wallet. It removes passphrase from class instance, encrypt and hide all address and
79
+ * secrets.
80
+ */
81
+ lock(): void;
82
+ /**
83
+ * Unlock wallet. It sets passphrase on WalletManger instance load all address from configured vaults.
84
+ * Vaults with secrets are not unlocked or instantiated on this moment.
85
+ */
86
+ unlock(passphrase: string): Promise<void>;
87
+ /**
88
+ * Update WalletManager encryption passphrase
89
+ */
90
+ updatePassphrase(oldpass: string, newpass: string): Promise<void>;
91
+ /**
92
+ * Retrieve and decrypt WalletManager state from storage
93
+ */
94
+ loadState(): Promise<void>;
95
+ /**
96
+ * Store encrypted WalletManager state on storage
97
+ */
98
+ private saveState;
99
+ /**
100
+ * Return a instantiable Class reference from `WalletManager.Vaults` supported list.
101
+ */
102
+ private getVaultClass;
103
+ }
104
+ //# sourceMappingURL=wallet-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-manager.d.ts","sourceRoot":"","sources":["../../src/wallet-manager/wallet-manager.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGjD,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,WAAW,EAEX,oBAAoB,EAEpB,KAAK,EACN,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAmB5D;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,YAAY;;IAC7C;;;;;;;;OAQG;IACH,MAAM,CAAC,MAAM,oDAAoC;IACjD;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAuB;IAExD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAmB;gBAOnC,OAAO,CAAC,EAAE,oBAAoB;IAK1C,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;;OAGG;IACH,WAAW,CAAC,CAAC,SAAS,KAAK,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IAOzE;;OAEG;IACH,SAAS,IAAI,KAAK,CAAC;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAQrE;;OAEG;IACH,WAAW,IAAI,KAAK,CAAC,oBAAoB,CAAC;IAO1C;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,cAAc;IAU5D;;OAEG;IACH,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe;IAWlD;;;OAGG;IACG,UAAU,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE;IAc9C;;;OAGG;IACG,WAAW,CAAC,KAAK,EAAE,MAAM;IAK/B;;;OAGG;IACG,QAAQ,CAAC,WAAW,EAAE,WAAW;IAiBvC;;;OAGG;IACH,IAAI;IAUJ;;;OAGG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM;IAmB/B;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAgBvD;;OAEG;IACG,SAAS;IAUf;;OAEG;YACW,SAAS;IAuCvB;;OAEG;IACH,OAAO,CAAC,aAAa;CAOtB"}
@@ -0,0 +1,69 @@
1
+ import type { AbstractAddress } from '@fuel-ts/interfaces';
2
+ import type { BytesLike } from 'ethers';
3
+ import type { Provider } from './providers';
4
+ import { WalletLocked, WalletUnlocked } from './wallets';
5
+ /**
6
+ * `Wallet` provides methods to create locked and unlocked wallet instances.
7
+ */
8
+ export declare class Wallet {
9
+ /**
10
+ * Creates a locked wallet instance from an address and a provider.
11
+ *
12
+ * @param address - The address of the wallet.
13
+ * @param provider - A Provider instance (optional).
14
+ * @returns A locked wallet instance.
15
+ */
16
+ static fromAddress(address: string | AbstractAddress, provider?: Provider): WalletLocked;
17
+ /**
18
+ * Creates an unlocked wallet instance from a private key and a provider.
19
+ *
20
+ * @param privateKey - The private key of the wallet.
21
+ * @param provider - A Provider instance (optional).
22
+ * @returns An unlocked wallet instance.
23
+ */
24
+ static fromPrivateKey(privateKey: BytesLike, provider?: Provider): WalletUnlocked;
25
+ /**
26
+ * Generate a new Wallet Unlocked with a random key pair.
27
+ *
28
+ * @param generateOptions - Options to customize the generation process (optional).
29
+ * @returns An unlocked wallet instance.
30
+ */
31
+ static generate: typeof WalletUnlocked.generate;
32
+ /**
33
+ * Create a Wallet Unlocked from a seed.
34
+ *
35
+ * @param seed - The seed phrase.
36
+ * @param provider - A Provider instance (optional).
37
+ * @param path - The derivation path (optional).
38
+ * @returns An unlocked wallet instance.
39
+ */
40
+ static fromSeed: typeof WalletUnlocked.fromSeed;
41
+ /**
42
+ * Create a Wallet Unlocked from a mnemonic phrase.
43
+ *
44
+ * @param mnemonic - The mnemonic phrase.
45
+ * @param provider - A Provider instance (optional).
46
+ * @param path - The derivation path (optional).
47
+ * @param passphrase - The passphrase for the mnemonic (optional).
48
+ * @returns An unlocked wallet instance.
49
+ */
50
+ static fromMnemonic: typeof WalletUnlocked.fromMnemonic;
51
+ /**
52
+ * Create a Wallet Unlocked from an extended key.
53
+ *
54
+ * @param extendedKey - The extended key.
55
+ * @param provider - A Provider instance (optional).
56
+ * @returns An unlocked wallet instance.
57
+ */
58
+ static fromExtendedKey: typeof WalletUnlocked.fromExtendedKey;
59
+ /**
60
+ * Create a Wallet Unlocked from an encrypted JSON.
61
+ *
62
+ * @param jsonWallet - The encrypted JSON keystore.
63
+ * @param password - The password to decrypt the JSON.
64
+ * @param provider - A Provider instance (optional).
65
+ * @returns An unlocked wallet instance.
66
+ */
67
+ static fromEncryptedJson: typeof WalletUnlocked.fromEncryptedJson;
68
+ }
69
+ //# sourceMappingURL=wallet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../src/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD;;GAEG;AACH,qBAAa,MAAM;IACjB;;;;;;OAMG;IACH,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,YAAY;IAIxF;;;;;;OAMG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,QAAQ;IAIhE;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,iCAA2B;IAE1C;;;;;;;OAOG;IACH,MAAM,CAAC,QAAQ,iCAA2B;IAE1C;;;;;;;;OAQG;IACH,MAAM,CAAC,YAAY,qCAA+B;IAElD;;;;;;OAMG;IACH,MAAM,CAAC,eAAe,wCAAkC;IAExD;;;;;;;OAOG;IACH,MAAM,CAAC,iBAAiB,0CAAoC;CAC7D"}
@@ -0,0 +1,76 @@
1
+ import type { BytesLike } from 'ethers';
2
+ import { Account } from './account';
3
+ import { BaseWalletUnlocked } from './base-wallet-unlocked';
4
+ import type { Provider } from './providers';
5
+ export interface GenerateOptions {
6
+ /** Additional entropy for the random bytes */
7
+ entropy?: BytesLike;
8
+ provider?: Provider;
9
+ }
10
+ /**
11
+ * `WalletLocked` provides the functionalities for a locked wallet.
12
+ */
13
+ export declare class WalletLocked extends Account {
14
+ /**
15
+ * Unlocks the wallet using the provided private key and returns an instance of WalletUnlocked.
16
+ *
17
+ * @param privateKey - The private key used to unlock the wallet.
18
+ * @returns An instance of WalletUnlocked.
19
+ */
20
+ unlock(privateKey: BytesLike): WalletUnlocked;
21
+ }
22
+ /**
23
+ * `WalletUnlocked` provides the functionalities for an unlocked wallet.
24
+ */
25
+ export declare class WalletUnlocked extends BaseWalletUnlocked {
26
+ /**
27
+ * Locks the wallet and returns an instance of WalletLocked.
28
+ *
29
+ * @returns An instance of WalletLocked.
30
+ */
31
+ lock(): WalletLocked;
32
+ /**
33
+ * Generate a new Wallet Unlocked with a random key pair.
34
+ *
35
+ * @param generateOptions - Options to customize the generation process (optional).
36
+ * @returns An instance of WalletUnlocked.
37
+ */
38
+ static generate(generateOptions?: GenerateOptions): WalletUnlocked;
39
+ /**
40
+ * Create a Wallet Unlocked from a seed.
41
+ *
42
+ * @param seed - The seed phrase.
43
+ * @param provider - A Provider instance (optional).
44
+ * @param path - The derivation path (optional).
45
+ * @returns An instance of WalletUnlocked.
46
+ */
47
+ static fromSeed(seed: string, provider?: Provider, path?: string): WalletUnlocked;
48
+ /**
49
+ * Create a Wallet Unlocked from a mnemonic phrase.
50
+ *
51
+ * @param mnemonic - The mnemonic phrase.
52
+ * @param provider - A Provider instance (optional).
53
+ * @param path - The derivation path (optional).
54
+ * @param passphrase - The passphrase for the mnemonic (optional).
55
+ * @returns An instance of WalletUnlocked.
56
+ */
57
+ static fromMnemonic(mnemonic: string, provider?: Provider, path?: string, passphrase?: BytesLike): WalletUnlocked;
58
+ /**
59
+ * Create a Wallet Unlocked from an extended key.
60
+ *
61
+ * @param extendedKey - The extended key.
62
+ * @param provider - A Provider instance (optional).
63
+ * @returns An instance of WalletUnlocked.
64
+ */
65
+ static fromExtendedKey(extendedKey: string, provider?: Provider): WalletUnlocked;
66
+ /**
67
+ * Create a Wallet Unlocked from an encrypted JSON.
68
+ *
69
+ * @param jsonWallet - The encrypted JSON keystore.
70
+ * @param password - The password to decrypt the JSON.
71
+ * @param provider - A Provider instance (optional).
72
+ * @returns An unlocked wallet instance.
73
+ */
74
+ static fromEncryptedJson(jsonWallet: string, password: string, provider?: Provider): Promise<WalletUnlocked>;
75
+ }
76
+ //# sourceMappingURL=wallets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../src/wallets.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAI5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,MAAM,WAAW,eAAe;IAC9B,8CAA8C;IAC9C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,OAAO;IACvC;;;;;OAKG;IACH,MAAM,CAAC,UAAU,EAAE,SAAS,GAAG,cAAc;CAI9C;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,kBAAkB;IACpD;;;;OAIG;IACH,IAAI,IAAI,YAAY;IAKpB;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,GAAG,cAAc;IAMlE;;;;;;;OAOG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,cAAc;IAOjF;;;;;;;;OAQG;IACH,MAAM,CAAC,YAAY,CACjB,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,QAAQ,EACnB,IAAI,CAAC,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,SAAS,GACrB,cAAc;IAQjB;;;;;;OAMG;IACH,MAAM,CAAC,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,cAAc;IAMhF;;;;;;;OAOG;WACU,iBAAiB,CAC5B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,QAAQ,GAClB,OAAO,CAAC,cAAc,CAAC;CAK3B"}
@@ -0,0 +1,5 @@
1
+ export { english } from './words/english';
2
+ export declare enum Language {
3
+ 'english' = "english"
4
+ }
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wordlists/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,oBAAY,QAAQ;IAClB,SAAS,YAAY;CACtB"}
@@ -0,0 +1,2 @@
1
+ export declare const english: string[];
2
+ //# sourceMappingURL=english.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"english.d.ts","sourceRoot":"","sources":["../../../src/wordlists/words/english.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAigEnB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,91 @@
1
+ {
2
+ "name": "@fuel-ts/account",
3
+ "version": "0.0.0-pr-1699-20240202183346",
4
+ "description": "",
5
+ "author": "Fuel Labs <contact@fuel.sh> (https://fuel.network/)",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.mjs",
8
+ "types": "dist/index.d.ts",
9
+ "engines": {
10
+ "node": "^18.18.2 || ^20.0.0"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "require": "./dist/index.js",
15
+ "import": "./dist/index.mjs",
16
+ "types": "./dist/index.d.ts"
17
+ },
18
+ "./configs": {
19
+ "require": "./dist/configs.js",
20
+ "import": "./dist/configs.mjs",
21
+ "types": "./dist/configs.d.ts"
22
+ },
23
+ "./test-utils": {
24
+ "require": "./dist/test-utils.js",
25
+ "import": "./dist/test-utils.mjs",
26
+ "types": "./dist/test-utils.d.ts"
27
+ }
28
+ },
29
+ "typesVersions": {
30
+ "*": {
31
+ "configs": [
32
+ "./dist/configs.d.ts"
33
+ ],
34
+ "test-utils": [
35
+ "./dist/test-utils.d.ts"
36
+ ]
37
+ }
38
+ },
39
+ "files": [
40
+ "dist"
41
+ ],
42
+ "license": "Apache-2.0",
43
+ "dependencies": {
44
+ "@fuels/assets": "^0.1.4",
45
+ "@fuels/vm-asm": "0.42.1",
46
+ "graphql": "^16.6.0",
47
+ "graphql-request": "5.0.0",
48
+ "graphql-tag": "^2.12.6",
49
+ "ramda": "^0.29.0",
50
+ "tai64": "^1.0.0",
51
+ "events": "^3.3.0",
52
+ "@noble/curves": "^1.3.0",
53
+ "dexie-observable": "4.0.1-beta.13",
54
+ "ethers": "^6.7.1",
55
+ "json-rpc-2.0": "^1.7.0",
56
+ "portfinder": "^1.0.32",
57
+ "tree-kill": "^1.2.2",
58
+ "uuid": "^9.0.0",
59
+ "@fuel-ts/abi-coder": "0.0.0-pr-1699-20240202183346",
60
+ "@fuel-ts/address": "0.0.0-pr-1699-20240202183346",
61
+ "@fuel-ts/crypto": "0.0.0-pr-1699-20240202183346",
62
+ "@fuel-ts/errors": "0.0.0-pr-1699-20240202183346",
63
+ "@fuel-ts/fuel-core": "0.0.0-pr-1699-20240202183346",
64
+ "@fuel-ts/hasher": "0.0.0-pr-1699-20240202183346",
65
+ "@fuel-ts/interfaces": "0.0.0-pr-1699-20240202183346",
66
+ "@fuel-ts/math": "0.0.0-pr-1699-20240202183346",
67
+ "@fuel-ts/merkle": "0.0.0-pr-1699-20240202183346",
68
+ "@fuel-ts/transactions": "0.0.0-pr-1699-20240202183346",
69
+ "@fuel-ts/utils": "0.0.0-pr-1699-20240202183346",
70
+ "@fuel-ts/versions": "0.0.0-pr-1699-20240202183346"
71
+ },
72
+ "devDependencies": {
73
+ "@graphql-codegen/cli": "^2.13.7",
74
+ "@graphql-codegen/typescript": "^2.8.0",
75
+ "@graphql-codegen/typescript-operations": "^2.5.5",
76
+ "@graphql-codegen/typescript-generic-sdk": "^3.1.0",
77
+ "get-graphql-schema": "^2.1.2",
78
+ "@types/ramda": "^0.29.3",
79
+ "@types/uuid": "^9.0.1",
80
+ "@fuel-ts/hasher": "0.0.0-pr-1699-20240202183346",
81
+ "@fuel-ts/math": "0.0.0-pr-1699-20240202183346",
82
+ "@fuel-ts/utils": "0.0.0-pr-1699-20240202183346"
83
+ },
84
+ "scripts": {
85
+ "build": "tsup",
86
+ "prebuild": "pnpm build:operations",
87
+ "build:schema": "get-graphql-schema http://localhost:4000/graphql > fuel-core-schema.graphql && prettier --write fuel-core-schema.graphql",
88
+ "build:operations": "pnpm graphql-codegen",
89
+ "postbuild": "tsx ../../scripts/postbuild.ts"
90
+ }
91
+ }