diff --git a/.changeset/swift-chefs-battle.md b/.changeset/swift-chefs-battle.md index 9ee8d044cf..891fc98c25 100644 --- a/.changeset/swift-chefs-battle.md +++ b/.changeset/swift-chefs-battle.md @@ -1,5 +1,5 @@ --- -"@fuel-ts/wallet-manager": minor +"@fuel-ts/account": minor --- remove provider from WalletManager specific types diff --git a/.changeset/young-impalas-explain.md b/.changeset/young-impalas-explain.md new file mode 100644 index 0000000000..cb0e080ce0 --- /dev/null +++ b/.changeset/young-impalas-explain.md @@ -0,0 +1,11 @@ +--- +"@fuel-ts/account": minor +"@fuel-ts/contract": minor +"@fuel-ts/errors": minor +"fuels": minor +"@fuel-ts/interfaces": minor +"@fuel-ts/program": minor +"@fuel-ts/script": minor +--- + +restructure Account related packages diff --git a/.eslintignore b/.eslintignore index af1f9fa550..96288895cd 100644 --- a/.eslintignore +++ b/.eslintignore @@ -12,11 +12,11 @@ apps/demo-react-cra apps/demo-react-vite packages/fuels/test/fixtures/project -packages/providers/src/__generated__ +packages/account/src/providers/__generated__ out CHANGELOG.md *.hbs -templates/nextjs \ No newline at end of file +templates/nextjs diff --git a/.github/actions/ci-setup/action.yaml b/.github/actions/ci-setup/action.yaml index 2eee76c489..03422d6036 100644 --- a/.github/actions/ci-setup/action.yaml +++ b/.github/actions/ci-setup/action.yaml @@ -21,7 +21,7 @@ runs: path: | apps/docs/.typedoc apps/docs/src/api - packages/providers/src/__generated__ + packages/account/src/providers/__generated__ templates/src/sway-api key: ${{ runner.os }}-generated-${{ github.sha }} @@ -37,7 +37,7 @@ runs: path: | apps/docs/.typedoc apps/docs/src/api - packages/providers/src/__generated__ + packages/account/src/providers/__generated__ templates/src/sway-api key: ${{ runner.os }}-generated-${{ github.sha }} diff --git a/.github/actions/test-setup/action.yaml b/.github/actions/test-setup/action.yaml index 78a0956980..30a9909211 100644 --- a/.github/actions/test-setup/action.yaml +++ b/.github/actions/test-setup/action.yaml @@ -21,7 +21,7 @@ runs: path: | apps/docs/.typedoc apps/docs/src/api - packages/providers/src/__generated__ + packages/account/src/providers/__generated__ key: ${{ runner.os }}-generated-${{ github.sha }} - name: Cache Build @@ -36,7 +36,7 @@ runs: path: | apps/docs/.typedoc apps/docs/src/api - packages/providers/src/__generated__ + packages/account/src/providers/__generated__ key: ${{ runner.os }}-generated-${{ github.sha }} - name: Setup Node.js diff --git a/apps/demo-fuels/package.json b/apps/demo-fuels/package.json index 1777059734..4e237dd652 100644 --- a/apps/demo-fuels/package.json +++ b/apps/demo-fuels/package.json @@ -9,7 +9,7 @@ "license": "Apache-2.0", "dependencies": { "@fuel-ts/errors": "workspace:^", - "@fuel-ts/wallet": "workspace:^", + "@fuel-ts/account": "workspace:^", "fuels": "workspace:*" }, "version": null diff --git a/apps/demo-fuels/src/index.test.ts b/apps/demo-fuels/src/index.test.ts index 5c6ca0877b..1b4302e218 100644 --- a/apps/demo-fuels/src/index.test.ts +++ b/apps/demo-fuels/src/index.test.ts @@ -5,8 +5,8 @@ * It ensures that built code is fully working. */ +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import { safeExec } from '@fuel-ts/errors/test-utils'; -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import type { BN } from 'fuels'; import { ContractFactory, Provider, toHex, BaseAssetId, Wallet, FUEL_NETWORK_URL } from 'fuels'; diff --git a/apps/demo-typegen/package.json b/apps/demo-typegen/package.json index c105a25e3d..6159715048 100644 --- a/apps/demo-typegen/package.json +++ b/apps/demo-typegen/package.json @@ -20,7 +20,7 @@ }, "devDependencies": { "@fuel-ts/forc": "workspace:*", - "@fuel-ts/wallet": "workspace:*", + "@fuel-ts/account": "workspace:*", "@fuel-ts/errors": "workspace:*", "@fuel-ts/utils": "workspace:*" }, diff --git a/apps/demo-typegen/src/demo.test.ts b/apps/demo-typegen/src/demo.test.ts index 8a2b80ffb1..36682d6599 100644 --- a/apps/demo-typegen/src/demo.test.ts +++ b/apps/demo-typegen/src/demo.test.ts @@ -1,6 +1,6 @@ // #region Testing-in-ts-ts +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import { safeExec } from '@fuel-ts/errors/test-utils'; -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import type { BN } from 'fuels'; import { ContractFactory, diff --git a/apps/docs-snippets/package.json b/apps/docs-snippets/package.json index e714da760d..0103f3e7c1 100644 --- a/apps/docs-snippets/package.json +++ b/apps/docs-snippets/package.json @@ -11,8 +11,7 @@ "fuels": "workspace:*", "@fuel-ts/utils": "workspace:*", "@fuel-ts/errors": "workspace:*", - "@fuel-ts/wallet-manager": "workspace:*", - "@fuel-ts/wallet": "workspace:*" + "@fuel-ts/account": "workspace:*" }, "keywords": [], "author": "", diff --git a/apps/docs-snippets/src/guide/wallet-manager/getting-started-with-wallet-manager.test.ts b/apps/docs-snippets/src/guide/wallet-manager/getting-started-with-wallet-manager.test.ts index b413c5eb06..afa0f301ed 100644 --- a/apps/docs-snippets/src/guide/wallet-manager/getting-started-with-wallet-manager.test.ts +++ b/apps/docs-snippets/src/guide/wallet-manager/getting-started-with-wallet-manager.test.ts @@ -1,4 +1,4 @@ -import { WalletManager } from '@fuel-ts/wallet-manager'; +import { WalletManager } from '@fuel-ts/account'; import { FUEL_NETWORK_URL, Provider, Wallet } from 'fuels'; /** diff --git a/apps/docs-snippets/src/guide/wallet-manager/locking-and-unlocking-wallet-manager.test.ts b/apps/docs-snippets/src/guide/wallet-manager/locking-and-unlocking-wallet-manager.test.ts index 040b5e3463..5e3395b3f0 100644 --- a/apps/docs-snippets/src/guide/wallet-manager/locking-and-unlocking-wallet-manager.test.ts +++ b/apps/docs-snippets/src/guide/wallet-manager/locking-and-unlocking-wallet-manager.test.ts @@ -1,4 +1,4 @@ -import { WalletManager } from '@fuel-ts/wallet-manager'; +import { WalletManager } from '@fuel-ts/account'; /** * @group node diff --git a/apps/docs/.vitepress/config.ts b/apps/docs/.vitepress/config.ts index b0c48e1e79..7c1c7239bc 100644 --- a/apps/docs/.vitepress/config.ts +++ b/apps/docs/.vitepress/config.ts @@ -234,7 +234,7 @@ export default defineConfig({ }, { text: 'Connecting to Testnet', - link: '/guide/providers/connecting-to-an-external-node', + link: '/guide/providers/connecting-to-testnet', }, { text: 'Querying the Chain', diff --git a/apps/docs/src/glossary.md b/apps/docs/src/glossary.md index cb6e3fff6b..68767a9c06 100644 --- a/apps/docs/src/glossary.md +++ b/apps/docs/src/glossary.md @@ -12,4 +12,4 @@ A Provider is a Class that provides an abstraction for a connection to a Fuel no ## Wallet and signer -A [`Wallet`](./api/Wallet/Wallet.md) is a Class with direct or indirect access to a private key. You can use a [`Wallet`](./api/Wallet/Wallet.md) to sign messages and transactions to authorize the network to charge your account to perform operations. The terms wallet and signer in the SDK are often used interchangeably, but, technically, a `Signer` enables the signing of transactions and messages; the [`Wallet`](./api/Wallet/Wallet.md) implements the `Signer` functionality. +A [`Wallet`](./api/Account/Wallet.md) is a Class with direct or indirect access to a private key. You can use a [`Wallet`](./api/Account/Wallet.md) to sign messages and transactions to authorize the network to charge your account to perform operations. The terms wallet and signer in the SDK are often used interchangeably, but, technically, a `Signer` enables the signing of transactions and messages; the [`Wallet`](./api/Account/Wallet.md) implements the `Signer` functionality. diff --git a/apps/docs/src/guide/contracts/calls-with-different-wallets.md b/apps/docs/src/guide/contracts/calls-with-different-wallets.md index 7b4cd78e10..94d8185849 100644 --- a/apps/docs/src/guide/contracts/calls-with-different-wallets.md +++ b/apps/docs/src/guide/contracts/calls-with-different-wallets.md @@ -1,6 +1,6 @@ # Making Calls with Different Wallets or Providers -This guide demonstrates how to make contract calls using different wallets and providers by passing either an [`Account`](../../api/Wallet/Account.md) or a [`Provider`](../../api/Providers/Provider.md) to the contract on instantiation. +This guide demonstrates how to make contract calls using different wallets and providers by passing either an [`Account`](../../api/Account/Account.md) or a [`Provider`](../../api/Account/Provider.md) to the contract on instantiation. ## Changing Wallets diff --git a/apps/docs/src/guide/contracts/cost-estimation.md b/apps/docs/src/guide/contracts/cost-estimation.md index 83f8d034b3..533e18d095 100644 --- a/apps/docs/src/guide/contracts/cost-estimation.md +++ b/apps/docs/src/guide/contracts/cost-estimation.md @@ -1,8 +1,8 @@ # Estimating Contract Call Cost -The `getTransactionCost` function provided by the [Provider](../../api/Providers/Provider.md) allows you to estimate the cost of a specific contract call. The return type, `TransactionCost`, is an object containing relevant information for the estimation: +The `getTransactionCost` function provided by the [Provider](../../api/Account/Provider.md) allows you to estimate the cost of a specific contract call. The return type, `TransactionCost`, is an object containing relevant information for the estimation: -<<< @/../../../packages/providers/src/provider.ts#cost-estimation-1{ts:line-numbers} +<<< @/../../../packages/account/src/providers/provider.ts#cost-estimation-1{ts:line-numbers} The following example demonstrate how to get the estimated transaction cost for: diff --git a/apps/docs/src/guide/contracts/transaction-dependency-estimation.md b/apps/docs/src/guide/contracts/transaction-dependency-estimation.md index ea8d4240da..77a8f434a7 100644 --- a/apps/docs/src/guide/contracts/transaction-dependency-estimation.md +++ b/apps/docs/src/guide/contracts/transaction-dependency-estimation.md @@ -6,6 +6,6 @@ However, the SDK always automatically estimates these dependencies and double-ch The SDK uses the `estimateTxDependencies` helper function to set any missing dependencies identified during the estimation process. This requires simulating the transaction a few times in the background. -<<< @/../../../packages/providers/src/provider.ts#Provider-sendTransaction{ts:line-numbers} +<<< @/../../../packages/account/src/providers/provider.ts#Provider-sendTransaction{ts:line-numbers} While relying on the SDK's automatic estimation is a decent default behavior, we recommend manually specifying the dependencies if they are known in advance to avoid the performance impact of the estimation process. diff --git a/apps/docs/src/guide/cookbook/custom-transactions.md b/apps/docs/src/guide/cookbook/custom-transactions.md index 15e9287387..0f25df6888 100644 --- a/apps/docs/src/guide/cookbook/custom-transactions.md +++ b/apps/docs/src/guide/cookbook/custom-transactions.md @@ -1,11 +1,11 @@ # Custom Transactions -There may be scenarios where you need to build out transactions that involve multiple program types and assets; this can be done by instantiating a [`ScriptTransactionRequest`](../../api/Providers/ScriptTransactionRequest.md). This class allows you to a append multiple program types and assets to a single transaction. +There may be scenarios where you need to build out transactions that involve multiple program types and assets; this can be done by instantiating a [`ScriptTransactionRequest`](../../api/Account/ScriptTransactionRequest.md). This class allows you to a append multiple program types and assets to a single transaction. Consider the following script that transfers multiple assets to a contract: <<< @/../../docs-snippets/test/fixtures/forc-projects/script-transfer-to-contract/src/main.sw#custom-transactions-1{ts:line-numbers} -This script can be executed by creating a [`ScriptTransactionRequest`](../../api/Providers/ScriptTransactionRequest.md), appending the resource and contract inputs/outputs and then sending the transaction, as follows: +This script can be executed by creating a [`ScriptTransactionRequest`](../../api/Account/ScriptTransactionRequest.md), appending the resource and contract inputs/outputs and then sending the transaction, as follows: <<< @/../../docs-snippets/src/guide/scripts/script-custom-transaction.test.ts#custom-transactions-2{ts:line-numbers} diff --git a/apps/docs/src/guide/messages/getting-a-message-proof.md b/apps/docs/src/guide/messages/getting-a-message-proof.md index 58ad62c64b..3dc66a781e 100644 --- a/apps/docs/src/guide/messages/getting-a-message-proof.md +++ b/apps/docs/src/guide/messages/getting-a-message-proof.md @@ -2,6 +2,6 @@ A message proof is a cryptographic proof that a message was included in a block. You can use the `getMessageProof` method to retrieve a message proof for a given transaction ID and message ID. -<<< @/../../../packages/wallet/src/transfer.test.ts#Message-getMessageProof{ts:line-numbers} +<<< @/../../../packages/account/src/account.test.ts#Message-getMessageProof{ts:line-numbers} diff --git a/apps/docs/src/guide/messages/getting-all-resources.md b/apps/docs/src/guide/messages/getting-all-resources.md index 0eddff0a93..73c3d2f02c 100644 --- a/apps/docs/src/guide/messages/getting-all-resources.md +++ b/apps/docs/src/guide/messages/getting-all-resources.md @@ -2,4 +2,4 @@ You can use the `getResourcesToSpend` method to retrieve a list of all the resources (coins + assets) that can be spent by a given address. -<<< @/../../../packages/wallet/src/account.test.ts#Message-getResourcesToSpend{ts:line-numbers} +<<< @/../../../packages/account/src/account.test.ts#Message-getResourcesToSpend{ts:line-numbers} diff --git a/apps/docs/src/guide/messages/index.md b/apps/docs/src/guide/messages/index.md index 22f068fe88..ec008783c1 100644 --- a/apps/docs/src/guide/messages/index.md +++ b/apps/docs/src/guide/messages/index.md @@ -4,4 +4,4 @@ A message is an object that contains some data that when broadcast to the networ This is the general structure of a `Message` object: -<<< @/../../../packages/providers/src/message.ts#Message-shape{ts:line-numbers} +<<< @/../../../packages/account/src/providers/message.ts#Message-shape{ts:line-numbers} diff --git a/apps/docs/src/guide/predicates/index.md b/apps/docs/src/guide/predicates/index.md index 50e07ba663..c9ea2b5711 100644 --- a/apps/docs/src/guide/predicates/index.md +++ b/apps/docs/src/guide/predicates/index.md @@ -31,7 +31,7 @@ After compiling, you will obtain the binary of the predicate and its JSON ABI (A <<< @/../../docs-snippets/src/guide/predicates/index.test.ts#predicate-index-2{ts:line-numbers} -The created [`Predicate`](../../api/Predicate/Predicate.md) instance, among other things, has three important properties: the predicate `bytes` (byte code), the `chainId`, and the predicate `address`. +The created [`Predicate`](../../api/Account/Predicate.md) instance, among other things, has three important properties: the predicate `bytes` (byte code), the `chainId`, and the predicate `address`. This address, generated from the byte code, corresponds to the Pay-to-Script-Hash (P2SH) address used in Bitcoin. diff --git a/apps/docs/src/guide/predicates/send-and-spend-funds-from-predicates.md b/apps/docs/src/guide/predicates/send-and-spend-funds-from-predicates.md index ddb90cafd1..3d6678fc3b 100644 --- a/apps/docs/src/guide/predicates/send-and-spend-funds-from-predicates.md +++ b/apps/docs/src/guide/predicates/send-and-spend-funds-from-predicates.md @@ -26,7 +26,7 @@ With the predicate instantiated, we can transfer funds to its address. This requ Now that our predicate holds funds, we can use it to validate a transaction. -First, we need to set its data. Note that the `main` function in our predicate example requires a parameter called `input_address` of type `b256`. We achieve this using the [`Predicate`](../../api/Predicate/Predicate.md) class method `setData`. +First, we need to set its data. Note that the `main` function in our predicate example requires a parameter called `input_address` of type `b256`. We achieve this using the [`Predicate`](../../api/Account/Predicate.md) class method `setData`. <<< @/../../docs-snippets/src/guide/predicates/send-and-spend-funds-from-predicates.test.ts#send-and-spend-funds-from-predicates-4{ts:line-numbers} @@ -40,7 +40,7 @@ Once the predicate resolves with a return value `true` based on its predefined c --- -In a similar approach, you can use the `createTransfer` method, which returns a [`ScriptTransactionRequest`](../../api/Providers/ScriptTransactionRequest.md). Then, we can submit this transaction request by calling the `sendTransaction` method. +In a similar approach, you can use the `createTransfer` method, which returns a [`ScriptTransactionRequest`](../../api/Account/ScriptTransactionRequest.md). Then, we can submit this transaction request by calling the `sendTransaction` method. This can be useful if you need the transaction ID before actually submitting it to the node. diff --git a/apps/docs/src/guide/providers/connecting-to-an-external-node.md b/apps/docs/src/guide/providers/connecting-to-testnet.md similarity index 100% rename from apps/docs/src/guide/providers/connecting-to-an-external-node.md rename to apps/docs/src/guide/providers/connecting-to-testnet.md diff --git a/apps/docs/src/guide/providers/connection.md b/apps/docs/src/guide/providers/connection.md index 8e261b6f58..b100a5c182 100644 --- a/apps/docs/src/guide/providers/connection.md +++ b/apps/docs/src/guide/providers/connection.md @@ -4,7 +4,7 @@ At a high level, you can use the Fuel TypeScript SDK to build applications that For this interaction to work, the SDK must be able to communicate with a `fuel-core` node; you have two options at your disposal: -1. Use the [Testnet](../providers/connecting-to-an-external-node.md) +1. Use the [Testnet](../providers/connecting-to-testnet.md) 2. [Run a local Fuel-Core node](https://docs.fuel.network/guides/running-a-node/) and instantiate a provider that points to that node's IP and port For application building, you should use the first option. diff --git a/apps/docs/src/guide/providers/index.md b/apps/docs/src/guide/providers/index.md index 8ff0697bf6..0646c8874e 100644 --- a/apps/docs/src/guide/providers/index.md +++ b/apps/docs/src/guide/providers/index.md @@ -1,5 +1,5 @@ # Providers -An instance of the [`Provider`](../../api/Providers/Provider.md) class lets you connect to a Fuel node. It provides read-only access to the blockchain state. You can use this provider as-is or through a [`Wallet`](../../api/Wallet/Wallet.md) instance. +An instance of the [`Provider`](../../api/Account/Provider.md) class lets you connect to a Fuel node. It provides read-only access to the blockchain state. You can use this provider as-is or through a [`Wallet`](../../api/Account/Wallet.md) instance. -<<< @/../../../packages/providers/test/provider.test.ts#provider-definition{ts:line-numbers} +<<< @/../../../packages/account/src/providers/provider.test.ts#provider-definition{ts:line-numbers} diff --git a/apps/docs/src/guide/providers/querying-the-chain.md b/apps/docs/src/guide/providers/querying-the-chain.md index cea66a6817..c481ba673b 100644 --- a/apps/docs/src/guide/providers/querying-the-chain.md +++ b/apps/docs/src/guide/providers/querying-the-chain.md @@ -5,7 +5,7 @@ Once you have set up a provider, you're ready to interact with the Fuel blockcha We can connect to either a _*local*_ or an _*external*_ node: > 1. _Running a [local node](https://docs.fuel.network/guides/running-a-node/)_ -> 1. _Connecting to an [external node](./connecting-to-an-external-node.md)_ +> 1. _Connecting to an [external node](./connecting-to-testnet.md)_ Let's look at a few examples below. @@ -31,4 +31,4 @@ Get all the spendable balances of all assets for an address. This is different f This method returns all the blocks from the blockchain that match the given query. The below code snippet shows how to get the last 10 blocks. -<<< @/../../../packages/providers/test/provider.test.ts#Provider-get-blocks{ts:line-numbers} +<<< @/../../../packages/account/src/providers/provider.test.ts#Provider-get-blocks{ts:line-numbers} diff --git a/apps/docs/src/guide/providers/retrying-calls.md b/apps/docs/src/guide/providers/retrying-calls.md index e5a3651a26..b07ca2e676 100644 --- a/apps/docs/src/guide/providers/retrying-calls.md +++ b/apps/docs/src/guide/providers/retrying-calls.md @@ -2,4 +2,4 @@ The default behavior of calls done via the `Provider` towards a fuel node is that they'll fail if the connection breaks. Specifying retry options allows you to customize how many additional attempts you want to make when the connection to the node breaks before ultimately throwing an error. You can also specify the back-off algorithm as well as the base delay that algorithm will use to calculate the wait time for each request. -<<< @/../../../packages/providers/test/auto-retry-fetch.test.ts#provider-retry-options{ts:line-numbers} +<<< @/../../../packages/account/test/auto-retry-fetch.test.ts#provider-retry-options{ts:line-numbers} diff --git a/apps/docs/src/guide/testing/index.md b/apps/docs/src/guide/testing/index.md index d0e7a69657..a32c86f672 100644 --- a/apps/docs/src/guide/testing/index.md +++ b/apps/docs/src/guide/testing/index.md @@ -24,10 +24,10 @@ For this, you can find two simple utilities on the wallet package: - [`@fuel-ts/wallet`](https://github.com/FuelLabs/fuels-ts/tree/master/packages/wallet#test-utilities) -On top of these two utilities, if you want to quickly get up and running with a local node, you can use the `launchNodeAndGetWallets` from the `@fuel-ts/wallet/test-utils` package. +On top of these two utilities, if you want to quickly get up and running with a local node, you can use the `launchNodeAndGetWallets` from the `@fuel-ts/account/test-utils` package. ```ts -import { launchNodeAndGetWallets } from "@fuel-ts/wallet/test-utils"; +import { launchNodeAndGetWallets } from "@fuel-ts/account/test-utils"; const { stop, wallets, provider } = await launchNodeAndGetWallets(); diff --git a/apps/docs/src/guide/testing/setting-up-a-custom-chain.md b/apps/docs/src/guide/testing/setting-up-a-custom-chain.md index f965ab9916..a3c18971cd 100644 --- a/apps/docs/src/guide/testing/setting-up-a-custom-chain.md +++ b/apps/docs/src/guide/testing/setting-up-a-custom-chain.md @@ -4,7 +4,7 @@ The `launchNodeAndGetWallets` method lets you launch a local Fuel node with vari In the code snippet below, we provide a custom chain config file to the `launchNodeAndGetWallets` method. You can use a chain config file to customize things like the chain's consensus parameters or specify some initial states for the chain. Click here to see what a chain config file looks like: [`chainConfig.json`](https://github.com/FuelLabs/fuels-ts/blob/master/.fuel-core/configs/chainConfig.json) -<<< @/../../../packages/wallet/src/test-utils/launchNodeAndGetWallets.test.ts#launchNode-custom-config{ts:line-numbers} +<<< @/../../../packages/account/src/test-utils/launchNodeAndGetWallets.test.ts#launchNode-custom-config{ts:line-numbers} ## Customization options @@ -14,6 +14,6 @@ The `walletCount` option lets you specify how many wallets you want to generate. The `launchNodeOptions` option lets you specify some additional options for the node. The available options are: -<<< @/../../../packages/wallet/src/test-utils/launchNode.ts#launchNode-launchNodeOptions{ts:line-numbers} +<<< @/../../../packages/account/src/test-utils/launchNode.ts#launchNode-launchNodeOptions{ts:line-numbers} > Note: You can see all the available fuel-core args by running `pnpm fuels core run -h`. diff --git a/apps/docs/src/guide/testing/tweaking-the-blockchain.md b/apps/docs/src/guide/testing/tweaking-the-blockchain.md index 94d55f0a8c..904fd12839 100644 --- a/apps/docs/src/guide/testing/tweaking-the-blockchain.md +++ b/apps/docs/src/guide/testing/tweaking-the-blockchain.md @@ -2,7 +2,7 @@ You can force-produce blocks using the `produceBlocks` helper to achieve an arbitrary block height. This is especially useful when you want to do some testing regarding transaction maturity. -<<< @/../../../packages/providers/test/provider.test.ts#Provider-produce-blocks{ts:line-numbers} +<<< @/../../../packages/account/src/providers/provider.test.ts#Provider-produce-blocks{ts:line-numbers} # Producing Blocks With Custom Timestamps diff --git a/apps/docs/src/guide/wallets/access.md b/apps/docs/src/guide/wallets/access.md index b44aaa2405..f52028bf61 100644 --- a/apps/docs/src/guide/wallets/access.md +++ b/apps/docs/src/guide/wallets/access.md @@ -1,26 +1,26 @@ # Wallet Access -The kinds of operations we can perform with a [`Wallet`](../../api/Wallet/Wallet.md) instance depend on +The kinds of operations we can perform with a [`Wallet`](../../api/Account/Wallet.md) instance depend on whether or not we have access to the wallet's private key. -In order to differentiate between [`Wallet`](../../api/Wallet/Wallet.md) instances that know their private key -and those that do not, we use the [`WalletUnlocked`](../../api/Wallet/WalletUnlocked.md) and [`WalletLocked`](../../api/Wallet/WalletLocked.md) types +In order to differentiate between [`Wallet`](../../api/Account/Wallet.md) instances that know their private key +and those that do not, we use the [`WalletUnlocked`](../../api/Account/WalletUnlocked.md) and [`WalletLocked`](../../api/Account/WalletLocked.md) types respectively. ## Wallet States -The [`WalletUnlocked`](../../api/Wallet/WalletUnlocked.md) type represents a wallet whose private key is known and -stored internally in memory. A wallet must be of type [`WalletUnlocked`](../../api/Wallet/WalletUnlocked.md) in order +The [`WalletUnlocked`](../../api/Account/WalletUnlocked.md) type represents a wallet whose private key is known and +stored internally in memory. A wallet must be of type [`WalletUnlocked`](../../api/Account/WalletUnlocked.md) in order to perform operations that involve [signing messages or transactions](./signing.md). -The [`WalletLocked`](../../api/Wallet/WalletLocked.md) type represents a wallet whose private key is _not_ known or stored -in memory. Instead, [`WalletLocked`](../../api/Wallet/WalletLocked.md) only knows its public address. A [`WalletLocked`](../../api/Wallet/WalletLocked.md) cannot be +The [`WalletLocked`](../../api/Account/WalletLocked.md) type represents a wallet whose private key is _not_ known or stored +in memory. Instead, [`WalletLocked`](../../api/Account/WalletLocked.md) only knows its public address. A [`WalletLocked`](../../api/Account/WalletLocked.md) cannot be used to sign transactions, however it may still perform a whole suite of useful operations including listing transactions, assets, querying balances, and so on. -Note that the [`WalletUnlocked`](../../api/Wallet/WalletUnlocked.md) type implements most methods available on the [`WalletLocked`](../../api/Wallet/WalletLocked.md) -type. In other words, [`WalletUnlocked`](../../api/Wallet/WalletUnlocked.md) can be thought of as a thin wrapper around [`WalletLocked`](../../api/Wallet/WalletLocked.md) that +Note that the [`WalletUnlocked`](../../api/Account/WalletUnlocked.md) type implements most methods available on the [`WalletLocked`](../../api/Account/WalletLocked.md) +type. In other words, [`WalletUnlocked`](../../api/Account/WalletUnlocked.md) can be thought of as a thin wrapper around [`WalletLocked`](../../api/Account/WalletLocked.md) that provides greater access via its private key. ## Basic Example @@ -35,16 +35,16 @@ You can choose not to pass through a provider argument on `Wallet` construction: ## Transitioning States -A [`WalletLocked`](../../api/Wallet/WalletLocked.md) instance can be unlocked by providing the private key: +A [`WalletLocked`](../../api/Account/WalletLocked.md) instance can be unlocked by providing the private key: <<< @/../../../packages/fuel-gauge/src/doc-examples.test.ts#wallet-locked-to-unlocked{ts:line-numbers} -A [`WalletUnlocked`](../../api/Wallet/WalletUnlocked.md) instance can be locked using the `lock` method: +A [`WalletUnlocked`](../../api/Account/WalletUnlocked.md) instance can be locked using the `lock` method: <<< @/../../../packages/fuel-gauge/src/doc-examples.test.ts#wallet-unlocked-to-locked{ts:line-numbers} Most wallet constructors that create or generate a new wallet are provided on -the [`WalletUnlocked`](../../api/Wallet/WalletUnlocked.md) type. Consider locking the wallet with the `lock` method after the new private +the [`WalletUnlocked`](../../api/Account/WalletUnlocked.md) type. Consider locking the wallet with the `lock` method after the new private key has been handled in order to reduce the scope in which the wallet's private key is stored in memory. @@ -52,6 +52,6 @@ key is stored in memory. When designing APIs that accept a wallet as an input, we should think carefully about the kind of access that we require. API developers should aim to minimise -their usage of [`WalletUnlocked`](../../api/Wallet/WalletUnlocked.md) in order to ensure private keys are stored in +their usage of [`WalletUnlocked`](../../api/Account/WalletUnlocked.md) in order to ensure private keys are stored in memory no longer than necessary to reduce the surface area for attacks and vulnerabilities in downstream libraries and applications. diff --git a/apps/docs/src/guide/wallets/encrypting-and-decrypting-json-wallets.md b/apps/docs/src/guide/wallets/encrypting-and-decrypting-json-wallets.md index b9ca639170..6d1dc9c3ba 100644 --- a/apps/docs/src/guide/wallets/encrypting-and-decrypting-json-wallets.md +++ b/apps/docs/src/guide/wallets/encrypting-and-decrypting-json-wallets.md @@ -4,23 +4,23 @@ JSON wallets are a standardized way of storing wallets securely. They follow a s ## Encrypting a Wallet -We will be calling `encrypt` from the [`WalletUnlocked`](../../api/Wallet/WalletUnlocked.md) instance which will take a password as the argument. It will encrypt the private key using a cipher and returns the JSON keystore wallet. You can then securely store this JSON wallet. +We will be calling `encrypt` from the [`WalletUnlocked`](../../api/Account/WalletUnlocked.md) instance which will take a password as the argument. It will encrypt the private key using a cipher and returns the JSON keystore wallet. You can then securely store this JSON wallet. Here is an example of how you can accomplish this: <<< @/../../docs-snippets/src/guide/wallets/encrypting-and-decrypting-json-wallets.test.ts#encrypting-and-decrypting-json-wallets-1{ts:line-numbers} -Please note that `encrypt` must be called within an instance of [`WalletUnlocked`](../../api/Wallet/WalletUnlocked.md). This instance can only be achieved through passing a private key or mnemonic phrase to a locked wallet. +Please note that `encrypt` must be called within an instance of [`WalletUnlocked`](../../api/Account/WalletUnlocked.md). This instance can only be achieved through passing a private key or mnemonic phrase to a locked wallet. ## Decrypting a Wallet -To decrypt the JSON wallet and retrieve your private key, you can call `fromEncryptedJson` on a [Wallet](../../api/Wallet/Wallet.md) instance. It takes the encrypted JSON wallet and the password as its arguments, and returns the decrypted wallet. +To decrypt the JSON wallet and retrieve your private key, you can call `fromEncryptedJson` on a [Wallet](../../api/Account/Wallet.md) instance. It takes the encrypted JSON wallet and the password as its arguments, and returns the decrypted wallet. Here is an example: <<< @/../../docs-snippets/src/guide/wallets/encrypting-and-decrypting-json-wallets.test.ts#encrypting-and-decrypting-json-wallets-2{ts:line-numbers} -In this example, `decryptedWallet` is an instance of [`WalletUnlocked`](../../api/Wallet/WalletUnlocked.md) class, now available for use. +In this example, `decryptedWallet` is an instance of [`WalletUnlocked`](../../api/Account/WalletUnlocked.md) class, now available for use. ## Important diff --git a/apps/docs/src/guide/wallets/mnemonic-wallet.md b/apps/docs/src/guide/wallets/mnemonic-wallet.md index a2e558e64a..b0611d0c51 100644 --- a/apps/docs/src/guide/wallets/mnemonic-wallet.md +++ b/apps/docs/src/guide/wallets/mnemonic-wallet.md @@ -8,4 +8,4 @@ The SDK gives you two wallets from mnemonic instantiation methods: one that take Here's how you can create wallets with both mnemonic phrases and derivation paths: -<<< @/../../../packages/wallet-manager/src/wallet-manager.test.ts#wallet-manager-mnemonic{ts:line-numbers} +<<< @/../../../packages/account/src/wallet-manager/wallet-manager.test.ts#wallet-manager-mnemonic{ts:line-numbers} diff --git a/apps/docs/src/guide/wallets/signing.md b/apps/docs/src/guide/wallets/signing.md index e4c9cb595c..252a6dd223 100644 --- a/apps/docs/src/guide/wallets/signing.md +++ b/apps/docs/src/guide/wallets/signing.md @@ -6,4 +6,4 @@ Once you've instantiated your wallet in an unlocked state using one of the previ You can also sign a _transaction_ by using `wallet.sign_transaction`. Below is a full example of how to sign and recover a transaction. -<<< @/../../../packages/wallet/src/wallet-unlocked.test.ts#wallet-transaction-signing{ts:line-numbers} +<<< @/../../../packages/account/src/wallet/wallet-unlocked.test.ts#wallet-transaction-signing{ts:line-numbers} diff --git a/apps/docs/typedoc.json b/apps/docs/typedoc.json index ecf416bf92..b7fedecf24 100644 --- a/apps/docs/typedoc.json +++ b/apps/docs/typedoc.json @@ -9,11 +9,10 @@ "../../packages/address", "../../packages/interfaces", "../../packages/predicate", - "../../packages/wallet", + "../../packages/account", "../../packages/program", "../../packages/contract", - "../../packages/script", - "../../packages/providers" + "../../packages/script" ], "out": "src/api", "githubPages": false, diff --git a/graphql.config.json b/graphql.config.json index 1af8b918d6..4f0e3cd8fa 100644 --- a/graphql.config.json +++ b/graphql.config.json @@ -1,4 +1,4 @@ { - "schema": "./packages/providers/fuel-core-schema.graphql", - "documents": "./packages/providers/src/operations.graphql" + "schema": "./packages/account/src/providers/fuel-core-schema.graphql", + "documents": "./packages/account/src/providers/operations.graphql" } diff --git a/internal/check-imports/package.json b/internal/check-imports/package.json index 7639ef975c..908f319fdb 100644 --- a/internal/check-imports/package.json +++ b/internal/check-imports/package.json @@ -16,22 +16,15 @@ "@fuel-ts/crypto": "workspace:*", "@fuel-ts/errors": "workspace:*", "@fuel-ts/hasher": "workspace:*", - "@fuel-ts/hdwallet": "workspace:*", "@fuel-ts/interfaces": "workspace:*", "@fuel-ts/math": "workspace:*", "@fuel-ts/merkle": "workspace:*", - "@fuel-ts/mnemonic": "workspace:*", - "@fuel-ts/predicate": "workspace:*", "@fuel-ts/program": "workspace:*", - "@fuel-ts/providers": "workspace:*", "@fuel-ts/script": "workspace:*", - "@fuel-ts/signer": "workspace:*", "@fuel-ts/transactions": "workspace:*", "@fuel-ts/utils": "workspace:*", "@fuel-ts/versions": "workspace:*", - "@fuel-ts/wallet-manager": "workspace:*", - "@fuel-ts/wallet": "workspace:*", - "@fuel-ts/wordlists": "workspace:*", + "@fuel-ts/account": "workspace:*", "fuels": "workspace:*" }, "version": null diff --git a/internal/check-imports/src/imports.ts b/internal/check-imports/src/imports.ts index bf6cbec34c..8e34fec88a 100644 --- a/internal/check-imports/src/imports.ts +++ b/internal/check-imports/src/imports.ts @@ -1,5 +1,6 @@ import * as abiCoder from '@fuel-ts/abi-coder'; import * as abiTypegen from '@fuel-ts/abi-typegen'; +import * as account from '@fuel-ts/account'; import * as address from '@fuel-ts/address'; import * as contract from '@fuel-ts/contract'; import * as crypto from '@fuel-ts/crypto'; @@ -7,22 +8,14 @@ import * as errors from '@fuel-ts/errors'; // forc-bin // fuels-gauge import * as hasher from '@fuel-ts/hasher'; -import * as hdwallet from '@fuel-ts/hdwallet'; import * as interfaces from '@fuel-ts/interfaces'; import * as math from '@fuel-ts/math'; import * as merkle from '@fuel-ts/merkle'; -import * as mnemonic from '@fuel-ts/mnemonic'; -import * as predicate from '@fuel-ts/predicate'; import * as program from '@fuel-ts/program'; -import * as providers from '@fuel-ts/providers'; import * as script from '@fuel-ts/script'; -import * as signer from '@fuel-ts/signer'; import * as transactions from '@fuel-ts/transactions'; import * as utils from '@fuel-ts/utils'; import * as versions from '@fuel-ts/versions'; -import * as wallet from '@fuel-ts/wallet'; -import * as walletManager from '@fuel-ts/wallet-manager'; -import * as wordlists from '@fuel-ts/wordlists'; import * as fuels from 'fuels'; const { log } = console; @@ -35,21 +28,14 @@ log([ errors, fuels, hasher, - hdwallet, interfaces, crypto, math, merkle, - mnemonic, - predicate, program, - providers, script, - signer, transactions, utils, versions, - wallet, - walletManager, - wordlists, + account, ]); diff --git a/internal/check-imports/src/references.ts b/internal/check-imports/src/references.ts index 5759a7813f..ea2f8bff7e 100644 --- a/internal/check-imports/src/references.ts +++ b/internal/check-imports/src/references.ts @@ -2,32 +2,34 @@ import { Interface, StringCoder } from '@fuel-ts/abi-coder'; import { AbiTypeGen } from '@fuel-ts/abi-typegen'; import { runCliAction } from '@fuel-ts/abi-typegen/cli'; import { runTypegen } from '@fuel-ts/abi-typegen/runTypegen'; +import { + Wallet, + HDWallet, + Mnemonic, + english, + Language, + Signer, + WalletManager, + Predicate, + Provider, +} from '@fuel-ts/account'; +import { FUEL_NETWORK_URL } from '@fuel-ts/account/configs'; +import { generateTestWallet, seedTestWallet } from '@fuel-ts/account/test-utils'; import { Address } from '@fuel-ts/address'; import { BaseAssetId } from '@fuel-ts/address/configs'; import { ContractFactory } from '@fuel-ts/contract'; import { encrypt, decrypt } from '@fuel-ts/crypto'; import { hashMessage } from '@fuel-ts/hasher'; -import { HDWallet } from '@fuel-ts/hdwallet'; -import { AbstractPredicate } from '@fuel-ts/interfaces'; import { BN } from '@fuel-ts/math'; import { DEFAULT_PRECISION, DEFAULT_MIN_PRECISION } from '@fuel-ts/math/configs'; import { SparseMerkleTree, constructTree } from '@fuel-ts/merkle'; -import { Mnemonic } from '@fuel-ts/mnemonic'; -import { Predicate } from '@fuel-ts/predicate'; import { FunctionInvocationScope } from '@fuel-ts/program'; import { PANIC_REASONS } from '@fuel-ts/program/configs'; -import { Provider } from '@fuel-ts/providers'; import { Script } from '@fuel-ts/script'; -import { Signer } from '@fuel-ts/signer'; import { InputCoinCoder } from '@fuel-ts/transactions'; import { versions } from '@fuel-ts/versions'; import { runVersions } from '@fuel-ts/versions/cli'; -import { Wallet } from '@fuel-ts/wallet'; -import { FUEL_NETWORK_URL } from '@fuel-ts/wallet/configs'; // TODO: Add `launchNode` and `launchNodeAndGetWallets` here -import { generateTestWallet, seedTestWallet } from '@fuel-ts/wallet/test-utils'; -import { WalletManager } from '@fuel-ts/wallet-manager'; -import { english, Language } from '@fuel-ts/wordlists'; import type { DeployContractOptions, FuelsConfig, UserFuelsConfig } from 'fuels'; import { ScriptRequest, @@ -91,11 +93,6 @@ log(hashMessage); */ log(HDWallet); -/** - * interfaces - */ -log(AbstractPredicate); - /** * keystore */ diff --git a/packages/wallet/CHANGELOG.md b/packages/account/CHANGELOG.md similarity index 100% rename from packages/wallet/CHANGELOG.md rename to packages/account/CHANGELOG.md diff --git a/packages/mnemonic/LICENSE b/packages/account/LICENSE similarity index 100% rename from packages/mnemonic/LICENSE rename to packages/account/LICENSE diff --git a/packages/wallet/README.md b/packages/account/README.md similarity index 95% rename from packages/wallet/README.md rename to packages/account/README.md index 5a8d7f9796..5a6d69f99e 100644 --- a/packages/wallet/README.md +++ b/packages/account/README.md @@ -45,7 +45,7 @@ These test utilities are exported to assist in testing apps using Fuels. ```ts import { bn } from "@fuel-ts/math"; import { BaseAssetId } from "fuels"; -import { seedTestWallet, generateTestWallet } from "@wallet/test-utils"; +import { seedTestWallet, generateTestWallet } from "@account/test-utils"; const provider = await Provider.create("http://127.0.0.1:4000/graphql"); diff --git a/packages/providers/codegen.json b/packages/account/codegen.json similarity index 82% rename from packages/providers/codegen.json rename to packages/account/codegen.json index d21c27157c..8f5ed940d7 100644 --- a/packages/providers/codegen.json +++ b/packages/account/codegen.json @@ -1,9 +1,9 @@ { "$schema": "https://www.graphql-code-generator.com/config.schema.json", - "schema": "./fuel-core-schema.graphql", - "documents": "./src/operations.graphql", + "schema": "./src/providers/fuel-core-schema.graphql", + "documents": "./src/providers/operations.graphql", "generates": { - "./src/__generated__/operations.ts": { + "./src/providers/__generated__/operations.ts": { "plugins": [ { "typescript": {} }, { "typescript-operations": {} }, diff --git a/packages/wallet/package.json b/packages/account/package.json similarity index 62% rename from packages/wallet/package.json rename to packages/account/package.json index af9d44c3d8..2f6a504b92 100644 --- a/packages/wallet/package.json +++ b/packages/account/package.json @@ -1,5 +1,5 @@ { - "name": "@fuel-ts/wallet", + "name": "@fuel-ts/account", "version": "0.73.0", "description": "", "author": "Fuel Labs (https://fuel.network/)", @@ -32,7 +32,7 @@ "./dist/configs.d.ts" ], "test-utils": [ - "./dist/test-utils.d.ts" + "./dist/test-utils/index.d.ts" ] } }, @@ -41,6 +41,9 @@ ], "scripts": { "build": "tsup", + "prebuild": "pnpm build:operations", + "build:schema": "get-graphql-schema http://localhost:4000/graphql > fuel-core-schema.graphql && prettier --write fuel-core-schema.graphql", + "build:operations": "pnpm graphql-codegen", "postbuild": "tsx ../../scripts/postbuild.ts" }, "license": "Apache-2.0", @@ -51,21 +54,35 @@ "@fuel-ts/errors": "workspace:*", "@fuel-ts/fuel-core": "workspace:*", "@fuel-ts/hasher": "workspace:*", - "@fuel-ts/hdwallet": "workspace:*", "@fuel-ts/interfaces": "workspace:*", "@fuel-ts/math": "workspace:*", - "@fuel-ts/mnemonic": "workspace:*", - "@fuel-ts/providers": "workspace:*", - "@fuel-ts/signer": "workspace:*", "@fuel-ts/transactions": "workspace:*", "@fuel-ts/utils": "workspace:*", + "@fuel-ts/merkle": "workspace:*", + "@fuel-ts/versions": "workspace:*", "@fuels/vm-asm": "0.42.1", + "graphql": "^16.6.0", + "graphql-request": "5.0.0", + "graphql-tag": "^2.12.6", + "ramda": "^0.29.0", + "tai64": "^1.0.0", + "events": "^3.3.0", + "@noble/curves": "^1.3.0", "ethers": "^6.7.1", "portfinder": "^1.0.32", "tree-kill": "^1.2.2", "uuid": "^9.0.0" }, "devDependencies": { + "@fuel-ts/hasher": "workspace:*", + "@fuel-ts/math": "workspace:*", + "@fuel-ts/utils": "workspace:*", + "@graphql-codegen/cli": "^2.13.7", + "@graphql-codegen/typescript": "^2.8.0", + "@graphql-codegen/typescript-operations": "^2.5.5", + "@graphql-codegen/typescript-generic-sdk": "^3.1.0", + "get-graphql-schema": "^2.1.2", + "@types/ramda": "^0.29.3", "@types/uuid": "^9.0.1" } } diff --git a/packages/wallet/src/account.test.ts b/packages/account/src/account.test.ts similarity index 63% rename from packages/wallet/src/account.test.ts rename to packages/account/src/account.test.ts index 187e6b316b..661c575a0f 100644 --- a/packages/wallet/src/account.test.ts +++ b/packages/account/src/account.test.ts @@ -1,6 +1,13 @@ import { Address } from '@fuel-ts/address'; import { BaseAssetId } from '@fuel-ts/address/configs'; +import type { BN } from '@fuel-ts/math'; import { bn } from '@fuel-ts/math'; + +import type { TxParamsType } from './account'; +import { Account } from './account'; +import { FUEL_NETWORK_URL } from './configs'; +import { TransactionResponse, ScriptTransactionRequest, Provider } from './providers'; +import * as providersMod from './providers'; import type { CallResult, Coin, @@ -8,15 +15,12 @@ import type { Message, Resource, TransactionRequestLike, -} from '@fuel-ts/providers'; -import { TransactionResponse, ScriptTransactionRequest, Provider } from '@fuel-ts/providers'; -import * as providersMod from '@fuel-ts/providers'; - -import type { TxParamsType } from './account'; -import { Account } from './account'; -import { FUEL_NETWORK_URL } from './configs'; +} from './providers'; +import { generateTestWallet, seedTestWallet } from './test-utils'; +import { Wallet } from './wallet'; let provider: Provider; +let gasPrice: BN; afterEach(() => { vi.restoreAllMocks(); @@ -24,6 +28,7 @@ afterEach(() => { beforeAll(async () => { provider = await Provider.create(FUEL_NETWORK_URL); + ({ minGasPrice: gasPrice } = provider.getGasConfig()); }); /** @@ -504,4 +509,235 @@ describe('Account', () => { expect(simulate.mock.calls.length).toBe(1); expect(simulate.mock.calls[0][0]).toEqual(transactionRequest); }); + + it('can transfer a single type of coin to a single destination', async () => { + const sender = await generateTestWallet(provider, [[500_000, BaseAssetId]]); + const receiver = await generateTestWallet(provider); + + const response = await sender.transfer(receiver.address, 1, BaseAssetId, { + gasPrice, + gasLimit: 10_000, + }); + await response.wait(); + + const senderBalances = await sender.getBalances(); + const receiverBalances = await receiver.getBalances(); + + expect(senderBalances).toEqual([{ assetId: BaseAssetId, amount: bn(499921) }]); + expect(receiverBalances).toEqual([{ assetId: BaseAssetId, amount: bn(1) }]); + }); + + it('can create transfer request just fine', async () => { + const sender = await generateTestWallet(provider, [[500_000, BaseAssetId]]); + const receiver = await generateTestWallet(provider); + + const request = await sender.createTransfer(receiver.address.toB256(), 1, BaseAssetId, { + gasPrice, + gasLimit: 10_000, + }); + + const response = await sender.sendTransaction(request); + await response.wait(); + + const senderBalances = await sender.getBalances(); + const receiverBalances = await receiver.getBalances(); + + expect(senderBalances).toEqual([{ assetId: BaseAssetId, amount: bn(499921) }]); + expect(receiverBalances).toEqual([{ assetId: BaseAssetId, amount: bn(1) }]); + }); + + it('can transfer with custom TX Params', async () => { + const sender = await generateTestWallet(provider, [[500_000, BaseAssetId]]); + const receiver = await generateTestWallet(provider); + + /* Error out because gas is to low */ + await expect(async () => { + const result = await sender.transfer(receiver.address, 1, BaseAssetId, { + gasLimit: 0, + gasPrice, + }); + await result.wait(); + }).rejects.toThrowError(/Gas limit '0' is lower than the required: ./); + + const response = await sender.transfer(receiver.address, 1, BaseAssetId, { + gasLimit: 10_000, + gasPrice, + }); + await response.wait(); + const senderBalances = await sender.getBalances(); + expect(senderBalances).toEqual([{ assetId: BaseAssetId, amount: bn(499_921) }]); + const receiverBalances = await receiver.getBalances(); + expect(receiverBalances).toEqual([{ assetId: BaseAssetId, amount: bn(1) }]); + }); + + it('can exclude IDs when getResourcesToSpend is called', async () => { + const assetIdA = '0x0101010101010101010101010101010101010101010101010101010101010101'; + const assetIdB = '0x0202020202020202020202020202020202020202020202020202020202020202'; + + const user = await generateTestWallet(provider, [ + [500_000, assetIdA], + [500_000, assetIdB], + [500_000, BaseAssetId], + ]); + + const coins = await user.getCoins(); + + // Test excludes the UTXO where the assetIdA gets added to the senders wallet + await expect( + user.getResourcesToSpend([[1, assetIdA, 500_000]], { utxos: [coins[0].id] }) + ).rejects.toThrow(/not enough coins to fit the target/); + }); + + it('can transfer multiple types of coins to multiple destinations', async () => { + const assetIdA = '0x0101010101010101010101010101010101010101010101010101010101010101'; + const assetIdB = '0x0202020202020202020202020202020202020202020202020202020202020202'; + const amount = 1; + + const request = new ScriptTransactionRequest({ gasLimit: 1000000, gasPrice }); + const sender = await generateTestWallet(provider, [ + [500_000, assetIdA], + [500_000, assetIdB], + [500_000, BaseAssetId], + ]); + const receiverA = await generateTestWallet(provider); + const receiverB = await generateTestWallet(provider); + + const resources = await sender.getResourcesToSpend([ + [500_000, BaseAssetId], + [500_000, assetIdA], + [500_000, assetIdB], + ]); + + request.addResources(resources); + request.addCoinOutputs(receiverA.address, [ + [amount, assetIdA], + [amount, assetIdB], + ]); + request.addCoinOutputs(receiverB.address, [ + [amount, assetIdA], + [amount, assetIdB], + ]); + + const response = await sender.sendTransaction(request); + + await response.wait(); + + const receiverACoins = await receiverA.getCoins(); + expect(receiverACoins).toEqual( + expect.arrayContaining([ + expect.objectContaining({ assetId: assetIdA, amount: bn(amount) }), + expect.objectContaining({ assetId: assetIdB, amount: bn(amount) }), + ]) + ); + + const receiverBCoins = await receiverB.getCoins(); + expect(receiverBCoins).toEqual( + expect.arrayContaining([ + expect.objectContaining({ assetId: assetIdA, amount: bn(amount) }), + expect.objectContaining({ assetId: assetIdB, amount: bn(amount) }), + ]) + ); + }); + + it('can withdraw an amount of base asset', async () => { + const sender = await generateTestWallet(provider, [[500_000, BaseAssetId]]); + const recipient = Address.fromB256( + '0x00000000000000000000000047ba61eec8e5e65247d717ff236f504cf3b0a263' + ); + const amount = 10; + + const tx = await sender.withdrawToBaseLayer(recipient, 10, { gasPrice, gasLimit: 10_000 }); + const result = await tx.waitForResult(); + + const messageOutReceipt = result.receipts[0]; + + // The sender is the TX ID on the spec it says it should be the sender address + // but is not returning the sender address instead is returning the tx id + expect(result.id).toEqual(messageOutReceipt.sender); + expect(recipient.toHexString()).toEqual(messageOutReceipt.recipient); + expect(amount.toString()).toEqual(messageOutReceipt.amount.toString()); + + const senderBalances = await sender.getBalances(); + expect(senderBalances).toEqual([{ assetId: BaseAssetId, amount: bn(499911) }]); + }); + + it('can retrieve a valid MessageProof', async () => { + const sender = await generateTestWallet(provider, [[500_000, BaseAssetId]]); + const RECIPIENT_ID = '0x00000000000000000000000047ba61eec8e5e65247d717ff236f504cf3b0a263'; + const AMOUNT = 10; + const recipient = Address.fromB256(RECIPIENT_ID); + + const tx = await sender.withdrawToBaseLayer(recipient.toB256(), AMOUNT, { + gasPrice, + gasLimit: 10_000, + }); + // #region Message-getMessageProof + const result = await tx.waitForResult(); + + // Wait for the next block to be minter on out case we are using a local provider + // so we can create a new tx to generate next block + const resp = await sender.transfer(recipient, AMOUNT, BaseAssetId, { + gasPrice, + gasLimit: 10_000, + }); + const nextBlock = await resp.waitForResult(); + + const messageOutReceipt = result.receipts[0]; + const messageProof = await provider.getMessageProof( + result.gqlTransaction.id, + messageOutReceipt.nonce, + nextBlock.blockId + ); + // #endregion Message-getMessageProof + + expect(messageProof?.amount.toNumber()).toEqual(AMOUNT); + expect(messageProof?.sender.toHexString()).toEqual(result.id); + }); + + it('can transfer amount using mutiple utxos', async () => { + const sender = Wallet.generate({ + provider, + }); + const receiver = Wallet.generate({ + provider, + }); + + // seed wallet with 3 distinct utxos + await seedTestWallet(sender, [[500_000, BaseAssetId]]); + await seedTestWallet(sender, [[500_000, BaseAssetId]]); + await seedTestWallet(sender, [[500_000, BaseAssetId]]); + + const transfer = await sender.transfer(receiver.address, 110, BaseAssetId, { + gasPrice, + gasLimit: 10_000, + }); + await transfer.wait(); + + const receiverBalances = await receiver.getBalances(); + expect(receiverBalances).toEqual([{ assetId: BaseAssetId, amount: bn(110) }]); + }); + + it('can withdraw an amount of base asset using mutiple uxtos', async () => { + const sender = Wallet.generate({ + provider, + }); + // seed wallet with 3 distinct utxos + await seedTestWallet(sender, [[500_000, BaseAssetId]]); + await seedTestWallet(sender, [[500_000, BaseAssetId]]); + await seedTestWallet(sender, [[500_000, BaseAssetId]]); + const recipient = Address.fromB256( + '0x00000000000000000000000047ba61eec8e5e65247d717ff236f504cf3b0a263' + ); + const amount = 110; + const tx = await sender.withdrawToBaseLayer(recipient, amount, { gasPrice, gasLimit: 10_000 }); + const result = await tx.wait(); + + const messageOutReceipt = result.receipts[0]; + expect(result.gqlTransaction.id).toEqual(messageOutReceipt.sender); + expect(recipient.toHexString()).toEqual(messageOutReceipt.recipient); + expect(amount.toString()).toEqual(messageOutReceipt.amount.toString()); + + const senderBalances = await sender.getBalances(); + expect(senderBalances).toEqual([{ assetId: BaseAssetId, amount: bn(1499811) }]); + }); }); diff --git a/packages/wallet/src/account.ts b/packages/account/src/account.ts similarity index 97% rename from packages/wallet/src/account.ts rename to packages/account/src/account.ts index 8ebff68d87..04ddced577 100644 --- a/packages/wallet/src/account.ts +++ b/packages/account/src/account.ts @@ -5,6 +5,9 @@ import { AbstractAccount } from '@fuel-ts/interfaces'; import type { AbstractAddress } from '@fuel-ts/interfaces'; import type { BigNumberish, BN } from '@fuel-ts/math'; import { bn } from '@fuel-ts/math'; +import { getBytesCopy } from 'ethers'; +import type { BytesLike } from 'ethers'; + import type { TransactionRequestLike, CallResult, @@ -19,20 +22,14 @@ import type { Provider, ScriptTransactionRequestLike, ProviderSendTxParams, -} from '@fuel-ts/providers'; +} from './providers'; import { withdrawScript, ScriptTransactionRequest, transactionRequestify, addAmountToAsset, -} from '@fuel-ts/providers'; -import { getBytesCopy } from 'ethers'; -import type { BytesLike } from 'ethers'; - -import { - composeScriptForTransferringToContract, - formatScriptDataForTransferringToContract, -} from './utils'; +} from './providers'; +import { assembleTransferToContractScript } from './utils/formatTransferToContractScriptData'; export type TxParamsType = Pick< ScriptTransactionRequestLike, @@ -384,13 +381,11 @@ export class Account extends AbstractAccount { const { minGasPrice } = this.provider.getGasConfig(); const params = { gasPrice: minGasPrice, ...txParams }; - const script = await composeScriptForTransferringToContract(); - - const scriptData = formatScriptDataForTransferringToContract( - contractAddress.toB256(), - amount, - assetId - ); + const { script, scriptData } = await assembleTransferToContractScript({ + hexlifiedContractId: contractAddress.toB256(), + amountToTransfer: bn(amount), + assetId, + }); const request = new ScriptTransactionRequest({ ...params, diff --git a/packages/wallet/src/configs.test.ts b/packages/account/src/configs.test.ts similarity index 100% rename from packages/wallet/src/configs.test.ts rename to packages/account/src/configs.test.ts diff --git a/packages/wallet/src/configs.ts b/packages/account/src/configs.ts similarity index 100% rename from packages/wallet/src/configs.ts rename to packages/account/src/configs.ts diff --git a/packages/hdwallet/src/hdwallet.test.ts b/packages/account/src/hdwallet/hdwallet.test.ts similarity index 98% rename from packages/hdwallet/src/hdwallet.test.ts rename to packages/account/src/hdwallet/hdwallet.test.ts index 51894aeb57..7dc706bba5 100644 --- a/packages/hdwallet/src/hdwallet.test.ts +++ b/packages/account/src/hdwallet/hdwallet.test.ts @@ -1,5 +1,6 @@ +import HDWalletSpec from '../../test/fixtures/hdwallet-spec'; + import HDWallet from './hdwallet'; -import HDWalletSpec from './hdwallet-spec'; /** * @group node diff --git a/packages/hdwallet/src/hdwallet.ts b/packages/account/src/hdwallet/hdwallet.ts similarity index 98% rename from packages/hdwallet/src/hdwallet.ts rename to packages/account/src/hdwallet/hdwallet.ts index 32d53baad4..2253139f74 100644 --- a/packages/hdwallet/src/hdwallet.ts +++ b/packages/account/src/hdwallet/hdwallet.ts @@ -1,7 +1,5 @@ import { ErrorCode, FuelError } from '@fuel-ts/errors'; import { bn, toBytes, toHex } from '@fuel-ts/math'; -import { Mnemonic } from '@fuel-ts/mnemonic'; -import { Signer } from '@fuel-ts/signer'; import type { BytesLike } from 'ethers'; import { toBeHex, @@ -16,6 +14,9 @@ import { concat, } from 'ethers'; +import { Mnemonic } from '../mnemonic'; +import { Signer } from '../signer'; + // "Bitcoin seed" const HARDENED_INDEX = 0x80000000; diff --git a/packages/hdwallet/src/index.ts b/packages/account/src/hdwallet/index.ts similarity index 100% rename from packages/hdwallet/src/index.ts rename to packages/account/src/hdwallet/index.ts diff --git a/packages/account/src/index.ts b/packages/account/src/index.ts new file mode 100644 index 0000000000..1479514b60 --- /dev/null +++ b/packages/account/src/index.ts @@ -0,0 +1,9 @@ +export * from './account'; +export * from './wallet'; +export * from './hdwallet'; +export * from './mnemonic'; +export * from './wordlists'; +export * from './signer'; +export * from './wallet-manager'; +export * from './predicate'; +export * from './providers'; diff --git a/packages/mnemonic/src/index.ts b/packages/account/src/mnemonic/index.ts similarity index 100% rename from packages/mnemonic/src/index.ts rename to packages/account/src/mnemonic/index.ts diff --git a/packages/mnemonic/src/mnemonic.test.ts b/packages/account/src/mnemonic/mnemonic.test.ts similarity index 99% rename from packages/mnemonic/src/mnemonic.test.ts rename to packages/account/src/mnemonic/mnemonic.test.ts index f07d1c4ccd..97c05632e2 100644 --- a/packages/mnemonic/src/mnemonic.test.ts +++ b/packages/account/src/mnemonic/mnemonic.test.ts @@ -1,7 +1,8 @@ import { randomBytes } from '@fuel-ts/crypto'; +import MnemonicSpec from '../../test/fixtures/mnemonic-specs'; + import Mnemonic from './mnemonic'; -import MnemonicSpec from './mnemonic-specs'; /** * @group node diff --git a/packages/mnemonic/src/mnemonic.ts b/packages/account/src/mnemonic/mnemonic.ts similarity index 99% rename from packages/mnemonic/src/mnemonic.ts rename to packages/account/src/mnemonic/mnemonic.ts index b9589067f1..64fd5c3e04 100644 --- a/packages/mnemonic/src/mnemonic.ts +++ b/packages/account/src/mnemonic/mnemonic.ts @@ -1,6 +1,5 @@ import { randomBytes } from '@fuel-ts/crypto'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; -import { english } from '@fuel-ts/wordlists'; import type { BytesLike } from 'ethers'; import { concat, @@ -13,6 +12,8 @@ import { getBytesCopy, } from 'ethers'; +import { english } from '../wordlists'; + import type { MnemonicPhrase } from './utils'; import { entropyToMnemonicIndices, diff --git a/packages/mnemonic/src/utils.test.ts b/packages/account/src/mnemonic/utils.test.ts similarity index 100% rename from packages/mnemonic/src/utils.test.ts rename to packages/account/src/mnemonic/utils.test.ts diff --git a/packages/mnemonic/src/utils.ts b/packages/account/src/mnemonic/utils.ts similarity index 100% rename from packages/mnemonic/src/utils.ts rename to packages/account/src/mnemonic/utils.ts diff --git a/packages/predicate/src/index.ts b/packages/account/src/predicate/index.ts similarity index 100% rename from packages/predicate/src/index.ts rename to packages/account/src/predicate/index.ts diff --git a/packages/predicate/src/predicate.ts b/packages/account/src/predicate/predicate.ts similarity index 96% rename from packages/predicate/src/predicate.ts rename to packages/account/src/predicate/predicate.ts index 50889a6514..870ffe01ac 100644 --- a/packages/predicate/src/predicate.ts +++ b/packages/account/src/predicate/predicate.ts @@ -9,8 +9,14 @@ import { import { Address } from '@fuel-ts/address'; import { BaseAssetId } from '@fuel-ts/address/configs'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; -import type { AbstractAddress, AbstractPredicate, BytesLike } from '@fuel-ts/interfaces'; +import type { AbstractAddress, BytesLike } from '@fuel-ts/interfaces'; import type { BigNumberish } from '@fuel-ts/math'; +import { ByteArrayCoder, InputType } from '@fuel-ts/transactions'; +import { getBytesCopy, hexlify } from 'ethers'; + +import { Account } from '../account'; +import type { TxParamsType } from '../account'; +import { transactionRequestify, BaseTransactionRequest } from '../providers'; import type { CallResult, Provider, @@ -18,19 +24,14 @@ import type { TransactionRequest, TransactionRequestLike, TransactionResponse, -} from '@fuel-ts/providers'; -import { transactionRequestify, BaseTransactionRequest } from '@fuel-ts/providers'; -import { ByteArrayCoder, InputType } from '@fuel-ts/transactions'; -import type { TxParamsType } from '@fuel-ts/wallet'; -import { Account } from '@fuel-ts/wallet'; -import { getBytesCopy, hexlify } from 'ethers'; +} from '../providers'; import { getPredicateRoot } from './utils'; /** * `Predicate` provides methods to populate transaction data with predicate information and sending transactions with them. */ -export class Predicate extends Account implements AbstractPredicate { +export class Predicate extends Account { bytes: Uint8Array; predicateData: Uint8Array = Uint8Array.from([]); predicateArgs: ARGS = [] as unknown as ARGS; diff --git a/packages/predicate/src/utils/getPredicateRoot.test.ts b/packages/account/src/predicate/utils/getPredicateRoot.test.ts similarity index 100% rename from packages/predicate/src/utils/getPredicateRoot.test.ts rename to packages/account/src/predicate/utils/getPredicateRoot.test.ts diff --git a/packages/predicate/src/utils/getPredicateRoot.ts b/packages/account/src/predicate/utils/getPredicateRoot.ts similarity index 100% rename from packages/predicate/src/utils/getPredicateRoot.ts rename to packages/account/src/predicate/utils/getPredicateRoot.ts diff --git a/packages/predicate/src/utils/index.ts b/packages/account/src/predicate/utils/index.ts similarity index 100% rename from packages/predicate/src/utils/index.ts rename to packages/account/src/predicate/utils/index.ts diff --git a/packages/providers/CHANGELOG.md b/packages/account/src/providers/CHANGELOG.md similarity index 100% rename from packages/providers/CHANGELOG.md rename to packages/account/src/providers/CHANGELOG.md diff --git a/packages/providers/README.md b/packages/account/src/providers/README.md similarity index 100% rename from packages/providers/README.md rename to packages/account/src/providers/README.md diff --git a/packages/providers/src/coin-quantity.ts b/packages/account/src/providers/coin-quantity.ts similarity index 100% rename from packages/providers/src/coin-quantity.ts rename to packages/account/src/providers/coin-quantity.ts diff --git a/packages/providers/src/coin-quantityfy.test.ts b/packages/account/src/providers/coin-quantityfy.test.ts similarity index 100% rename from packages/providers/src/coin-quantityfy.test.ts rename to packages/account/src/providers/coin-quantityfy.test.ts diff --git a/packages/providers/src/coin.ts b/packages/account/src/providers/coin.ts similarity index 100% rename from packages/providers/src/coin.ts rename to packages/account/src/providers/coin.ts diff --git a/packages/providers/fuel-core-schema.graphql b/packages/account/src/providers/fuel-core-schema.graphql similarity index 100% rename from packages/providers/fuel-core-schema.graphql rename to packages/account/src/providers/fuel-core-schema.graphql diff --git a/packages/providers/src/fuel-graphql-subscriber.ts b/packages/account/src/providers/fuel-graphql-subscriber.ts similarity index 100% rename from packages/providers/src/fuel-graphql-subscriber.ts rename to packages/account/src/providers/fuel-graphql-subscriber.ts diff --git a/packages/providers/src/index.ts b/packages/account/src/providers/index.ts similarity index 100% rename from packages/providers/src/index.ts rename to packages/account/src/providers/index.ts diff --git a/packages/providers/test/memory-cache.test.ts b/packages/account/src/providers/memory-cache.test.ts similarity index 98% rename from packages/providers/test/memory-cache.test.ts rename to packages/account/src/providers/memory-cache.test.ts index d4060528a3..24cad23b25 100644 --- a/packages/providers/test/memory-cache.test.ts +++ b/packages/account/src/providers/memory-cache.test.ts @@ -2,7 +2,7 @@ import { randomBytes } from '@fuel-ts/crypto'; import { hexlify } from 'ethers'; import type { BytesLike } from 'ethers'; -import { MemoryCache } from '../src/memory-cache'; +import { MemoryCache } from './memory-cache'; const CACHE_ITEMS = [hexlify(randomBytes(8)), randomBytes(8), randomBytes(8)]; diff --git a/packages/providers/src/memory-cache.ts b/packages/account/src/providers/memory-cache.ts similarity index 100% rename from packages/providers/src/memory-cache.ts rename to packages/account/src/providers/memory-cache.ts diff --git a/packages/providers/src/message.ts b/packages/account/src/providers/message.ts similarity index 100% rename from packages/providers/src/message.ts rename to packages/account/src/providers/message.ts diff --git a/packages/providers/src/operations.graphql b/packages/account/src/providers/operations.graphql similarity index 99% rename from packages/providers/src/operations.graphql rename to packages/account/src/providers/operations.graphql index 303c3d2761..d6b79cd710 100644 --- a/packages/providers/src/operations.graphql +++ b/packages/account/src/providers/operations.graphql @@ -1,6 +1,6 @@ # This file contains the queries used by Provider. # -# Running `pnpm --filter @fuel-ts/providers build-operations` will +# Running `pnpm --filter @fuel-ts/account build-operations` will # generate `operations.ts` from this file. # Fragments diff --git a/packages/providers/test/provider.test.ts b/packages/account/src/providers/provider.test.ts similarity index 96% rename from packages/providers/test/provider.test.ts rename to packages/account/src/providers/provider.test.ts index 2ba7d4d08a..d9dc1a5147 100644 --- a/packages/providers/test/provider.test.ts +++ b/packages/account/src/providers/provider.test.ts @@ -8,22 +8,25 @@ import type { Receipt } from '@fuel-ts/transactions'; import { InputType, ReceiptType, TransactionType } from '@fuel-ts/transactions'; import { versions } from '@fuel-ts/versions'; import * as fuelTsVersionsMod from '@fuel-ts/versions'; -import { getBytesCopy, hexlify } from 'ethers'; -import type { BytesLike } from 'ethers'; +import { getBytesCopy, hexlify, type BytesLike } from 'ethers'; -import { fromTai64ToDate } from '../src'; -import type { ChainInfo, NodeInfo, TransactionCost, FetchRequestOptions } from '../src/provider'; -import Provider from '../src/provider'; +import { + messageStatusResponse, + MESSAGE_PROOF_RAW_RESPONSE, + MESSAGE_PROOF, +} from '../../test/fixtures'; + +import type { ChainInfo, FetchRequestOptions, NodeInfo, TransactionCost } from './provider'; +import Provider from './provider'; import type { CoinTransactionRequestInput, MessageTransactionRequestInput, -} from '../src/transaction-request'; -import { ScriptTransactionRequest, CreateTransactionRequest } from '../src/transaction-request'; -import { TransactionResponse } from '../src/transaction-response'; -import { fromTai64ToUnix, fromUnixToTai64, sleep } from '../src/utils'; -import * as gasMod from '../src/utils/gas'; - -import { messageProofResponse, messageStatusResponse } from './fixtures'; +} from './transaction-request'; +import { ScriptTransactionRequest, CreateTransactionRequest } from './transaction-request'; +import { TransactionResponse } from './transaction-response'; +import { fromTai64ToDate } from './transaction-summary'; +import { fromTai64ToUnix, fromUnixToTai64, sleep } from './utils'; +import * as gasMod from './utils/gas'; afterEach(() => { vi.restoreAllMocks(); @@ -53,7 +56,7 @@ const getCustomFetch = return fetch(url, options); }; -// TODO: Figure out a way to import this constant from `@fuel-ts/wallet/configs` +// TODO: Figure out a way to import this constant from `@fuel-ts/account/configs` const FUEL_NETWORK_URL = 'http://127.0.0.1:4000/graphql'; /** @@ -701,16 +704,19 @@ describe('Provider', () => { // It test mainly types and converstions const provider = await Provider.create(FUEL_NETWORK_URL, { fetch: async (url, options) => - getCustomFetch('getMessageProof', { messageProof: messageProofResponse })(url, options), + getCustomFetch('getMessageProof', { messageProof: MESSAGE_PROOF_RAW_RESPONSE })( + url, + options + ), }); - const messageProof = await provider.getMessageProof( - '0x79c54219a5c910979e5e4c2728df163fa654a1fe03843e6af59daa2c3fcd42ea', - '0xb33895e6fdf23b5a62c92a1d45c71a11579027f9e5c4dda73c26cf140bcd6895', - '0xe4dfe8fc1b5de2c669efbcc5e4c0a61db175d1b2f03e3cd46ed4396e76695c5b' - ); + const transactionId = '0x79c54219a5c910979e5e4c2728df163fa654a1fe03843e6af59daa2c3fcd42ea'; + const nonce = '0xb33895e6fdf23b5a62c92a1d45c71a11579027f9e5c4dda73c26cf140bcd6895'; + const commitBlockId = '0xe4dfe8fc1b5de2c669efbcc5e4c0a61db175d1b2f03e3cd46ed4396e76695c5b'; - expect(messageProof).toMatchSnapshot(); + const messageProof = await provider.getMessageProof(transactionId, nonce, commitBlockId); + + expect(messageProof).toStrictEqual({ ...MESSAGE_PROOF, nonce }); }); it('can getMessageStatus', async () => { @@ -723,7 +729,8 @@ describe('Provider', () => { const messageStatus = await provider.getMessageStatus( '0x0000000000000000000000000000000000000000000000000000000000000008' ); - expect(messageStatus).toMatchSnapshot(); + + expect(messageStatus).toStrictEqual(messageStatusResponse); }); it('can connect', async () => { diff --git a/packages/providers/src/provider.ts b/packages/account/src/providers/provider.ts similarity index 99% rename from packages/providers/src/provider.ts rename to packages/account/src/providers/provider.ts index 117837aabe..437136ad6e 100644 --- a/packages/providers/src/provider.ts +++ b/packages/account/src/providers/provider.ts @@ -712,7 +712,7 @@ export default class Provider { txRequest = (await this.estimatePredicates(txRequest)) as ScriptTransactionRequest; } - do { + while (tries < MAX_RETRIES) { const { dryRun: gqlReceipts } = await this.operations.dryRun({ encodedTransaction: hexlify(txRequest.toTransactionBytes()), utxoValidation: false, @@ -735,7 +735,7 @@ export default class Provider { ); tries += 1; - } while (tries < MAX_RETRIES); + } } /** diff --git a/packages/providers/src/resource.ts b/packages/account/src/providers/resource.ts similarity index 100% rename from packages/providers/src/resource.ts rename to packages/account/src/providers/resource.ts diff --git a/packages/providers/src/transaction-request/create-transaction-request.ts b/packages/account/src/providers/transaction-request/create-transaction-request.ts similarity index 100% rename from packages/providers/src/transaction-request/create-transaction-request.ts rename to packages/account/src/providers/transaction-request/create-transaction-request.ts diff --git a/packages/providers/src/transaction-request/errors.ts b/packages/account/src/providers/transaction-request/errors.ts similarity index 100% rename from packages/providers/src/transaction-request/errors.ts rename to packages/account/src/providers/transaction-request/errors.ts diff --git a/packages/providers/src/transaction-request/hash-transaction.test.ts b/packages/account/src/providers/transaction-request/hash-transaction.test.ts similarity index 95% rename from packages/providers/src/transaction-request/hash-transaction.test.ts rename to packages/account/src/providers/transaction-request/hash-transaction.test.ts index 264abf2319..b09b282c75 100644 --- a/packages/providers/src/transaction-request/hash-transaction.test.ts +++ b/packages/account/src/providers/transaction-request/hash-transaction.test.ts @@ -1,7 +1,7 @@ import { bn } from '@fuel-ts/math'; import { clone } from 'ramda'; -import { SCRIPT_TX_REQUEST } from '../../test/fixtures/transaction-request'; +import { SCRIPT_TX_REQUEST } from '../../../test/fixtures/transaction-request'; import { hashTransaction } from './hash-transaction'; diff --git a/packages/providers/src/transaction-request/hash-transaction.ts b/packages/account/src/providers/transaction-request/hash-transaction.ts similarity index 100% rename from packages/providers/src/transaction-request/hash-transaction.ts rename to packages/account/src/providers/transaction-request/hash-transaction.ts diff --git a/packages/providers/src/transaction-request/index.ts b/packages/account/src/providers/transaction-request/index.ts similarity index 100% rename from packages/providers/src/transaction-request/index.ts rename to packages/account/src/providers/transaction-request/index.ts diff --git a/packages/providers/src/transaction-request/input.ts b/packages/account/src/providers/transaction-request/input.ts similarity index 100% rename from packages/providers/src/transaction-request/input.ts rename to packages/account/src/providers/transaction-request/input.ts diff --git a/packages/providers/src/transaction-request/output.ts b/packages/account/src/providers/transaction-request/output.ts similarity index 100% rename from packages/providers/src/transaction-request/output.ts rename to packages/account/src/providers/transaction-request/output.ts diff --git a/packages/providers/src/transaction-request/script-transaction-request.ts b/packages/account/src/providers/transaction-request/script-transaction-request.ts similarity index 100% rename from packages/providers/src/transaction-request/script-transaction-request.ts rename to packages/account/src/providers/transaction-request/script-transaction-request.ts diff --git a/packages/providers/src/transaction-request/scripts.ts b/packages/account/src/providers/transaction-request/scripts.ts similarity index 100% rename from packages/providers/src/transaction-request/scripts.ts rename to packages/account/src/providers/transaction-request/scripts.ts diff --git a/packages/providers/src/transaction-request/storage-slot.ts b/packages/account/src/providers/transaction-request/storage-slot.ts similarity index 100% rename from packages/providers/src/transaction-request/storage-slot.ts rename to packages/account/src/providers/transaction-request/storage-slot.ts diff --git a/packages/providers/src/transaction-request/transaction-request.test.ts b/packages/account/src/providers/transaction-request/transaction-request.test.ts similarity index 100% rename from packages/providers/src/transaction-request/transaction-request.test.ts rename to packages/account/src/providers/transaction-request/transaction-request.test.ts diff --git a/packages/providers/src/transaction-request/transaction-request.ts b/packages/account/src/providers/transaction-request/transaction-request.ts similarity index 97% rename from packages/providers/src/transaction-request/transaction-request.ts rename to packages/account/src/providers/transaction-request/transaction-request.ts index 3cc5e083d5..51b11a5597 100644 --- a/packages/providers/src/transaction-request/transaction-request.ts +++ b/packages/account/src/providers/transaction-request/transaction-request.ts @@ -1,6 +1,7 @@ +import type { InputValue } from '@fuel-ts/abi-coder'; import { Address, addressify } from '@fuel-ts/address'; import { BaseAssetId, ZeroBytes32 } from '@fuel-ts/address/configs'; -import type { AddressLike, AbstractAddress, AbstractPredicate } from '@fuel-ts/interfaces'; +import type { AddressLike, AbstractAddress } from '@fuel-ts/interfaces'; import type { BN, BigNumberish } from '@fuel-ts/math'; import { bn } from '@fuel-ts/math'; import type { TransactionScript, Policy, TransactionCreate } from '@fuel-ts/transactions'; @@ -14,6 +15,7 @@ import { import type { BytesLike } from 'ethers'; import { concat, getBytesCopy, hexlify } from 'ethers'; +import type { Predicate } from '../../predicate'; import type { GqlGasCosts } from '../__generated__/operations'; import type { Coin } from '../coin'; import type { CoinQuantity, CoinQuantityLike } from '../coin-quantity'; @@ -313,7 +315,7 @@ export abstract class BaseTransactionRequest implements BaseTransactionRequestLi * @param predicate - Predicate bytes. * @param predicateData - Predicate data bytes. */ - addCoinInput(coin: Coin, predicate?: AbstractPredicate) { + addCoinInput(coin: Coin, predicate?: Predicate) { const { assetId, owner, amount } = coin; let witnessIndex; @@ -356,7 +358,7 @@ export abstract class BaseTransactionRequest implements BaseTransactionRequestLi * @param predicate - Predicate bytes. * @param predicateData - Predicate data bytes. */ - addMessageInput(message: MessageCoin, predicate?: AbstractPredicate) { + addMessageInput(message: MessageCoin, predicate?: Predicate) { const { recipient, sender, amount } = message; const assetId = BaseAssetId; @@ -429,7 +431,7 @@ export abstract class BaseTransactionRequest implements BaseTransactionRequestLi * @param resources - The resources to add. * @returns This transaction. */ - addPredicateResource(resource: Resource, predicate: AbstractPredicate) { + addPredicateResource(resource: Resource, predicate: Predicate) { if (isCoin(resource)) { this.addCoinInput(resource, predicate); } else { @@ -446,7 +448,7 @@ export abstract class BaseTransactionRequest implements BaseTransactionRequestLi * @param resources - The resources to add. * @returns This transaction. */ - addPredicateResources(resources: Resource[], predicate: AbstractPredicate) { + addPredicateResources(resources: Resource[], predicate: Predicate) { resources.forEach((resource) => this.addPredicateResource(resource, predicate)); return this; diff --git a/packages/providers/src/transaction-request/types.ts b/packages/account/src/providers/transaction-request/types.ts similarity index 100% rename from packages/providers/src/transaction-request/types.ts rename to packages/account/src/providers/transaction-request/types.ts diff --git a/packages/providers/src/transaction-request/utils.ts b/packages/account/src/providers/transaction-request/utils.ts similarity index 100% rename from packages/providers/src/transaction-request/utils.ts rename to packages/account/src/providers/transaction-request/utils.ts diff --git a/packages/providers/src/transaction-request/witness.ts b/packages/account/src/providers/transaction-request/witness.ts similarity index 100% rename from packages/providers/src/transaction-request/witness.ts rename to packages/account/src/providers/transaction-request/witness.ts diff --git a/packages/providers/src/transaction-response/getDecodedLogs.ts b/packages/account/src/providers/transaction-response/getDecodedLogs.ts similarity index 100% rename from packages/providers/src/transaction-response/getDecodedLogs.ts rename to packages/account/src/providers/transaction-response/getDecodedLogs.ts diff --git a/packages/providers/src/transaction-response/index.ts b/packages/account/src/providers/transaction-response/index.ts similarity index 100% rename from packages/providers/src/transaction-response/index.ts rename to packages/account/src/providers/transaction-response/index.ts diff --git a/packages/providers/src/transaction-response/transaction-response.ts b/packages/account/src/providers/transaction-response/transaction-response.ts similarity index 100% rename from packages/providers/src/transaction-response/transaction-response.ts rename to packages/account/src/providers/transaction-response/transaction-response.ts diff --git a/packages/providers/src/transaction-summary/assemble-transaction-summary.test.ts b/packages/account/src/providers/transaction-summary/assemble-transaction-summary.test.ts similarity index 98% rename from packages/providers/src/transaction-summary/assemble-transaction-summary.test.ts rename to packages/account/src/providers/transaction-summary/assemble-transaction-summary.test.ts index ca4ea11493..d6539716f2 100644 --- a/packages/providers/src/transaction-summary/assemble-transaction-summary.test.ts +++ b/packages/account/src/providers/transaction-summary/assemble-transaction-summary.test.ts @@ -13,7 +13,7 @@ import { MOCK_FAILURE_STATUS, MOCK_SUBMITTED_STATUS, MOCK_SQUEEZEDOUT_STATUS, -} from '../../test/fixtures/transaction-summary'; +} from '../../../test/fixtures/transaction-summary'; import type { GqlGasCosts } from '../__generated__/operations'; import Provider from '../provider'; import type { TransactionResultReceipt } from '../transaction-response'; diff --git a/packages/providers/src/transaction-summary/assemble-transaction-summary.ts b/packages/account/src/providers/transaction-summary/assemble-transaction-summary.ts similarity index 100% rename from packages/providers/src/transaction-summary/assemble-transaction-summary.ts rename to packages/account/src/providers/transaction-summary/assemble-transaction-summary.ts diff --git a/packages/providers/src/transaction-summary/calculate-transaction-fee.test.ts b/packages/account/src/providers/transaction-summary/calculate-transaction-fee.test.ts similarity index 96% rename from packages/providers/src/transaction-summary/calculate-transaction-fee.test.ts rename to packages/account/src/providers/transaction-summary/calculate-transaction-fee.test.ts index 096ed6b2ea..bea33b011f 100644 --- a/packages/providers/src/transaction-summary/calculate-transaction-fee.test.ts +++ b/packages/account/src/providers/transaction-summary/calculate-transaction-fee.test.ts @@ -1,11 +1,11 @@ import { bn } from '@fuel-ts/math'; -import { MOCK_CHAIN } from '../../test/fixtures/chain'; +import { MOCK_CHAIN } from '../../../test/fixtures/chain'; import { MOCK_TX_CREATE_RAW_PAYLOAD, MOCK_TX_MINT_RAW_PAYLOAD, MOCK_TX_SCRIPT_RAW_PAYLOAD, -} from '../../test/fixtures/transaction-summary'; +} from '../../../test/fixtures/transaction-summary'; import { calculateTransactionFee } from './calculate-transaction-fee'; diff --git a/packages/providers/src/transaction-summary/calculate-transaction-fee.ts b/packages/account/src/providers/transaction-summary/calculate-transaction-fee.ts similarity index 100% rename from packages/providers/src/transaction-summary/calculate-transaction-fee.ts rename to packages/account/src/providers/transaction-summary/calculate-transaction-fee.ts diff --git a/packages/providers/src/transaction-summary/call.ts b/packages/account/src/providers/transaction-summary/call.ts similarity index 100% rename from packages/providers/src/transaction-summary/call.ts rename to packages/account/src/providers/transaction-summary/call.ts diff --git a/packages/providers/src/transaction-summary/date.test.ts b/packages/account/src/providers/transaction-summary/date.test.ts similarity index 100% rename from packages/providers/src/transaction-summary/date.test.ts rename to packages/account/src/providers/transaction-summary/date.test.ts diff --git a/packages/providers/src/transaction-summary/date.ts b/packages/account/src/providers/transaction-summary/date.ts similarity index 100% rename from packages/providers/src/transaction-summary/date.ts rename to packages/account/src/providers/transaction-summary/date.ts diff --git a/packages/providers/src/transaction-summary/get-transaction-summary.ts b/packages/account/src/providers/transaction-summary/get-transaction-summary.ts similarity index 100% rename from packages/providers/src/transaction-summary/get-transaction-summary.ts rename to packages/account/src/providers/transaction-summary/get-transaction-summary.ts diff --git a/packages/providers/src/transaction-summary/index.ts b/packages/account/src/providers/transaction-summary/index.ts similarity index 100% rename from packages/providers/src/transaction-summary/index.ts rename to packages/account/src/providers/transaction-summary/index.ts diff --git a/packages/providers/src/transaction-summary/input.test.ts b/packages/account/src/providers/transaction-summary/input.test.ts similarity index 98% rename from packages/providers/src/transaction-summary/input.test.ts rename to packages/account/src/providers/transaction-summary/input.test.ts index 773847c29a..cf920bf991 100644 --- a/packages/providers/src/transaction-summary/input.test.ts +++ b/packages/account/src/providers/transaction-summary/input.test.ts @@ -6,7 +6,7 @@ import { MOCK_INPUT_CONTRACT, MOCK_INPUT_MESSAGE, MOCK_OUTPUT_CONTRACT, -} from '../../test/fixtures/transaction-summary'; +} from '../../../test/fixtures/transaction-summary'; import { getInputAccountAddress, diff --git a/packages/providers/src/transaction-summary/input.ts b/packages/account/src/providers/transaction-summary/input.ts similarity index 100% rename from packages/providers/src/transaction-summary/input.ts rename to packages/account/src/providers/transaction-summary/input.ts diff --git a/packages/providers/src/transaction-summary/operations.test.ts b/packages/account/src/providers/transaction-summary/operations.test.ts similarity index 99% rename from packages/providers/src/transaction-summary/operations.test.ts rename to packages/account/src/providers/transaction-summary/operations.test.ts index c6a3167839..8b18e6b2bf 100644 --- a/packages/providers/src/transaction-summary/operations.test.ts +++ b/packages/account/src/providers/transaction-summary/operations.test.ts @@ -21,7 +21,7 @@ import { MOCK_RECEIPT_TRANSFER, MOCK_RECEIPT_TRANSFER_OUT, MOCK_TRANSACTION_RAWPAYLOAD, -} from '../../test/fixtures/transaction-summary'; +} from '../../../test/fixtures/transaction-summary'; import type { TransactionResultMessageOutReceipt, TransactionResultReceipt, diff --git a/packages/providers/src/transaction-summary/operations.ts b/packages/account/src/providers/transaction-summary/operations.ts similarity index 100% rename from packages/providers/src/transaction-summary/operations.ts rename to packages/account/src/providers/transaction-summary/operations.ts diff --git a/packages/providers/src/transaction-summary/output.test.ts b/packages/account/src/providers/transaction-summary/output.test.ts similarity index 98% rename from packages/providers/src/transaction-summary/output.test.ts rename to packages/account/src/providers/transaction-summary/output.test.ts index f4aceb3cfc..0e8d74f8c9 100644 --- a/packages/providers/src/transaction-summary/output.test.ts +++ b/packages/account/src/providers/transaction-summary/output.test.ts @@ -4,7 +4,7 @@ import { MOCK_OUTPUT_VARIABLE, MOCK_OUTPUT_CONTRACT_CREATED, MOCK_OUTPUT_COIN, -} from '../../test/fixtures/transaction-summary'; +} from '../../../test/fixtures/transaction-summary'; import { getOutputsChange, diff --git a/packages/providers/src/transaction-summary/output.ts b/packages/account/src/providers/transaction-summary/output.ts similarity index 100% rename from packages/providers/src/transaction-summary/output.ts rename to packages/account/src/providers/transaction-summary/output.ts diff --git a/packages/providers/src/transaction-summary/receipt.test.ts b/packages/account/src/providers/transaction-summary/receipt.test.ts similarity index 100% rename from packages/providers/src/transaction-summary/receipt.test.ts rename to packages/account/src/providers/transaction-summary/receipt.test.ts diff --git a/packages/providers/src/transaction-summary/receipt.ts b/packages/account/src/providers/transaction-summary/receipt.ts similarity index 100% rename from packages/providers/src/transaction-summary/receipt.ts rename to packages/account/src/providers/transaction-summary/receipt.ts diff --git a/packages/providers/src/transaction-summary/status.test.ts b/packages/account/src/providers/transaction-summary/status.test.ts similarity index 98% rename from packages/providers/src/transaction-summary/status.test.ts rename to packages/account/src/providers/transaction-summary/status.test.ts index b3050375c0..100f73ae19 100644 --- a/packages/providers/src/transaction-summary/status.test.ts +++ b/packages/account/src/providers/transaction-summary/status.test.ts @@ -3,7 +3,7 @@ import { MOCK_SQUEEZEDOUT_STATUS, MOCK_SUBMITTED_STATUS, MOCK_SUCCESS_STATUS, -} from '../../test/fixtures/transaction-summary'; +} from '../../../test/fixtures/transaction-summary'; import { getTransactionStatusName, processGraphqlStatus } from './status'; import type { GqlTransactionStatusesNames, GraphqlTransactionStatus } from './types'; diff --git a/packages/providers/src/transaction-summary/status.ts b/packages/account/src/providers/transaction-summary/status.ts similarity index 100% rename from packages/providers/src/transaction-summary/status.ts rename to packages/account/src/providers/transaction-summary/status.ts diff --git a/packages/providers/src/transaction-summary/types.ts b/packages/account/src/providers/transaction-summary/types.ts similarity index 100% rename from packages/providers/src/transaction-summary/types.ts rename to packages/account/src/providers/transaction-summary/types.ts diff --git a/packages/providers/src/utils/auto-retry-fetch.test.ts b/packages/account/src/providers/utils/auto-retry-fetch.test.ts similarity index 100% rename from packages/providers/src/utils/auto-retry-fetch.test.ts rename to packages/account/src/providers/utils/auto-retry-fetch.test.ts diff --git a/packages/providers/src/utils/auto-retry-fetch.ts b/packages/account/src/providers/utils/auto-retry-fetch.ts similarity index 100% rename from packages/providers/src/utils/auto-retry-fetch.ts rename to packages/account/src/providers/utils/auto-retry-fetch.ts diff --git a/packages/providers/src/utils/block-explorer.test.ts b/packages/account/src/providers/utils/block-explorer.test.ts similarity index 100% rename from packages/providers/src/utils/block-explorer.test.ts rename to packages/account/src/providers/utils/block-explorer.test.ts diff --git a/packages/providers/src/utils/block-explorer.ts b/packages/account/src/providers/utils/block-explorer.ts similarity index 100% rename from packages/providers/src/utils/block-explorer.ts rename to packages/account/src/providers/utils/block-explorer.ts diff --git a/packages/providers/src/utils/gas.test.ts b/packages/account/src/providers/utils/gas.test.ts similarity index 99% rename from packages/providers/src/utils/gas.test.ts rename to packages/account/src/providers/utils/gas.test.ts index 9857395941..b4afa36ff7 100644 --- a/packages/providers/src/utils/gas.test.ts +++ b/packages/account/src/providers/utils/gas.test.ts @@ -2,14 +2,14 @@ import { BN, bn } from '@fuel-ts/math'; import { ReceiptType, type InputCoin, type InputMessage } from '@fuel-ts/transactions'; import { getBytesCopy } from 'ethers'; -import { MOCK_CHAIN } from '../../test/fixtures/chain'; +import { MOCK_CHAIN } from '../../../test/fixtures/chain'; import { MOCK_COIN_INPUT, MOCK_MESSAGE_INPUT, MOCK_REQUEST_COIN_INPUT, MOCK_REQUEST_MESSAGE_INPUT, MOCK_REQUEST_PREDICATE_INPUT, -} from '../../test/fixtures/inputs-and-outputs'; +} from '../../../test/fixtures/inputs-and-outputs'; import type { GqlDependentCost } from '../__generated__/operations'; import type { CoinTransactionRequestInput, diff --git a/packages/providers/src/utils/gas.ts b/packages/account/src/providers/utils/gas.ts similarity index 100% rename from packages/providers/src/utils/gas.ts rename to packages/account/src/providers/utils/gas.ts diff --git a/packages/providers/src/utils/index.ts b/packages/account/src/providers/utils/index.ts similarity index 100% rename from packages/providers/src/utils/index.ts rename to packages/account/src/providers/utils/index.ts diff --git a/packages/providers/src/utils/json.test.ts b/packages/account/src/providers/utils/json.test.ts similarity index 100% rename from packages/providers/src/utils/json.test.ts rename to packages/account/src/providers/utils/json.test.ts diff --git a/packages/providers/src/utils/json.ts b/packages/account/src/providers/utils/json.ts similarity index 100% rename from packages/providers/src/utils/json.ts rename to packages/account/src/providers/utils/json.ts diff --git a/packages/providers/src/utils/merge-quantities.test.ts b/packages/account/src/providers/utils/merge-quantities.test.ts similarity index 100% rename from packages/providers/src/utils/merge-quantities.test.ts rename to packages/account/src/providers/utils/merge-quantities.test.ts diff --git a/packages/providers/src/utils/merge-quantities.ts b/packages/account/src/providers/utils/merge-quantities.ts similarity index 100% rename from packages/providers/src/utils/merge-quantities.ts rename to packages/account/src/providers/utils/merge-quantities.ts diff --git a/packages/providers/src/utils/receipts.test.ts b/packages/account/src/providers/utils/receipts.test.ts similarity index 99% rename from packages/providers/src/utils/receipts.test.ts rename to packages/account/src/providers/utils/receipts.test.ts index 1d3bc76b0e..aec0c6f026 100644 --- a/packages/providers/src/utils/receipts.test.ts +++ b/packages/account/src/providers/utils/receipts.test.ts @@ -20,7 +20,7 @@ import { getBytesCopy } from 'ethers'; import { MOCK_GQL_RECEIPT_FRAGMENT, MOCK_GQL_RECEIPT_FRAGMENT_TO_ADDRESS, -} from '../../test/fixtures/receipts'; +} from '../../../test/fixtures/receipts'; import { GqlReceiptType } from '../__generated__/operations'; import { assembleReceiptByType } from './receipts'; diff --git a/packages/providers/src/utils/receipts.ts b/packages/account/src/providers/utils/receipts.ts similarity index 100% rename from packages/providers/src/utils/receipts.ts rename to packages/account/src/providers/utils/receipts.ts diff --git a/packages/providers/src/utils/sleep.ts b/packages/account/src/providers/utils/sleep.ts similarity index 100% rename from packages/providers/src/utils/sleep.ts rename to packages/account/src/providers/utils/sleep.ts diff --git a/packages/providers/src/utils/time.test.ts b/packages/account/src/providers/utils/time.test.ts similarity index 100% rename from packages/providers/src/utils/time.test.ts rename to packages/account/src/providers/utils/time.test.ts diff --git a/packages/providers/src/utils/time.ts b/packages/account/src/providers/utils/time.ts similarity index 100% rename from packages/providers/src/utils/time.ts rename to packages/account/src/providers/utils/time.ts diff --git a/packages/signer/src/index.ts b/packages/account/src/signer/index.ts similarity index 100% rename from packages/signer/src/index.ts rename to packages/account/src/signer/index.ts diff --git a/packages/signer/src/signer.test.ts b/packages/account/src/signer/signer.test.ts similarity index 100% rename from packages/signer/src/signer.test.ts rename to packages/account/src/signer/signer.test.ts diff --git a/packages/signer/src/signer.ts b/packages/account/src/signer/signer.ts similarity index 96% rename from packages/signer/src/signer.ts rename to packages/account/src/signer/signer.ts index 0444a4c1ec..b88d90b476 100644 --- a/packages/signer/src/signer.ts +++ b/packages/account/src/signer/signer.ts @@ -44,7 +44,9 @@ export class Signer { /** * Sign data using the Signer instance * - * Signature is a 64 byte array of the concatenated r and s values with the compressed recoveryParam byte. [Read more](FuelLabs/fuel-specs/specs/protocol/cryptographic_primitives.md#public-key-cryptography) + * Signature is a 64 byte array of the concatenated r and s values with the compressed recoveryParam byte. + * @ignore + * [Read more](FuelLabs/fuel-specs/specs/protocol/cryptographic_primitives.md#public-key-cryptography) * * @param data - The data to be sign * @returns hashed signature diff --git a/packages/wallet/src/test-utils/generateTestWallet.ts b/packages/account/src/test-utils/generateTestWallet.ts similarity index 74% rename from packages/wallet/src/test-utils/generateTestWallet.ts rename to packages/account/src/test-utils/generateTestWallet.ts index 717df32077..6e9fad10a8 100644 --- a/packages/wallet/src/test-utils/generateTestWallet.ts +++ b/packages/account/src/test-utils/generateTestWallet.ts @@ -1,7 +1,6 @@ -import type { Provider, CoinQuantityLike } from '@fuel-ts/providers'; - +import type { Provider, CoinQuantityLike } from '../providers'; +import type { WalletUnlocked } from '../wallet'; import { Wallet } from '../wallet'; -import type { WalletUnlocked } from '../wallets'; import { seedTestWallet } from './seedTestWallet'; diff --git a/packages/account/src/test-utils/index.ts b/packages/account/src/test-utils/index.ts new file mode 100644 index 0000000000..d90225587a --- /dev/null +++ b/packages/account/src/test-utils/index.ts @@ -0,0 +1,3 @@ +export * from './generateTestWallet'; +export * from './seedTestWallet'; +export * from './launchNode'; diff --git a/packages/wallet/src/test-utils/launchNode.test.ts b/packages/account/src/test-utils/launchNode.test.ts similarity index 100% rename from packages/wallet/src/test-utils/launchNode.test.ts rename to packages/account/src/test-utils/launchNode.test.ts diff --git a/packages/wallet/src/test-utils/launchNode.ts b/packages/account/src/test-utils/launchNode.ts similarity index 98% rename from packages/wallet/src/test-utils/launchNode.ts rename to packages/account/src/test-utils/launchNode.ts index cfbd1f4684..943431c33b 100644 --- a/packages/wallet/src/test-utils/launchNode.ts +++ b/packages/account/src/test-utils/launchNode.ts @@ -1,7 +1,5 @@ import { BaseAssetId } from '@fuel-ts/address/configs'; import { toHex } from '@fuel-ts/math'; -import { Provider } from '@fuel-ts/providers'; -import { Signer } from '@fuel-ts/signer'; import { defaultChainConfig, defaultConsensusKey } from '@fuel-ts/utils'; import { findBinPath } from '@fuel-ts/utils/cli-utils'; import type { ChildProcessWithoutNullStreams } from 'child_process'; @@ -14,7 +12,9 @@ import path from 'path'; import { getPortPromise } from 'portfinder'; import treeKill from 'tree-kill'; -import type { WalletUnlocked } from '../wallets'; +import { Provider } from '../providers'; +import { Signer } from '../signer'; +import type { WalletUnlocked } from '../wallet'; import { generateTestWallet } from './generateTestWallet'; diff --git a/packages/wallet/src/test-utils/launchNodeAndGetWallets.test.ts b/packages/account/src/test-utils/launchNodeAndGetWallets.test.ts similarity index 96% rename from packages/wallet/src/test-utils/launchNodeAndGetWallets.test.ts rename to packages/account/src/test-utils/launchNodeAndGetWallets.test.ts index d90d0275ba..4c625751cd 100644 --- a/packages/wallet/src/test-utils/launchNodeAndGetWallets.test.ts +++ b/packages/account/src/test-utils/launchNodeAndGetWallets.test.ts @@ -1,8 +1,8 @@ -import { Provider } from '@fuel-ts/providers'; import path from 'path'; import { cwd } from 'process'; -import { WalletUnlocked } from '../wallets'; +import { Provider } from '../providers'; +import { WalletUnlocked } from '../wallet'; import { launchNodeAndGetWallets } from './launchNode'; diff --git a/packages/wallet/src/test-utils/seedTestWallet.ts b/packages/account/src/test-utils/seedTestWallet.ts similarity index 82% rename from packages/wallet/src/test-utils/seedTestWallet.ts rename to packages/account/src/test-utils/seedTestWallet.ts index 4ea14beb95..0561156bcb 100644 --- a/packages/wallet/src/test-utils/seedTestWallet.ts +++ b/packages/account/src/test-utils/seedTestWallet.ts @@ -1,9 +1,9 @@ import { randomBytes } from '@fuel-ts/crypto'; -import { coinQuantityfy, ScriptTransactionRequest } from '@fuel-ts/providers'; -import type { CoinQuantityLike } from '@fuel-ts/providers'; import type { Account } from '../account'; -import { WalletUnlocked } from '../wallets'; +import { coinQuantityfy, ScriptTransactionRequest } from '../providers'; +import type { CoinQuantityLike } from '../providers'; +import { WalletUnlocked } from '../wallet'; export const seedTestWallet = async (wallet: Account, quantities: CoinQuantityLike[]) => { const genesisWallet = new WalletUnlocked( diff --git a/packages/wallet/src/utils.test.ts b/packages/account/src/utils/formatTransferToContractScriptData.test.ts similarity index 60% rename from packages/wallet/src/utils.test.ts rename to packages/account/src/utils/formatTransferToContractScriptData.test.ts index fdf91e7f34..745311425e 100644 --- a/packages/wallet/src/utils.test.ts +++ b/packages/account/src/utils/formatTransferToContractScriptData.test.ts @@ -5,9 +5,9 @@ import * as getBytesCopyMod from 'ethers'; import type { BytesLike } from 'ethers'; import { - composeScriptForTransferringToContract, - formatScriptDataForTransferringToContract, -} from './utils'; + assembleTransferToContractScript, + formatTransferToContractScriptData, +} from './formatTransferToContractScriptData'; vi.mock('ethers', async () => { const mod = await vi.importActual('ethers'); @@ -26,12 +26,28 @@ describe('util', () => { }); it('should ensure "composeScriptForTransferringToContract" returns script just fine', async () => { - const script = await composeScriptForTransferringToContract(); + const hexlifiedContractId = '0x1234567890123456789012345678901234567890'; + const amountToTransfer: BigNumberish = 0; + const assetId: BytesLike = BaseAssetId; + + const { script, scriptData } = await assembleTransferToContractScript({ + hexlifiedContractId, + amountToTransfer, + assetId, + }); + expect(script).toStrictEqual( new Uint8Array([ 97, 64, 0, 10, 80, 69, 0, 32, 93, 73, 16, 0, 80, 77, 16, 8, 60, 65, 36, 192, 36, 4, 0, 0, ]) ); + expect(scriptData).toStrictEqual( + new Uint8Array([ + 18, 52, 86, 120, 144, 18, 52, 86, 120, 144, 18, 52, 86, 120, 144, 18, 52, 86, 120, 144, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + ]) + ); }); it('should ensure "formatScriptDataForTransferringToContract" returns script data just fine', () => { @@ -43,15 +59,15 @@ describe('util', () => { .spyOn(getBytesCopyMod, 'getBytesCopy') .mockReturnValue(Uint8Array.from(byte)); - const contractId = '0x1234567890123456789012345678901234567890'; + const hexlifiedContractId = '0x1234567890123456789012345678901234567890'; const amountToTransfer: BigNumberish = 0; const assetId: BytesLike = BaseAssetId; - const scriptData = formatScriptDataForTransferringToContract( - contractId, + const scriptData = formatTransferToContractScriptData({ + hexlifiedContractId, amountToTransfer, - assetId - ); + assetId, + }); expect(scriptData).toStrictEqual(Uint8Array.from([].concat(...Array(3).fill(byte)))); diff --git a/packages/wallet/src/utils.ts b/packages/account/src/utils/formatTransferToContractScriptData.ts similarity index 71% rename from packages/wallet/src/utils.ts rename to packages/account/src/utils/formatTransferToContractScriptData.ts index 392274f8f6..df9e35039e 100644 --- a/packages/wallet/src/utils.ts +++ b/packages/account/src/utils/formatTransferToContractScriptData.ts @@ -4,7 +4,35 @@ import { BN, type BigNumberish } from '@fuel-ts/math'; import * as asm from '@fuels/vm-asm'; import { getBytesCopy, type BytesLike } from 'ethers'; -export const composeScriptForTransferringToContract = async () => { +interface IAssembleTransferToContractScriptParams { + hexlifiedContractId: B256Address; + amountToTransfer: BigNumberish; + assetId: BytesLike; +} + +export const formatTransferToContractScriptData = ( + params: IAssembleTransferToContractScriptParams +) => { + const { assetId, amountToTransfer, hexlifiedContractId } = params; + + const numberCoder = new U64Coder(); + + const encoded = numberCoder.encode(new BN(amountToTransfer).toNumber()); + + const scriptData = Uint8Array.from([ + ...getBytesCopy(hexlifiedContractId), + ...encoded, + ...getBytesCopy(assetId), + ]); + + return scriptData; +}; + +export const assembleTransferToContractScript = async ( + params: IAssembleTransferToContractScriptParams +) => { + const scriptData = formatTransferToContractScriptData(params); + // implementation extracted from Rust SDK at: // https://github.com/FuelLabs/fuels-rs/blob/master/packages/fuels-core/src/types/transaction_builders.rs#L240-L272 // This script loads: @@ -35,23 +63,5 @@ export const composeScriptForTransferringToContract = async () => { ...ret.to_bytes(), ]); - return script; -}; - -export const formatScriptDataForTransferringToContract = ( - hexelifiedContractId: B256Address, - amountToTransfer: BigNumberish, - assetId: BytesLike -) => { - const numberCoder = new U64Coder(); - - const encoded = numberCoder.encode(new BN(amountToTransfer).toNumber()); - - const scriptData = Uint8Array.from([ - ...getBytesCopy(hexelifiedContractId), - ...encoded, - ...getBytesCopy(assetId), - ]); - - return scriptData; + return { script, scriptData }; }; diff --git a/packages/account/src/wallet-manager/index.ts b/packages/account/src/wallet-manager/index.ts new file mode 100644 index 0000000000..26955b86b6 --- /dev/null +++ b/packages/account/src/wallet-manager/index.ts @@ -0,0 +1,5 @@ +export * from './wallet-manager'; +export * from './storages/memory-storage'; +export * from './vaults/mnemonic-vault'; +export * from './vaults/privatekey-vault'; +export * from './types'; diff --git a/packages/wallet-manager/src/storages/memory-storage.test.ts b/packages/account/src/wallet-manager/storages/memory-storage.test.ts similarity index 92% rename from packages/wallet-manager/src/storages/memory-storage.test.ts rename to packages/account/src/wallet-manager/storages/memory-storage.test.ts index bc3a0ca6c8..cbb7a032a3 100644 --- a/packages/wallet-manager/src/storages/memory-storage.test.ts +++ b/packages/account/src/wallet-manager/storages/memory-storage.test.ts @@ -1,4 +1,4 @@ -import MemoryStorage from './memory-storage'; +import { MemoryStorage } from './memory-storage'; /** * @group node diff --git a/packages/wallet-manager/src/storages/memory-storage.ts b/packages/account/src/wallet-manager/storages/memory-storage.ts similarity index 84% rename from packages/wallet-manager/src/storages/memory-storage.ts rename to packages/account/src/wallet-manager/storages/memory-storage.ts index 5208228fb3..2eaabe16d8 100644 --- a/packages/wallet-manager/src/storages/memory-storage.ts +++ b/packages/account/src/wallet-manager/storages/memory-storage.ts @@ -1,6 +1,6 @@ import type { StorageAbstract } from '../types'; -class MemoryStorage implements StorageAbstract { +export class MemoryStorage implements StorageAbstract { storage = new Map(); async getItem(key: string): Promise { @@ -20,5 +20,3 @@ class MemoryStorage implements StorageAbstract { await this.storage.clear(); } } - -export default MemoryStorage; diff --git a/packages/wallet-manager/src/types.ts b/packages/account/src/wallet-manager/types.ts similarity index 90% rename from packages/wallet-manager/src/types.ts rename to packages/account/src/wallet-manager/types.ts index 571171e532..26c4c78835 100644 --- a/packages/wallet-manager/src/types.ts +++ b/packages/account/src/wallet-manager/types.ts @@ -1,9 +1,10 @@ /* eslint-disable max-classes-per-file */ import { ErrorCode, FuelError } from '@fuel-ts/errors'; import type { AbstractAddress } from '@fuel-ts/interfaces'; -import type { WalletUnlocked } from '@fuel-ts/wallet'; -export type Account = { +import type { WalletUnlocked } from '../wallet'; + +export type WalletManagerAccount = { address: AbstractAddress; publicKey: string; vaultId?: number; @@ -41,11 +42,11 @@ export abstract class Vault { throw new FuelError(ErrorCode.NOT_IMPLEMENTED, 'Not implemented.'); } - getAccounts(): Account[] { + getAccounts(): WalletManagerAccount[] { throw new FuelError(ErrorCode.NOT_IMPLEMENTED, 'Not implemented.'); } - addAccount(): Account { + addAccount(): WalletManagerAccount { throw new FuelError(ErrorCode.NOT_IMPLEMENTED, 'Not implemented.'); } diff --git a/packages/wallet-manager/src/vaults/mnemonic-vault.test.ts b/packages/account/src/wallet-manager/vaults/mnemonic-vault.test.ts similarity index 96% rename from packages/wallet-manager/src/vaults/mnemonic-vault.test.ts rename to packages/account/src/wallet-manager/vaults/mnemonic-vault.test.ts index 47a9513d38..c0dfc898f6 100644 --- a/packages/wallet-manager/src/vaults/mnemonic-vault.test.ts +++ b/packages/account/src/wallet-manager/vaults/mnemonic-vault.test.ts @@ -1,6 +1,5 @@ -import { Wallet } from '@fuel-ts/wallet'; - -import walletManagerSpec from '../wallet-manager-spec'; +import walletManagerSpec from '../../../test/fixtures/wallet-manager-spec'; +import { Wallet } from '../../wallet'; import { MnemonicVault } from './mnemonic-vault'; diff --git a/packages/wallet-manager/src/vaults/mnemonic-vault.ts b/packages/account/src/wallet-manager/vaults/mnemonic-vault.ts similarity index 93% rename from packages/wallet-manager/src/vaults/mnemonic-vault.ts rename to packages/account/src/wallet-manager/vaults/mnemonic-vault.ts index 14b82f3e2f..0880442369 100644 --- a/packages/wallet-manager/src/vaults/mnemonic-vault.ts +++ b/packages/account/src/wallet-manager/vaults/mnemonic-vault.ts @@ -1,13 +1,13 @@ import { Address } from '@fuel-ts/address'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; import type { AbstractAddress } from '@fuel-ts/interfaces'; -import { Mnemonic } from '@fuel-ts/mnemonic'; -import type { WalletUnlocked } from '@fuel-ts/wallet'; -import { Wallet } from '@fuel-ts/wallet'; +import { Mnemonic } from '../../mnemonic'; +import type { WalletUnlocked } from '../../wallet'; +import { Wallet } from '../../wallet'; import type { Vault } from '../types'; -interface MnemonicVaultOptions { +export interface MnemonicVaultOptions { secret?: string; rootPath?: string; numberOfAccounts?: number | null; diff --git a/packages/wallet-manager/src/vaults/privatekey-vault.test.ts b/packages/account/src/wallet-manager/vaults/privatekey-vault.test.ts similarity index 95% rename from packages/wallet-manager/src/vaults/privatekey-vault.test.ts rename to packages/account/src/wallet-manager/vaults/privatekey-vault.test.ts index a8dc591ba6..41f4ba8931 100644 --- a/packages/wallet-manager/src/vaults/privatekey-vault.test.ts +++ b/packages/account/src/wallet-manager/vaults/privatekey-vault.test.ts @@ -1,6 +1,7 @@ import { Address } from '@fuel-ts/address'; -import type { WalletUnlocked } from '@fuel-ts/wallet'; -import { Wallet } from '@fuel-ts/wallet'; + +import type { WalletUnlocked } from '../../wallet'; +import { Wallet } from '../../wallet'; import { PrivateKeyVault } from './privatekey-vault'; diff --git a/packages/wallet-manager/src/vaults/privatekey-vault.ts b/packages/account/src/wallet-manager/vaults/privatekey-vault.ts similarity index 88% rename from packages/wallet-manager/src/vaults/privatekey-vault.ts rename to packages/account/src/wallet-manager/vaults/privatekey-vault.ts index 0f73f76190..0fa82376ac 100644 --- a/packages/wallet-manager/src/vaults/privatekey-vault.ts +++ b/packages/account/src/wallet-manager/vaults/privatekey-vault.ts @@ -1,12 +1,12 @@ import { Address } from '@fuel-ts/address'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; import type { AbstractAddress } from '@fuel-ts/interfaces'; -import type { WalletUnlocked } from '@fuel-ts/wallet'; -import { Wallet } from '@fuel-ts/wallet'; -import type { Account, Vault } from '../types'; +import type { WalletUnlocked } from '../../wallet'; +import { Wallet } from '../../wallet'; +import type { WalletManagerAccount, Vault } from '../types'; -interface PkVaultOptions { +export interface PkVaultOptions { secret?: string; accounts?: Array; } @@ -42,7 +42,7 @@ export class PrivateKeyVault implements Vault { }; } - getAccounts(): Account[] { + getAccounts(): WalletManagerAccount[] { return this.#privateKeys.map((pk) => this.getPublicAccount(pk)); } diff --git a/packages/wallet-manager/src/wallet-manager.test.ts b/packages/account/src/wallet-manager/wallet-manager.test.ts similarity index 98% rename from packages/wallet-manager/src/wallet-manager.test.ts rename to packages/account/src/wallet-manager/wallet-manager.test.ts index e5221c87fe..7b96706acc 100644 --- a/packages/wallet-manager/src/wallet-manager.test.ts +++ b/packages/account/src/wallet-manager/wallet-manager.test.ts @@ -1,12 +1,13 @@ import { Address } from '@fuel-ts/address'; import { hashMessage } from '@fuel-ts/hasher'; -import { Signer } from '@fuel-ts/signer'; -import { Wallet } from '@fuel-ts/wallet'; -import MemoryStorage from './storages/memory-storage'; +import WalletManagerSpec from '../../test/fixtures/wallet-manager-spec'; +import { Signer } from '../signer'; +import { Wallet } from '../wallet'; + +import { MemoryStorage } from './storages/memory-storage'; import type { VaultConfig } from './types'; import { WalletManager } from './wallet-manager'; -import WalletManagerSpec from './wallet-manager-spec'; /** * @group node diff --git a/packages/wallet-manager/src/wallet-manager.ts b/packages/account/src/wallet-manager/wallet-manager.ts similarity index 96% rename from packages/wallet-manager/src/wallet-manager.ts rename to packages/account/src/wallet-manager/wallet-manager.ts index fd4f710f15..75f78170e9 100644 --- a/packages/wallet-manager/src/wallet-manager.ts +++ b/packages/account/src/wallet-manager/wallet-manager.ts @@ -3,13 +3,14 @@ import type { Keystore } from '@fuel-ts/crypto'; import { encrypt, decrypt } from '@fuel-ts/crypto'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; import type { AbstractAddress } from '@fuel-ts/interfaces'; -import type { WalletUnlocked } from '@fuel-ts/wallet'; import { EventEmitter } from 'events'; -import MemoryStorage from './storages/memory-storage'; +import type { WalletUnlocked } from '../wallet'; + +import { MemoryStorage } from './storages/memory-storage'; import type { StorageAbstract, - Account, + WalletManagerAccount, VaultConfig, VaultsState, WalletManagerOptions, @@ -101,9 +102,9 @@ export class WalletManager extends EventEmitter { /** * List all accounts on the Wallet Manager not vault information is revealed */ - getAccounts(): Array { - // Return all accounts from vaults - return this.#vaults.flatMap((vaultState, vaultId) => + getAccounts(): Array { + // Return all WalletManagerAccounts from vaults + return this.#vaults.flatMap((vaultState, vaultId) => vaultState.vault.getAccounts().map((account) => ({ ...account, vaultId })) ); } diff --git a/packages/wallet/src/base-unlocked-wallet.ts b/packages/account/src/wallet/base-wallet-unlocked.ts similarity index 96% rename from packages/wallet/src/base-unlocked-wallet.ts rename to packages/account/src/wallet/base-wallet-unlocked.ts index 69a1912a25..aad8c32af8 100644 --- a/packages/wallet/src/base-unlocked-wallet.ts +++ b/packages/account/src/wallet/base-wallet-unlocked.ts @@ -1,16 +1,17 @@ import { hashMessage } from '@fuel-ts/hasher'; +import type { BytesLike } from 'ethers'; + +import { Account } from '../account'; +import { transactionRequestify } from '../providers'; import type { TransactionResponse, TransactionRequestLike, CallResult, Provider, ProviderSendTxParams, -} from '@fuel-ts/providers'; -import { transactionRequestify } from '@fuel-ts/providers'; -import { Signer } from '@fuel-ts/signer'; -import type { BytesLike } from 'ethers'; +} from '../providers'; +import { Signer } from '../signer'; -import { Account } from './account'; import { encryptKeystoreWallet } from './keystore-wallet'; /** diff --git a/packages/account/src/wallet/index.ts b/packages/account/src/wallet/index.ts new file mode 100644 index 0000000000..3f2a2854e2 --- /dev/null +++ b/packages/account/src/wallet/index.ts @@ -0,0 +1,3 @@ +export * from './base-wallet-unlocked'; +export * from './wallet'; +export * from './wallets'; diff --git a/packages/wallet/src/keystore-wallet.test.ts b/packages/account/src/wallet/keystore-wallet.test.ts similarity index 100% rename from packages/wallet/src/keystore-wallet.test.ts rename to packages/account/src/wallet/keystore-wallet.test.ts diff --git a/packages/wallet/src/keystore-wallet.ts b/packages/account/src/wallet/keystore-wallet.ts similarity index 100% rename from packages/wallet/src/keystore-wallet.ts rename to packages/account/src/wallet/keystore-wallet.ts diff --git a/packages/wallet/src/wallet-unlocked.test.ts b/packages/account/src/wallet/wallet-unlocked.test.ts similarity index 96% rename from packages/wallet/src/wallet-unlocked.test.ts rename to packages/account/src/wallet/wallet-unlocked.test.ts index bbcb387f62..064988418e 100644 --- a/packages/wallet/src/wallet-unlocked.test.ts +++ b/packages/account/src/wallet/wallet-unlocked.test.ts @@ -1,17 +1,17 @@ import { randomBytes } from '@fuel-ts/crypto'; import { hashMessage } from '@fuel-ts/hasher'; -import type { CallResult, TransactionResponse, TransactionRequestLike } from '@fuel-ts/providers'; -import { Provider } from '@fuel-ts/providers'; -import * as providersMod from '@fuel-ts/providers'; -import { Signer } from '@fuel-ts/signer'; import type { BytesLike } from 'ethers'; -import { SCRIPT_TX_REQUEST, SIGNED_TX, PRIVATE_KEY } from '../test/fixtures/wallet-unlocked'; +import walletSpec from '../../test/fixtures/wallet-spec'; +import { SCRIPT_TX_REQUEST, SIGNED_TX, PRIVATE_KEY } from '../../test/fixtures/wallet-unlocked'; +import { FUEL_NETWORK_URL } from '../configs'; +import * as providersMod from '../providers'; +import { Provider } from '../providers'; +import type { CallResult, TransactionResponse, TransactionRequestLike } from '../providers'; +import { Signer } from '../signer'; -import { BaseWalletUnlocked } from './base-unlocked-wallet'; -import { FUEL_NETWORK_URL } from './configs'; +import { BaseWalletUnlocked } from './base-wallet-unlocked'; import * as keystoreWMod from './keystore-wallet'; -import walletSpec from './wallet-spec'; import { WalletLocked, WalletUnlocked } from './wallets'; const { ScriptTransactionRequest } = providersMod; diff --git a/packages/wallet/src/wallet.test.ts b/packages/account/src/wallet/wallet.test.ts similarity index 97% rename from packages/wallet/src/wallet.test.ts rename to packages/account/src/wallet/wallet.test.ts index af9617c272..5f6d4a1198 100644 --- a/packages/wallet/src/wallet.test.ts +++ b/packages/account/src/wallet/wallet.test.ts @@ -2,11 +2,12 @@ import { BaseAssetId } from '@fuel-ts/address/configs'; import { safeExec } from '@fuel-ts/errors/test-utils'; import type { BN } from '@fuel-ts/math'; import { bn } from '@fuel-ts/math'; -import type { TransactionRequestLike, TransactionResponse } from '@fuel-ts/providers'; -import { transactionRequestify, Provider } from '@fuel-ts/providers'; -import { FUEL_NETWORK_URL } from './configs'; -import { generateTestWallet } from './test-utils/generateTestWallet'; +import { FUEL_NETWORK_URL } from '../configs'; +import { transactionRequestify, Provider } from '../providers'; +import type { TransactionRequestLike, TransactionResponse } from '../providers'; +import { generateTestWallet } from '../test-utils/generateTestWallet'; + import { Wallet } from './wallet'; import { WalletLocked, WalletUnlocked } from './wallets'; diff --git a/packages/wallet/src/wallet.ts b/packages/account/src/wallet/wallet.ts similarity index 98% rename from packages/wallet/src/wallet.ts rename to packages/account/src/wallet/wallet.ts index 13cba2b6ed..bb33fc32a5 100644 --- a/packages/wallet/src/wallet.ts +++ b/packages/account/src/wallet/wallet.ts @@ -1,7 +1,8 @@ import type { AbstractAddress } from '@fuel-ts/interfaces'; -import type { Provider } from '@fuel-ts/providers'; import type { BytesLike } from 'ethers'; +import type { Provider } from '../providers'; + import { WalletLocked, WalletUnlocked } from './wallets'; /** diff --git a/packages/wallet/src/wallets.ts b/packages/account/src/wallet/wallets.ts similarity index 90% rename from packages/wallet/src/wallets.ts rename to packages/account/src/wallet/wallets.ts index 1cd7360148..099784222e 100644 --- a/packages/wallet/src/wallets.ts +++ b/packages/account/src/wallet/wallets.ts @@ -3,16 +3,22 @@ // it's not possible to split the two classes in different files // /* eslint-disable max-classes-per-file */ -import { HDWallet } from '@fuel-ts/hdwallet'; -import { Mnemonic } from '@fuel-ts/mnemonic'; -import type { Provider } from '@fuel-ts/providers'; -import { Signer } from '@fuel-ts/signer'; import type { BytesLike } from 'ethers'; -import { Account } from './account'; -import { BaseWalletUnlocked } from './base-unlocked-wallet'; +import { Account } from '../account'; +import { HDWallet } from '../hdwallet'; +import { Mnemonic } from '../mnemonic'; +import type { Provider } from '../providers'; +import { Signer } from '../signer'; + +import { BaseWalletUnlocked } from './base-wallet-unlocked'; import { decryptKeystoreWallet } from './keystore-wallet'; -import type { GenerateOptions } from './types/GenerateOptions'; + +export interface GenerateOptions { + /** Additional entropy for the random bytes */ + entropy?: BytesLike; + provider?: Provider; +} /** * `WalletLocked` provides the functionalities for a locked wallet. diff --git a/packages/wordlists/src/index.ts b/packages/account/src/wordlists/index.ts similarity index 100% rename from packages/wordlists/src/index.ts rename to packages/account/src/wordlists/index.ts diff --git a/packages/wordlists/src/wordlists.test.ts b/packages/account/src/wordlists/words/english.test.ts similarity index 80% rename from packages/wordlists/src/wordlists.test.ts rename to packages/account/src/wordlists/words/english.test.ts index 3d72a3e917..475d218472 100644 --- a/packages/wordlists/src/wordlists.test.ts +++ b/packages/account/src/wordlists/words/english.test.ts @@ -1,6 +1,6 @@ import { createHash } from 'crypto'; -import { english } from './words/english'; +import { english } from './english'; const checksum = (wordlists: string[]) => createHash('sha256') @@ -11,7 +11,7 @@ const checksum = (wordlists: string[]) => * @group node */ describe('Checksum word lists', () => { - test('Checksum english list', () => { + it('should checksum english word list', () => { expect(checksum(english)).toBe( '2f5eed53a4727b4bf8880d8f3f199efc90e58503646d9ff8eff3a2ed3b24dbda' ); diff --git a/packages/wordlists/src/words/english.ts b/packages/account/src/wordlists/words/english.ts similarity index 100% rename from packages/wordlists/src/words/english.ts rename to packages/account/src/wordlists/words/english.ts diff --git a/packages/providers/test/auto-retry-fetch.test.ts b/packages/account/test/auto-retry-fetch.test.ts similarity index 79% rename from packages/providers/test/auto-retry-fetch.test.ts rename to packages/account/test/auto-retry-fetch.test.ts index cb0d6b7717..157107e6f6 100644 --- a/packages/providers/test/auto-retry-fetch.test.ts +++ b/packages/account/test/auto-retry-fetch.test.ts @@ -1,8 +1,8 @@ -import Provider from '../src/provider'; -import type { RetryOptions } from '../src/utils/auto-retry-fetch'; -import * as autoRetryFetchMod from '../src/utils/auto-retry-fetch'; +import Provider from '../src/providers/provider'; +import * as autoRetryFetchMod from '../src/providers/utils/auto-retry-fetch'; +import type { RetryOptions } from '../src/providers/utils/auto-retry-fetch'; -// TODO: Figure out a way to import this constant from `@fuel-ts/wallet/configs` +// TODO: Figure out a way to import this constant from `@fuel-ts/account/configs` const FUEL_NETWORK_URL = 'http://127.0.0.1:4000/graphql'; /** diff --git a/packages/providers/test/fixtures/chain.ts b/packages/account/test/fixtures/chain.ts similarity index 98% rename from packages/providers/test/fixtures/chain.ts rename to packages/account/test/fixtures/chain.ts index ebfd6a5d97..da6cf63447 100644 --- a/packages/providers/test/fixtures/chain.ts +++ b/packages/account/test/fixtures/chain.ts @@ -1,4 +1,4 @@ -import type { GqlChainInfoFragmentFragment } from '../../src/__generated__/operations'; +import type { GqlChainInfoFragmentFragment } from '../../src/providers/__generated__/operations'; export const MOCK_CHAIN: GqlChainInfoFragmentFragment = { __typename: 'ChainInfo', diff --git a/packages/hdwallet/src/hdwallet-spec.ts b/packages/account/test/fixtures/hdwallet-spec.ts similarity index 100% rename from packages/hdwallet/src/hdwallet-spec.ts rename to packages/account/test/fixtures/hdwallet-spec.ts diff --git a/packages/providers/test/fixtures/index.ts b/packages/account/test/fixtures/index.ts similarity index 100% rename from packages/providers/test/fixtures/index.ts rename to packages/account/test/fixtures/index.ts diff --git a/packages/providers/test/fixtures/inputs-and-outputs.ts b/packages/account/test/fixtures/inputs-and-outputs.ts similarity index 96% rename from packages/providers/test/fixtures/inputs-and-outputs.ts rename to packages/account/test/fixtures/inputs-and-outputs.ts index 0bd4c322ff..33e864d307 100644 --- a/packages/providers/test/fixtures/inputs-and-outputs.ts +++ b/packages/account/test/fixtures/inputs-and-outputs.ts @@ -6,14 +6,12 @@ import { InputType, OutputType } from '@fuel-ts/transactions'; import type { CoinTransactionRequestInput, - ContractTransactionRequestInput, MessageTransactionRequestInput, -} from '../../src/transaction-request/input'; -import type { - ChangeTransactionRequestOutput, + ContractTransactionRequestInput, CoinTransactionRequestOutput, ContractTransactionRequestOutput, -} from '../../src/transaction-request/output'; + ChangeTransactionRequestOutput, +} from '../../src'; export const MOCK_COIN_INPUT: InputCoin = { type: InputType.Coin, diff --git a/packages/account/test/fixtures/messageProof.ts b/packages/account/test/fixtures/messageProof.ts new file mode 100644 index 0000000000..e373d7115a --- /dev/null +++ b/packages/account/test/fixtures/messageProof.ts @@ -0,0 +1,96 @@ +import { Address } from '@fuel-ts/address'; +import { bn } from '@fuel-ts/math'; + +import type { GqlGetMessageProofQuery } from '../../src/providers/__generated__/operations'; +import type { MessageProof } from '../../src/providers/message'; + +export const MESSAGE_PROOF_RAW_RESPONSE: GqlGetMessageProofQuery['messageProof'] = { + __typename: 'MessageProof', + messageProof: { + __typename: 'MerkleProof', + proofSet: ['0x34fdfbc73458998a106b02f13bba51bc0fd36513602e312ca1d1893f2075eca5'], + proofIndex: '0', + }, + blockProof: { + __typename: 'MerkleProof', + proofSet: [ + '0x3480098c927d3a8a86745ba6c91419f04901baf5d25bbd0e6ba56fcb3b3e35bd', + '0xa8795e5d15b88c2383f5673a4658edae93dcdb7986ccfacbe916e656ec11ce70', + '0x97ea3aee8cb9ccc6593c21879979eeab0f748066b9e22e2294cb973ee5d95e3c', + '0x50a33f4fe58e35955df499092515fe2f77d7bfaed35f80194b338d7091c363ab', + '0xa07fc684d351ab1970efe9ffd04eb67b6544dd4443169ecf6dd0bfc546216211', + ], + proofIndex: '432', + }, + messageBlockHeader: { + __typename: 'Header', + id: '0x864b55089878bf7009d2ff64cbeeeeb75fcd73768785dcb75d54180e7fbaab7b', + daHeight: '0', + transactionsCount: '2', + transactionsRoot: '0xbf760e126159b72f59bde2d59a972620f826e5a5134deb2a775a21c37644e1a1', + messageReceiptCount: '1', + messageReceiptRoot: '0x34fdfbc73458998a106b02f13bba51bc0fd36513602e312ca1d1893f2075eca5', + height: '432', + prevRoot: '0x26e49e4af2253e0bca68d2a8b38fa7406a546ebc476b6ca51569cb325ad55ea6', + time: '4611686020115956241', + applicationHash: '0x76b6838a38a3049fa1dd42f923a0f287594a390493003af0f1c3da94f3d2b8c7', + }, + commitBlockHeader: { + __typename: 'Header', + id: '0xe4dfe8fc1b5de2c669efbcc5e4c0a61db175d1b2f03e3cd46ed4396e76695c5b', + daHeight: '0', + transactionsCount: '2', + transactionsRoot: '0x471d68713ae2fef6bb3eede37a976b38390f2ab8916e463b22942e7130456a8a', + messageReceiptRoot: '0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', + messageReceiptCount: '0', + height: '433', + prevRoot: '0xcc024475c2ccd175082bc233f5ebb3736e47a648a666d82567b001ab46cf0a83', + time: '4611686020115956241', + applicationHash: '0x441dece8e41d111f3a875ed89d716e48abf450ad385b111cf7c55e06e0b57d6b', + }, + sender: '0x79c54219a5c910979e5e4c2728df163fa654a1fe03843e6af59daa2c3fcd42ea', + recipient: '0x00000000000000000000000047ba61eec8e5e65247d717ff236f504cf3b0a263', + nonce: '0x3e87e0f44613cabecd1aad381ad41a433afb12ec5c54c172de3db25b1b4d1b53', + amount: '10', + data: '0x', +}; + +export const MESSAGE_PROOF: MessageProof = { + messageProof: { + proofIndex: bn(MESSAGE_PROOF_RAW_RESPONSE.messageProof.proofIndex), + proofSet: MESSAGE_PROOF_RAW_RESPONSE.messageProof.proofSet, + }, + blockProof: { + proofIndex: bn(MESSAGE_PROOF_RAW_RESPONSE.blockProof.proofIndex), + proofSet: MESSAGE_PROOF_RAW_RESPONSE.blockProof.proofSet, + }, + messageBlockHeader: { + id: MESSAGE_PROOF_RAW_RESPONSE.messageBlockHeader.id, + daHeight: bn(MESSAGE_PROOF_RAW_RESPONSE.messageBlockHeader.daHeight), + transactionsCount: bn(MESSAGE_PROOF_RAW_RESPONSE.messageBlockHeader.transactionsCount), + transactionsRoot: MESSAGE_PROOF_RAW_RESPONSE.messageBlockHeader.transactionsRoot, + height: bn(MESSAGE_PROOF_RAW_RESPONSE.messageBlockHeader.height), + prevRoot: MESSAGE_PROOF_RAW_RESPONSE.messageBlockHeader.prevRoot, + time: MESSAGE_PROOF_RAW_RESPONSE.messageBlockHeader.time, + applicationHash: MESSAGE_PROOF_RAW_RESPONSE.messageBlockHeader.applicationHash, + messageReceiptRoot: MESSAGE_PROOF_RAW_RESPONSE.messageBlockHeader.messageReceiptRoot, + messageReceiptCount: bn(MESSAGE_PROOF_RAW_RESPONSE.messageBlockHeader.messageReceiptCount), + }, + commitBlockHeader: { + id: MESSAGE_PROOF_RAW_RESPONSE.commitBlockHeader.id, + daHeight: bn(MESSAGE_PROOF_RAW_RESPONSE.commitBlockHeader.daHeight), + transactionsCount: bn(MESSAGE_PROOF_RAW_RESPONSE.commitBlockHeader.transactionsCount), + transactionsRoot: MESSAGE_PROOF_RAW_RESPONSE.commitBlockHeader.transactionsRoot, + height: bn(MESSAGE_PROOF_RAW_RESPONSE.commitBlockHeader.height), + prevRoot: MESSAGE_PROOF_RAW_RESPONSE.commitBlockHeader.prevRoot, + time: MESSAGE_PROOF_RAW_RESPONSE.commitBlockHeader.time, + applicationHash: MESSAGE_PROOF_RAW_RESPONSE.commitBlockHeader.applicationHash, + messageReceiptRoot: MESSAGE_PROOF_RAW_RESPONSE.commitBlockHeader.messageReceiptRoot, + messageReceiptCount: bn(MESSAGE_PROOF_RAW_RESPONSE.commitBlockHeader.messageReceiptCount), + }, + sender: Address.fromAddressOrString(MESSAGE_PROOF_RAW_RESPONSE.sender), + recipient: Address.fromAddressOrString(MESSAGE_PROOF_RAW_RESPONSE.recipient), + nonce: MESSAGE_PROOF_RAW_RESPONSE.nonce, + amount: bn(MESSAGE_PROOF_RAW_RESPONSE.amount), + data: MESSAGE_PROOF_RAW_RESPONSE.data, +}; diff --git a/packages/providers/test/fixtures/messageStatus.ts b/packages/account/test/fixtures/messageStatus.ts similarity index 55% rename from packages/providers/test/fixtures/messageStatus.ts rename to packages/account/test/fixtures/messageStatus.ts index 2de13c3d27..3b00c0b517 100644 --- a/packages/providers/test/fixtures/messageStatus.ts +++ b/packages/account/test/fixtures/messageStatus.ts @@ -1,4 +1,7 @@ -import { GqlMessageState, type GqlGetMessageStatusQuery } from '../../src/__generated__/operations'; +import { + GqlMessageState, + type GqlGetMessageStatusQuery, +} from '../../src/providers/__generated__/operations'; export const messageStatusResponse: Omit = { diff --git a/packages/mnemonic/src/mnemonic-specs.ts b/packages/account/test/fixtures/mnemonic-specs.ts similarity index 100% rename from packages/mnemonic/src/mnemonic-specs.ts rename to packages/account/test/fixtures/mnemonic-specs.ts diff --git a/packages/providers/test/fixtures/nodeInfo.ts b/packages/account/test/fixtures/nodeInfo.ts similarity index 70% rename from packages/providers/test/fixtures/nodeInfo.ts rename to packages/account/test/fixtures/nodeInfo.ts index f35097effa..ab98e21b59 100644 --- a/packages/providers/test/fixtures/nodeInfo.ts +++ b/packages/account/test/fixtures/nodeInfo.ts @@ -1,4 +1,4 @@ -import type { GqlNodeInfoFragmentFragment } from '../../src/__generated__/operations'; +import type { GqlNodeInfoFragmentFragment } from '../../src/providers/__generated__/operations'; export const MOCK_NODE_INFO: GqlNodeInfoFragmentFragment = { __typename: 'NodeInfo', diff --git a/packages/predicate/test/fixtures/abi/default.ts b/packages/account/test/fixtures/predicate-abi.ts similarity index 92% rename from packages/predicate/test/fixtures/abi/default.ts rename to packages/account/test/fixtures/predicate-abi.ts index 492c6021fa..df0ab35435 100644 --- a/packages/predicate/test/fixtures/abi/default.ts +++ b/packages/account/test/fixtures/predicate-abi.ts @@ -1,6 +1,6 @@ import type { JsonAbi } from '@fuel-ts/abi-coder'; -export const defaultPredicateAbi: JsonAbi = { +export const predicateAbi: JsonAbi = { types: [ { typeId: 0, diff --git a/packages/predicate/test/fixtures/bytecode/default.ts b/packages/account/test/fixtures/predicate-bytecode.ts similarity index 77% rename from packages/predicate/test/fixtures/bytecode/default.ts rename to packages/account/test/fixtures/predicate-bytecode.ts index a6afa8bdd8..f9d2393540 100644 --- a/packages/predicate/test/fixtures/bytecode/default.ts +++ b/packages/account/test/fixtures/predicate-bytecode.ts @@ -1,2 +1,2 @@ -export const defaultPredicateBytecode = +export const predicateBytecode = '0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8'; diff --git a/packages/providers/test/fixtures/receipts.ts b/packages/account/test/fixtures/receipts.ts similarity index 89% rename from packages/providers/test/fixtures/receipts.ts rename to packages/account/test/fixtures/receipts.ts index b1e3430ffa..5438349429 100644 --- a/packages/providers/test/fixtures/receipts.ts +++ b/packages/account/test/fixtures/receipts.ts @@ -1,5 +1,5 @@ -import { GqlReceiptType } from '../../src/__generated__/operations'; -import type { GqlReceiptFragmentFragment } from '../../src/__generated__/operations'; +import type { GqlReceiptFragmentFragment } from '../../src/providers/__generated__/operations'; +import { GqlReceiptType } from '../../src/providers/__generated__/operations'; export const MOCK_GQL_RECEIPT_FRAGMENT: GqlReceiptFragmentFragment = { receiptType: GqlReceiptType.Call, diff --git a/packages/providers/test/fixtures/transaction-request.ts b/packages/account/test/fixtures/transaction-request.ts similarity index 89% rename from packages/providers/test/fixtures/transaction-request.ts rename to packages/account/test/fixtures/transaction-request.ts index cf2f7657b0..e7b3a7a0c6 100644 --- a/packages/providers/test/fixtures/transaction-request.ts +++ b/packages/account/test/fixtures/transaction-request.ts @@ -1,4 +1,4 @@ -import { ScriptTransactionRequest } from '../../src/transaction-request/script-transaction-request'; +import { ScriptTransactionRequest } from '../../src/providers/transaction-request/script-transaction-request'; export const SCRIPT_TX_REQUEST = new ScriptTransactionRequest({ gasLimit: 10_000, diff --git a/packages/providers/test/fixtures/transaction-summary.ts b/packages/account/test/fixtures/transaction-summary.ts similarity index 99% rename from packages/providers/test/fixtures/transaction-summary.ts rename to packages/account/test/fixtures/transaction-summary.ts index ab2b2d51ba..202c88fbd1 100644 --- a/packages/providers/test/fixtures/transaction-summary.ts +++ b/packages/account/test/fixtures/transaction-summary.ts @@ -14,20 +14,18 @@ import { InputType, OutputType, ReceiptType, TransactionType } from '@fuel-ts/tr import type { TransactionResultCallReceipt, - TransactionResultMessageOutReceipt, - TransactionResultReturnDataReceipt, TransactionResultReturnReceipt, - TransactionResultScriptResultReceipt, - TransactionResultTransferOutReceipt, TransactionResultTransferReceipt, -} from '../../src'; -import type { + TransactionResultTransferOutReceipt, + TransactionResultReturnDataReceipt, + TransactionResultMessageOutReceipt, + TransactionResultScriptResultReceipt, AbiMap, + SuccessStatus, FailureStatus, - SqueezedOutStatus, SubmittedStatus, - SuccessStatus, -} from '../../src/transaction-summary/types'; + SqueezedOutStatus, +} from '../../src'; export const MOCK_INPUT_COIN: InputCoin = { amount: bn(4999989993), diff --git a/packages/wallet-manager/src/wallet-manager-spec.ts b/packages/account/test/fixtures/wallet-manager-spec.ts similarity index 100% rename from packages/wallet-manager/src/wallet-manager-spec.ts rename to packages/account/test/fixtures/wallet-manager-spec.ts diff --git a/packages/wallet/src/wallet-spec.ts b/packages/account/test/fixtures/wallet-spec.ts similarity index 95% rename from packages/wallet/src/wallet-spec.ts rename to packages/account/test/fixtures/wallet-spec.ts index 7432b3f33d..2dbcf15244 100644 --- a/packages/wallet/src/wallet-spec.ts +++ b/packages/account/test/fixtures/wallet-spec.ts @@ -1,4 +1,4 @@ -import { FUEL_NETWORK_URL } from './configs'; +import { FUEL_NETWORK_URL } from '../../src/configs'; export default { mnemonic: diff --git a/packages/wallet/test/fixtures/wallet-unlocked.ts b/packages/account/test/fixtures/wallet-unlocked.ts similarity index 96% rename from packages/wallet/test/fixtures/wallet-unlocked.ts rename to packages/account/test/fixtures/wallet-unlocked.ts index 1e8b8a1932..405199f04f 100644 --- a/packages/wallet/test/fixtures/wallet-unlocked.ts +++ b/packages/account/test/fixtures/wallet-unlocked.ts @@ -1,4 +1,4 @@ -import { ScriptTransactionRequest } from '@fuel-ts/providers'; +import { ScriptTransactionRequest } from '../../src/providers'; export const SCRIPT_TX_REQUEST = new ScriptTransactionRequest({ gasLimit: 5_000, diff --git a/packages/predicate/test/features/predicate-functions.test.ts b/packages/account/test/predicate-functions.test.ts similarity index 63% rename from packages/predicate/test/features/predicate-functions.test.ts rename to packages/account/test/predicate-functions.test.ts index ecdba186b4..d160c10a04 100644 --- a/packages/predicate/test/features/predicate-functions.test.ts +++ b/packages/account/test/predicate-functions.test.ts @@ -1,9 +1,9 @@ -import { Provider } from '@fuel-ts/providers'; -import { FUEL_NETWORK_URL } from '@fuel-ts/wallet/configs'; +import { FUEL_NETWORK_URL } from '../src/configs'; +import { Predicate } from '../src/predicate'; +import { Provider } from '../src/providers'; -import { Predicate } from '../../src/predicate'; -import { defaultPredicateAbi } from '../fixtures/abi/default'; -import { defaultPredicateBytecode } from '../fixtures/bytecode/default'; +import { predicateAbi } from './fixtures/predicate-abi'; +import { predicateBytecode } from './fixtures/predicate-bytecode'; /** * @group node @@ -19,12 +19,12 @@ describe('Predicate', () => { }); it('sets predicate address for given byte code', () => { - const predicate = new Predicate(defaultPredicateBytecode, provider); + const predicate = new Predicate(predicateBytecode, provider); expect(predicate.address.toB256()).toEqual(predicateAddress); }); it('sets predicate data for given ABI', () => { - const predicate = new Predicate(defaultPredicateBytecode, provider, defaultPredicateAbi); + const predicate = new Predicate(predicateBytecode, provider, predicateAbi); const b256 = '0x0101010101010101010101010101010101010101010101010101010101010101'; expect(predicate.predicateArgs).toEqual([]); @@ -36,17 +36,17 @@ describe('Predicate', () => { it('throws when predicate ABI has no main function', () => { const abiWithNoMain = { - ...defaultPredicateAbi, + ...predicateAbi, functions: [ { - ...defaultPredicateAbi.functions[0], + ...predicateAbi.functions[0], name: 'notMain', }, ], }; expect(() => { - const predicate = new Predicate(defaultPredicateBytecode, provider, abiWithNoMain, { + const predicate = new Predicate(predicateBytecode, provider, abiWithNoMain, { value: 1, }); diff --git a/packages/hdwallet/tsconfig.dts.json b/packages/account/tsconfig.dts.json similarity index 100% rename from packages/hdwallet/tsconfig.dts.json rename to packages/account/tsconfig.dts.json diff --git a/packages/predicate/tsconfig.json b/packages/account/tsconfig.json similarity index 73% rename from packages/predicate/tsconfig.json rename to packages/account/tsconfig.json index b0fced27d7..fc5bdb4c4e 100644 --- a/packages/predicate/tsconfig.json +++ b/packages/account/tsconfig.json @@ -3,5 +3,5 @@ "compilerOptions": { "outDir": "./dist" }, - "include": ["src"] + "include": ["src", "test/**/*"] } diff --git a/packages/hdwallet/tsdoc.json b/packages/account/tsdoc.json similarity index 100% rename from packages/hdwallet/tsdoc.json rename to packages/account/tsdoc.json diff --git a/packages/wallet/tsup.config.ts b/packages/account/tsup.config.ts similarity index 83% rename from packages/wallet/tsup.config.ts rename to packages/account/tsup.config.ts index 11113786da..d5bc499edc 100644 --- a/packages/wallet/tsup.config.ts +++ b/packages/account/tsup.config.ts @@ -6,7 +6,7 @@ const configs: Options = { entry: { index: 'src/index.ts', configs: 'src/configs.ts', - 'test-utils': 'src/test-utils.ts', + 'test-utils': 'src/test-utils/index.ts', }, }; diff --git a/packages/predicate/typedoc.json b/packages/account/typedoc.json similarity index 100% rename from packages/predicate/typedoc.json rename to packages/account/typedoc.json diff --git a/packages/contract/package.json b/packages/contract/package.json index 33b48e213b..de5e231ec8 100644 --- a/packages/contract/package.json +++ b/packages/contract/package.json @@ -30,11 +30,10 @@ "@fuel-ts/crypto": "workspace:*", "@fuel-ts/merkle": "workspace:*", "@fuel-ts/program": "workspace:*", - "@fuel-ts/providers": "workspace:*", "@fuel-ts/transactions": "workspace:*", "@fuel-ts/utils": "workspace:*", "@fuel-ts/versions": "workspace:*", - "@fuel-ts/wallet": "workspace:*", + "@fuel-ts/account": "workspace:*", "@fuel-ts/errors": "workspace:*", "ethers": "^6.7.1" }, diff --git a/packages/contract/src/contract-factory.ts b/packages/contract/src/contract-factory.ts index 6838e6fbfe..dc1f1b6056 100644 --- a/packages/contract/src/contract-factory.ts +++ b/packages/contract/src/contract-factory.ts @@ -1,12 +1,11 @@ import { Interface } from '@fuel-ts/abi-coder'; import type { JsonAbi, InputValue } from '@fuel-ts/abi-coder'; +import { CreateTransactionRequest } from '@fuel-ts/account'; +import type { Account, CreateTransactionRequestLike, Provider } from '@fuel-ts/account'; import { randomBytes } from '@fuel-ts/crypto'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; import { Contract } from '@fuel-ts/program'; -import type { CreateTransactionRequestLike, Provider } from '@fuel-ts/providers'; -import { CreateTransactionRequest } from '@fuel-ts/providers'; import type { StorageSlot } from '@fuel-ts/transactions'; -import type { Account } from '@fuel-ts/wallet'; import { getBytesCopy, type BytesLike } from 'ethers'; import { getContractId, getContractStorageRoot, hexlifyWithPrefix } from './util'; diff --git a/packages/errors/src/test-utils/expect-to-throw-fuel-error.test.ts b/packages/errors/src/test-utils/expect-to-throw-fuel-error.test.ts index bd20f07f35..9738309029 100644 --- a/packages/errors/src/test-utils/expect-to-throw-fuel-error.test.ts +++ b/packages/errors/src/test-utils/expect-to-throw-fuel-error.test.ts @@ -1,4 +1,4 @@ -import { FuelError } from '..'; +import { FuelError } from '../fuel-error'; import { expectToThrowFuelError } from './expect-to-throw-fuel-error'; diff --git a/packages/fuel-gauge/package.json b/packages/fuel-gauge/package.json index 95c377556c..f4016528e6 100644 --- a/packages/fuel-gauge/package.json +++ b/packages/fuel-gauge/package.json @@ -15,7 +15,7 @@ "fuels": "workspace:*" }, "devDependencies": { - "@fuel-ts/wallet": "workspace:*", + "@fuel-ts/account": "workspace:*", "@fuel-ts/forc": "workspace:*", "@fuel-ts/utils": "workspace:*", "@fuel-ts/errors": "workspace:*" diff --git a/packages/fuel-gauge/src/auth-testing.test.ts b/packages/fuel-gauge/src/auth-testing.test.ts index ff7c9faa10..14c17be85f 100644 --- a/packages/fuel-gauge/src/auth-testing.test.ts +++ b/packages/fuel-gauge/src/auth-testing.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import type { BN, Contract, WalletUnlocked } from 'fuels'; import { AssertFailedRevertError, diff --git a/packages/fuel-gauge/src/await-execution.test.ts b/packages/fuel-gauge/src/await-execution.test.ts index 34010ac7b9..60743e48c8 100644 --- a/packages/fuel-gauge/src/await-execution.test.ts +++ b/packages/fuel-gauge/src/await-execution.test.ts @@ -1,4 +1,4 @@ -import { launchNode } from '@fuel-ts/wallet/test-utils'; +import { launchNode } from '@fuel-ts/account/test-utils'; import { Provider, WalletUnlocked, diff --git a/packages/fuel-gauge/src/bytes.test.ts b/packages/fuel-gauge/src/bytes.test.ts index be242c5aab..d05527c288 100644 --- a/packages/fuel-gauge/src/bytes.test.ts +++ b/packages/fuel-gauge/src/bytes.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import { bn, Predicate, Wallet, Address, BaseAssetId, Provider, FUEL_NETWORK_URL } from 'fuels'; import type { BN, Contract } from 'fuels'; diff --git a/packages/fuel-gauge/src/configurable-contract.test.ts b/packages/fuel-gauge/src/configurable-contract.test.ts index 92303dc840..6d5794fc63 100644 --- a/packages/fuel-gauge/src/configurable-contract.test.ts +++ b/packages/fuel-gauge/src/configurable-contract.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import type { CoinQuantityLike, WalletUnlocked } from 'fuels'; import { BN, ContractFactory, BaseAssetId, Provider, getRandomB256, FUEL_NETWORK_URL } from 'fuels'; diff --git a/packages/fuel-gauge/src/contract-factory.test.ts b/packages/fuel-gauge/src/contract-factory.test.ts index ffa9159db9..3102ef1b9a 100644 --- a/packages/fuel-gauge/src/contract-factory.test.ts +++ b/packages/fuel-gauge/src/contract-factory.test.ts @@ -1,6 +1,6 @@ +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import { FuelError, ErrorCode } from '@fuel-ts/errors'; import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import { BN, bn, diff --git a/packages/fuel-gauge/src/contract.test.ts b/packages/fuel-gauge/src/contract.test.ts index dda9d0d016..f2601a5200 100644 --- a/packages/fuel-gauge/src/contract.test.ts +++ b/packages/fuel-gauge/src/contract.test.ts @@ -1,6 +1,6 @@ +import { generateTestWallet, seedTestWallet } from '@fuel-ts/account/test-utils'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; -import { generateTestWallet, seedTestWallet } from '@fuel-ts/wallet/test-utils'; import type { TransactionRequestLike, TransactionResponse, diff --git a/packages/fuel-gauge/src/doc-examples.test.ts b/packages/fuel-gauge/src/doc-examples.test.ts index 5ce2eae57f..c1481d1c09 100644 --- a/packages/fuel-gauge/src/doc-examples.test.ts +++ b/packages/fuel-gauge/src/doc-examples.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet, seedTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet, seedTestWallet } from '@fuel-ts/account/test-utils'; import type { BN, Bech32Address, diff --git a/packages/fuel-gauge/src/fee.test.ts b/packages/fuel-gauge/src/fee.test.ts index fce6d11f66..b1325e5a14 100644 --- a/packages/fuel-gauge/src/fee.test.ts +++ b/packages/fuel-gauge/src/fee.test.ts @@ -1,5 +1,5 @@ +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import { expectToBeInRange } from '@fuel-ts/utils/test-utils'; -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import type { BN, BaseWalletUnlocked, CoinQuantityLike } from 'fuels'; import { BaseAssetId, diff --git a/packages/fuel-gauge/src/funding-transaction.test.ts b/packages/fuel-gauge/src/funding-transaction.test.ts index 6bb36b665d..de66865250 100644 --- a/packages/fuel-gauge/src/funding-transaction.test.ts +++ b/packages/fuel-gauge/src/funding-transaction.test.ts @@ -1,4 +1,4 @@ -import { seedTestWallet } from '@fuel-ts/wallet/test-utils'; +import { seedTestWallet } from '@fuel-ts/account/test-utils'; import type { Account, CoinTransactionRequestInput } from 'fuels'; import { FUEL_NETWORK_URL, diff --git a/packages/fuel-gauge/src/min-gas.test.ts b/packages/fuel-gauge/src/min-gas.test.ts index d9dfb2958c..e3d1fba147 100644 --- a/packages/fuel-gauge/src/min-gas.test.ts +++ b/packages/fuel-gauge/src/min-gas.test.ts @@ -1,4 +1,4 @@ -import { seedTestWallet } from '@fuel-ts/wallet/test-utils'; +import { seedTestWallet } from '@fuel-ts/account/test-utils'; import { ContractFactory, Wallet, diff --git a/packages/fuel-gauge/src/multi-token-contract.test.ts b/packages/fuel-gauge/src/multi-token-contract.test.ts index 6ec6d28cac..fdc56d2665 100644 --- a/packages/fuel-gauge/src/multi-token-contract.test.ts +++ b/packages/fuel-gauge/src/multi-token-contract.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import type { BN } from 'fuels'; import { Provider, Wallet, ContractFactory, bn, BaseAssetId, FUEL_NETWORK_URL } from 'fuels'; diff --git a/packages/fuel-gauge/src/policies.test.ts b/packages/fuel-gauge/src/policies.test.ts index 43f21e9c92..703856bb5c 100644 --- a/packages/fuel-gauge/src/policies.test.ts +++ b/packages/fuel-gauge/src/policies.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import type { BigNumberish, Transaction } from 'fuels'; import { BaseAssetId, diff --git a/packages/fuel-gauge/src/predicate-conditional-inputs.test.ts b/packages/fuel-gauge/src/predicate-conditional-inputs.test.ts index 0d54b84d22..8e53f11561 100644 --- a/packages/fuel-gauge/src/predicate-conditional-inputs.test.ts +++ b/packages/fuel-gauge/src/predicate-conditional-inputs.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import type { BN } from 'fuels'; import { Provider, diff --git a/packages/fuel-gauge/src/predicate/predicate-configurables.test.ts b/packages/fuel-gauge/src/predicate/predicate-configurables.test.ts index c4aec565fb..6783568275 100644 --- a/packages/fuel-gauge/src/predicate/predicate-configurables.test.ts +++ b/packages/fuel-gauge/src/predicate/predicate-configurables.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import type { BN, CoinQuantityLike } from 'fuels'; import { getRandomB256, diff --git a/packages/fuel-gauge/src/predicate/predicate-estimations.test.ts b/packages/fuel-gauge/src/predicate/predicate-estimations.test.ts index 0b75f2afbc..9e8f3c5c96 100644 --- a/packages/fuel-gauge/src/predicate/predicate-estimations.test.ts +++ b/packages/fuel-gauge/src/predicate/predicate-estimations.test.ts @@ -1,4 +1,4 @@ -import { seedTestWallet } from '@fuel-ts/wallet/test-utils'; +import { seedTestWallet } from '@fuel-ts/account/test-utils'; import type { CoinTransactionRequestInput, MessageTransactionRequestInput, diff --git a/packages/fuel-gauge/src/predicate/predicate-with-contract.test.ts b/packages/fuel-gauge/src/predicate/predicate-with-contract.test.ts index 40f8042183..4d076a6269 100644 --- a/packages/fuel-gauge/src/predicate/predicate-with-contract.test.ts +++ b/packages/fuel-gauge/src/predicate/predicate-with-contract.test.ts @@ -1,5 +1,5 @@ +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import { expectToBeInRange } from '@fuel-ts/utils/test-utils'; -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import type { BN, WalletUnlocked } from 'fuels'; import { BaseAssetId, diff --git a/packages/fuel-gauge/src/predicate/predicate-with-script.test.ts b/packages/fuel-gauge/src/predicate/predicate-with-script.test.ts index 94af3c6722..5c04585213 100644 --- a/packages/fuel-gauge/src/predicate/predicate-with-script.test.ts +++ b/packages/fuel-gauge/src/predicate/predicate-with-script.test.ts @@ -1,5 +1,5 @@ +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import { expectToBeInRange } from '@fuel-ts/utils/test-utils'; -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import type { BN, BigNumberish, WalletUnlocked } from 'fuels'; import { toNumber, BaseAssetId, Script, Provider, Predicate, FUEL_NETWORK_URL } from 'fuels'; diff --git a/packages/fuel-gauge/src/predicate/utils/predicate/setupContract.ts b/packages/fuel-gauge/src/predicate/utils/predicate/setupContract.ts index 1417e3a08c..8c3936ab9c 100644 --- a/packages/fuel-gauge/src/predicate/utils/predicate/setupContract.ts +++ b/packages/fuel-gauge/src/predicate/utils/predicate/setupContract.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import { BaseAssetId, ContractFactory, FUEL_NETWORK_URL, Provider } from 'fuels'; import type { Interface, JsonAbi, Contract, WalletUnlocked, BytesLike } from 'fuels'; diff --git a/packages/fuel-gauge/src/predicate/utils/predicate/setupWallets.ts b/packages/fuel-gauge/src/predicate/utils/predicate/setupWallets.ts index 9cc5f2341e..479ababf50 100644 --- a/packages/fuel-gauge/src/predicate/utils/predicate/setupWallets.ts +++ b/packages/fuel-gauge/src/predicate/utils/predicate/setupWallets.ts @@ -1,5 +1,5 @@ -import { Wallet } from '@fuel-ts/wallet'; -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { Wallet } from '@fuel-ts/account'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import { Address, BaseAssetId, FUEL_NETWORK_URL, Provider } from 'fuels'; export const setupWallets = async () => { diff --git a/packages/fuel-gauge/src/raw-slice.test.ts b/packages/fuel-gauge/src/raw-slice.test.ts index 0d5318a54f..d0ef484a53 100644 --- a/packages/fuel-gauge/src/raw-slice.test.ts +++ b/packages/fuel-gauge/src/raw-slice.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import { bn, Predicate, Wallet, Address, BaseAssetId, Provider, FUEL_NETWORK_URL } from 'fuels'; import type { BN, Contract } from 'fuels'; diff --git a/packages/fuel-gauge/src/revert-error.test.ts b/packages/fuel-gauge/src/revert-error.test.ts index 720709397a..525f9555da 100644 --- a/packages/fuel-gauge/src/revert-error.test.ts +++ b/packages/fuel-gauge/src/revert-error.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import type { BN, Contract, WalletUnlocked } from 'fuels'; import { ScriptResultDecoderError, diff --git a/packages/fuel-gauge/src/script-main-args.test.ts b/packages/fuel-gauge/src/script-main-args.test.ts index 02b99f0aa9..fa0ad4d1e2 100644 --- a/packages/fuel-gauge/src/script-main-args.test.ts +++ b/packages/fuel-gauge/src/script-main-args.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import type { BigNumberish } from 'fuels'; import { Provider, bn, Script, BaseAssetId, FUEL_NETWORK_URL } from 'fuels'; diff --git a/packages/fuel-gauge/src/script-with-configurable.test.ts b/packages/fuel-gauge/src/script-with-configurable.test.ts index 1296979cb8..ab20e3cafb 100644 --- a/packages/fuel-gauge/src/script-with-configurable.test.ts +++ b/packages/fuel-gauge/src/script-with-configurable.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import type { CoinQuantityLike, WalletUnlocked } from 'fuels'; import { BN, Script, BaseAssetId, Provider, FUEL_NETWORK_URL } from 'fuels'; diff --git a/packages/fuel-gauge/src/script-with-vectors.test.ts b/packages/fuel-gauge/src/script-with-vectors.test.ts index 36939e951a..45d12df514 100644 --- a/packages/fuel-gauge/src/script-with-vectors.test.ts +++ b/packages/fuel-gauge/src/script-with-vectors.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import type { BigNumberish, BN } from 'fuels'; import { BaseAssetId, FUEL_NETWORK_URL, Provider } from 'fuels'; diff --git a/packages/fuel-gauge/src/std-lib-string.test.ts b/packages/fuel-gauge/src/std-lib-string.test.ts index c7efa8b3e1..556b25271e 100644 --- a/packages/fuel-gauge/src/std-lib-string.test.ts +++ b/packages/fuel-gauge/src/std-lib-string.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import { bn, Predicate, Wallet, Address, BaseAssetId, Provider, FUEL_NETWORK_URL } from 'fuels'; import type { BN, Contract } from 'fuels'; diff --git a/packages/fuel-gauge/src/storage-test-contract.test.ts b/packages/fuel-gauge/src/storage-test-contract.test.ts index 97ce55bdc3..5da7a7a576 100644 --- a/packages/fuel-gauge/src/storage-test-contract.test.ts +++ b/packages/fuel-gauge/src/storage-test-contract.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import type { BN } from 'fuels'; import { toHex, Provider, ContractFactory, BaseAssetId, FUEL_NETWORK_URL } from 'fuels'; diff --git a/packages/fuel-gauge/src/token-test-contract.test.ts b/packages/fuel-gauge/src/token-test-contract.test.ts index 759aa01bac..e4fa650dc4 100644 --- a/packages/fuel-gauge/src/token-test-contract.test.ts +++ b/packages/fuel-gauge/src/token-test-contract.test.ts @@ -1,6 +1,6 @@ +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils'; -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import type { AssetId, BN } from 'fuels'; import { toHex, Provider, Wallet, ContractFactory, bn, BaseAssetId, FUEL_NETWORK_URL } from 'fuels'; diff --git a/packages/fuel-gauge/src/transaction-response.test.ts b/packages/fuel-gauge/src/transaction-response.test.ts index bdd2ec0030..4005e71b81 100644 --- a/packages/fuel-gauge/src/transaction-response.test.ts +++ b/packages/fuel-gauge/src/transaction-response.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet, launchNode } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet, launchNode } from '@fuel-ts/account/test-utils'; import type { BN } from 'fuels'; import { BaseAssetId, diff --git a/packages/fuel-gauge/src/transaction-summary.test.ts b/packages/fuel-gauge/src/transaction-summary.test.ts index dc9810fd70..b49d97f3e3 100644 --- a/packages/fuel-gauge/src/transaction-summary.test.ts +++ b/packages/fuel-gauge/src/transaction-summary.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import type { WalletUnlocked, TransactionResultReceipt, diff --git a/packages/fuel-gauge/src/utils.ts b/packages/fuel-gauge/src/utils.ts index c8579bae42..c7a0892b1a 100644 --- a/packages/fuel-gauge/src/utils.ts +++ b/packages/fuel-gauge/src/utils.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import { readFileSync } from 'fs'; import type { Interface, Contract, WalletUnlocked, JsonAbi, BytesLike } from 'fuels'; import { Script, Provider, ContractFactory, BaseAssetId, FUEL_NETWORK_URL } from 'fuels'; diff --git a/packages/fuel-gauge/src/vector-types.test.ts b/packages/fuel-gauge/src/vector-types.test.ts index 37912bbf3d..c43c8f3d75 100644 --- a/packages/fuel-gauge/src/vector-types.test.ts +++ b/packages/fuel-gauge/src/vector-types.test.ts @@ -1,4 +1,4 @@ -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import type { BN, BigNumberish } from 'fuels'; import { bn, Predicate, Wallet, Address, BaseAssetId, Provider, FUEL_NETWORK_URL } from 'fuels'; diff --git a/packages/fuels/package.json b/packages/fuels/package.json index d8f5f492c0..bfee4ecd1f 100644 --- a/packages/fuels/package.json +++ b/packages/fuels/package.json @@ -50,22 +50,15 @@ "@fuel-ts/forc": "workspace:*", "@fuel-ts/fuel-core": "workspace:*", "@fuel-ts/hasher": "workspace:*", - "@fuel-ts/hdwallet": "workspace:*", "@fuel-ts/interfaces": "workspace:*", "@fuel-ts/math": "workspace:*", "@fuel-ts/merkle": "workspace:*", - "@fuel-ts/mnemonic": "workspace:*", - "@fuel-ts/predicate": "workspace:*", "@fuel-ts/program": "workspace:*", - "@fuel-ts/providers": "workspace:*", "@fuel-ts/script": "workspace:*", - "@fuel-ts/signer": "workspace:*", "@fuel-ts/transactions": "workspace:*", "@fuel-ts/utils": "workspace:*", "@fuel-ts/versions": "workspace:*", - "@fuel-ts/wallet": "workspace:*", - "@fuel-ts/wallet-manager": "workspace:*", - "@fuel-ts/wordlists": "workspace:*", + "@fuel-ts/account": "workspace:*", "bundle-require": "^4.0.1", "chalk": "4", "chokidar": "^3.5.3", diff --git a/packages/fuels/src/cli/commands/deploy/createWallet.test.ts b/packages/fuels/src/cli/commands/deploy/createWallet.test.ts index 4722fa53f9..a735cb984a 100644 --- a/packages/fuels/src/cli/commands/deploy/createWallet.test.ts +++ b/packages/fuels/src/cli/commands/deploy/createWallet.test.ts @@ -1,5 +1,5 @@ +import { FUEL_NETWORK_URL } from '@fuel-ts/account/configs'; import { safeExec } from '@fuel-ts/errors/test-utils'; -import { FUEL_NETWORK_URL } from '@fuel-ts/wallet/configs'; import { createWallet } from './createWallet'; diff --git a/packages/fuels/src/cli/commands/deploy/createWallet.ts b/packages/fuels/src/cli/commands/deploy/createWallet.ts index 871b1c1c05..d42080c8f2 100644 --- a/packages/fuels/src/cli/commands/deploy/createWallet.ts +++ b/packages/fuels/src/cli/commands/deploy/createWallet.ts @@ -1,5 +1,4 @@ -import { Provider } from '@fuel-ts/providers'; -import { Wallet } from '@fuel-ts/wallet'; +import { Wallet, Provider } from '@fuel-ts/account'; export async function createWallet(providerUrl: string, privateKey?: string) { let pvtKey: string; diff --git a/packages/fuels/src/cli/commands/deploy/deployContract.ts b/packages/fuels/src/cli/commands/deploy/deployContract.ts index 6aec65e0c3..5a0d29da32 100644 --- a/packages/fuels/src/cli/commands/deploy/deployContract.ts +++ b/packages/fuels/src/cli/commands/deploy/deployContract.ts @@ -1,6 +1,6 @@ +import type { WalletUnlocked } from '@fuel-ts/account'; import { ContractFactory } from '@fuel-ts/contract'; import type { DeployContractOptions } from '@fuel-ts/contract'; -import type { WalletUnlocked } from '@fuel-ts/wallet'; import { existsSync, readFileSync } from 'fs'; import { debug } from '../../utils/logger'; diff --git a/packages/fuels/src/cli/commands/dev/autoStartFuelCore.test.ts b/packages/fuels/src/cli/commands/dev/autoStartFuelCore.test.ts index 2b270f493d..fc8aa161f9 100644 --- a/packages/fuels/src/cli/commands/dev/autoStartFuelCore.test.ts +++ b/packages/fuels/src/cli/commands/dev/autoStartFuelCore.test.ts @@ -1,4 +1,4 @@ -import * as testUtilsMod from '@fuel-ts/wallet/test-utils'; +import * as testUtilsMod from '@fuel-ts/account/test-utils'; import { existsSync, rmSync } from 'fs'; import { join } from 'path'; diff --git a/packages/fuels/src/cli/commands/dev/autoStartFuelCore.ts b/packages/fuels/src/cli/commands/dev/autoStartFuelCore.ts index 76d95b135b..936f7f1781 100644 --- a/packages/fuels/src/cli/commands/dev/autoStartFuelCore.ts +++ b/packages/fuels/src/cli/commands/dev/autoStartFuelCore.ts @@ -1,5 +1,5 @@ +import { launchNode } from '@fuel-ts/account/test-utils'; import { defaultConsensusKey } from '@fuel-ts/utils'; -import { launchNode } from '@fuel-ts/wallet/test-utils'; import type { ChildProcessWithoutNullStreams } from 'child_process'; import { getPortPromise } from 'portfinder'; diff --git a/packages/fuels/src/cli/config/loadConfig.ts b/packages/fuels/src/cli/config/loadConfig.ts index 8715392504..e8ccd05a8e 100644 --- a/packages/fuels/src/cli/config/loadConfig.ts +++ b/packages/fuels/src/cli/config/loadConfig.ts @@ -1,5 +1,5 @@ +import { FUEL_NETWORK_URL } from '@fuel-ts/account/configs'; import { defaultConsensusKey } from '@fuel-ts/utils'; -import { FUEL_NETWORK_URL } from '@fuel-ts/wallet/configs'; import { bundleRequire } from 'bundle-require'; import type { BuildOptions } from 'esbuild'; import JoyCon from 'joycon'; diff --git a/packages/fuels/src/index.ts b/packages/fuels/src/index.ts index 37a81955e9..b51f3600ac 100644 --- a/packages/fuels/src/index.ts +++ b/packages/fuels/src/index.ts @@ -9,16 +9,10 @@ export * from '@fuel-ts/hasher'; export * from '@fuel-ts/interfaces'; export * from '@fuel-ts/math'; export * from '@fuel-ts/math/configs'; -export * from '@fuel-ts/mnemonic'; -export * from '@fuel-ts/predicate'; -export * from '@fuel-ts/predicate'; export * from '@fuel-ts/program'; export * from '@fuel-ts/program/configs'; -export * from '@fuel-ts/providers'; -export * from '@fuel-ts/signer'; export * from '@fuel-ts/transactions'; export * from '@fuel-ts/utils'; -export * from '@fuel-ts/wallet'; +export * from '@fuel-ts/account'; export * from '@fuel-ts/transactions/configs'; -export * from '@fuel-ts/wallet'; -export * from '@fuel-ts/wallet/configs'; +export * from '@fuel-ts/account/configs'; diff --git a/packages/fuels/test/fixtures/fuels.config.ts b/packages/fuels/test/fixtures/fuels.config.ts index edc85516c4..527833f8f7 100644 --- a/packages/fuels/test/fixtures/fuels.config.ts +++ b/packages/fuels/test/fixtures/fuels.config.ts @@ -1,4 +1,4 @@ -import { FUEL_NETWORK_URL } from '@fuel-ts/wallet/configs'; +import { FUEL_NETWORK_URL } from '@fuel-ts/account/configs'; import { join } from 'path'; import type { FuelsConfig } from '../../src'; diff --git a/packages/hdwallet/CHANGELOG.md b/packages/hdwallet/CHANGELOG.md deleted file mode 100644 index 1da189053e..0000000000 --- a/packages/hdwallet/CHANGELOG.md +++ /dev/null @@ -1,645 +0,0 @@ -# Change Log - -## 0.73.0 - -## 0.72.0 - -## 0.71.1 - -## 0.71.0 - -### Minor Changes - -- Add `pnpm create fuels` CLI tool, by [@arboleya](https://github.com/arboleya) (See [#1624](https://github.com/FuelLabs/fuels-ts/pull/1624)) - -## 0.70.1 - -## 0.70.0 - -### Minor Changes - -- Add `pnpm create fuels` CLI tool, by [@Dhaiwat10](https://github.com/Dhaiwat10) (See [#1565](https://github.com/FuelLabs/fuels-ts/pull/1565)) - -## 0.69.1 - -## 0.69.0 - -## 0.68.0 - -## 0.67.0 - -## 0.66.1 - -### Patch Changes - -- Adjusting package manager configs, by [@arboleya](https://github.com/arboleya) (See [#1415](https://github.com/FuelLabs/fuels-ts/pull/1415)) - -## 0.66.0 - -## 0.65.0 - -## 0.64.1 - -## 0.64.0 - -## 0.63.0 - -### Patch Changes - -- refactor: purge usage of `arrayify` from ethers v5 in favor of `getBytes` from ethers v6, by [@danielbate](https://github.com/danielbate) (See [#1255](https://github.com/FuelLabs/fuels-ts/pull/1255)) - -## 0.62.0 - -## 0.61.0 - -## 0.60.0 - -## 0.59.0 - -## 0.58.0 - -### Minor Changes - -- using FuelError across all packages, by [@Torres-ssf](https://github.com/Torres-ssf) (See [#1230](https://github.com/FuelLabs/fuels-ts/pull/1230)) - -## 0.57.0 - -## 0.56.1 - -## 0.56.0 - -## 0.55.0 - -## 0.54.1 - -## 0.54.0 - -## 0.53.0 - -## 0.52.0 - -## 0.51.0 - -## 0.50.0 - -## 0.49.1 - -## 0.49.0 - -## 0.48.2 - -## 0.48.1 - -## 0.48.0 - -## 0.47.0 - -## 0.46.0 - -### Patch Changes - -- Removing `publishConfigs`, using `.dts` files with declaration maps (`.dts.map`), by [@arboleya](https://github.com/arboleya) (See [#1055](https://github.com/FuelLabs/fuels-ts/pull/1055)) - -## 0.45.0 - -## 0.44.2 - -## 0.44.1 - -## 0.44.0 - -### Minor Changes - -- Revamping all packages configs, enabling local installation, by [@arboleya](https://github.com/arboleya) (See [#984](https://github.com/FuelLabs/fuels-ts/pull/984)) - -## 0.43.1 - -## 0.43.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.43.0 - - @fuel-ts/math@0.43.0 - - @fuel-ts/mnemonic@0.43.0 - -## 0.42.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.42.0 - - @fuel-ts/math@0.42.0 - - @fuel-ts/mnemonic@0.42.0 - -## 0.41.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.41.0 - - @fuel-ts/math@0.41.0 - - @fuel-ts/mnemonic@0.41.0 - -## 0.40.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.40.0 - - @fuel-ts/math@0.40.0 - - @fuel-ts/mnemonic@0.40.0 - -## 0.39.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.39.1 - - @fuel-ts/math@0.39.1 - - @fuel-ts/mnemonic@0.39.1 - -## 0.39.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.39.0 - - @fuel-ts/math@0.39.0 - - @fuel-ts/mnemonic@0.39.0 - -## 0.38.1 - -### Patch Changes - -- Updated dependencies [[`771844de`](https://github.com/FuelLabs/fuels-ts/commit/771844de1bb27d3e88f5a45f9ac6e32adfbf50e3)]: - - @fuel-ts/signer@0.38.1 - - @fuel-ts/math@0.38.1 - - @fuel-ts/mnemonic@0.38.1 - -## 0.38.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.38.0 - - @fuel-ts/math@0.38.0 - - @fuel-ts/mnemonic@0.38.0 - -## 0.37.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.37.1 - - @fuel-ts/math@0.37.1 - - @fuel-ts/mnemonic@0.37.1 - -## 0.37.0 - -### Patch Changes - -- Updated dependencies [[`deeb2d9c`](https://github.com/FuelLabs/fuels-ts/commit/deeb2d9ca304e43e36ef0db5e7b46c14f2f4e8f3)]: - - @fuel-ts/math@0.37.0 - - @fuel-ts/signer@0.37.0 - - @fuel-ts/mnemonic@0.37.0 - -## 0.36.0 - -### Patch Changes - -- Updated dependencies [[`3cb39443`](https://github.com/FuelLabs/fuels-ts/commit/3cb394431a63f5294edf7e33207214eabf439ef5), [`1de9693a`](https://github.com/FuelLabs/fuels-ts/commit/1de9693a059501243bfa7b826231fd0fff10abcd)]: - - @fuel-ts/math@0.36.0 - - @fuel-ts/signer@0.36.0 - - @fuel-ts/mnemonic@0.36.0 - -## 0.35.0 - -### Patch Changes - -- [#819](https://github.com/FuelLabs/fuels-ts/pull/819) [`f4e1028a`](https://github.com/FuelLabs/fuels-ts/commit/f4e1028acd5a583d12662dd07ca0d17084a35be2) Thanks [@arboleya](https://github.com/arboleya)! - Adjusting export fields for all packages - -- Updated dependencies [[`f4e1028a`](https://github.com/FuelLabs/fuels-ts/commit/f4e1028acd5a583d12662dd07ca0d17084a35be2)]: - - @fuel-ts/math@0.35.0 - - @fuel-ts/mnemonic@0.35.0 - - @fuel-ts/signer@0.35.0 - -## 0.34.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.34.1 - - @fuel-ts/math@0.34.1 - - @fuel-ts/mnemonic@0.34.1 - -## 0.34.0 - -### Patch Changes - -- Updated dependencies [[`5454ca3b`](https://github.com/FuelLabs/fuels-ts/commit/5454ca3b616401fda051962129b1d8a221e3139d)]: - - @fuel-ts/mnemonic@0.34.0 - - @fuel-ts/signer@0.34.0 - - @fuel-ts/math@0.34.0 - -## 0.33.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.33.0 - - @fuel-ts/math@0.33.0 - - @fuel-ts/mnemonic@0.33.0 - -## 0.32.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.32.0 - - @fuel-ts/math@0.32.0 - - @fuel-ts/mnemonic@0.32.0 - -## 0.31.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.31.0 - - @fuel-ts/math@0.31.0 - - @fuel-ts/mnemonic@0.31.0 - -## 0.30.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.30.0 - - @fuel-ts/math@0.30.0 - - @fuel-ts/mnemonic@0.30.0 - -## 0.29.1 - -### Patch Changes - -- Updated dependencies [[`cac1901`](https://github.com/FuelLabs/fuels-ts/commit/cac1901cbc5851751eaa5ef6380a436e33789e8a), [`609d5f0`](https://github.com/FuelLabs/fuels-ts/commit/609d5f052e5c1e7f2a73a619ac49a76605812c51)]: - - @fuel-ts/mnemonic@0.29.1 - - @fuel-ts/math@0.29.1 - - @fuel-ts/signer@0.29.1 - -## 0.29.0 - -### Patch Changes - -- Updated dependencies [[`c81396b`](https://github.com/FuelLabs/fuels-ts/commit/c81396bf3300e5aa2d0e0355877526c7357e0c90)]: - - @fuel-ts/mnemonic@0.29.0 - - @fuel-ts/signer@0.29.0 - - @fuel-ts/math@0.29.0 - -## 0.28.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/math@0.28.1 - - @fuel-ts/mnemonic@0.28.1 - - @fuel-ts/signer@0.28.1 - -## 0.28.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.28.0 - - @fuel-ts/math@0.28.0 - - @fuel-ts/mnemonic@0.28.0 - -## 0.27.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.27.0 - - @fuel-ts/math@0.27.0 - - @fuel-ts/mnemonic@0.27.0 - -## 0.26.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.26.0 - - @fuel-ts/math@0.26.0 - - @fuel-ts/mnemonic@0.26.0 - -## 0.25.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.25.1 - - @fuel-ts/math@0.25.1 - - @fuel-ts/mnemonic@0.25.1 - -## 0.25.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/math@0.25.0 - - @fuel-ts/mnemonic@0.25.0 - - @fuel-ts/signer@0.25.0 - -## 0.24.2 - -### Patch Changes - -- [#646](https://github.com/FuelLabs/fuels-ts/pull/646) [`fa97383`](https://github.com/FuelLabs/fuels-ts/commit/fa97383114c36ee7a204be7e7f3f974382fa1b2c) Thanks [@camsjams](https://github.com/camsjams)! - Adjust doc update timing - -- Updated dependencies [[`fa97383`](https://github.com/FuelLabs/fuels-ts/commit/fa97383114c36ee7a204be7e7f3f974382fa1b2c)]: - - @fuel-ts/math@0.24.2 - - @fuel-ts/mnemonic@0.24.2 - - @fuel-ts/signer@0.24.2 - -## 0.24.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.24.1 - - @fuel-ts/math@0.24.1 - - @fuel-ts/mnemonic@0.24.1 - -## 0.24.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.24.0 - - @fuel-ts/math@0.24.0 - - @fuel-ts/mnemonic@0.24.0 - -## 0.23.0 - -### Patch Changes - -- [#639](https://github.com/FuelLabs/fuels-ts/pull/639) [`c0a62ed`](https://github.com/FuelLabs/fuels-ts/commit/c0a62ed278d6118f1af177dc98dcdb42febd0c81) Thanks [@camsjams](https://github.com/camsjams)! - Update docs - -- Updated dependencies [[`c0a62ed`](https://github.com/FuelLabs/fuels-ts/commit/c0a62ed278d6118f1af177dc98dcdb42febd0c81), [`8888e79`](https://github.com/FuelLabs/fuels-ts/commit/8888e79bcd7740a0c85298862bd59981bc6755b3)]: - - @fuel-ts/math@0.23.0 - - @fuel-ts/mnemonic@0.23.0 - - @fuel-ts/signer@0.23.0 - -## 0.22.2 - -### Patch Changes - -- [#612](https://github.com/FuelLabs/fuels-ts/pull/612) [`03b060b`](https://github.com/FuelLabs/fuels-ts/commit/03b060b51e00034a2814a0c5ed2718d5dc86533b) Thanks [@camsjams](https://github.com/camsjams)! - Added docs and improved examples - -- Updated dependencies [[`03b060b`](https://github.com/FuelLabs/fuels-ts/commit/03b060b51e00034a2814a0c5ed2718d5dc86533b)]: - - @fuel-ts/math@0.22.2 - - @fuel-ts/mnemonic@0.22.2 - - @fuel-ts/signer@0.22.2 - -## 0.22.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.22.1 - - @fuel-ts/math@0.22.1 - - @fuel-ts/mnemonic@0.22.1 - -## 0.22.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.22.0 - - @fuel-ts/math@0.22.0 - - @fuel-ts/mnemonic@0.22.0 - -## 0.21.2 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.21.2 - - @fuel-ts/math@0.21.2 - - @fuel-ts/mnemonic@0.21.2 - -## 0.21.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.21.1 - - @fuel-ts/math@0.21.1 - - @fuel-ts/mnemonic@0.21.1 - -## 0.21.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.21.0 - - @fuel-ts/math@0.21.0 - - @fuel-ts/mnemonic@0.21.0 - -## 0.20.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.20.0 - - @fuel-ts/math@0.20.0 - - @fuel-ts/mnemonic@0.20.0 - -## 0.19.0 - -### Minor Changes - -- [#549](https://github.com/FuelLabs/fuels-ts/pull/549) [`db8cc6b`](https://github.com/FuelLabs/fuels-ts/commit/db8cc6b49616199368463ecd69aae6b3ca0b65d0) Thanks [@QuinnLee](https://github.com/QuinnLee)! - add output variables to transactions - -### Patch Changes - -- Updated dependencies [[`ec83b17`](https://github.com/FuelLabs/fuels-ts/commit/ec83b17a1bcb3d1277911471d3515df3643e6280), [`db8cc6b`](https://github.com/FuelLabs/fuels-ts/commit/db8cc6b49616199368463ecd69aae6b3ca0b65d0)]: - - @fuel-ts/math@0.19.0 - - @fuel-ts/mnemonic@0.19.0 - - @fuel-ts/signer@0.19.0 - -## 0.18.0 - -### Patch Changes - -- [#543](https://github.com/FuelLabs/fuels-ts/pull/543) [`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3) Thanks [@arboleya](https://github.com/arboleya)! - Updating all libraries to their latest version - -- [#543](https://github.com/FuelLabs/fuels-ts/pull/543) [`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3) Thanks [@arboleya](https://github.com/arboleya)! - Upgrading outdated dependencies to latest version - -- Updated dependencies [[`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3), [`6b2b812`](https://github.com/FuelLabs/fuels-ts/commit/6b2b812aecfb639c22f3bbd251f2d50f23f9cd0f), [`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3)]: - - @fuel-ts/math@0.18.0 - - @fuel-ts/mnemonic@0.18.0 - - @fuel-ts/signer@0.18.0 - -## 0.17.0 - -### Minor Changes - -- [#517](https://github.com/FuelLabs/fuels-ts/pull/517) [`6403076`](https://github.com/FuelLabs/fuels-ts/commit/6403076bb9fce9055b436596e23713b0e7909d87) Thanks [@QuinnLee](https://github.com/QuinnLee)! - Parse Logs and Log Data - -### Patch Changes - -- Updated dependencies [[`f106a78`](https://github.com/FuelLabs/fuels-ts/commit/f106a78e816045e3bdb6bff0b9bceec871009091), [`658b065`](https://github.com/FuelLabs/fuels-ts/commit/658b06538389a6ad3310a739a1bf60311c1e3343), [`6403076`](https://github.com/FuelLabs/fuels-ts/commit/6403076bb9fce9055b436596e23713b0e7909d87)]: - - @fuel-ts/math@0.17.0 - - @fuel-ts/mnemonic@0.17.0 - - @fuel-ts/signer@0.17.0 - -## 0.16.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.16.0 - - @fuel-ts/math@0.16.0 - - @fuel-ts/mnemonic@0.16.0 - -## 0.15.0 - -### Patch Changes - -- [#468](https://github.com/FuelLabs/fuels-ts/pull/468) [`7ad3d79`](https://github.com/FuelLabs/fuels-ts/commit/7ad3d79bf7a1db766912a7b3d52e4fa2e550af56) Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - Refactor to use bn.js instead of bigint. - -- Updated dependencies [[`7ad3d79`](https://github.com/FuelLabs/fuels-ts/commit/7ad3d79bf7a1db766912a7b3d52e4fa2e550af56)]: - - @fuel-ts/math@0.15.0 - - @fuel-ts/signer@0.15.0 - - @fuel-ts/mnemonic@0.15.0 - -## 0.14.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/math@0.14.0 - - @fuel-ts/mnemonic@0.14.0 - - @fuel-ts/signer@0.14.0 - -## 0.13.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.13.0 - - @fuel-ts/math@0.13.0 - - @fuel-ts/mnemonic@0.13.0 - -## 0.12.0 - -### Patch Changes - -- Updated dependencies [[`f3dcd27`](https://github.com/FuelLabs/fuels-ts/commit/f3dcd272dc5a237c6a8ce235a542ad804039f13b)]: - - @fuel-ts/signer@0.12.0 - - @fuel-ts/math@0.12.0 - - @fuel-ts/mnemonic@0.12.0 - -## 0.11.0 - -### Patch Changes - -- [#437](https://github.com/FuelLabs/fuels-ts/pull/437) [`b2f1c66`](https://github.com/FuelLabs/fuels-ts/commit/b2f1c665b8d75f635edb4b75691abc9ebf6850b5) Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - - Fixed linking packages to inside `node_modules` folder - - Remove old Lerna config -- Updated dependencies [[`b2f1c66`](https://github.com/FuelLabs/fuels-ts/commit/b2f1c665b8d75f635edb4b75691abc9ebf6850b5)]: - - @fuel-ts/math@0.11.0 - - @fuel-ts/mnemonic@0.11.0 - - @fuel-ts/signer@0.11.0 - -## 0.10.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.10.0 - - @fuel-ts/math@0.10.0 - - @fuel-ts/mnemonic@0.10.0 - -## 0.9.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/signer@0.9.0 - - @fuel-ts/math@0.9.0 - - @fuel-ts/mnemonic@0.9.0 - -## 0.8.0 - -### Minor Changes - -- [#405](https://github.com/FuelLabs/fuels-ts/pull/405) [`19dee43`](https://github.com/FuelLabs/fuels-ts/commit/19dee437f0ea2fe02a4a7f56b0b55d84279c2dc0) Thanks [@camsjams](https://github.com/camsjams)! - Bumping all packages to next minor version - -### Patch Changes - -- [#374](https://github.com/FuelLabs/fuels-ts/pull/374) [`0dd4870`](https://github.com/FuelLabs/fuels-ts/commit/0dd48702fd187eeebdf9f6e1882c400ee44b956e) Thanks [@camsjams](https://github.com/camsjams)! - Add readme - -* [#397](https://github.com/FuelLabs/fuels-ts/pull/397) [`9ac636b`](https://github.com/FuelLabs/fuels-ts/commit/9ac636b7b1f31d2f68c55af2062b4476217ef563) Thanks [@camsjams](https://github.com/camsjams)! - fix list on fuels - -* Updated dependencies [[`0dd4870`](https://github.com/FuelLabs/fuels-ts/commit/0dd48702fd187eeebdf9f6e1882c400ee44b956e), [`9ac636b`](https://github.com/FuelLabs/fuels-ts/commit/9ac636b7b1f31d2f68c55af2062b4476217ef563), [`19dee43`](https://github.com/FuelLabs/fuels-ts/commit/19dee437f0ea2fe02a4a7f56b0b55d84279c2dc0)]: - - @fuel-ts/math@0.8.0 - - @fuel-ts/mnemonic@0.8.0 - - @fuel-ts/signer@0.8.0 - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - ---- - - - -## [0.7.0](https://github.com/FuelLabs/fuels-ts/compare/v0.6.0...0.7.0) - -> 2022-05-13 - -### 🐞 Bug Fixes - -- change build tasks in order to use pnpm link correctly ([#246](https://github.com/FuelLabs/fuels-ts/issues/246)) - -### 📃 Code Refactoring - -- add turborepo, pnpm and tsup ([#238](https://github.com/FuelLabs/fuels-ts/issues/238)) - -### 🚀 Features - -- move from BigNumber to BigInt ([#266](https://github.com/FuelLabs/fuels-ts/issues/266)) - - - -## [v0.6.0](https://github.com/FuelLabs/fuels-ts/compare/v0.5.0...v0.6.0) - -> 2022-04-25 - - - -## [v0.5.0](https://github.com/FuelLabs/fuels-ts/compare/v0.4.0...v0.5.0) - -> 2022-03-30 - - - -## [v0.4.0](https://github.com/FuelLabs/fuels-ts/compare/v0.3.0...v0.4.0) - -> 2022-03-13 - - - -## [v0.3.0](https://github.com/FuelLabs/fuels-ts/compare/v0.1.0...v0.3.0) - -> 2022-03-04 - - - -## v0.1.0 - -> 2022-03-04 - -### 🚀 Features - -- add HDWallet implementation BIP-032 + BIP-044 ([#143](https://github.com/FuelLabs/fuels-ts/issues/143)) diff --git a/packages/hdwallet/README.md b/packages/hdwallet/README.md deleted file mode 100644 index 0069b8004f..0000000000 --- a/packages/hdwallet/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# `@fuel-ts/hdwallet` - -**@fuel-ts/hdwallet** is a sub-module for interacting with **Fuel**. - -This module is an implementation of the BIP-0044 and BIP-0032, Multi-Account Hierarchy for Deterministic Wallets, also known as Hierarchal Deterministic (HD) Wallets. - -# Table of contents - -- [Documentation](#documentation) -- [Usage](#usage) - - [Installation](#installation) - - [Full SDK Installation](#full-sdk-installation) -- [Contributing](#contributing) -- [Changelog](#changelog) -- [License](#license) - -## Documentation - - - -See [Fuels-ts Documentation](https://docs.fuel.network/docs/fuels-ts/) - -## Usage - -### Installation - -```sh -pnpm add @fuel-ts/hdwallet -# or -npm add @fuel-ts/hdwallet -``` - -### Full SDK Installation - -Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package: - -```sh -pnpm add fuels -# or -npm add fuels -``` - -## Contributing - -In order to contribute to `@fuel-ts/hdwallet`, please see the main [fuels-ts](https://github.com/FuelLabs/fuels-ts) monorepo. - -## Changelog - -The `@fuel-ts/hdwallet` changelog can be found at [CHANGELOG](./CHANGELOG.md). - -## License - -The primary license for `@fuel-ts/hdwallet` is `Apache 2.0`, see [LICENSE](./LICENSE). diff --git a/packages/hdwallet/package.json b/packages/hdwallet/package.json deleted file mode 100644 index 2c38c06672..0000000000 --- a/packages/hdwallet/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@fuel-ts/hdwallet", - "version": "0.73.0", - "description": "The Hierarchal Desterministic (HD) Wallet", - "author": "Fuel Labs (https://fuel.network/)", - "main": "dist/index.js", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "engines": { - "node": "^18.18.2 || ^20.0.0" - }, - "exports": { - ".": { - "require": "./dist/index.js", - "import": "./dist/index.mjs", - "types": "./dist/index.d.ts" - } - }, - "files": [ - "dist" - ], - "scripts": { - "build": "tsup", - "postbuild": "tsx ../../scripts/postbuild.ts" - }, - "license": "Apache-2.0", - "dependencies": { - "@fuel-ts/math": "workspace:*", - "@fuel-ts/mnemonic": "workspace:*", - "@fuel-ts/signer": "workspace:*", - "@fuel-ts/errors": "workspace:*", - "ethers": "^6.7.1" - } -} diff --git a/packages/hdwallet/tsconfig.json b/packages/hdwallet/tsconfig.json deleted file mode 100644 index b0fced27d7..0000000000 --- a/packages/hdwallet/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./dist" - }, - "include": ["src"] -} diff --git a/packages/hdwallet/tsup.config.ts b/packages/hdwallet/tsup.config.ts deleted file mode 100644 index 4c7f2f0354..0000000000 --- a/packages/hdwallet/tsup.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { index } from '@internal/tsup'; - -export default index; diff --git a/packages/interfaces/src/index.ts b/packages/interfaces/src/index.ts index 90765b3442..42d8371a05 100644 --- a/packages/interfaces/src/index.ts +++ b/packages/interfaces/src/index.ts @@ -93,14 +93,3 @@ export abstract class AbstractScript extends AbstractProgram { export type AddressLike = AbstractAddress | AbstractAccount; export type ContractIdLike = AbstractAddress | AbstractContract; - -/** - * @hidden - */ -export abstract class AbstractPredicate { - abstract bytes: Uint8Array; - abstract address: AbstractAddress; - abstract predicateData: Uint8Array; - - abstract types?: ReadonlyArray; -} diff --git a/packages/mnemonic/CHANGELOG.md b/packages/mnemonic/CHANGELOG.md deleted file mode 100644 index 6a69ec1821..0000000000 --- a/packages/mnemonic/CHANGELOG.md +++ /dev/null @@ -1,611 +0,0 @@ -# Change Log - -## 0.73.0 - -## 0.72.0 - -## 0.71.1 - -## 0.71.0 - -### Minor Changes - -- Add `pnpm create fuels` CLI tool, by [@arboleya](https://github.com/arboleya) (See [#1624](https://github.com/FuelLabs/fuels-ts/pull/1624)) - -## 0.70.1 - -## 0.70.0 - -### Minor Changes - -- Add `pnpm create fuels` CLI tool, by [@Dhaiwat10](https://github.com/Dhaiwat10) (See [#1565](https://github.com/FuelLabs/fuels-ts/pull/1565)) - -## 0.69.1 - -## 0.69.0 - -## 0.68.0 - -## 0.67.0 - -## 0.66.1 - -### Patch Changes - -- Adjusting package manager configs, by [@arboleya](https://github.com/arboleya) (See [#1415](https://github.com/FuelLabs/fuels-ts/pull/1415)) - -## 0.66.0 - -## 0.65.0 - -## 0.64.1 - -## 0.64.0 - -## 0.63.0 - -### Patch Changes - -- refactor: purge usage of `arrayify` from ethers v5 in favor of `getBytes` from ethers v6, by [@danielbate](https://github.com/danielbate) (See [#1255](https://github.com/FuelLabs/fuels-ts/pull/1255)) - -## 0.62.0 - -## 0.61.0 - -## 0.60.0 - -## 0.59.0 - -## 0.58.0 - -### Minor Changes - -- using FuelError across all packages, by [@Torres-ssf](https://github.com/Torres-ssf) (See [#1230](https://github.com/FuelLabs/fuels-ts/pull/1230)) - -## 0.57.0 - -## 0.56.1 - -## 0.56.0 - -## 0.55.0 - -## 0.54.1 - -## 0.54.0 - -## 0.53.0 - -## 0.52.0 - -## 0.51.0 - -## 0.50.0 - -## 0.49.1 - -## 0.49.0 - -### Minor Changes - -- rename package keystore to crypto, by [@Torres-ssf](https://github.com/Torres-ssf) (See [#1140](https://github.com/FuelLabs/fuels-ts/pull/1140)) - -## 0.48.2 - -## 0.48.1 - -## 0.48.0 - -## 0.47.0 - -## 0.46.0 - -### Patch Changes - -- Removing `publishConfigs`, using `.dts` files with declaration maps (`.dts.map`), by [@arboleya](https://github.com/arboleya) (See [#1055](https://github.com/FuelLabs/fuels-ts/pull/1055)) - -## 0.45.0 - -## 0.44.2 - -## 0.44.1 - -## 0.44.0 - -### Minor Changes - -- Revamping all packages configs, enabling local installation, by [@arboleya](https://github.com/arboleya) (See [#984](https://github.com/FuelLabs/fuels-ts/pull/984)) - -## 0.43.1 - -## 0.43.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.43.0 - - @fuel-ts/wordlists@0.43.0 - -## 0.42.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.42.0 - - @fuel-ts/wordlists@0.42.0 - -## 0.41.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.41.0 - - @fuel-ts/wordlists@0.41.0 - -## 0.40.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.40.0 - - @fuel-ts/wordlists@0.40.0 - -## 0.39.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.39.1 - - @fuel-ts/wordlists@0.39.1 - -## 0.39.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.39.0 - - @fuel-ts/wordlists@0.39.0 - -## 0.38.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.38.1 - - @fuel-ts/wordlists@0.38.1 - -## 0.38.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.38.0 - - @fuel-ts/wordlists@0.38.0 - -## 0.37.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.37.1 - - @fuel-ts/wordlists@0.37.1 - -## 0.37.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.37.0 - - @fuel-ts/wordlists@0.37.0 - -## 0.36.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.36.0 - - @fuel-ts/wordlists@0.36.0 - -## 0.35.0 - -### Patch Changes - -- [#819](https://github.com/FuelLabs/fuels-ts/pull/819) [`f4e1028a`](https://github.com/FuelLabs/fuels-ts/commit/f4e1028acd5a583d12662dd07ca0d17084a35be2) Thanks [@arboleya](https://github.com/arboleya)! - Adjusting export fields for all packages - -- Updated dependencies [[`f4e1028a`](https://github.com/FuelLabs/fuels-ts/commit/f4e1028acd5a583d12662dd07ca0d17084a35be2)]: - - @fuel-ts/keystore@0.35.0 - - @fuel-ts/wordlists@0.35.0 - -## 0.34.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.34.1 - - @fuel-ts/wordlists@0.34.1 - -## 0.34.0 - -### Minor Changes - -- [#814](https://github.com/FuelLabs/fuels-ts/pull/814) [`5454ca3b`](https://github.com/FuelLabs/fuels-ts/commit/5454ca3b616401fda051962129b1d8a221e3139d) Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - export `mnemonic` package in `fuels` umbrella package - create/exports const `MNEMONIC_SIZES` - avoid throw error in predicate function `Mnemonic.isMnemonicValid` - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.34.0 - - @fuel-ts/wordlists@0.34.0 - -## 0.33.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.33.0 - - @fuel-ts/wordlists@0.33.0 - -## 0.32.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.32.0 - - @fuel-ts/wordlists@0.32.0 - -## 0.31.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.31.0 - - @fuel-ts/wordlists@0.31.0 - -## 0.30.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.30.0 - - @fuel-ts/wordlists@0.30.0 - -## 0.29.1 - -### Patch Changes - -- [#726](https://github.com/FuelLabs/fuels-ts/pull/726) [`cac1901`](https://github.com/FuelLabs/fuels-ts/commit/cac1901cbc5851751eaa5ef6380a436e33789e8a) Thanks [@arboleya](https://github.com/arboleya)! - Accounting for possible sequential blank spaces in mnemonic phrases - -- Updated dependencies []: - - @fuel-ts/keystore@0.29.1 - - @fuel-ts/wordlists@0.29.1 - -## 0.29.0 - -### Minor Changes - -- [#695](https://github.com/FuelLabs/fuels-ts/pull/695) [`c81396b`](https://github.com/FuelLabs/fuels-ts/commit/c81396bf3300e5aa2d0e0355877526c7357e0c90) Thanks [@protocolwhisper](https://github.com/protocolwhisper)! - Mnemonic utility to check if a phrase is valid - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.29.0 - - @fuel-ts/wordlists@0.29.0 - -## 0.28.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.28.1 - - @fuel-ts/wordlists@0.28.1 - -## 0.28.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.28.0 - - @fuel-ts/wordlists@0.28.0 - -## 0.27.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.27.0 - - @fuel-ts/wordlists@0.27.0 - -## 0.26.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.26.0 - - @fuel-ts/wordlists@0.26.0 - -## 0.25.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.25.1 - - @fuel-ts/wordlists@0.25.1 - -## 0.25.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.25.0 - - @fuel-ts/wordlists@0.25.0 - -## 0.24.2 - -### Patch Changes - -- [#646](https://github.com/FuelLabs/fuels-ts/pull/646) [`fa97383`](https://github.com/FuelLabs/fuels-ts/commit/fa97383114c36ee7a204be7e7f3f974382fa1b2c) Thanks [@camsjams](https://github.com/camsjams)! - Adjust doc update timing - -- Updated dependencies [[`fa97383`](https://github.com/FuelLabs/fuels-ts/commit/fa97383114c36ee7a204be7e7f3f974382fa1b2c), [`0da49d3`](https://github.com/FuelLabs/fuels-ts/commit/0da49d37f4088faf112c0e5a393c6e8a25b3aa61)]: - - @fuel-ts/keystore@0.24.2 - - @fuel-ts/wordlists@0.24.2 - -## 0.24.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.24.1 - - @fuel-ts/wordlists@0.24.1 - -## 0.24.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.24.0 - - @fuel-ts/wordlists@0.24.0 - -## 0.23.0 - -### Patch Changes - -- [#639](https://github.com/FuelLabs/fuels-ts/pull/639) [`c0a62ed`](https://github.com/FuelLabs/fuels-ts/commit/c0a62ed278d6118f1af177dc98dcdb42febd0c81) Thanks [@camsjams](https://github.com/camsjams)! - Update docs - -- Updated dependencies [[`c0a62ed`](https://github.com/FuelLabs/fuels-ts/commit/c0a62ed278d6118f1af177dc98dcdb42febd0c81)]: - - @fuel-ts/keystore@0.23.0 - - @fuel-ts/wordlists@0.23.0 - -## 0.22.2 - -### Patch Changes - -- [#612](https://github.com/FuelLabs/fuels-ts/pull/612) [`03b060b`](https://github.com/FuelLabs/fuels-ts/commit/03b060b51e00034a2814a0c5ed2718d5dc86533b) Thanks [@camsjams](https://github.com/camsjams)! - Added docs and improved examples - -- Updated dependencies [[`03b060b`](https://github.com/FuelLabs/fuels-ts/commit/03b060b51e00034a2814a0c5ed2718d5dc86533b)]: - - @fuel-ts/keystore@0.22.2 - - @fuel-ts/wordlists@0.22.2 - -## 0.22.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.22.1 - - @fuel-ts/wordlists@0.22.1 - -## 0.22.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.22.0 - - @fuel-ts/wordlists@0.22.0 - -## 0.21.2 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.21.2 - - @fuel-ts/wordlists@0.21.2 - -## 0.21.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.21.1 - - @fuel-ts/wordlists@0.21.1 - -## 0.21.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.21.0 - - @fuel-ts/wordlists@0.21.0 - -## 0.20.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.20.0 - - @fuel-ts/wordlists@0.20.0 - -## 0.19.0 - -### Minor Changes - -- [#549](https://github.com/FuelLabs/fuels-ts/pull/549) [`db8cc6b`](https://github.com/FuelLabs/fuels-ts/commit/db8cc6b49616199368463ecd69aae6b3ca0b65d0) Thanks [@QuinnLee](https://github.com/QuinnLee)! - add output variables to transactions - -### Patch Changes - -- Updated dependencies [[`db8cc6b`](https://github.com/FuelLabs/fuels-ts/commit/db8cc6b49616199368463ecd69aae6b3ca0b65d0)]: - - @fuel-ts/keystore@0.19.0 - - @fuel-ts/wordlists@0.19.0 - -## 0.18.0 - -### Patch Changes - -- [#543](https://github.com/FuelLabs/fuels-ts/pull/543) [`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3) Thanks [@arboleya](https://github.com/arboleya)! - Updating all libraries to their latest version - -- [#543](https://github.com/FuelLabs/fuels-ts/pull/543) [`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3) Thanks [@arboleya](https://github.com/arboleya)! - Upgrading outdated dependencies to latest version - -- Updated dependencies [[`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3), [`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3)]: - - @fuel-ts/keystore@0.18.0 - - @fuel-ts/wordlists@0.18.0 - -## 0.17.0 - -### Minor Changes - -- [#517](https://github.com/FuelLabs/fuels-ts/pull/517) [`6403076`](https://github.com/FuelLabs/fuels-ts/commit/6403076bb9fce9055b436596e23713b0e7909d87) Thanks [@QuinnLee](https://github.com/QuinnLee)! - Parse Logs and Log Data - -### Patch Changes - -- Updated dependencies [[`6403076`](https://github.com/FuelLabs/fuels-ts/commit/6403076bb9fce9055b436596e23713b0e7909d87)]: - - @fuel-ts/keystore@0.17.0 - - @fuel-ts/wordlists@0.17.0 - -## 0.16.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.16.0 - - @fuel-ts/wordlists@0.16.0 - -## 0.15.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.15.0 - - @fuel-ts/wordlists@0.15.0 - -## 0.14.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.14.0 - - @fuel-ts/wordlists@0.14.0 - -## 0.13.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.13.0 - - @fuel-ts/wordlists@0.13.0 - -## 0.12.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.12.0 - - @fuel-ts/wordlists@0.12.0 - -## 0.11.0 - -### Patch Changes - -- [#437](https://github.com/FuelLabs/fuels-ts/pull/437) [`b2f1c66`](https://github.com/FuelLabs/fuels-ts/commit/b2f1c665b8d75f635edb4b75691abc9ebf6850b5) Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - - Fixed linking packages to inside `node_modules` folder - - Remove old Lerna config -- Updated dependencies [[`b2f1c66`](https://github.com/FuelLabs/fuels-ts/commit/b2f1c665b8d75f635edb4b75691abc9ebf6850b5)]: - - @fuel-ts/keystore@0.11.0 - - @fuel-ts/wordlists@0.11.0 - -## 0.10.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.10.0 - - @fuel-ts/wordlists@0.10.0 - -## 0.9.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/keystore@0.9.0 - - @fuel-ts/wordlists@0.9.0 - -## 0.8.0 - -### Minor Changes - -- [#405](https://github.com/FuelLabs/fuels-ts/pull/405) [`19dee43`](https://github.com/FuelLabs/fuels-ts/commit/19dee437f0ea2fe02a4a7f56b0b55d84279c2dc0) Thanks [@camsjams](https://github.com/camsjams)! - Bumping all packages to next minor version - -### Patch Changes - -- [#374](https://github.com/FuelLabs/fuels-ts/pull/374) [`0dd4870`](https://github.com/FuelLabs/fuels-ts/commit/0dd48702fd187eeebdf9f6e1882c400ee44b956e) Thanks [@camsjams](https://github.com/camsjams)! - Add readme - -* [#397](https://github.com/FuelLabs/fuels-ts/pull/397) [`9ac636b`](https://github.com/FuelLabs/fuels-ts/commit/9ac636b7b1f31d2f68c55af2062b4476217ef563) Thanks [@camsjams](https://github.com/camsjams)! - fix list on fuels - -* Updated dependencies [[`0dd4870`](https://github.com/FuelLabs/fuels-ts/commit/0dd48702fd187eeebdf9f6e1882c400ee44b956e), [`9ac636b`](https://github.com/FuelLabs/fuels-ts/commit/9ac636b7b1f31d2f68c55af2062b4476217ef563), [`19dee43`](https://github.com/FuelLabs/fuels-ts/commit/19dee437f0ea2fe02a4a7f56b0b55d84279c2dc0)]: - - @fuel-ts/keystore@0.8.0 - - @fuel-ts/wordlists@0.8.0 - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - ---- - - - -## [0.7.0](https://github.com/FuelLabs/fuels-ts/compare/v0.6.0...0.7.0) - -> 2022-06-03 - -### 🐞 Bug Fixes - -- Use internal random bytes function to avoid browser ESM file ([#310](https://github.com/FuelLabs/fuels-ts/issues/310)) -- change build tasks in order to use pnpm link correctly ([#246](https://github.com/FuelLabs/fuels-ts/issues/246)) - -### 📃 Code Refactoring - -- add turborepo, pnpm and tsup ([#238](https://github.com/FuelLabs/fuels-ts/issues/238)) - - - -## [v0.6.0](https://github.com/FuelLabs/fuels-ts/compare/v0.5.0...v0.6.0) - -> 2022-04-25 - -### 🐞 Bug Fixes - -- export wordlist as default object ([#211](https://github.com/FuelLabs/fuels-ts/issues/211)) - - - -## [v0.5.0](https://github.com/FuelLabs/fuels-ts/compare/v0.4.0...v0.5.0) - -> 2022-03-30 - - - -## [v0.4.0](https://github.com/FuelLabs/fuels-ts/compare/v0.3.0...v0.4.0) - -> 2022-03-13 - - - -## [v0.3.0](https://github.com/FuelLabs/fuels-ts/compare/v0.1.0...v0.3.0) - -> 2022-03-04 - - - -## v0.1.0 - -> 2022-03-04 - -### 🚀 Features - -- add HDWallet implementation BIP-032 + BIP-044 ([#143](https://github.com/FuelLabs/fuels-ts/issues/143)) diff --git a/packages/mnemonic/README.md b/packages/mnemonic/README.md deleted file mode 100644 index 27338167f3..0000000000 --- a/packages/mnemonic/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# `@fuel-ts/mnemonic` - -**@fuel-ts/mnemonic** is a sub-module for interacting with **Fuel**. - -This module contains utilities to import and export BIP 39 mnemonic phrases in coordination with `@fuel-ts/wordlists`. - -# Table of contents - -- [Documentation](#documentation) -- [Usage](#usage) - - [Installation](#installation) - - [Full SDK Installation](#full-sdk-installation) -- [Contributing](#contributing) -- [Changelog](#changelog) -- [License](#license) - -## Documentation - - - -See [Fuels-ts Documentation](https://docs.fuel.network/docs/fuels-ts/) - -## Usage - -### Installation - -```sh -pnpm add @fuel-ts/mnemonic -# or -npm add @fuel-ts/mnemonic -``` - -### Full SDK Installation - -Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package: - -```sh -pnpm add fuels -# or -npm add fuels -``` - -## Contributing - -In order to contribute to `@fuel-ts/mnemonic`, please see the main [fuels-ts](https://github.com/FuelLabs/fuels-ts) monorepo. - -## Changelog - -The `@fuel-ts/mnemonic` changelog can be found at [CHANGELOG](./CHANGELOG.md). - -## License - -The primary license for `@fuel-ts/mnemonic` is `Apache 2.0`, see [LICENSE](./LICENSE). diff --git a/packages/mnemonic/package.json b/packages/mnemonic/package.json deleted file mode 100644 index bfd3b10a2a..0000000000 --- a/packages/mnemonic/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "@fuel-ts/mnemonic", - "version": "0.73.0", - "description": "Mnemonic implementation from BIP39", - "author": "Fuel Labs (https://fuel.network/)", - "main": "dist/index.js", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "engines": { - "node": "^18.18.2 || ^20.0.0" - }, - "exports": { - ".": { - "require": "./dist/index.js", - "import": "./dist/index.mjs", - "types": "./dist/index.d.ts" - } - }, - "files": [ - "dist" - ], - "scripts": { - "build": "tsup", - "postbuild": "tsx ../../scripts/postbuild.ts" - }, - "license": "Apache-2.0", - "dependencies": { - "@fuel-ts/crypto": "workspace:*", - "@fuel-ts/wordlists": "workspace:*", - "@fuel-ts/errors": "workspace:*", - "ethers": "^6.7.1" - } -} diff --git a/packages/mnemonic/tsconfig.dts.json b/packages/mnemonic/tsconfig.dts.json deleted file mode 100644 index ccca2ac1f3..0000000000 --- a/packages/mnemonic/tsconfig.dts.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./dist", - "rootDir": "./src" - }, - "include": ["src"], - "exclude": ["**/*.test.ts"] -} diff --git a/packages/mnemonic/tsconfig.json b/packages/mnemonic/tsconfig.json deleted file mode 100644 index b0fced27d7..0000000000 --- a/packages/mnemonic/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./dist" - }, - "include": ["src"] -} diff --git a/packages/mnemonic/tsdoc.json b/packages/mnemonic/tsdoc.json deleted file mode 100644 index 4514b07272..0000000000 --- a/packages/mnemonic/tsdoc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "extends": ["../../tsdoc.base.json"] -} diff --git a/packages/mnemonic/tsup.config.ts b/packages/mnemonic/tsup.config.ts deleted file mode 100644 index 4c7f2f0354..0000000000 --- a/packages/mnemonic/tsup.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { index } from '@internal/tsup'; - -export default index; diff --git a/packages/predicate/CHANGELOG.md b/packages/predicate/CHANGELOG.md deleted file mode 100644 index a3b1947dfc..0000000000 --- a/packages/predicate/CHANGELOG.md +++ /dev/null @@ -1,819 +0,0 @@ -# Change Log - -## 0.73.0 - -### Patch Changes - -- filter out tx properties for estimatePredicates query, by [@Torres-ssf](https://github.com/Torres-ssf) (See [#1713](https://github.com/FuelLabs/fuels-ts/pull/1713)) - -## 0.72.0 - -### Minor Changes - -- - Transaction execution can now be await with the `{awaitExecution: true}` option on `Provider.sendTransaction` - - Added same functionality to accounts (unlocked wallet, predicate) - - `BaseInvocationScope` internally now uses `{awaitExecution: true}` to reduce amount of network calls, by [@arboleya](https://github.com/arboleya) (See [#1495](https://github.com/FuelLabs/fuels-ts/pull/1495)) -- exporting getPredicateRoot from the predicate package, by [@Torres-ssf](https://github.com/Torres-ssf) (See [#1653](https://github.com/FuelLabs/fuels-ts/pull/1653)) - -## 0.71.1 - -## 0.71.0 - -### Minor Changes - -- Add `pnpm create fuels` CLI tool, by [@arboleya](https://github.com/arboleya) (See [#1624](https://github.com/FuelLabs/fuels-ts/pull/1624)) -- add support for TX policies, by [@arboleya](https://github.com/arboleya) (See [#1624](https://github.com/FuelLabs/fuels-ts/pull/1624)) - -## 0.70.1 - -## 0.70.0 - -### Minor Changes - -- Add `pnpm create fuels` CLI tool, by [@Dhaiwat10](https://github.com/Dhaiwat10) (See [#1565](https://github.com/FuelLabs/fuels-ts/pull/1565)) -- add support for TX policies, by [@Torres-ssf](https://github.com/Torres-ssf) (See [#1437](https://github.com/FuelLabs/fuels-ts/pull/1437)) - -## 0.69.1 - -## 0.69.0 - -## 0.68.0 - -### Patch Changes - -- New helper method `Predicate.getTransferTxId`, which lets you calculate the transaction ID for a Predicate.transfer transaction, before actually sending it, by [@Dhaiwat10](https://github.com/Dhaiwat10) (See [#1467](https://github.com/FuelLabs/fuels-ts/pull/1467)) - -## 0.67.0 - -## 0.66.1 - -### Patch Changes - -- Adjusting package manager configs, by [@arboleya](https://github.com/arboleya) (See [#1415](https://github.com/FuelLabs/fuels-ts/pull/1415)) - -## 0.66.0 - -## 0.65.0 - -## 0.64.1 - -## 0.64.0 - -## 0.63.0 - -### Patch Changes - -- refactor: purge usage of `arrayify` from ethers v5 in favor of `getBytes` from ethers v6, by [@danielbate](https://github.com/danielbate) (See [#1255](https://github.com/FuelLabs/fuels-ts/pull/1255)) - -## 0.62.0 - -## 0.61.0 - -### Patch Changes - -- refactor: purge the usage of the hardcoded constant `VM_TX_MEMORY`, by [@Dhaiwat10](https://github.com/Dhaiwat10) (See [#1318](https://github.com/FuelLabs/fuels-ts/pull/1318)) - -## 0.60.0 - -## 0.59.0 - -### Minor Changes - -- using `FuelError` instead of `@ethersproject/logger`, by [@Torres-ssf](https://github.com/Torres-ssf) (See [#1278](https://github.com/FuelLabs/fuels-ts/pull/1278)) - -## 0.58.0 - -### Minor Changes - -- `chainInfo` is now fetched and cached on all `Provider`s when they are initialized. With this release, you now need to initialize a `Provider` like so: - ```ts - const provider = await Provider.create(url); - ``` - For the full list of breaking-changes, please see [this PR](https://github.com/FuelLabs/fuels-ts/pull/1181), by [@Dhaiwat10](https://github.com/Dhaiwat10) (See [#1181](https://github.com/FuelLabs/fuels-ts/pull/1181)) -- Remove `chainId` from the `Predicate` constructor. You don't need to pass in `chainId` anymore since you are passing in a `provider` already, by [@Dhaiwat10](https://github.com/Dhaiwat10) (See [#1181](https://github.com/FuelLabs/fuels-ts/pull/1181)) -- using FuelError across all packages, by [@Torres-ssf](https://github.com/Torres-ssf) (See [#1230](https://github.com/FuelLabs/fuels-ts/pull/1230)) - -### Patch Changes - -- Increase support for vectors in predicates, by [@danielbate](https://github.com/danielbate) (See [#1247](https://github.com/FuelLabs/fuels-ts/pull/1247)) - -## 0.57.0 - -## 0.56.1 - -## 0.56.0 - -## 0.55.0 - -## 0.54.1 - -## 0.54.0 - -## 0.53.0 - -## 0.52.0 - -## 0.51.0 - -## 0.50.0 - -## 0.49.1 - -## 0.49.0 - -## 0.48.2 - -### Patch Changes - -- Implement chunk and pad utility in predicate and contract root calculations, by [@danielbate](https://github.com/danielbate) (See [#1137](https://github.com/FuelLabs/fuels-ts/pull/1137)) - -## 0.48.1 - -## 0.48.0 - -### Patch Changes - -- Refactor structure of tests in the predicate package, by [@danielbate](https://github.com/danielbate) (See [#1079](https://github.com/FuelLabs/fuels-ts/pull/1079)) - -## 0.47.0 - -### Minor Changes - -- Purged codebase of old ABI format, by [@nedsalk](https://github.com/nedsalk) (See [#1094](https://github.com/FuelLabs/fuels-ts/pull/1094)) -- Added improved Vector support, by [@camsjams](https://github.com/camsjams) (See [#1046](https://github.com/FuelLabs/fuels-ts/pull/1046)) - -## 0.46.0 - -### Minor Changes - -- Update fuel core version to 0.19.0, by [@danielbate](https://github.com/danielbate) (See [#1085](https://github.com/FuelLabs/fuels-ts/pull/1085)) -- Improve usability of `ScriptTransactionRequest` and document, by [@danielbate](https://github.com/danielbate) (See [#1072](https://github.com/FuelLabs/fuels-ts/pull/1072)) - -### Patch Changes - -- Removing `publishConfigs`, using `.dts` files with declaration maps (`.dts.map`), by [@arboleya](https://github.com/arboleya) (See [#1055](https://github.com/FuelLabs/fuels-ts/pull/1055)) - -## 0.45.0 - -### Minor Changes - -- Upgrade to fuel-core 0.18.1 and forc 0.40.1, by [@Dhaiwat10](https://github.com/Dhaiwat10) (See [#986](https://github.com/FuelLabs/fuels-ts/pull/986)) - -## 0.44.2 - -## 0.44.1 - -## 0.44.0 - -### Minor Changes - -- Revamping all packages configs, enabling local installation, by [@arboleya](https://github.com/arboleya) (See [#984](https://github.com/FuelLabs/fuels-ts/pull/984)) - -## 0.43.1 - -## 0.43.0 - -### Minor Changes - -- [#1016](https://github.com/FuelLabs/fuels-ts/pull/1016) [`0e4590b0`](https://github.com/FuelLabs/fuels-ts/commit/0e4590b02e737d5db22136e21f54772e3d3eced8) Thanks [@danielbate](https://github.com/danielbate)! - Alter naming of function to set configurable constants in predicates to standardise across program types - -### Patch Changes - -- Updated dependencies [[`7d9017d0`](https://github.com/FuelLabs/fuels-ts/commit/7d9017d03d602e6fb32c16f41b503afecfa0f901), [`0b3c342b`](https://github.com/FuelLabs/fuels-ts/commit/0b3c342b395bca48b1c274d3d99cb3fc61eef9a3)]: - - @fuel-ts/abi-coder@0.43.0 - - @fuel-ts/providers@0.43.0 - - @fuel-ts/transactions@0.43.0 - - @fuel-ts/wallet@0.43.0 - - @fuel-ts/address@0.43.0 - - @fuel-ts/interfaces@0.43.0 - - @fuel-ts/merkle@0.43.0 - - @fuel-ts/versions@0.43.0 - -## 0.42.0 - -### Minor Changes - -- [#998](https://github.com/FuelLabs/fuels-ts/pull/998) [`7c8439f1`](https://github.com/FuelLabs/fuels-ts/commit/7c8439f11a796b653328f674e9df8264f61b10e2) Thanks [@Torres-ssf](https://github.com/Torres-ssf)! - support configurable contants for predicates - -### Patch Changes - -- Updated dependencies [[`5b0ce1c0`](https://github.com/FuelLabs/fuels-ts/commit/5b0ce1c03e16702b6101b1f299020d7c70e85505), [`41da3655`](https://github.com/FuelLabs/fuels-ts/commit/41da3655d8a6b7a4633e0fdd3f35622ed24bbd90), [`eda13d72`](https://github.com/FuelLabs/fuels-ts/commit/eda13d72c32f72652a34f926c4b9cf42ac36556c), [`3d1492a1`](https://github.com/FuelLabs/fuels-ts/commit/3d1492a13dee9e19aa1844098fa144680810abc2)]: - - @fuel-ts/providers@0.42.0 - - @fuel-ts/abi-coder@0.42.0 - - @fuel-ts/versions@0.42.0 - - @fuel-ts/wallet@0.42.0 - - @fuel-ts/transactions@0.42.0 - - @fuel-ts/address@0.42.0 - - @fuel-ts/interfaces@0.42.0 - - @fuel-ts/merkle@0.42.0 - -## 0.41.0 - -### Patch Changes - -- Updated dependencies [[`8332026a`](https://github.com/FuelLabs/fuels-ts/commit/8332026aef44dcf17ace31dfb08a3114612a2ae5), [`bf6214cc`](https://github.com/FuelLabs/fuels-ts/commit/bf6214cc2c4be227974e7d64360c01c9875c772c), [`0ff4eeab`](https://github.com/FuelLabs/fuels-ts/commit/0ff4eeab67b4c6b6b224230193ab742a3103fa1e)]: - - @fuel-ts/providers@0.41.0 - - @fuel-ts/wallet@0.41.0 - - @fuel-ts/abi-coder@0.41.0 - - @fuel-ts/address@0.41.0 - - @fuel-ts/interfaces@0.41.0 - - @fuel-ts/merkle@0.41.0 - - @fuel-ts/transactions@0.41.0 - - @fuel-ts/versions@0.41.0 - -## 0.40.0 - -### Patch Changes - -- Updated dependencies [[`4321ac1b`](https://github.com/FuelLabs/fuels-ts/commit/4321ac1beacce0ed2e342942ef4a3997c1d34d10), [`d0eb7a39`](https://github.com/FuelLabs/fuels-ts/commit/d0eb7a39d2d5cd59cc45fede3826a327f158d5ea)]: - - @fuel-ts/abi-coder@0.40.0 - - @fuel-ts/providers@0.40.0 - - @fuel-ts/transactions@0.40.0 - - @fuel-ts/wallet@0.40.0 - - @fuel-ts/address@0.40.0 - - @fuel-ts/interfaces@0.40.0 - - @fuel-ts/merkle@0.40.0 - - @fuel-ts/versions@0.40.0 - -## 0.39.1 - -### Patch Changes - -- Updated dependencies [[`e31f2f57`](https://github.com/FuelLabs/fuels-ts/commit/e31f2f574b5d2e334b0c55360cdc1bb273d4ac47)]: - - @fuel-ts/address@0.39.1 - - @fuel-ts/providers@0.39.1 - - @fuel-ts/transactions@0.39.1 - - @fuel-ts/wallet@0.39.1 - - @fuel-ts/abi-coder@0.39.1 - - @fuel-ts/interfaces@0.39.1 - - @fuel-ts/merkle@0.39.1 - - @fuel-ts/versions@0.39.1 - -## 0.39.0 - -### Patch Changes - -- [#824](https://github.com/FuelLabs/fuels-ts/pull/824) [`a8d27dc7`](https://github.com/FuelLabs/fuels-ts/commit/a8d27dc749b4c443fd0714da12b7a75ab56da6d7) Thanks [@Dhaiwat10](https://github.com/Dhaiwat10)! - The `no-explicit-any` ESLint rule is now treated as an error. The usage of `any` has now been replaced from as many files as possible. - -- Updated dependencies [[`a0beaa1d`](https://github.com/FuelLabs/fuels-ts/commit/a0beaa1d45f287aa566a42602f20744c71a37b32), [`63c906b2`](https://github.com/FuelLabs/fuels-ts/commit/63c906b25e9cdb65e52c5d77fb85f118400fc545), [`0522917f`](https://github.com/FuelLabs/fuels-ts/commit/0522917f64d05d992b7607740272e4954e991472), [`a8d27dc7`](https://github.com/FuelLabs/fuels-ts/commit/a8d27dc749b4c443fd0714da12b7a75ab56da6d7)]: - - @fuel-ts/providers@0.39.0 - - @fuel-ts/abi-coder@0.39.0 - - @fuel-ts/interfaces@0.39.0 - - @fuel-ts/wallet@0.39.0 - - @fuel-ts/transactions@0.39.0 - - @fuel-ts/address@0.39.0 - - @fuel-ts/merkle@0.39.0 - - @fuel-ts/versions@0.39.0 - -## 0.38.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/wallet@0.38.1 - - @fuel-ts/abi-coder@0.38.1 - - @fuel-ts/address@0.38.1 - - @fuel-ts/interfaces@0.38.1 - - @fuel-ts/merkle@0.38.1 - - @fuel-ts/providers@0.38.1 - - @fuel-ts/transactions@0.38.1 - - @fuel-ts/versions@0.38.1 - -## 0.38.0 - -### Patch Changes - -- Updated dependencies [[`653c8391`](https://github.com/FuelLabs/fuels-ts/commit/653c8391ece33a8f31598ea137452dd601dc7468), [`0873a883`](https://github.com/FuelLabs/fuels-ts/commit/0873a883d366a4efc6653a9c30079bb713769290)]: - - @fuel-ts/interfaces@0.38.0 - - @fuel-ts/providers@0.38.0 - - @fuel-ts/versions@0.38.0 - - @fuel-ts/wallet@0.38.0 - - @fuel-ts/transactions@0.38.0 - - @fuel-ts/address@0.38.0 - - @fuel-ts/abi-coder@0.38.0 - - @fuel-ts/merkle@0.38.0 - -## 0.37.1 - -### Patch Changes - -- Updated dependencies [[`0fedaa2b`](https://github.com/FuelLabs/fuels-ts/commit/0fedaa2bccfc3d4858d7e89aef929bc1d91bca8c)]: - - @fuel-ts/versions@0.37.1 - - @fuel-ts/abi-coder@0.37.1 - - @fuel-ts/address@0.37.1 - - @fuel-ts/providers@0.37.1 - - @fuel-ts/transactions@0.37.1 - - @fuel-ts/wallet@0.37.1 - - @fuel-ts/interfaces@0.37.1 - - @fuel-ts/merkle@0.37.1 - -## 0.37.0 - -### Patch Changes - -- Updated dependencies [[`deeb2d9c`](https://github.com/FuelLabs/fuels-ts/commit/deeb2d9ca304e43e36ef0db5e7b46c14f2f4e8f3)]: - - @fuel-ts/transactions@0.37.0 - - @fuel-ts/versions@0.37.0 - - @fuel-ts/wallet@0.37.0 - - @fuel-ts/abi-coder@0.37.0 - - @fuel-ts/merkle@0.37.0 - - @fuel-ts/providers@0.37.0 - - @fuel-ts/address@0.37.0 - - @fuel-ts/interfaces@0.37.0 - -## 0.36.0 - -### Patch Changes - -- Updated dependencies [[`1613399e`](https://github.com/FuelLabs/fuels-ts/commit/1613399e97fc3ce63cdefa00ccff938e10f9fb9a), [`d9f8c8c0`](https://github.com/FuelLabs/fuels-ts/commit/d9f8c8c0e993cc1abca19877eafd617ca0d2ee38), [`3cb39443`](https://github.com/FuelLabs/fuels-ts/commit/3cb394431a63f5294edf7e33207214eabf439ef5), [`dd7b1cab`](https://github.com/FuelLabs/fuels-ts/commit/dd7b1cab0e7c4a5234383ce6fc34f041ee6d03a9), [`1de9693a`](https://github.com/FuelLabs/fuels-ts/commit/1de9693a059501243bfa7b826231fd0fff10abcd)]: - - @fuel-ts/abi-coder@0.36.0 - - @fuel-ts/wallet@0.36.0 - - @fuel-ts/address@0.36.0 - - @fuel-ts/providers@0.36.0 - - @fuel-ts/transactions@0.36.0 - - @fuel-ts/merkle@0.36.0 - - @fuel-ts/interfaces@0.36.0 - - @fuel-ts/versions@0.36.0 - -## 0.35.0 - -### Patch Changes - -- [#819](https://github.com/FuelLabs/fuels-ts/pull/819) [`f4e1028a`](https://github.com/FuelLabs/fuels-ts/commit/f4e1028acd5a583d12662dd07ca0d17084a35be2) Thanks [@arboleya](https://github.com/arboleya)! - Adjusting export fields for all packages - -- Updated dependencies [[`f4e1028a`](https://github.com/FuelLabs/fuels-ts/commit/f4e1028acd5a583d12662dd07ca0d17084a35be2)]: - - @fuel-ts/abi-coder@0.35.0 - - @fuel-ts/address@0.35.0 - - @fuel-ts/interfaces@0.35.0 - - @fuel-ts/merkle@0.35.0 - - @fuel-ts/providers@0.35.0 - - @fuel-ts/transactions@0.35.0 - - @fuel-ts/versions@0.35.0 - - @fuel-ts/wallet@0.35.0 - -## 0.34.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.34.1 - - @fuel-ts/wallet@0.34.1 - - @fuel-ts/abi-coder@0.34.1 - - @fuel-ts/interfaces@0.34.1 - - @fuel-ts/merkle@0.34.1 - - @fuel-ts/providers@0.34.1 - - @fuel-ts/transactions@0.34.1 - - @fuel-ts/versions@0.34.1 - -## 0.34.0 - -### Patch Changes - -- Updated dependencies [[`c7cb8ac2`](https://github.com/FuelLabs/fuels-ts/commit/c7cb8ac2e268b860a41d29927814c24339f8514a)]: - - @fuel-ts/abi-coder@0.34.0 - - @fuel-ts/wallet@0.34.0 - - @fuel-ts/providers@0.34.0 - - @fuel-ts/transactions@0.34.0 - - @fuel-ts/address@0.34.0 - - @fuel-ts/interfaces@0.34.0 - - @fuel-ts/merkle@0.34.0 - - @fuel-ts/versions@0.34.0 - -## 0.33.0 - -### Patch Changes - -- Updated dependencies [[`da3bc00a`](https://github.com/FuelLabs/fuels-ts/commit/da3bc00a29e7ef8f378afdb8bfb99d962be0dce3), [`5ba6ade0`](https://github.com/FuelLabs/fuels-ts/commit/5ba6ade0c5176e97a0f9f9b16835f8dd37408313)]: - - @fuel-ts/providers@0.33.0 - - @fuel-ts/abi-coder@0.33.0 - - @fuel-ts/wallet@0.33.0 - - @fuel-ts/transactions@0.33.0 - - @fuel-ts/address@0.33.0 - - @fuel-ts/interfaces@0.33.0 - - @fuel-ts/merkle@0.33.0 - - @fuel-ts/versions@0.33.0 - -## 0.32.0 - -### Minor Changes - -- [#789](https://github.com/FuelLabs/fuels-ts/pull/789) [`66c200a1`](https://github.com/FuelLabs/fuels-ts/commit/66c200a1b4ecbef0ef8664fc01f7142364b0a1bc) Thanks [@luizstacio](https://github.com/luizstacio)! - Updating usages of BaseWalletLocked after renaming it to Account - -### Patch Changes - -- Updated dependencies [[`9943c5a7`](https://github.com/FuelLabs/fuels-ts/commit/9943c5a713f774412136513461836e50548c3e80), [`66c200a1`](https://github.com/FuelLabs/fuels-ts/commit/66c200a1b4ecbef0ef8664fc01f7142364b0a1bc), [`ab019648`](https://github.com/FuelLabs/fuels-ts/commit/ab019648edb9b9b84d7208d08c0b80164837661a), [`66c200a1`](https://github.com/FuelLabs/fuels-ts/commit/66c200a1b4ecbef0ef8664fc01f7142364b0a1bc), [`361fa1e6`](https://github.com/FuelLabs/fuels-ts/commit/361fa1e6c2fb45bca3b5e766b2aa83e94135a544), [`0ce7e930`](https://github.com/FuelLabs/fuels-ts/commit/0ce7e930e5af17153313990a933fcab5970ccbc6)]: - - @fuel-ts/providers@0.32.0 - - @fuel-ts/wallet@0.32.0 - - @fuel-ts/address@0.32.0 - - @fuel-ts/interfaces@0.32.0 - - @fuel-ts/abi-coder@0.32.0 - - @fuel-ts/merkle@0.32.0 - - @fuel-ts/transactions@0.32.0 - - @fuel-ts/versions@0.32.0 - -## 0.31.0 - -### Patch Changes - -- Updated dependencies [[`b126037`](https://github.com/FuelLabs/fuels-ts/commit/b126037000d2005ac8de1c24372cbcdc9b2b1c83)]: - - @fuel-ts/abi-coder@0.31.0 - - @fuel-ts/contract@0.31.0 - - @fuel-ts/address@0.31.0 - - @fuel-ts/interfaces@0.31.0 - - @fuel-ts/versions@0.31.0 - -## 0.30.0 - -### Minor Changes - -- [#746](https://github.com/FuelLabs/fuels-ts/pull/746) [`8649f0f`](https://github.com/FuelLabs/fuels-ts/commit/8649f0ff536af7124b199fe1a84b68160ec38942) Thanks [@camsjams](https://github.com/camsjams)! - Add support for main args - -### Patch Changes - -- Updated dependencies [[`9eaad60`](https://github.com/FuelLabs/fuels-ts/commit/9eaad60e1aceffc31882175e9e81ad202bfe41f9), [`dcdfea0`](https://github.com/FuelLabs/fuels-ts/commit/dcdfea0f480998537b6c9aee7b06fda25c7ec531), [`f521146`](https://github.com/FuelLabs/fuels-ts/commit/f521146c328a7fb2c98679ec3f0c9aa6df2f684f)]: - - @fuel-ts/contract@0.30.0 - - @fuel-ts/abi-coder@0.30.0 - - @fuel-ts/address@0.30.0 - - @fuel-ts/interfaces@0.30.0 - - @fuel-ts/versions@0.30.0 - -## 0.29.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/contract@0.29.1 - - @fuel-ts/abi-coder@0.29.1 - - @fuel-ts/address@0.29.1 - - @fuel-ts/interfaces@0.29.1 - -## 0.29.0 - -### Patch Changes - -- Updated dependencies [[`5a08f80`](https://github.com/FuelLabs/fuels-ts/commit/5a08f80f408aff842403814c6cf444932b2afa0a)]: - - @fuel-ts/abi-coder@0.29.0 - - @fuel-ts/contract@0.29.0 - - @fuel-ts/address@0.29.0 - - @fuel-ts/interfaces@0.29.0 - -## 0.28.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/abi-coder@0.28.1 - - @fuel-ts/address@0.28.1 - - @fuel-ts/contract@0.28.1 - - @fuel-ts/interfaces@0.28.1 - -## 0.28.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/contract@0.28.0 - - @fuel-ts/abi-coder@0.28.0 - - @fuel-ts/address@0.28.0 - - @fuel-ts/interfaces@0.28.0 - -## 0.27.0 - -### Patch Changes - -- Updated dependencies [[`8103891`](https://github.com/FuelLabs/fuels-ts/commit/8103891071145a86380a8c9bcb11132249138486)]: - - @fuel-ts/address@0.27.0 - - @fuel-ts/contract@0.27.0 - - @fuel-ts/abi-coder@0.27.0 - - @fuel-ts/interfaces@0.27.0 - -## 0.26.0 - -### Patch Changes - -- Updated dependencies [[`ec6c31f`](https://github.com/FuelLabs/fuels-ts/commit/ec6c31fdc1debb69e3e712fe5c9308167b9940de)]: - - @fuel-ts/contract@0.26.0 - - @fuel-ts/abi-coder@0.26.0 - - @fuel-ts/address@0.26.0 - - @fuel-ts/interfaces@0.26.0 - -## 0.25.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/abi-coder@0.25.1 - - @fuel-ts/address@0.25.1 - - @fuel-ts/contract@0.25.1 - - @fuel-ts/interfaces@0.25.1 - -## 0.25.0 - -### Patch Changes - -- Updated dependencies [[`fab08ed`](https://github.com/FuelLabs/fuels-ts/commit/fab08ede896d46adcfa2e057ed15bb1075bfe0de)]: - - @fuel-ts/contract@0.25.0 - - @fuel-ts/abi-coder@0.25.0 - - @fuel-ts/address@0.25.0 - - @fuel-ts/interfaces@0.25.0 - -## 0.24.2 - -### Patch Changes - -- [#646](https://github.com/FuelLabs/fuels-ts/pull/646) [`fa97383`](https://github.com/FuelLabs/fuels-ts/commit/fa97383114c36ee7a204be7e7f3f974382fa1b2c) Thanks [@camsjams](https://github.com/camsjams)! - Adjust doc update timing - -- Updated dependencies [[`fa97383`](https://github.com/FuelLabs/fuels-ts/commit/fa97383114c36ee7a204be7e7f3f974382fa1b2c)]: - - @fuel-ts/abi-coder@0.24.2 - - @fuel-ts/address@0.24.2 - - @fuel-ts/contract@0.24.2 - - @fuel-ts/interfaces@0.24.2 - -## 0.24.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/abi-coder@0.24.1 - - @fuel-ts/address@0.24.1 - - @fuel-ts/contract@0.24.1 - - @fuel-ts/interfaces@0.24.1 - -## 0.24.0 - -### Minor Changes - -- [#616](https://github.com/FuelLabs/fuels-ts/pull/616) [`02ac98e`](https://github.com/FuelLabs/fuels-ts/commit/02ac98ea865e0464b132dc3f6bd21f7e1a57435a) Thanks [@arboleya](https://github.com/arboleya)! - Adding new `versions` package for exposing and managing compatibility versions of Fuel toolchain components - -### Patch Changes - -- Updated dependencies [[`02ac98e`](https://github.com/FuelLabs/fuels-ts/commit/02ac98ea865e0464b132dc3f6bd21f7e1a57435a), [`3de5ee5`](https://github.com/FuelLabs/fuels-ts/commit/3de5ee5b07b9e0c3754bebdecd8eac49b3a79413)]: - - @fuel-ts/abi-coder@0.24.0 - - @fuel-ts/address@0.24.0 - - @fuel-ts/contract@0.24.0 - - @fuel-ts/interfaces@0.24.0 - -## 0.23.0 - -### Patch Changes - -- [#639](https://github.com/FuelLabs/fuels-ts/pull/639) [`c0a62ed`](https://github.com/FuelLabs/fuels-ts/commit/c0a62ed278d6118f1af177dc98dcdb42febd0c81) Thanks [@camsjams](https://github.com/camsjams)! - Update docs - -- Updated dependencies [[`c0a62ed`](https://github.com/FuelLabs/fuels-ts/commit/c0a62ed278d6118f1af177dc98dcdb42febd0c81), [`a1f6905`](https://github.com/FuelLabs/fuels-ts/commit/a1f6905723f2fd490a65f8aa778dd388d32d6f58)]: - - @fuel-ts/abi-coder@0.23.0 - - @fuel-ts/address@0.23.0 - - @fuel-ts/contract@0.23.0 - - @fuel-ts/interfaces@0.23.0 - -## 0.22.2 - -### Patch Changes - -- [#612](https://github.com/FuelLabs/fuels-ts/pull/612) [`03b060b`](https://github.com/FuelLabs/fuels-ts/commit/03b060b51e00034a2814a0c5ed2718d5dc86533b) Thanks [@camsjams](https://github.com/camsjams)! - Added docs and improved examples - -- Updated dependencies [[`03b060b`](https://github.com/FuelLabs/fuels-ts/commit/03b060b51e00034a2814a0c5ed2718d5dc86533b)]: - - @fuel-ts/abi-coder@0.22.2 - - @fuel-ts/address@0.22.2 - - @fuel-ts/contract@0.22.2 - - @fuel-ts/interfaces@0.22.2 - -## 0.22.1 - -### Patch Changes - -- Updated dependencies [[`58d9fa0`](https://github.com/FuelLabs/fuels-ts/commit/58d9fa032a6cb3478bca4a93523b21cc184fbc9e)]: - - @fuel-ts/abi-coder@0.22.1 - - @fuel-ts/contract@0.22.1 - - @fuel-ts/address@0.22.1 - - @fuel-ts/interfaces@0.22.1 - -## 0.22.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/contract@0.22.0 - - @fuel-ts/abi-coder@0.22.0 - - @fuel-ts/address@0.22.0 - - @fuel-ts/interfaces@0.22.0 - -## 0.21.2 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/contract@0.21.2 - - @fuel-ts/abi-coder@0.21.2 - - @fuel-ts/address@0.21.2 - - @fuel-ts/interfaces@0.21.2 - -## 0.21.1 - -### Patch Changes - -- Updated dependencies [[`141ecdd`](https://github.com/FuelLabs/fuels-ts/commit/141ecddc198a39e35f2363a13f7498543536bf75)]: - - @fuel-ts/contract@0.21.1 - - @fuel-ts/abi-coder@0.21.1 - - @fuel-ts/address@0.21.1 - - @fuel-ts/interfaces@0.21.1 - -## 0.21.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/contract@0.21.0 - - @fuel-ts/abi-coder@0.21.0 - - @fuel-ts/address@0.21.0 - - @fuel-ts/interfaces@0.21.0 - -## 0.20.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/contract@0.20.0 - - @fuel-ts/abi-coder@0.20.0 - - @fuel-ts/address@0.20.0 - - @fuel-ts/interfaces@0.20.0 - -## 0.19.0 - -### Minor Changes - -- [#549](https://github.com/FuelLabs/fuels-ts/pull/549) [`db8cc6b`](https://github.com/FuelLabs/fuels-ts/commit/db8cc6b49616199368463ecd69aae6b3ca0b65d0) Thanks [@QuinnLee](https://github.com/QuinnLee)! - add output variables to transactions - -### Patch Changes - -- Updated dependencies [[`0e91213`](https://github.com/FuelLabs/fuels-ts/commit/0e91213e54b39d2de7a358912c85d7c32c5dde6d), [`db8cc6b`](https://github.com/FuelLabs/fuels-ts/commit/db8cc6b49616199368463ecd69aae6b3ca0b65d0), [`2a98c1e`](https://github.com/FuelLabs/fuels-ts/commit/2a98c1e455765fbfe5775bd4d706571705083f3e), [`bdfa9d6`](https://github.com/FuelLabs/fuels-ts/commit/bdfa9d6e453a9c47177b19f2811265d740fc4ac4)]: - - @fuel-ts/contract@0.19.0 - - @fuel-ts/abi-coder@0.19.0 - - @fuel-ts/address@0.19.0 - - @fuel-ts/interfaces@0.19.0 - -## 0.18.0 - -### Patch Changes - -- [#543](https://github.com/FuelLabs/fuels-ts/pull/543) [`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3) Thanks [@arboleya](https://github.com/arboleya)! - Updating all libraries to their latest version - -- [#526](https://github.com/FuelLabs/fuels-ts/pull/526) [`b6942b1`](https://github.com/FuelLabs/fuels-ts/commit/b6942b19574abb59378f01a13833116a6b05ceee) Thanks [@camsjams](https://github.com/camsjams)! - Relocated tests - -- [#543](https://github.com/FuelLabs/fuels-ts/pull/543) [`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3) Thanks [@arboleya](https://github.com/arboleya)! - Upgrading outdated dependencies to latest version - -- Updated dependencies [[`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3), [`9f79a61`](https://github.com/FuelLabs/fuels-ts/commit/9f79a6172e3caf3c90beb725547fbd778cfdd2cf), [`b6942b1`](https://github.com/FuelLabs/fuels-ts/commit/b6942b19574abb59378f01a13833116a6b05ceee), [`7c1ecf0`](https://github.com/FuelLabs/fuels-ts/commit/7c1ecf0ea5d116b78f59c53d9dcada4339a7e72b), [`6b2b812`](https://github.com/FuelLabs/fuels-ts/commit/6b2b812aecfb639c22f3bbd251f2d50f23f9cd0f), [`72b1631`](https://github.com/FuelLabs/fuels-ts/commit/72b163142a3f28c6035fc112441542f2e83972ee), [`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3)]: - - @fuel-ts/abi-coder@0.18.0 - - @fuel-ts/address@0.18.0 - - @fuel-ts/contract@0.18.0 - - @fuel-ts/interfaces@0.18.0 - -## 0.17.0 - -### Minor Changes - -- [#511](https://github.com/FuelLabs/fuels-ts/pull/511) [`69a102d`](https://github.com/FuelLabs/fuels-ts/commit/69a102dac5fc7b41ac79374a99675077907a356d) Thanks [@QuinnLee](https://github.com/QuinnLee)! - Update to forc v 0.24.3 - -- [#517](https://github.com/FuelLabs/fuels-ts/pull/517) [`6403076`](https://github.com/FuelLabs/fuels-ts/commit/6403076bb9fce9055b436596e23713b0e7909d87) Thanks [@QuinnLee](https://github.com/QuinnLee)! - Parse Logs and Log Data - -### Patch Changes - -- Updated dependencies [[`039f930`](https://github.com/FuelLabs/fuels-ts/commit/039f9301dc1a964d6d40abbd93d3dd6c82598c44), [`69a102d`](https://github.com/FuelLabs/fuels-ts/commit/69a102dac5fc7b41ac79374a99675077907a356d), [`fa83fcd`](https://github.com/FuelLabs/fuels-ts/commit/fa83fcd0c90ddb95bc397ab2675a5ad759b94f82), [`6403076`](https://github.com/FuelLabs/fuels-ts/commit/6403076bb9fce9055b436596e23713b0e7909d87)]: - - @fuel-ts/contract@0.17.0 - - @fuel-ts/wallet@0.17.0 - - @fuel-ts/abi-coder@0.17.0 - - @fuel-ts/address@0.17.0 - - @fuel-ts/interfaces@0.17.0 - -## 0.16.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/contract@0.16.0 - - @fuel-ts/wallet@0.16.0 - - @fuel-ts/abi-coder@0.16.0 - - @fuel-ts/address@0.16.0 - - @fuel-ts/interfaces@0.16.0 - -## 0.15.0 - -### Patch Changes - -- [#468](https://github.com/FuelLabs/fuels-ts/pull/468) [`7ad3d79`](https://github.com/FuelLabs/fuels-ts/commit/7ad3d79bf7a1db766912a7b3d52e4fa2e550af56) Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - Refactor to use bn.js instead of bigint. - -- Updated dependencies [[`60e42d5`](https://github.com/FuelLabs/fuels-ts/commit/60e42d5f864425d5cd910e6d9eb243bd377da784), [`5828934`](https://github.com/FuelLabs/fuels-ts/commit/5828934ccd96cec82fc0cece0f207dafaee5b89a), [`63583aa`](https://github.com/FuelLabs/fuels-ts/commit/63583aa6e8b5b5417bdc0c0ae3bc15eec7735e43), [`7d01caa`](https://github.com/FuelLabs/fuels-ts/commit/7d01caa55b947ca2f14efef217c5f6b377256e85), [`7ad3d79`](https://github.com/FuelLabs/fuels-ts/commit/7ad3d79bf7a1db766912a7b3d52e4fa2e550af56), [`f3c7273`](https://github.com/FuelLabs/fuels-ts/commit/f3c7273d946979e628b178ba808b8fc1598105bb)]: - - @fuel-ts/contract@0.15.0 - - @fuel-ts/address@0.15.0 - - @fuel-ts/interfaces@0.15.0 - - @fuel-ts/abi-coder@0.15.0 - - @fuel-ts/wallet@0.15.0 - -## 0.14.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/abi-coder@0.14.0 - - @fuel-ts/address@0.14.0 - - @fuel-ts/contract@0.14.0 - - @fuel-ts/interfaces@0.14.0 - - @fuel-ts/wallet@0.14.0 - -## 0.13.0 - -### Patch Changes - -- Updated dependencies [[`745e65b`](https://github.com/FuelLabs/fuels-ts/commit/745e65bc563ab8cace6f73e2715a6eaaae93fda5), [`48285d4`](https://github.com/FuelLabs/fuels-ts/commit/48285d48b6929e3104c480dddb18d2878be6c478), [`9190cee`](https://github.com/FuelLabs/fuels-ts/commit/9190cee45529b6c3fcffb2a12b1ef6319b2b39df), [`5d4d6ce`](https://github.com/FuelLabs/fuels-ts/commit/5d4d6ce7fa1a23deae3f41be94c9fe2ee9851772), [`dfb2612`](https://github.com/FuelLabs/fuels-ts/commit/dfb261222c17cf6f158f475d91b3414996300066)]: - - @fuel-ts/abi-coder@0.13.0 - - @fuel-ts/contract@0.13.0 - - @fuel-ts/wallet@0.13.0 - - @fuel-ts/address@0.13.0 - - @fuel-ts/interfaces@0.13.0 - -## 0.12.0 - -### Minor Changes - -- [#441](https://github.com/FuelLabs/fuels-ts/pull/441) [`f3dcd27`](https://github.com/FuelLabs/fuels-ts/commit/f3dcd272dc5a237c6a8ce235a542ad804039f13b) Thanks [@camsjams](https://github.com/camsjams)! - Added support for Bech32 Address format - -### Patch Changes - -- Updated dependencies [[`b45c3cd`](https://github.com/FuelLabs/fuels-ts/commit/b45c3cd9d834e11f7ccc358bb93103b937c2a9fe), [`f3dcd27`](https://github.com/FuelLabs/fuels-ts/commit/f3dcd272dc5a237c6a8ce235a542ad804039f13b), [`400607d`](https://github.com/FuelLabs/fuels-ts/commit/400607d3e957d9cb6a2925d35b7b10393d6f15cc)]: - - @fuel-ts/contract@0.12.0 - - @fuel-ts/abi-coder@0.12.0 - - @fuel-ts/address@0.12.0 - - @fuel-ts/interfaces@0.12.0 - - @fuel-ts/wallet@0.12.0 - -## 0.11.0 - -### Patch Changes - -- Updated dependencies [[`bfb7a30`](https://github.com/FuelLabs/fuels-ts/commit/bfb7a30c6c56426bf7c8493cb95396bef40eaa65), [`b2f1c66`](https://github.com/FuelLabs/fuels-ts/commit/b2f1c665b8d75f635edb4b75691abc9ebf6850b5), [`3cb7332`](https://github.com/FuelLabs/fuels-ts/commit/3cb733212e09d32a21e235c4e46006efd77eca41), [`212d51c`](https://github.com/FuelLabs/fuels-ts/commit/212d51c3e6b1eea5c874f435ea8d50320cd870a1), [`abf2884`](https://github.com/FuelLabs/fuels-ts/commit/abf28848a172c8df5e5fef5fa71ffa439f7be56d)]: - - @fuel-ts/contract@0.11.0 - - @fuel-ts/abi-coder@0.11.0 - - @fuel-ts/constants@0.11.0 - - @fuel-ts/keystore@0.11.0 - - @fuel-ts/math@0.11.0 - - @fuel-ts/providers@0.11.0 - - @fuel-ts/transactions@0.11.0 - - @fuel-ts/wallet@0.11.0 - -## 0.10.0 - -### Minor Changes - -- [#428](https://github.com/FuelLabs/fuels-ts/pull/428) [`b9cf1a3`](https://github.com/FuelLabs/fuels-ts/commit/b9cf1a3fce660b2a04adcd0b3782a27aead48762) Thanks [@luizstacio](https://github.com/luizstacio)! - Remove export transactions on provider package - -### Patch Changes - -- Updated dependencies [[`b9cf1a3`](https://github.com/FuelLabs/fuels-ts/commit/b9cf1a3fce660b2a04adcd0b3782a27aead48762)]: - - @fuel-ts/contract@0.10.0 - - @fuel-ts/providers@0.10.0 - - @fuel-ts/wallet@0.10.0 - - @fuel-ts/abi-coder@0.10.0 - - @fuel-ts/constants@0.10.0 - - @fuel-ts/keystore@0.10.0 - - @fuel-ts/math@0.10.0 - - @fuel-ts/transactions@0.10.0 - -## 0.9.0 - -### Patch Changes - -- Updated dependencies [[`d881da1`](https://github.com/FuelLabs/fuels-ts/commit/d881da1c99f1359a5c848076a624a6476407c69a), [`a8349b0`](https://github.com/FuelLabs/fuels-ts/commit/a8349b0bb7f78ffe982fadc740a0209b4056bf5b), [`a8349b0`](https://github.com/FuelLabs/fuels-ts/commit/a8349b0bb7f78ffe982fadc740a0209b4056bf5b)]: - - @fuel-ts/contract@0.9.0 - - @fuel-ts/providers@0.9.0 - - @fuel-ts/wallet@0.9.0 - - @fuel-ts/abi-coder@0.9.0 - - @fuel-ts/constants@0.9.0 - - @fuel-ts/keystore@0.9.0 - - @fuel-ts/math@0.9.0 - -## 0.8.0 - -### Minor Changes - -- [#405](https://github.com/FuelLabs/fuels-ts/pull/405) [`19dee43`](https://github.com/FuelLabs/fuels-ts/commit/19dee437f0ea2fe02a4a7f56b0b55d84279c2dc0) Thanks [@camsjams](https://github.com/camsjams)! - Bumping all packages to next minor version - -### Patch Changes - -- [#374](https://github.com/FuelLabs/fuels-ts/pull/374) [`0dd4870`](https://github.com/FuelLabs/fuels-ts/commit/0dd48702fd187eeebdf9f6e1882c400ee44b956e) Thanks [@camsjams](https://github.com/camsjams)! - Add readme - -* [#397](https://github.com/FuelLabs/fuels-ts/pull/397) [`9ac636b`](https://github.com/FuelLabs/fuels-ts/commit/9ac636b7b1f31d2f68c55af2062b4476217ef563) Thanks [@camsjams](https://github.com/camsjams)! - fix list on fuels - -- [#401](https://github.com/FuelLabs/fuels-ts/pull/401) [`42b6e4e`](https://github.com/FuelLabs/fuels-ts/commit/42b6e4ea9cf4de38adeb2c1bbb0668bf140d2163) Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - Upgrade sway to 0.18.1 - -* [#384](https://github.com/FuelLabs/fuels-ts/pull/384) [`7c556e6`](https://github.com/FuelLabs/fuels-ts/commit/7c556e696fd99fb90ccb4d2d6c3bba535b0df562) Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - - make predicate contracts use new `std::tx::get_predicate_data;` from sway 0.18 - -* Updated dependencies [[`0dd4870`](https://github.com/FuelLabs/fuels-ts/commit/0dd48702fd187eeebdf9f6e1882c400ee44b956e), [`9ac636b`](https://github.com/FuelLabs/fuels-ts/commit/9ac636b7b1f31d2f68c55af2062b4476217ef563), [`1585e14`](https://github.com/FuelLabs/fuels-ts/commit/1585e1485558258665613787ef6576c82d57beee), [`42b6e4e`](https://github.com/FuelLabs/fuels-ts/commit/42b6e4ea9cf4de38adeb2c1bbb0668bf140d2163), [`19dee43`](https://github.com/FuelLabs/fuels-ts/commit/19dee437f0ea2fe02a4a7f56b0b55d84279c2dc0), [`03842d0`](https://github.com/FuelLabs/fuels-ts/commit/03842d010babb74e8bf88699ad842939da0d1760)]: - - @fuel-ts/abi-coder@0.8.0 - - @fuel-ts/constants@0.8.0 - - @fuel-ts/contract@0.8.0 - - @fuel-ts/keystore@0.8.0 - - @fuel-ts/math@0.8.0 - - @fuel-ts/providers@0.8.0 - - @fuel-ts/wallet@0.8.0 - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. diff --git a/packages/predicate/LICENSE b/packages/predicate/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/packages/predicate/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/packages/predicate/README.md b/packages/predicate/README.md deleted file mode 100644 index d966e70e06..0000000000 --- a/packages/predicate/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# `@fuel-ts/predicate` - -**@fuel-ts/predicate** is a sub-module for interacting with **Fuel**. - -This module allows for a simple way to serialize calls to an on-chain predicate as part of an Input. - -# Table of contents - -- [Documentation](#documentation) -- [Usage](#usage) - - [Installation](#installation) - - [Full SDK Installation](#full-sdk-installation) -- [Contributing](#contributing) -- [Changelog](#changelog) -- [License](#license) - -## Documentation - -See [Fuels-ts Documentation](https://docs.fuel.network/docs/fuels-ts/predicates/) - -## Usage - -### Installation - -```sh -pnpm add @fuel-ts/predicate -# or -npm add @fuel-ts/predicate -``` - -### Full SDK Installation - -Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package: - -```sh -pnpm add fuels -# or -npm add fuels -``` - -## Contributing - -In order to contribute to `@fuel-ts/predicate`, please see the main [fuels-ts](https://github.com/FuelLabs/fuels-ts) monorepo. - -## Changelog - -The `@fuel-ts/predicate` changelog can be found at [CHANGELOG](./CHANGELOG.md). - -## License - -The primary license for `@fuel-ts/predicate` is `Apache 2.0`, see [LICENSE](./LICENSE). diff --git a/packages/predicate/package.json b/packages/predicate/package.json deleted file mode 100644 index 403900d1fa..0000000000 --- a/packages/predicate/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "@fuel-ts/predicate", - "version": "0.73.0", - "description": "", - "author": "Fuel Labs (https://fuel.network/)", - "main": "dist/index.js", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "engines": { - "node": "^18.18.2 || ^20.0.0" - }, - "exports": { - ".": { - "require": "./dist/index.js", - "import": "./dist/index.mjs", - "types": "./dist/index.d.ts" - } - }, - "files": [ - "dist" - ], - "scripts": { - "build": "tsup", - "postbuild": "tsx ../../scripts/postbuild.ts" - }, - "license": "Apache-2.0", - "dependencies": { - "@fuel-ts/abi-coder": "workspace:*", - "@fuel-ts/address": "workspace:*", - "@fuel-ts/interfaces": "workspace:*", - "@fuel-ts/merkle": "workspace:*", - "@fuel-ts/providers": "workspace:*", - "@fuel-ts/transactions": "workspace:*", - "@fuel-ts/versions": "workspace:*", - "@fuel-ts/wallet": "workspace:*", - "@fuel-ts/hasher": "workspace:*", - "@fuel-ts/utils": "workspace:*", - "@fuel-ts/errors": "workspace:*", - "ethers": "^6.7.1" - }, - "devDependencies": { - "@fuel-ts/math": "workspace:*" - } -} diff --git a/packages/predicate/test/features/predicate-transactions.test.ts b/packages/predicate/test/features/predicate-transactions.test.ts deleted file mode 100644 index 3be2fa8d3e..0000000000 --- a/packages/predicate/test/features/predicate-transactions.test.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { Address } from '@fuel-ts/address'; -import { bn } from '@fuel-ts/math'; -import { Provider, ScriptTransactionRequest } from '@fuel-ts/providers'; -import type { InputCoin } from '@fuel-ts/transactions'; -import { Account } from '@fuel-ts/wallet'; -import { FUEL_NETWORK_URL } from '@fuel-ts/wallet/configs'; -import { hexlify } from 'ethers'; - -import { Predicate } from '../../src/predicate'; -import { defaultPredicateAbi } from '../fixtures/abi/default'; -import { defaultPredicateBytecode } from '../fixtures/bytecode/default'; - -/** - * @group node - * @group browser - */ -describe('Predicate', () => { - describe('Transactions', () => { - let predicate: Predicate<[string]>; - let provider: Provider; - let request: ScriptTransactionRequest; - const b256 = '0x0101010101010101010101010101010101010101010101010101010101010101'; - - beforeAll(async () => { - provider = await Provider.create(FUEL_NETWORK_URL); - predicate = new Predicate(defaultPredicateBytecode, provider, defaultPredicateAbi); - - predicate.setData<[string]>(b256); - - request = new ScriptTransactionRequest(); - request.addResource({ - id: '0x01', - assetId: '0x0000000000000000000000000000000000000000000000000000000000000000', - amount: bn(1), - owner: Address.fromAddressOrString(predicate.address), - maturity: 0, - blockCreated: bn(0), - txCreatedIdx: bn(0), - }); - }); - - it('includes predicate as input when sending a transaction', async () => { - const sendTransactionMock = vi - .spyOn(Account.prototype, 'sendTransaction') - .mockImplementation(() => []); - - await predicate.sendTransaction(request); - - const inputCoinMock = sendTransactionMock.mock.calls[0][0] - .inputs?.[0] as unknown as InputCoin; - expect(hexlify(inputCoinMock.predicate)).toBe(defaultPredicateBytecode); - expect(predicate.predicateArgs).not.toBeUndefined(); - }); - - it('includes predicate as input when simulating a transaction', async () => { - const sendTransactionMock = vi - .spyOn(Account.prototype, 'simulateTransaction') - .mockImplementation(() => []); - - await predicate.simulateTransaction(request); - - const inputCoinMock = sendTransactionMock.mock.calls[0][0] - .inputs?.[0] as unknown as InputCoin; - expect(hexlify(inputCoinMock.predicate)).toBe(defaultPredicateBytecode); - expect(predicate.predicateArgs).not.toBeUndefined(); - }); - }); -}); diff --git a/packages/predicate/tsconfig.dts.json b/packages/predicate/tsconfig.dts.json deleted file mode 100644 index ccca2ac1f3..0000000000 --- a/packages/predicate/tsconfig.dts.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./dist", - "rootDir": "./src" - }, - "include": ["src"], - "exclude": ["**/*.test.ts"] -} diff --git a/packages/predicate/tsdoc.json b/packages/predicate/tsdoc.json deleted file mode 100644 index 4514b07272..0000000000 --- a/packages/predicate/tsdoc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "extends": ["../../tsdoc.base.json"] -} diff --git a/packages/predicate/tsup.config.ts b/packages/predicate/tsup.config.ts deleted file mode 100644 index 4c7f2f0354..0000000000 --- a/packages/predicate/tsup.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { index } from '@internal/tsup'; - -export default index; diff --git a/packages/program/package.json b/packages/program/package.json index f40716abf4..6a103b3d3e 100644 --- a/packages/program/package.json +++ b/packages/program/package.json @@ -42,10 +42,9 @@ "@fuel-ts/hasher": "workspace:^", "@fuel-ts/interfaces": "workspace:*", "@fuel-ts/math": "workspace:*", - "@fuel-ts/providers": "workspace:*", "@fuel-ts/transactions": "workspace:*", "@fuel-ts/versions": "workspace:*", - "@fuel-ts/wallet": "workspace:*", + "@fuel-ts/account": "workspace:*", "@fuel-ts/errors": "workspace:*", "@fuel-ts/utils": "workspace:*", "@fuels/vm-asm": "0.42.1", diff --git a/packages/program/src/contract-call-script.ts b/packages/program/src/contract-call-script.ts index b31f031433..ca4350530d 100644 --- a/packages/program/src/contract-call-script.ts +++ b/packages/program/src/contract-call-script.ts @@ -1,16 +1,16 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { WORD_SIZE, U64Coder, B256Coder, ASSET_ID_LEN } from '@fuel-ts/abi-coder'; -import { BaseAssetId, ZeroBytes32 } from '@fuel-ts/address/configs'; -import { ErrorCode, FuelError } from '@fuel-ts/errors'; -import type { AbstractAddress } from '@fuel-ts/interfaces'; -import type { BN } from '@fuel-ts/math'; -import { bn, toNumber } from '@fuel-ts/math'; import type { CallResult, TransactionResultCallReceipt, TransactionResultReturnDataReceipt, TransactionResultReturnReceipt, -} from '@fuel-ts/providers'; +} from '@fuel-ts/account'; +import { BaseAssetId, ZeroBytes32 } from '@fuel-ts/address/configs'; +import { ErrorCode, FuelError } from '@fuel-ts/errors'; +import type { AbstractAddress } from '@fuel-ts/interfaces'; +import type { BN } from '@fuel-ts/math'; +import { bn, toNumber } from '@fuel-ts/math'; import { ReceiptType } from '@fuel-ts/transactions'; import { concat } from '@fuel-ts/utils'; import * as asm from '@fuels/vm-asm'; diff --git a/packages/program/src/contract.test.ts b/packages/program/src/contract.test.ts index 6dac19ba45..78e3aa3123 100644 --- a/packages/program/src/contract.test.ts +++ b/packages/program/src/contract.test.ts @@ -1,7 +1,6 @@ import type { JsonAbi } from '@fuel-ts/abi-coder'; -import { Provider } from '@fuel-ts/providers'; -import { Account, Wallet } from '@fuel-ts/wallet'; -import { FUEL_NETWORK_URL } from '@fuel-ts/wallet/configs'; +import { Account, Wallet, Provider } from '@fuel-ts/account'; +import { FUEL_NETWORK_URL } from '@fuel-ts/account/configs'; import Contract from './contract'; diff --git a/packages/program/src/contract.ts b/packages/program/src/contract.ts index e4434e5f4b..309e8ec728 100644 --- a/packages/program/src/contract.ts +++ b/packages/program/src/contract.ts @@ -1,9 +1,8 @@ import type { FunctionFragment, JsonAbi } from '@fuel-ts/abi-coder'; import { Interface } from '@fuel-ts/abi-coder'; +import type { Account, Provider } from '@fuel-ts/account'; import { Address } from '@fuel-ts/address'; import type { AbstractAddress, AbstractContract } from '@fuel-ts/interfaces'; -import type { Provider } from '@fuel-ts/providers'; -import type { Account } from '@fuel-ts/wallet'; import type { BytesLike } from 'ethers'; import { FunctionInvocationScope } from './functions/invocation-scope'; diff --git a/packages/program/src/errors.ts b/packages/program/src/errors.ts index 78b82931c1..c92d86f0e5 100644 --- a/packages/program/src/errors.ts +++ b/packages/program/src/errors.ts @@ -1,4 +1,4 @@ -import type { TransactionResult } from '@fuel-ts/providers'; +import type { TransactionResult } from '@fuel-ts/account'; import { ReceiptType } from '@fuel-ts/transactions'; import { RevertErrorCodes } from './revert/revert-error-codes'; diff --git a/packages/program/src/functions/base-invocation-scope.ts b/packages/program/src/functions/base-invocation-scope.ts index 1bcffd1f5b..560f5e62c8 100644 --- a/packages/program/src/functions/base-invocation-scope.ts +++ b/packages/program/src/functions/base-invocation-scope.ts @@ -1,13 +1,12 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import type { InputValue } from '@fuel-ts/abi-coder'; +import type { BaseWalletUnlocked, Provider, CoinQuantity } from '@fuel-ts/account'; +import { ScriptTransactionRequest } from '@fuel-ts/account'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; import type { AbstractContract, AbstractProgram } from '@fuel-ts/interfaces'; import type { BN } from '@fuel-ts/math'; import { bn, toNumber } from '@fuel-ts/math'; -import type { Provider, CoinQuantity } from '@fuel-ts/providers'; -import { ScriptTransactionRequest } from '@fuel-ts/providers'; import { InputType } from '@fuel-ts/transactions'; -import type { BaseWalletUnlocked } from '@fuel-ts/wallet'; import * as asm from '@fuels/vm-asm'; import { getContractCallScript } from '../contract-call-script'; diff --git a/packages/program/src/functions/invocation-results.ts b/packages/program/src/functions/invocation-results.ts index 9daeee3b2b..5b246e9795 100644 --- a/packages/program/src/functions/invocation-results.ts +++ b/packages/program/src/functions/invocation-results.ts @@ -1,16 +1,16 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable max-classes-per-file */ import type { Interface } from '@fuel-ts/abi-coder'; -import type { AbstractContract, AbstractProgram } from '@fuel-ts/interfaces'; -import type { BN } from '@fuel-ts/math'; -import { bn } from '@fuel-ts/math'; +import { getDecodedLogs } from '@fuel-ts/account'; import type { CallResult, TransactionResponse, TransactionResult, TransactionResultReceipt, -} from '@fuel-ts/providers'; -import { getDecodedLogs } from '@fuel-ts/providers'; +} from '@fuel-ts/account'; +import type { AbstractContract, AbstractProgram } from '@fuel-ts/interfaces'; +import type { BN } from '@fuel-ts/math'; +import { bn } from '@fuel-ts/math'; import type { ReceiptScriptResult } from '@fuel-ts/transactions'; import { ReceiptType } from '@fuel-ts/transactions'; diff --git a/packages/program/src/functions/invocation-scope.ts b/packages/program/src/functions/invocation-scope.ts index 633652801c..f533b5035e 100644 --- a/packages/program/src/functions/invocation-scope.ts +++ b/packages/program/src/functions/invocation-scope.ts @@ -1,9 +1,9 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import type { FunctionFragment } from '@fuel-ts/abi-coder'; +import type { CoinQuantity } from '@fuel-ts/account'; +import { coinQuantityfy } from '@fuel-ts/account'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; import type { AbstractProgram } from '@fuel-ts/interfaces'; -import type { CoinQuantity } from '@fuel-ts/providers'; -import { coinQuantityfy } from '@fuel-ts/providers'; import type { CallConfig, CallParams } from '../types'; diff --git a/packages/program/src/revert/revert-error-codes.ts b/packages/program/src/revert/revert-error-codes.ts index af52fbbc9a..067e69860a 100644 --- a/packages/program/src/revert/revert-error-codes.ts +++ b/packages/program/src/revert/revert-error-codes.ts @@ -1,4 +1,4 @@ -import type { TransactionResultReceipt, TransactionResultRevertReceipt } from '@fuel-ts/providers'; +import type { TransactionResultReceipt, TransactionResultRevertReceipt } from '@fuel-ts/account'; import { ReceiptType } from '@fuel-ts/transactions'; import type { RevertError } from './revert-error'; diff --git a/packages/program/src/revert/revert-error.ts b/packages/program/src/revert/revert-error.ts index 1be84b78b8..05953eca00 100644 --- a/packages/program/src/revert/revert-error.ts +++ b/packages/program/src/revert/revert-error.ts @@ -1,5 +1,5 @@ /* eslint-disable max-classes-per-file */ -import type { TransactionResultRevertReceipt } from '@fuel-ts/providers'; +import type { TransactionResultRevertReceipt } from '@fuel-ts/account'; import { FAILED_ASSERT_EQ_SIGNAL, FAILED_ASSERT_SIGNAL, diff --git a/packages/program/src/script-request.ts b/packages/program/src/script-request.ts index 31b3e5f6c3..eed512e5d5 100644 --- a/packages/program/src/script-request.ts +++ b/packages/program/src/script-request.ts @@ -6,8 +6,6 @@ import { WORD_SIZE, calculateVmTxMemory, } from '@fuel-ts/abi-coder'; -import { ErrorCode, FuelError } from '@fuel-ts/errors'; -import type { BN } from '@fuel-ts/math'; import type { TransactionResultReturnDataReceipt, TransactionResultRevertReceipt, @@ -16,7 +14,9 @@ import type { TransactionResultReturnReceipt, TransactionResultScriptResultReceipt, TransactionResult, -} from '@fuel-ts/providers'; +} from '@fuel-ts/account'; +import { ErrorCode, FuelError } from '@fuel-ts/errors'; +import type { BN } from '@fuel-ts/math'; import type { ReceiptScriptResult } from '@fuel-ts/transactions'; import { ReceiptType } from '@fuel-ts/transactions'; import { getBytesCopy, type BytesLike } from 'ethers'; diff --git a/packages/program/src/types.ts b/packages/program/src/types.ts index 9a67edd388..5ae9b1bd7f 100644 --- a/packages/program/src/types.ts +++ b/packages/program/src/types.ts @@ -1,7 +1,7 @@ import type { FunctionFragment } from '@fuel-ts/abi-coder'; +import type { CoinQuantity, CoinQuantityLike } from '@fuel-ts/account'; import type { AbstractProgram, AbstractAddress } from '@fuel-ts/interfaces'; import type { BigNumberish } from '@fuel-ts/math'; -import type { CoinQuantity, CoinQuantityLike } from '@fuel-ts/providers'; import type { BytesLike } from 'ethers'; import type { FunctionInvocationScope } from './functions/invocation-scope'; diff --git a/packages/program/src/utils.ts b/packages/program/src/utils.ts index 8151f28017..6df34e093d 100644 --- a/packages/program/src/utils.ts +++ b/packages/program/src/utils.ts @@ -1,5 +1,5 @@ +import type { TransactionResult } from '@fuel-ts/account'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; -import type { TransactionResult } from '@fuel-ts/providers'; import { PANIC_REASONS, PANIC_DOC_URL } from './configs'; diff --git a/packages/providers/LICENSE b/packages/providers/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/packages/providers/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/packages/providers/package.json b/packages/providers/package.json deleted file mode 100644 index 1c98c1894a..0000000000 --- a/packages/providers/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "@fuel-ts/providers", - "version": "0.73.0", - "description": "", - "author": "Fuel Labs (https://fuel.network/)", - "main": "dist/index.js", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "engines": { - "node": "^18.18.2 || ^20.0.0" - }, - "exports": { - ".": { - "require": "./dist/index.js", - "import": "./dist/index.mjs", - "types": "./dist/index.d.ts" - } - }, - "files": [ - "dist" - ], - "scripts": { - "prebuild": "pnpm build:operations", - "build": "tsup", - "build:schema": "get-graphql-schema http://localhost:4000/graphql > fuel-core-schema.graphql && prettier --write fuel-core-schema.graphql", - "build:operations": "pnpm graphql-codegen", - "postbuild": "tsx ../../scripts/postbuild.ts" - }, - "license": "Apache-2.0", - "dependencies": { - "@fuel-ts/abi-coder": "workspace:*", - "@fuel-ts/address": "workspace:*", - "@fuel-ts/crypto": "workspace:*", - "@fuel-ts/errors": "workspace:*", - "@fuel-ts/interfaces": "workspace:*", - "@fuel-ts/math": "workspace:*", - "@fuel-ts/hasher": "workspace:*", - "@fuel-ts/transactions": "workspace:*", - "@fuel-ts/versions": "workspace:*", - "ethers": "^6.7.1", - "graphql": "^16.6.0", - "graphql-request": "5.0.0", - "graphql-tag": "^2.12.6", - "ramda": "^0.29.0", - "tai64": "^1.0.0" - }, - "devDependencies": { - "@graphql-codegen/cli": "^2.13.7", - "@graphql-codegen/typescript": "^2.8.0", - "@graphql-codegen/typescript-operations": "^2.5.5", - "@graphql-codegen/typescript-generic-sdk": "^3.1.0", - "get-graphql-schema": "^2.1.2", - "@types/ramda": "^0.29.3" - } -} diff --git a/packages/providers/test/__snapshots__/provider.test.ts.snap b/packages/providers/test/__snapshots__/provider.test.ts.snap deleted file mode 100644 index 30aaf5b14e..0000000000 --- a/packages/providers/test/__snapshots__/provider.test.ts.snap +++ /dev/null @@ -1,57 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`Provider > can getMessageProof with all data 1`] = ` -{ - "amount": "0xa", - "blockProof": { - "proofIndex": "0x1b0", - "proofSet": [ - "0x3480098c927d3a8a86745ba6c91419f04901baf5d25bbd0e6ba56fcb3b3e35bd", - "0xa8795e5d15b88c2383f5673a4658edae93dcdb7986ccfacbe916e656ec11ce70", - "0x97ea3aee8cb9ccc6593c21879979eeab0f748066b9e22e2294cb973ee5d95e3c", - "0x50a33f4fe58e35955df499092515fe2f77d7bfaed35f80194b338d7091c363ab", - "0xa07fc684d351ab1970efe9ffd04eb67b6544dd4443169ecf6dd0bfc546216211", - ], - }, - "commitBlockHeader": { - "applicationHash": "0x441dece8e41d111f3a875ed89d716e48abf450ad385b111cf7c55e06e0b57d6b", - "daHeight": "0x0", - "height": "0x1b1", - "id": "0xe4dfe8fc1b5de2c669efbcc5e4c0a61db175d1b2f03e3cd46ed4396e76695c5b", - "messageReceiptCount": "0x0", - "messageReceiptRoot": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "prevRoot": "0xcc024475c2ccd175082bc233f5ebb3736e47a648a666d82567b001ab46cf0a83", - "time": "4611686020115956241", - "transactionsCount": "0x2", - "transactionsRoot": "0x471d68713ae2fef6bb3eede37a976b38390f2ab8916e463b22942e7130456a8a", - }, - "data": "0x", - "messageBlockHeader": { - "applicationHash": "0x76b6838a38a3049fa1dd42f923a0f287594a390493003af0f1c3da94f3d2b8c7", - "daHeight": "0x0", - "height": "0x1b0", - "id": "0x864b55089878bf7009d2ff64cbeeeeb75fcd73768785dcb75d54180e7fbaab7b", - "messageReceiptCount": "0x1", - "messageReceiptRoot": "0x34fdfbc73458998a106b02f13bba51bc0fd36513602e312ca1d1893f2075eca5", - "prevRoot": "0x26e49e4af2253e0bca68d2a8b38fa7406a546ebc476b6ca51569cb325ad55ea6", - "time": "4611686020115956241", - "transactionsCount": "0x2", - "transactionsRoot": "0xbf760e126159b72f59bde2d59a972620f826e5a5134deb2a775a21c37644e1a1", - }, - "messageProof": { - "proofIndex": "0x0", - "proofSet": [ - "0x34fdfbc73458998a106b02f13bba51bc0fd36513602e312ca1d1893f2075eca5", - ], - }, - "nonce": "0xb33895e6fdf23b5a62c92a1d45c71a11579027f9e5c4dda73c26cf140bcd6895", - "recipient": "fuel1qqqqqqqqqqqqqqqqqqqy0wnpamywtejjglt30lerdagyeuas5f3s0esvs7", - "sender": "fuel108z5yxd9eygf08j7fsnj3hck87n9fg07qwzru6h4nk4zc07dgt4q5t8nka", -} -`; - -exports[`Provider > can getMessageStatus 1`] = ` -{ - "state": "SPENT", -} -`; diff --git a/packages/providers/test/fixtures/messageProof.ts b/packages/providers/test/fixtures/messageProof.ts deleted file mode 100644 index bc8f17f43e..0000000000 --- a/packages/providers/test/fixtures/messageProof.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { GqlGetMessageProofQuery } from '../../src/__generated__/operations'; - -export const messageProofResponse: GqlGetMessageProofQuery['messageProof'] = { - __typename: 'MessageProof', - messageProof: { - __typename: 'MerkleProof', - proofSet: ['0x34fdfbc73458998a106b02f13bba51bc0fd36513602e312ca1d1893f2075eca5'], - proofIndex: '0', - }, - blockProof: { - __typename: 'MerkleProof', - proofSet: [ - '0x3480098c927d3a8a86745ba6c91419f04901baf5d25bbd0e6ba56fcb3b3e35bd', - '0xa8795e5d15b88c2383f5673a4658edae93dcdb7986ccfacbe916e656ec11ce70', - '0x97ea3aee8cb9ccc6593c21879979eeab0f748066b9e22e2294cb973ee5d95e3c', - '0x50a33f4fe58e35955df499092515fe2f77d7bfaed35f80194b338d7091c363ab', - '0xa07fc684d351ab1970efe9ffd04eb67b6544dd4443169ecf6dd0bfc546216211', - ], - proofIndex: '432', - }, - messageBlockHeader: { - __typename: 'Header', - id: '0x864b55089878bf7009d2ff64cbeeeeb75fcd73768785dcb75d54180e7fbaab7b', - daHeight: '0', - transactionsCount: '2', - transactionsRoot: '0xbf760e126159b72f59bde2d59a972620f826e5a5134deb2a775a21c37644e1a1', - messageReceiptCount: '1', - messageReceiptRoot: '0x34fdfbc73458998a106b02f13bba51bc0fd36513602e312ca1d1893f2075eca5', - height: '432', - prevRoot: '0x26e49e4af2253e0bca68d2a8b38fa7406a546ebc476b6ca51569cb325ad55ea6', - time: '4611686020115956241', - applicationHash: '0x76b6838a38a3049fa1dd42f923a0f287594a390493003af0f1c3da94f3d2b8c7', - }, - commitBlockHeader: { - __typename: 'Header', - id: '0xe4dfe8fc1b5de2c669efbcc5e4c0a61db175d1b2f03e3cd46ed4396e76695c5b', - daHeight: '0', - transactionsCount: '2', - transactionsRoot: '0x471d68713ae2fef6bb3eede37a976b38390f2ab8916e463b22942e7130456a8a', - messageReceiptRoot: '0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', - messageReceiptCount: '0', - height: '433', - prevRoot: '0xcc024475c2ccd175082bc233f5ebb3736e47a648a666d82567b001ab46cf0a83', - time: '4611686020115956241', - applicationHash: '0x441dece8e41d111f3a875ed89d716e48abf450ad385b111cf7c55e06e0b57d6b', - }, - sender: '0x79c54219a5c910979e5e4c2728df163fa654a1fe03843e6af59daa2c3fcd42ea', - recipient: '0x00000000000000000000000047ba61eec8e5e65247d717ff236f504cf3b0a263', - nonce: '0x3e87e0f44613cabecd1aad381ad41a433afb12ec5c54c172de3db25b1b4d1b53', - amount: '10', - data: '0x', -}; diff --git a/packages/providers/tsconfig.dts.json b/packages/providers/tsconfig.dts.json deleted file mode 100644 index ccca2ac1f3..0000000000 --- a/packages/providers/tsconfig.dts.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./dist", - "rootDir": "./src" - }, - "include": ["src"], - "exclude": ["**/*.test.ts"] -} diff --git a/packages/providers/tsconfig.json b/packages/providers/tsconfig.json deleted file mode 100644 index b22c89a4b3..0000000000 --- a/packages/providers/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./dist" - }, - "include": ["src", "test"] -} diff --git a/packages/providers/tsdoc.json b/packages/providers/tsdoc.json deleted file mode 100644 index 4514b07272..0000000000 --- a/packages/providers/tsdoc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "extends": ["../../tsdoc.base.json"] -} diff --git a/packages/providers/tsup.config.ts b/packages/providers/tsup.config.ts deleted file mode 100644 index 4c7f2f0354..0000000000 --- a/packages/providers/tsup.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { index } from '@internal/tsup'; - -export default index; diff --git a/packages/providers/typedoc.json b/packages/providers/typedoc.json deleted file mode 100644 index 801c3ba632..0000000000 --- a/packages/providers/typedoc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://typedoc.org/schema.json", - "extends": ["../../typedoc.base.json"], - "entryPoints": ["src/index.ts"] -} diff --git a/packages/script/package.json b/packages/script/package.json index 8d47758e58..386b6e991b 100644 --- a/packages/script/package.json +++ b/packages/script/package.json @@ -33,10 +33,9 @@ "@fuel-ts/interfaces": "workspace:*", "@fuel-ts/math": "workspace:*", "@fuel-ts/program": "workspace:*", - "@fuel-ts/providers": "workspace:*", "@fuel-ts/transactions": "workspace:*", "@fuel-ts/utils": "workspace:*", - "@fuel-ts/wallet": "workspace:*", + "@fuel-ts/account": "workspace:*", "@fuel-ts/errors": "workspace:*", "ethers": "^6.7.1" }, diff --git a/packages/script/src/script-invocation-scope.ts b/packages/script/src/script-invocation-scope.ts index 5caeaa7b7f..ca92a472c1 100644 --- a/packages/script/src/script-invocation-scope.ts +++ b/packages/script/src/script-invocation-scope.ts @@ -1,8 +1,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ +import type { Provider } from '@fuel-ts/account'; import { FuelError } from '@fuel-ts/errors'; import type { AbstractScript } from '@fuel-ts/interfaces'; import { ScriptRequest, FunctionInvocationScope } from '@fuel-ts/program'; -import type { Provider } from '@fuel-ts/providers'; import { ByteArrayCoder } from '@fuel-ts/transactions'; export class ScriptInvocationScope< diff --git a/packages/script/src/script.test.ts b/packages/script/src/script.test.ts index 5dbd3e928b..d12b12302d 100644 --- a/packages/script/src/script.test.ts +++ b/packages/script/src/script.test.ts @@ -1,17 +1,21 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import type { JsonAbi } from '@fuel-ts/abi-coder'; import { Interface } from '@fuel-ts/abi-coder'; +import type { + Account, + CoinQuantityLike, + TransactionResponse, + TransactionResult, +} from '@fuel-ts/account'; +import { Provider, ScriptTransactionRequest } from '@fuel-ts/account'; +import { FUEL_NETWORK_URL } from '@fuel-ts/account/configs'; +import { generateTestWallet } from '@fuel-ts/account/test-utils'; import { BaseAssetId } from '@fuel-ts/address/configs'; import { safeExec } from '@fuel-ts/errors/test-utils'; import type { BigNumberish } from '@fuel-ts/math'; import { bn } from '@fuel-ts/math'; import { ScriptRequest } from '@fuel-ts/program'; -import type { CoinQuantityLike, TransactionResponse, TransactionResult } from '@fuel-ts/providers'; -import { Provider, ScriptTransactionRequest } from '@fuel-ts/providers'; import { ReceiptType } from '@fuel-ts/transactions'; -import type { Account } from '@fuel-ts/wallet'; -import { FUEL_NETWORK_URL } from '@fuel-ts/wallet/configs'; -import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import { getBytesCopy } from 'ethers'; import { getScriptForcProject, ScriptProjectsEnum } from '../test/fixtures'; diff --git a/packages/script/src/script.ts b/packages/script/src/script.ts index ba394f6abe..806a6ede56 100644 --- a/packages/script/src/script.ts +++ b/packages/script/src/script.ts @@ -1,12 +1,11 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { Interface } from '@fuel-ts/abi-coder'; import type { InputValue, JsonAbi } from '@fuel-ts/abi-coder'; +import type { Account, Provider } from '@fuel-ts/account'; import { ErrorCode, FuelError } from '@fuel-ts/errors'; import { AbstractScript } from '@fuel-ts/interfaces'; import type { BN } from '@fuel-ts/math'; import type { ScriptRequest } from '@fuel-ts/program'; -import type { Provider } from '@fuel-ts/providers'; -import type { Account } from '@fuel-ts/wallet'; import { getBytesCopy, type BytesLike } from 'ethers'; import { ScriptInvocationScope } from './script-invocation-scope'; diff --git a/packages/signer/CHANGELOG.md b/packages/signer/CHANGELOG.md deleted file mode 100644 index 8ca4ea7414..0000000000 --- a/packages/signer/CHANGELOG.md +++ /dev/null @@ -1,699 +0,0 @@ -# Change Log - -## 0.73.0 - -## 0.72.0 - -### Minor Changes - -- - Stopped exporting `getCurve()` / secp256k1 - - Replaced `elliptic` with `@noble/curves`, by [@arboleya](https://github.com/arboleya) (See [#1495](https://github.com/FuelLabs/fuels-ts/pull/1495)) - -## 0.71.1 - -## 0.71.0 - -### Minor Changes - -- Add `pnpm create fuels` CLI tool, by [@arboleya](https://github.com/arboleya) (See [#1624](https://github.com/FuelLabs/fuels-ts/pull/1624)) - -## 0.70.1 - -## 0.70.0 - -### Minor Changes - -- Add `pnpm create fuels` CLI tool, by [@Dhaiwat10](https://github.com/Dhaiwat10) (See [#1565](https://github.com/FuelLabs/fuels-ts/pull/1565)) - -## 0.69.1 - -## 0.69.0 - -## 0.68.0 - -## 0.67.0 - -## 0.66.1 - -### Patch Changes - -- Adjusting package manager configs, by [@arboleya](https://github.com/arboleya) (See [#1415](https://github.com/FuelLabs/fuels-ts/pull/1415)) - -## 0.66.0 - -## 0.65.0 - -## 0.64.1 - -## 0.64.0 - -## 0.63.0 - -### Patch Changes - -- refactor: purge usage of `arrayify` from ethers v5 in favor of `getBytes` from ethers v6, by [@danielbate](https://github.com/danielbate) (See [#1255](https://github.com/FuelLabs/fuels-ts/pull/1255)) - -## 0.62.0 - -## 0.61.0 - -## 0.60.0 - -## 0.59.0 - -## 0.58.0 - -## 0.57.0 - -## 0.56.1 - -## 0.56.0 - -## 0.55.0 - -## 0.54.1 - -## 0.54.0 - -## 0.53.0 - -## 0.52.0 - -## 0.51.0 - -## 0.50.0 - -## 0.49.1 - -## 0.49.0 - -### Minor Changes - -- rename package keystore to crypto, by [@Torres-ssf](https://github.com/Torres-ssf) (See [#1140](https://github.com/FuelLabs/fuels-ts/pull/1140)) - -## 0.48.2 - -## 0.48.1 - -## 0.48.0 - -## 0.47.0 - -## 0.46.0 - -### Patch Changes - -- Removing `publishConfigs`, using `.dts` files with declaration maps (`.dts.map`), by [@arboleya](https://github.com/arboleya) (See [#1055](https://github.com/FuelLabs/fuels-ts/pull/1055)) - -## 0.45.0 - -## 0.44.2 - -## 0.44.1 - -## 0.44.0 - -### Minor Changes - -- Revamping all packages configs, enabling local installation, by [@arboleya](https://github.com/arboleya) (See [#984](https://github.com/FuelLabs/fuels-ts/pull/984)) - -## 0.43.1 - -## 0.43.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.43.0 - - @fuel-ts/address@0.43.0 - - @fuel-ts/keystore@0.43.0 - - @fuel-ts/math@0.43.0 - -## 0.42.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.42.0 - - @fuel-ts/address@0.42.0 - - @fuel-ts/keystore@0.42.0 - - @fuel-ts/math@0.42.0 - -## 0.41.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.41.0 - - @fuel-ts/address@0.41.0 - - @fuel-ts/keystore@0.41.0 - - @fuel-ts/math@0.41.0 - -## 0.40.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.40.0 - - @fuel-ts/address@0.40.0 - - @fuel-ts/keystore@0.40.0 - - @fuel-ts/math@0.40.0 - -## 0.39.1 - -### Patch Changes - -- Updated dependencies [[`e31f2f57`](https://github.com/FuelLabs/fuels-ts/commit/e31f2f574b5d2e334b0c55360cdc1bb273d4ac47)]: - - @fuel-ts/address@0.39.1 - - @fuel-ts/hasher@0.39.1 - - @fuel-ts/keystore@0.39.1 - - @fuel-ts/math@0.39.1 - -## 0.39.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.39.0 - - @fuel-ts/address@0.39.0 - - @fuel-ts/keystore@0.39.0 - - @fuel-ts/math@0.39.0 - -## 0.38.1 - -### Patch Changes - -- [#870](https://github.com/FuelLabs/fuels-ts/pull/870) [`771844de`](https://github.com/FuelLabs/fuels-ts/commit/771844de1bb27d3e88f5a45f9ac6e32adfbf50e3) Thanks [@Dhaiwat10](https://github.com/Dhaiwat10)! - The SDK was crashing when being used inside of a Vite or Next.js project. This problem should be fixed now. - -- Updated dependencies []: - - @fuel-ts/address@0.38.1 - - @fuel-ts/hasher@0.38.1 - - @fuel-ts/keystore@0.38.1 - - @fuel-ts/math@0.38.1 - -## 0.38.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.38.0 - - @fuel-ts/hasher@0.38.0 - - @fuel-ts/keystore@0.38.0 - - @fuel-ts/math@0.38.0 - -## 0.37.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.37.1 - - @fuel-ts/hasher@0.37.1 - - @fuel-ts/keystore@0.37.1 - - @fuel-ts/math@0.37.1 - -## 0.37.0 - -### Patch Changes - -- Updated dependencies [[`deeb2d9c`](https://github.com/FuelLabs/fuels-ts/commit/deeb2d9ca304e43e36ef0db5e7b46c14f2f4e8f3)]: - - @fuel-ts/math@0.37.0 - - @fuel-ts/hasher@0.37.0 - - @fuel-ts/address@0.37.0 - - @fuel-ts/keystore@0.37.0 - -## 0.36.0 - -### Patch Changes - -- Updated dependencies [[`3cb39443`](https://github.com/FuelLabs/fuels-ts/commit/3cb394431a63f5294edf7e33207214eabf439ef5), [`1de9693a`](https://github.com/FuelLabs/fuels-ts/commit/1de9693a059501243bfa7b826231fd0fff10abcd)]: - - @fuel-ts/address@0.36.0 - - @fuel-ts/hasher@0.36.0 - - @fuel-ts/math@0.36.0 - - @fuel-ts/keystore@0.36.0 - -## 0.35.0 - -### Patch Changes - -- [#819](https://github.com/FuelLabs/fuels-ts/pull/819) [`f4e1028a`](https://github.com/FuelLabs/fuels-ts/commit/f4e1028acd5a583d12662dd07ca0d17084a35be2) Thanks [@arboleya](https://github.com/arboleya)! - Adjusting export fields for all packages - -- Updated dependencies [[`f4e1028a`](https://github.com/FuelLabs/fuels-ts/commit/f4e1028acd5a583d12662dd07ca0d17084a35be2)]: - - @fuel-ts/address@0.35.0 - - @fuel-ts/hasher@0.35.0 - - @fuel-ts/keystore@0.35.0 - - @fuel-ts/math@0.35.0 - -## 0.34.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.34.1 - - @fuel-ts/hasher@0.34.1 - - @fuel-ts/keystore@0.34.1 - - @fuel-ts/math@0.34.1 - -## 0.34.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.34.0 - - @fuel-ts/address@0.34.0 - - @fuel-ts/keystore@0.34.0 - - @fuel-ts/math@0.34.0 - -## 0.33.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.33.0 - - @fuel-ts/address@0.33.0 - - @fuel-ts/keystore@0.33.0 - - @fuel-ts/math@0.33.0 - -## 0.32.0 - -### Patch Changes - -- Updated dependencies [[`66c200a1`](https://github.com/FuelLabs/fuels-ts/commit/66c200a1b4ecbef0ef8664fc01f7142364b0a1bc)]: - - @fuel-ts/address@0.32.0 - - @fuel-ts/hasher@0.32.0 - - @fuel-ts/keystore@0.32.0 - - @fuel-ts/math@0.32.0 - -## 0.31.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.31.0 - - @fuel-ts/address@0.31.0 - - @fuel-ts/keystore@0.31.0 - - @fuel-ts/math@0.31.0 - -## 0.30.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.30.0 - - @fuel-ts/address@0.30.0 - - @fuel-ts/keystore@0.30.0 - - @fuel-ts/math@0.30.0 - -## 0.29.1 - -### Patch Changes - -- Updated dependencies [[`609d5f0`](https://github.com/FuelLabs/fuels-ts/commit/609d5f052e5c1e7f2a73a619ac49a76605812c51)]: - - @fuel-ts/math@0.29.1 - - @fuel-ts/hasher@0.29.1 - - @fuel-ts/address@0.29.1 - - @fuel-ts/keystore@0.29.1 - -## 0.29.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.29.0 - - @fuel-ts/address@0.29.0 - - @fuel-ts/keystore@0.29.0 - - @fuel-ts/math@0.29.0 - -## 0.28.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.28.1 - - @fuel-ts/hasher@0.28.1 - - @fuel-ts/keystore@0.28.1 - - @fuel-ts/math@0.28.1 - -## 0.28.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.28.0 - - @fuel-ts/address@0.28.0 - - @fuel-ts/keystore@0.28.0 - - @fuel-ts/math@0.28.0 - -## 0.27.0 - -### Patch Changes - -- Updated dependencies [[`8103891`](https://github.com/FuelLabs/fuels-ts/commit/8103891071145a86380a8c9bcb11132249138486)]: - - @fuel-ts/address@0.27.0 - - @fuel-ts/hasher@0.27.0 - - @fuel-ts/keystore@0.27.0 - - @fuel-ts/math@0.27.0 - -## 0.26.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.26.0 - - @fuel-ts/hasher@0.26.0 - - @fuel-ts/keystore@0.26.0 - - @fuel-ts/math@0.26.0 - -## 0.25.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.25.1 - - @fuel-ts/hasher@0.25.1 - - @fuel-ts/keystore@0.25.1 - - @fuel-ts/math@0.25.1 - -## 0.25.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.25.0 - - @fuel-ts/hasher@0.25.0 - - @fuel-ts/keystore@0.25.0 - - @fuel-ts/math@0.25.0 - -## 0.24.2 - -### Patch Changes - -- [#646](https://github.com/FuelLabs/fuels-ts/pull/646) [`fa97383`](https://github.com/FuelLabs/fuels-ts/commit/fa97383114c36ee7a204be7e7f3f974382fa1b2c) Thanks [@camsjams](https://github.com/camsjams)! - Adjust doc update timing - -- Updated dependencies [[`fa97383`](https://github.com/FuelLabs/fuels-ts/commit/fa97383114c36ee7a204be7e7f3f974382fa1b2c), [`0da49d3`](https://github.com/FuelLabs/fuels-ts/commit/0da49d37f4088faf112c0e5a393c6e8a25b3aa61)]: - - @fuel-ts/address@0.24.2 - - @fuel-ts/hasher@0.24.2 - - @fuel-ts/keystore@0.24.2 - - @fuel-ts/math@0.24.2 - -## 0.24.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.24.1 - - @fuel-ts/hasher@0.24.1 - - @fuel-ts/keystore@0.24.1 - - @fuel-ts/math@0.24.1 - -## 0.24.0 - -### Patch Changes - -- Updated dependencies [[`02ac98e`](https://github.com/FuelLabs/fuels-ts/commit/02ac98ea865e0464b132dc3f6bd21f7e1a57435a), [`3de5ee5`](https://github.com/FuelLabs/fuels-ts/commit/3de5ee5b07b9e0c3754bebdecd8eac49b3a79413)]: - - @fuel-ts/address@0.24.0 - - @fuel-ts/hasher@0.24.0 - - @fuel-ts/keystore@0.24.0 - - @fuel-ts/math@0.24.0 - -## 0.23.0 - -### Patch Changes - -- [#639](https://github.com/FuelLabs/fuels-ts/pull/639) [`c0a62ed`](https://github.com/FuelLabs/fuels-ts/commit/c0a62ed278d6118f1af177dc98dcdb42febd0c81) Thanks [@camsjams](https://github.com/camsjams)! - Update docs - -- Updated dependencies [[`c0a62ed`](https://github.com/FuelLabs/fuels-ts/commit/c0a62ed278d6118f1af177dc98dcdb42febd0c81), [`8888e79`](https://github.com/FuelLabs/fuels-ts/commit/8888e79bcd7740a0c85298862bd59981bc6755b3)]: - - @fuel-ts/address@0.23.0 - - @fuel-ts/hasher@0.23.0 - - @fuel-ts/keystore@0.23.0 - - @fuel-ts/math@0.23.0 - -## 0.22.2 - -### Patch Changes - -- [#612](https://github.com/FuelLabs/fuels-ts/pull/612) [`03b060b`](https://github.com/FuelLabs/fuels-ts/commit/03b060b51e00034a2814a0c5ed2718d5dc86533b) Thanks [@camsjams](https://github.com/camsjams)! - Added docs and improved examples - -- Updated dependencies [[`03b060b`](https://github.com/FuelLabs/fuels-ts/commit/03b060b51e00034a2814a0c5ed2718d5dc86533b)]: - - @fuel-ts/address@0.22.2 - - @fuel-ts/hasher@0.22.2 - - @fuel-ts/keystore@0.22.2 - - @fuel-ts/math@0.22.2 - -## 0.22.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.22.1 - - @fuel-ts/address@0.22.1 - - @fuel-ts/keystore@0.22.1 - - @fuel-ts/math@0.22.1 - -## 0.22.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.22.0 - - @fuel-ts/address@0.22.0 - - @fuel-ts/keystore@0.22.0 - - @fuel-ts/math@0.22.0 - -## 0.21.2 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.21.2 - - @fuel-ts/address@0.21.2 - - @fuel-ts/keystore@0.21.2 - - @fuel-ts/math@0.21.2 - -## 0.21.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.21.1 - - @fuel-ts/address@0.21.1 - - @fuel-ts/keystore@0.21.1 - - @fuel-ts/math@0.21.1 - -## 0.21.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.21.0 - - @fuel-ts/address@0.21.0 - - @fuel-ts/keystore@0.21.0 - - @fuel-ts/math@0.21.0 - -## 0.20.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.20.0 - - @fuel-ts/address@0.20.0 - - @fuel-ts/keystore@0.20.0 - - @fuel-ts/math@0.20.0 - -## 0.19.0 - -### Minor Changes - -- [#549](https://github.com/FuelLabs/fuels-ts/pull/549) [`db8cc6b`](https://github.com/FuelLabs/fuels-ts/commit/db8cc6b49616199368463ecd69aae6b3ca0b65d0) Thanks [@QuinnLee](https://github.com/QuinnLee)! - add output variables to transactions - -### Patch Changes - -- Updated dependencies [[`ec83b17`](https://github.com/FuelLabs/fuels-ts/commit/ec83b17a1bcb3d1277911471d3515df3643e6280), [`db8cc6b`](https://github.com/FuelLabs/fuels-ts/commit/db8cc6b49616199368463ecd69aae6b3ca0b65d0)]: - - @fuel-ts/math@0.19.0 - - @fuel-ts/address@0.19.0 - - @fuel-ts/hasher@0.19.0 - - @fuel-ts/keystore@0.19.0 - -## 0.18.0 - -### Patch Changes - -- [#543](https://github.com/FuelLabs/fuels-ts/pull/543) [`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3) Thanks [@arboleya](https://github.com/arboleya)! - Updating all libraries to their latest version - -- [#543](https://github.com/FuelLabs/fuels-ts/pull/543) [`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3) Thanks [@arboleya](https://github.com/arboleya)! - Upgrading outdated dependencies to latest version - -- Updated dependencies [[`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3), [`6b2b812`](https://github.com/FuelLabs/fuels-ts/commit/6b2b812aecfb639c22f3bbd251f2d50f23f9cd0f), [`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3)]: - - @fuel-ts/address@0.18.0 - - @fuel-ts/hasher@0.18.0 - - @fuel-ts/keystore@0.18.0 - - @fuel-ts/math@0.18.0 - -## 0.17.0 - -### Minor Changes - -- [#517](https://github.com/FuelLabs/fuels-ts/pull/517) [`6403076`](https://github.com/FuelLabs/fuels-ts/commit/6403076bb9fce9055b436596e23713b0e7909d87) Thanks [@QuinnLee](https://github.com/QuinnLee)! - Parse Logs and Log Data - -### Patch Changes - -- Updated dependencies [[`f106a78`](https://github.com/FuelLabs/fuels-ts/commit/f106a78e816045e3bdb6bff0b9bceec871009091), [`658b065`](https://github.com/FuelLabs/fuels-ts/commit/658b06538389a6ad3310a739a1bf60311c1e3343), [`6403076`](https://github.com/FuelLabs/fuels-ts/commit/6403076bb9fce9055b436596e23713b0e7909d87)]: - - @fuel-ts/math@0.17.0 - - @fuel-ts/address@0.17.0 - - @fuel-ts/hasher@0.17.0 - - @fuel-ts/keystore@0.17.0 - -## 0.16.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.16.0 - - @fuel-ts/address@0.16.0 - - @fuel-ts/keystore@0.16.0 - - @fuel-ts/math@0.16.0 - -## 0.15.0 - -### Patch Changes - -- [#468](https://github.com/FuelLabs/fuels-ts/pull/468) [`7ad3d79`](https://github.com/FuelLabs/fuels-ts/commit/7ad3d79bf7a1db766912a7b3d52e4fa2e550af56) Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - Refactor to use bn.js instead of bigint. - -- Updated dependencies [[`5828934`](https://github.com/FuelLabs/fuels-ts/commit/5828934ccd96cec82fc0cece0f207dafaee5b89a), [`7ad3d79`](https://github.com/FuelLabs/fuels-ts/commit/7ad3d79bf7a1db766912a7b3d52e4fa2e550af56)]: - - @fuel-ts/address@0.15.0 - - @fuel-ts/hasher@0.15.0 - - @fuel-ts/math@0.15.0 - - @fuel-ts/keystore@0.15.0 - -## 0.14.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.14.0 - - @fuel-ts/hasher@0.14.0 - - @fuel-ts/keystore@0.14.0 - -## 0.13.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.13.0 - - @fuel-ts/address@0.13.0 - - @fuel-ts/keystore@0.13.0 - -## 0.12.0 - -### Minor Changes - -- [#441](https://github.com/FuelLabs/fuels-ts/pull/441) [`f3dcd27`](https://github.com/FuelLabs/fuels-ts/commit/f3dcd272dc5a237c6a8ce235a542ad804039f13b) Thanks [@camsjams](https://github.com/camsjams)! - Added support for Bech32 Address format - -### Patch Changes - -- Updated dependencies [[`f3dcd27`](https://github.com/FuelLabs/fuels-ts/commit/f3dcd272dc5a237c6a8ce235a542ad804039f13b)]: - - @fuel-ts/address@0.12.0 - - @fuel-ts/hasher@0.12.0 - - @fuel-ts/keystore@0.12.0 - -## 0.11.0 - -### Patch Changes - -- [#437](https://github.com/FuelLabs/fuels-ts/pull/437) [`b2f1c66`](https://github.com/FuelLabs/fuels-ts/commit/b2f1c665b8d75f635edb4b75691abc9ebf6850b5) Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - - Fixed linking packages to inside `node_modules` folder - - Remove old Lerna config -- Updated dependencies [[`b2f1c66`](https://github.com/FuelLabs/fuels-ts/commit/b2f1c665b8d75f635edb4b75691abc9ebf6850b5)]: - - @fuel-ts/hasher@0.11.0 - - @fuel-ts/keystore@0.11.0 - -## 0.10.0 - -### Patch Changes - -- Updated dependencies [[`b9cf1a3`](https://github.com/FuelLabs/fuels-ts/commit/b9cf1a3fce660b2a04adcd0b3782a27aead48762)]: - - @fuel-ts/hasher@0.10.0 - - @fuel-ts/keystore@0.10.0 - -## 0.9.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/hasher@0.9.0 - - @fuel-ts/keystore@0.9.0 - -## 0.8.0 - -### Minor Changes - -- [#405](https://github.com/FuelLabs/fuels-ts/pull/405) [`19dee43`](https://github.com/FuelLabs/fuels-ts/commit/19dee437f0ea2fe02a4a7f56b0b55d84279c2dc0) Thanks [@camsjams](https://github.com/camsjams)! - Bumping all packages to next minor version - -### Patch Changes - -- [#374](https://github.com/FuelLabs/fuels-ts/pull/374) [`0dd4870`](https://github.com/FuelLabs/fuels-ts/commit/0dd48702fd187eeebdf9f6e1882c400ee44b956e) Thanks [@camsjams](https://github.com/camsjams)! - Add readme - -* [#397](https://github.com/FuelLabs/fuels-ts/pull/397) [`9ac636b`](https://github.com/FuelLabs/fuels-ts/commit/9ac636b7b1f31d2f68c55af2062b4476217ef563) Thanks [@camsjams](https://github.com/camsjams)! - fix list on fuels - -* Updated dependencies [[`0dd4870`](https://github.com/FuelLabs/fuels-ts/commit/0dd48702fd187eeebdf9f6e1882c400ee44b956e), [`9ac636b`](https://github.com/FuelLabs/fuels-ts/commit/9ac636b7b1f31d2f68c55af2062b4476217ef563), [`19dee43`](https://github.com/FuelLabs/fuels-ts/commit/19dee437f0ea2fe02a4a7f56b0b55d84279c2dc0)]: - - @fuel-ts/hasher@0.8.0 - - @fuel-ts/keystore@0.8.0 - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - ---- - - - -## [0.7.0](https://github.com/FuelLabs/fuels-ts/compare/v0.6.0...0.7.0) - -> 2022-06-03 - -### 🐞 Bug Fixes - -- Use internal random bytes function to avoid browser ESM file ([#310](https://github.com/FuelLabs/fuels-ts/issues/310)) -- change build tasks in order to use pnpm link correctly ([#246](https://github.com/FuelLabs/fuels-ts/issues/246)) - -### 📃 Code Refactoring - -- add turborepo, pnpm and tsup ([#238](https://github.com/FuelLabs/fuels-ts/issues/238)) - -### 🚀 Features - -- enable utxo validation ([#278](https://github.com/FuelLabs/fuels-ts/issues/278)) - - - -## [v0.6.0](https://github.com/FuelLabs/fuels-ts/compare/v0.5.0...v0.6.0) - -> 2022-04-25 - - - -## [v0.5.0](https://github.com/FuelLabs/fuels-ts/compare/v0.4.0...v0.5.0) - -> 2022-03-30 - -### 🚀 Features - -- add hdwallet and mnemonic features to wallet ([#196](https://github.com/FuelLabs/fuels-ts/issues/196)) - - - -## [v0.4.0](https://github.com/FuelLabs/fuels-ts/compare/v0.3.0...v0.4.0) - -> 2022-03-13 - - - -## [v0.3.0](https://github.com/FuelLabs/fuels-ts/compare/v0.1.0...v0.3.0) - -> 2022-03-04 - - - -## v0.1.0 - -> 2022-03-04 - -### 🚀 Features - -- add HDWallet implementation BIP-032 + BIP-044 ([#143](https://github.com/FuelLabs/fuels-ts/issues/143)) diff --git a/packages/signer/LICENSE b/packages/signer/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/packages/signer/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/packages/signer/README.md b/packages/signer/README.md deleted file mode 100644 index e588110d11..0000000000 --- a/packages/signer/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# `@fuel-ts/signer` - -**@fuel-ts/signer** is a sub-module for interacting with **Fuel**. - -This module contains utilities for secp256-k1 signing, verifying and recovery operations. - -# Table of contents - -- [Documentation](#documentation) -- [Usage](#usage) - - [Installation](#installation) - - [Full SDK Installation](#full-sdk-installation) -- [Contributing](#contributing) -- [Changelog](#changelog) -- [License](#license) - -## Documentation - - - -See [Fuels-ts Documentation](https://docs.fuel.network/docs/fuels-ts/) - -## Usage - -### Installation - -```sh -pnpm add @fuel-ts/signer -# or -npm add @fuel-ts/signer -``` - -### Full SDK Installation - -Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package: - -```sh -pnpm add fuels -# or -npm add fuels -``` - -## Contributing - -In order to contribute to `@fuel-ts/signer`, please see the main [fuels-ts](https://github.com/FuelLabs/fuels-ts) monorepo. - -## Changelog - -The `@fuel-ts/signer` changelog can be found at [CHANGELOG](./CHANGELOG.md). - -## License - -The primary license for `@fuel-ts/signer` is `Apache 2.0`, see [LICENSE](./LICENSE). diff --git a/packages/signer/package.json b/packages/signer/package.json deleted file mode 100644 index d648a22e31..0000000000 --- a/packages/signer/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "@fuel-ts/signer", - "version": "0.73.0", - "description": "Secp256k1 signer for the Fuel Network", - "author": "Fuel Labs (https://fuel.network/)", - "main": "dist/index.js", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "engines": { - "node": "^18.18.2 || ^20.0.0" - }, - "exports": { - ".": { - "require": "./dist/index.js", - "import": "./dist/index.mjs", - "types": "./dist/index.d.ts" - } - }, - "files": [ - "dist" - ], - "scripts": { - "build": "tsup", - "postbuild": "tsx ../../scripts/postbuild.ts" - }, - "license": "Apache-2.0", - "dependencies": { - "@fuel-ts/address": "workspace:*", - "@fuel-ts/crypto": "workspace:*", - "@fuel-ts/hasher": "workspace:*", - "@fuel-ts/math": "workspace:*", - "ethers": "^6.7.1", - "@noble/curves": "^1.3.0" - } -} diff --git a/packages/signer/tsconfig.dts.json b/packages/signer/tsconfig.dts.json deleted file mode 100644 index ccca2ac1f3..0000000000 --- a/packages/signer/tsconfig.dts.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./dist", - "rootDir": "./src" - }, - "include": ["src"], - "exclude": ["**/*.test.ts"] -} diff --git a/packages/signer/tsconfig.json b/packages/signer/tsconfig.json deleted file mode 100644 index b0fced27d7..0000000000 --- a/packages/signer/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./dist" - }, - "include": ["src"] -} diff --git a/packages/signer/tsdoc.json b/packages/signer/tsdoc.json deleted file mode 100644 index 4514b07272..0000000000 --- a/packages/signer/tsdoc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "extends": ["../../tsdoc.base.json"] -} diff --git a/packages/signer/tsup.config.ts b/packages/signer/tsup.config.ts deleted file mode 100644 index 4c7f2f0354..0000000000 --- a/packages/signer/tsup.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { index } from '@internal/tsup'; - -export default index; diff --git a/packages/wallet-manager/CHANGELOG.md b/packages/wallet-manager/CHANGELOG.md deleted file mode 100644 index a2c4eb4026..0000000000 --- a/packages/wallet-manager/CHANGELOG.md +++ /dev/null @@ -1,761 +0,0 @@ -# Change Log - -## 0.73.0 - -## 0.72.0 - -### Minor Changes - -- accepting string as address instead of only AbstractAddress, by [@arboleya](https://github.com/arboleya) (See [#1495](https://github.com/FuelLabs/fuels-ts/pull/1495)) - -## 0.71.1 - -## 0.71.0 - -### Minor Changes - -- Add `pnpm create fuels` CLI tool, by [@arboleya](https://github.com/arboleya) (See [#1624](https://github.com/FuelLabs/fuels-ts/pull/1624)) - -## 0.70.1 - -## 0.70.0 - -### Minor Changes - -- Add `pnpm create fuels` CLI tool, by [@Dhaiwat10](https://github.com/Dhaiwat10) (See [#1565](https://github.com/FuelLabs/fuels-ts/pull/1565)) - -## 0.69.1 - -## 0.69.0 - -## 0.68.0 - -## 0.67.0 - -## 0.66.1 - -### Patch Changes - -- Adjusting package manager configs, by [@arboleya](https://github.com/arboleya) (See [#1415](https://github.com/FuelLabs/fuels-ts/pull/1415)) - -## 0.66.0 - -## 0.65.0 - -## 0.64.1 - -## 0.64.0 - -## 0.63.0 - -## 0.62.0 - -## 0.61.0 - -## 0.60.0 - -## 0.59.0 - -## 0.58.0 - -### Minor Changes - -- `chainInfo` is now fetched and cached on all `Provider`s when they are initialized. With this release, you now need to initialize a `Provider` like so: - ```ts - const provider = await Provider.create(url); - ``` - For the full list of breaking-changes, please see [this PR](https://github.com/FuelLabs/fuels-ts/pull/1181), by [@Dhaiwat10](https://github.com/Dhaiwat10) (See [#1181](https://github.com/FuelLabs/fuels-ts/pull/1181)) -- Remove `chainId` from the `Predicate` constructor. You don't need to pass in `chainId` anymore since you are passing in a `provider` already, by [@Dhaiwat10](https://github.com/Dhaiwat10) (See [#1181](https://github.com/FuelLabs/fuels-ts/pull/1181)) -- using FuelError across all packages, by [@Torres-ssf](https://github.com/Torres-ssf) (See [#1230](https://github.com/FuelLabs/fuels-ts/pull/1230)) - -## 0.57.0 - -## 0.56.1 - -## 0.56.0 - -## 0.55.0 - -## 0.54.1 - -## 0.54.0 - -## 0.53.0 - -## 0.52.0 - -## 0.51.0 - -## 0.50.0 - -## 0.49.1 - -## 0.49.0 - -### Minor Changes - -- rename package keystore to crypto, by [@Torres-ssf](https://github.com/Torres-ssf) (See [#1140](https://github.com/FuelLabs/fuels-ts/pull/1140)) - -## 0.48.2 - -## 0.48.1 - -## 0.48.0 - -## 0.47.0 - -## 0.46.0 - -### Patch Changes - -- Removing `publishConfigs`, using `.dts` files with declaration maps (`.dts.map`), by [@arboleya](https://github.com/arboleya) (See [#1055](https://github.com/FuelLabs/fuels-ts/pull/1055)) - -## 0.45.0 - -## 0.44.2 - -## 0.44.1 - -## 0.44.0 - -### Minor Changes - -- Revamping all packages configs, enabling local installation, by [@arboleya](https://github.com/arboleya) (See [#984](https://github.com/FuelLabs/fuels-ts/pull/984)) - -## 0.43.1 - -## 0.43.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/wallet@0.43.0 - - @fuel-ts/address@0.43.0 - - @fuel-ts/interfaces@0.43.0 - - @fuel-ts/keystore@0.43.0 - - @fuel-ts/mnemonic@0.43.0 - -## 0.42.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/wallet@0.42.0 - - @fuel-ts/address@0.42.0 - - @fuel-ts/interfaces@0.42.0 - - @fuel-ts/keystore@0.42.0 - - @fuel-ts/mnemonic@0.42.0 - -## 0.41.0 - -### Patch Changes - -- Updated dependencies [[`bf6214cc`](https://github.com/FuelLabs/fuels-ts/commit/bf6214cc2c4be227974e7d64360c01c9875c772c)]: - - @fuel-ts/wallet@0.41.0 - - @fuel-ts/address@0.41.0 - - @fuel-ts/interfaces@0.41.0 - - @fuel-ts/keystore@0.41.0 - - @fuel-ts/mnemonic@0.41.0 - -## 0.40.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/wallet@0.40.0 - - @fuel-ts/address@0.40.0 - - @fuel-ts/interfaces@0.40.0 - - @fuel-ts/keystore@0.40.0 - - @fuel-ts/mnemonic@0.40.0 - -## 0.39.1 - -### Patch Changes - -- Updated dependencies [[`e31f2f57`](https://github.com/FuelLabs/fuels-ts/commit/e31f2f574b5d2e334b0c55360cdc1bb273d4ac47)]: - - @fuel-ts/address@0.39.1 - - @fuel-ts/wallet@0.39.1 - - @fuel-ts/interfaces@0.39.1 - - @fuel-ts/keystore@0.39.1 - - @fuel-ts/mnemonic@0.39.1 - -## 0.39.0 - -### Patch Changes - -- [#824](https://github.com/FuelLabs/fuels-ts/pull/824) [`a8d27dc7`](https://github.com/FuelLabs/fuels-ts/commit/a8d27dc749b4c443fd0714da12b7a75ab56da6d7) Thanks [@Dhaiwat10](https://github.com/Dhaiwat10)! - The `no-explicit-any` ESLint rule is now treated as an error. The usage of `any` has now been replaced from as many files as possible. - -- Updated dependencies [[`63c906b2`](https://github.com/FuelLabs/fuels-ts/commit/63c906b25e9cdb65e52c5d77fb85f118400fc545), [`a8d27dc7`](https://github.com/FuelLabs/fuels-ts/commit/a8d27dc749b4c443fd0714da12b7a75ab56da6d7)]: - - @fuel-ts/interfaces@0.39.0 - - @fuel-ts/wallet@0.39.0 - - @fuel-ts/address@0.39.0 - - @fuel-ts/keystore@0.39.0 - - @fuel-ts/mnemonic@0.39.0 - -## 0.38.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/wallet@0.38.1 - - @fuel-ts/address@0.38.1 - - @fuel-ts/interfaces@0.38.1 - - @fuel-ts/keystore@0.38.1 - - @fuel-ts/mnemonic@0.38.1 - -## 0.38.0 - -### Patch Changes - -- Updated dependencies [[`653c8391`](https://github.com/FuelLabs/fuels-ts/commit/653c8391ece33a8f31598ea137452dd601dc7468)]: - - @fuel-ts/interfaces@0.38.0 - - @fuel-ts/wallet@0.38.0 - - @fuel-ts/address@0.38.0 - - @fuel-ts/keystore@0.38.0 - - @fuel-ts/mnemonic@0.38.0 - -## 0.37.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.37.1 - - @fuel-ts/wallet@0.37.1 - - @fuel-ts/interfaces@0.37.1 - - @fuel-ts/keystore@0.37.1 - - @fuel-ts/mnemonic@0.37.1 - -## 0.37.0 - -### Patch Changes - -- Updated dependencies [[`deeb2d9c`](https://github.com/FuelLabs/fuels-ts/commit/deeb2d9ca304e43e36ef0db5e7b46c14f2f4e8f3)]: - - @fuel-ts/wallet@0.37.0 - - @fuel-ts/address@0.37.0 - - @fuel-ts/interfaces@0.37.0 - - @fuel-ts/keystore@0.37.0 - - @fuel-ts/mnemonic@0.37.0 - -## 0.36.0 - -### Patch Changes - -- Updated dependencies [[`d9f8c8c0`](https://github.com/FuelLabs/fuels-ts/commit/d9f8c8c0e993cc1abca19877eafd617ca0d2ee38), [`3cb39443`](https://github.com/FuelLabs/fuels-ts/commit/3cb394431a63f5294edf7e33207214eabf439ef5), [`1de9693a`](https://github.com/FuelLabs/fuels-ts/commit/1de9693a059501243bfa7b826231fd0fff10abcd)]: - - @fuel-ts/wallet@0.36.0 - - @fuel-ts/address@0.36.0 - - @fuel-ts/interfaces@0.36.0 - - @fuel-ts/keystore@0.36.0 - - @fuel-ts/mnemonic@0.36.0 - -## 0.35.0 - -### Patch Changes - -- [#819](https://github.com/FuelLabs/fuels-ts/pull/819) [`f4e1028a`](https://github.com/FuelLabs/fuels-ts/commit/f4e1028acd5a583d12662dd07ca0d17084a35be2) Thanks [@arboleya](https://github.com/arboleya)! - Adjusting export fields for all packages - -- Updated dependencies [[`f4e1028a`](https://github.com/FuelLabs/fuels-ts/commit/f4e1028acd5a583d12662dd07ca0d17084a35be2)]: - - @fuel-ts/address@0.35.0 - - @fuel-ts/interfaces@0.35.0 - - @fuel-ts/keystore@0.35.0 - - @fuel-ts/mnemonic@0.35.0 - - @fuel-ts/wallet@0.35.0 - -## 0.34.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.34.1 - - @fuel-ts/wallet@0.34.1 - - @fuel-ts/interfaces@0.34.1 - - @fuel-ts/keystore@0.34.1 - - @fuel-ts/mnemonic@0.34.1 - -## 0.34.0 - -### Patch Changes - -- Updated dependencies [[`5454ca3b`](https://github.com/FuelLabs/fuels-ts/commit/5454ca3b616401fda051962129b1d8a221e3139d)]: - - @fuel-ts/mnemonic@0.34.0 - - @fuel-ts/wallet@0.34.0 - - @fuel-ts/address@0.34.0 - - @fuel-ts/interfaces@0.34.0 - - @fuel-ts/keystore@0.34.0 - -## 0.33.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/wallet@0.33.0 - - @fuel-ts/address@0.33.0 - - @fuel-ts/interfaces@0.33.0 - - @fuel-ts/keystore@0.33.0 - - @fuel-ts/mnemonic@0.33.0 - -## 0.32.0 - -### Patch Changes - -- Updated dependencies [[`66c200a1`](https://github.com/FuelLabs/fuels-ts/commit/66c200a1b4ecbef0ef8664fc01f7142364b0a1bc), [`66c200a1`](https://github.com/FuelLabs/fuels-ts/commit/66c200a1b4ecbef0ef8664fc01f7142364b0a1bc)]: - - @fuel-ts/wallet@0.32.0 - - @fuel-ts/address@0.32.0 - - @fuel-ts/interfaces@0.32.0 - - @fuel-ts/keystore@0.32.0 - - @fuel-ts/mnemonic@0.32.0 - -## 0.31.0 - -### Patch Changes - -- Updated dependencies [[`3aa7ed4`](https://github.com/FuelLabs/fuels-ts/commit/3aa7ed46dec1a39e391d1672452bec9f8bc5fc4c)]: - - @fuel-ts/wallet@0.31.0 - - @fuel-ts/address@0.31.0 - - @fuel-ts/interfaces@0.31.0 - - @fuel-ts/keystore@0.31.0 - - @fuel-ts/mnemonic@0.31.0 - -## 0.30.0 - -### Patch Changes - -- [#756](https://github.com/FuelLabs/fuels-ts/pull/756) [`2d70903`](https://github.com/FuelLabs/fuels-ts/commit/2d70903c980a738bee82bdd1181ed84545b6aa66) Thanks [@luizstacio](https://github.com/luizstacio)! - Fix wallet manager state when unlock fails - -- Updated dependencies []: - - @fuel-ts/wallet@0.30.0 - - @fuel-ts/address@0.30.0 - - @fuel-ts/interfaces@0.30.0 - - @fuel-ts/keystore@0.30.0 - - @fuel-ts/mnemonic@0.30.0 - -## 0.29.1 - -### Patch Changes - -- Updated dependencies [[`7d3416d`](https://github.com/FuelLabs/fuels-ts/commit/7d3416d5631c124bf7d89e5451bc206f0d93dc2a), [`cac1901`](https://github.com/FuelLabs/fuels-ts/commit/cac1901cbc5851751eaa5ef6380a436e33789e8a)]: - - @fuel-ts/wallet@0.29.1 - - @fuel-ts/mnemonic@0.29.1 - - @fuel-ts/address@0.29.1 - - @fuel-ts/interfaces@0.29.1 - - @fuel-ts/keystore@0.29.1 - -## 0.29.0 - -### Patch Changes - -- Updated dependencies [[`52e62e4`](https://github.com/FuelLabs/fuels-ts/commit/52e62e4d7c19f5f45e54b1d23d89b6f4bfff4a42), [`c81396b`](https://github.com/FuelLabs/fuels-ts/commit/c81396bf3300e5aa2d0e0355877526c7357e0c90)]: - - @fuel-ts/wallet@0.29.0 - - @fuel-ts/mnemonic@0.29.0 - - @fuel-ts/address@0.29.0 - - @fuel-ts/interfaces@0.29.0 - - @fuel-ts/keystore@0.29.0 - -## 0.28.1 - -### Patch Changes - -- [#718](https://github.com/FuelLabs/fuels-ts/pull/718) [`217f981`](https://github.com/FuelLabs/fuels-ts/commit/217f9818e1e11415efc564ba9e6653658e6af07c) Thanks [@camsjams](https://github.com/camsjams)! - Fix test that had duplicated doc region - -- Updated dependencies []: - - @fuel-ts/address@0.28.1 - - @fuel-ts/interfaces@0.28.1 - - @fuel-ts/keystore@0.28.1 - - @fuel-ts/mnemonic@0.28.1 - - @fuel-ts/wallet@0.28.1 - -## 0.28.0 - -### Patch Changes - -- Updated dependencies [[`605293d`](https://github.com/FuelLabs/fuels-ts/commit/605293d276b6ab24347c65d717e6bdf57d92b95b)]: - - @fuel-ts/wallet@0.28.0 - - @fuel-ts/address@0.28.0 - - @fuel-ts/interfaces@0.28.0 - - @fuel-ts/keystore@0.28.0 - - @fuel-ts/mnemonic@0.28.0 - -## 0.27.0 - -### Patch Changes - -- [#691](https://github.com/FuelLabs/fuels-ts/pull/691) [`8dbde2c`](https://github.com/FuelLabs/fuels-ts/commit/8dbde2ca01578ebf45e419bd79cda4178d3013fc) Thanks [@luizstacio](https://github.com/luizstacio)! - Return account after addAccount - Export types from WalletManager -- Updated dependencies [[`8103891`](https://github.com/FuelLabs/fuels-ts/commit/8103891071145a86380a8c9bcb11132249138486)]: - - @fuel-ts/address@0.27.0 - - @fuel-ts/wallet@0.27.0 - - @fuel-ts/interfaces@0.27.0 - - @fuel-ts/keystore@0.27.0 - - @fuel-ts/mnemonic@0.27.0 - -## 0.26.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.26.0 - - @fuel-ts/wallet@0.26.0 - - @fuel-ts/interfaces@0.26.0 - - @fuel-ts/keystore@0.26.0 - - @fuel-ts/mnemonic@0.26.0 - -## 0.25.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.25.1 - - @fuel-ts/wallet@0.25.1 - - @fuel-ts/interfaces@0.25.1 - - @fuel-ts/keystore@0.25.1 - - @fuel-ts/mnemonic@0.25.1 - -## 0.25.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.25.0 - - @fuel-ts/interfaces@0.25.0 - - @fuel-ts/keystore@0.25.0 - - @fuel-ts/mnemonic@0.25.0 - - @fuel-ts/wallet@0.25.0 - -## 0.24.2 - -### Patch Changes - -- [#646](https://github.com/FuelLabs/fuels-ts/pull/646) [`fa97383`](https://github.com/FuelLabs/fuels-ts/commit/fa97383114c36ee7a204be7e7f3f974382fa1b2c) Thanks [@camsjams](https://github.com/camsjams)! - Adjust doc update timing - -- Updated dependencies [[`fa97383`](https://github.com/FuelLabs/fuels-ts/commit/fa97383114c36ee7a204be7e7f3f974382fa1b2c), [`0da49d3`](https://github.com/FuelLabs/fuels-ts/commit/0da49d37f4088faf112c0e5a393c6e8a25b3aa61)]: - - @fuel-ts/address@0.24.2 - - @fuel-ts/interfaces@0.24.2 - - @fuel-ts/keystore@0.24.2 - - @fuel-ts/mnemonic@0.24.2 - - @fuel-ts/wallet@0.24.2 - -## 0.24.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.24.1 - - @fuel-ts/wallet@0.24.1 - - @fuel-ts/interfaces@0.24.1 - - @fuel-ts/keystore@0.24.1 - - @fuel-ts/mnemonic@0.24.1 - -## 0.24.0 - -### Patch Changes - -- Updated dependencies [[`9c9fae0`](https://github.com/FuelLabs/fuels-ts/commit/9c9fae05668912afea1dfbe4339a9cdddba1513a), [`02ac98e`](https://github.com/FuelLabs/fuels-ts/commit/02ac98ea865e0464b132dc3f6bd21f7e1a57435a), [`3de5ee5`](https://github.com/FuelLabs/fuels-ts/commit/3de5ee5b07b9e0c3754bebdecd8eac49b3a79413)]: - - @fuel-ts/wallet@0.24.0 - - @fuel-ts/address@0.24.0 - - @fuel-ts/interfaces@0.24.0 - - @fuel-ts/keystore@0.24.0 - - @fuel-ts/mnemonic@0.24.0 - -## 0.23.0 - -### Patch Changes - -- [#639](https://github.com/FuelLabs/fuels-ts/pull/639) [`c0a62ed`](https://github.com/FuelLabs/fuels-ts/commit/c0a62ed278d6118f1af177dc98dcdb42febd0c81) Thanks [@camsjams](https://github.com/camsjams)! - Update docs - -- Updated dependencies [[`c0a62ed`](https://github.com/FuelLabs/fuels-ts/commit/c0a62ed278d6118f1af177dc98dcdb42febd0c81)]: - - @fuel-ts/address@0.23.0 - - @fuel-ts/interfaces@0.23.0 - - @fuel-ts/keystore@0.23.0 - - @fuel-ts/mnemonic@0.23.0 - - @fuel-ts/wallet@0.23.0 - -## 0.22.2 - -### Patch Changes - -- [#612](https://github.com/FuelLabs/fuels-ts/pull/612) [`03b060b`](https://github.com/FuelLabs/fuels-ts/commit/03b060b51e00034a2814a0c5ed2718d5dc86533b) Thanks [@camsjams](https://github.com/camsjams)! - Added docs and improved examples - -- Updated dependencies [[`03b060b`](https://github.com/FuelLabs/fuels-ts/commit/03b060b51e00034a2814a0c5ed2718d5dc86533b)]: - - @fuel-ts/address@0.22.2 - - @fuel-ts/interfaces@0.22.2 - - @fuel-ts/keystore@0.22.2 - - @fuel-ts/mnemonic@0.22.2 - - @fuel-ts/wallet@0.22.2 - -## 0.22.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/wallet@0.22.1 - - @fuel-ts/address@0.22.1 - - @fuel-ts/interfaces@0.22.1 - - @fuel-ts/keystore@0.22.1 - - @fuel-ts/mnemonic@0.22.1 - -## 0.22.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/wallet@0.22.0 - - @fuel-ts/address@0.22.0 - - @fuel-ts/interfaces@0.22.0 - - @fuel-ts/keystore@0.22.0 - - @fuel-ts/mnemonic@0.22.0 - -## 0.21.2 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/wallet@0.21.2 - - @fuel-ts/address@0.21.2 - - @fuel-ts/interfaces@0.21.2 - - @fuel-ts/keystore@0.21.2 - - @fuel-ts/mnemonic@0.21.2 - -## 0.21.1 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/wallet@0.21.1 - - @fuel-ts/address@0.21.1 - - @fuel-ts/interfaces@0.21.1 - - @fuel-ts/keystore@0.21.1 - - @fuel-ts/mnemonic@0.21.1 - -## 0.21.0 - -### Minor Changes - -- [#594](https://github.com/FuelLabs/fuels-ts/pull/594) [`2e3d25d`](https://github.com/FuelLabs/fuels-ts/commit/2e3d25dbaa602c4ab869601da7ae1921d3bd80e1) Thanks [@luizstacio](https://github.com/luizstacio)! - Enable passphrase update on wallet manager - -### Patch Changes - -- Updated dependencies [[`d44de76`](https://github.com/FuelLabs/fuels-ts/commit/d44de76bdde4d566e0bac6e872adc6e6f29f0bee), [`897888e`](https://github.com/FuelLabs/fuels-ts/commit/897888e08fcc3e6e533429ddd14cd2273e049e15)]: - - @fuel-ts/wallet@0.21.0 - - @fuel-ts/address@0.21.0 - - @fuel-ts/interfaces@0.21.0 - - @fuel-ts/keystore@0.21.0 - - @fuel-ts/mnemonic@0.21.0 - -## 0.20.0 - -### Patch Changes - -- Updated dependencies [[`5ee7642`](https://github.com/FuelLabs/fuels-ts/commit/5ee76427ae75d95aa4cb8698fdc4aadc90bfe01e)]: - - @fuel-ts/wallet@0.20.0 - - @fuel-ts/address@0.20.0 - - @fuel-ts/interfaces@0.20.0 - - @fuel-ts/keystore@0.20.0 - - @fuel-ts/mnemonic@0.20.0 - -## 0.19.0 - -### Minor Changes - -- [#551](https://github.com/FuelLabs/fuels-ts/pull/551) [`86b5411`](https://github.com/FuelLabs/fuels-ts/commit/86b5411d12caac6aea591fc46efecffae4788be3) Thanks [@luizstacio](https://github.com/luizstacio)! - Add export vault on wallet manager - -- [#549](https://github.com/FuelLabs/fuels-ts/pull/549) [`db8cc6b`](https://github.com/FuelLabs/fuels-ts/commit/db8cc6b49616199368463ecd69aae6b3ca0b65d0) Thanks [@QuinnLee](https://github.com/QuinnLee)! - add output variables to transactions - -- [#552](https://github.com/FuelLabs/fuels-ts/pull/552) [`fcacb06`](https://github.com/FuelLabs/fuels-ts/commit/fcacb06a006367381d05c85bb83fa7bf2fa485a5) Thanks [@luizstacio](https://github.com/luizstacio)! - Change sign methods to be async - -### Patch Changes - -- Updated dependencies [[`0e91213`](https://github.com/FuelLabs/fuels-ts/commit/0e91213e54b39d2de7a358912c85d7c32c5dde6d), [`63aa038`](https://github.com/FuelLabs/fuels-ts/commit/63aa038052d0aac1dc1f66a9852fd55771713be6), [`db8cc6b`](https://github.com/FuelLabs/fuels-ts/commit/db8cc6b49616199368463ecd69aae6b3ca0b65d0), [`2a98c1e`](https://github.com/FuelLabs/fuels-ts/commit/2a98c1e455765fbfe5775bd4d706571705083f3e), [`fcacb06`](https://github.com/FuelLabs/fuels-ts/commit/fcacb06a006367381d05c85bb83fa7bf2fa485a5)]: - - @fuel-ts/wallet@0.19.0 - - @fuel-ts/address@0.19.0 - - @fuel-ts/interfaces@0.19.0 - - @fuel-ts/keystore@0.19.0 - - @fuel-ts/mnemonic@0.19.0 - -## 0.18.0 - -### Patch Changes - -- Updated dependencies [[`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3), [`1eb0256`](https://github.com/FuelLabs/fuels-ts/commit/1eb02569008292621cd69647bc78044df6ec3103), [`6b2b812`](https://github.com/FuelLabs/fuels-ts/commit/6b2b812aecfb639c22f3bbd251f2d50f23f9cd0f), [`fecd78b`](https://github.com/FuelLabs/fuels-ts/commit/fecd78bec8a6a9077bd3494369345461da3934a3)]: - - @fuel-ts/address@0.18.0 - - @fuel-ts/keystore@0.18.0 - - @fuel-ts/mnemonic@0.18.0 - - @fuel-ts/wallet@0.18.0 - - @fuel-ts/interfaces@0.18.0 - -## 0.17.0 - -### Minor Changes - -- [#517](https://github.com/FuelLabs/fuels-ts/pull/517) [`6403076`](https://github.com/FuelLabs/fuels-ts/commit/6403076bb9fce9055b436596e23713b0e7909d87) Thanks [@QuinnLee](https://github.com/QuinnLee)! - Parse Logs and Log Data - -### Patch Changes - -- Updated dependencies [[`fa83fcd`](https://github.com/FuelLabs/fuels-ts/commit/fa83fcd0c90ddb95bc397ab2675a5ad759b94f82), [`6403076`](https://github.com/FuelLabs/fuels-ts/commit/6403076bb9fce9055b436596e23713b0e7909d87)]: - - @fuel-ts/wallet@0.17.0 - - @fuel-ts/address@0.17.0 - - @fuel-ts/interfaces@0.17.0 - - @fuel-ts/keystore@0.17.0 - - @fuel-ts/mnemonic@0.17.0 - -## 0.16.0 - -### Minor Changes - -- [#505](https://github.com/FuelLabs/fuels-ts/pull/505) [`1961cc4`](https://github.com/FuelLabs/fuels-ts/commit/1961cc4d9bcaccf7311699b04947549c14c01ee8) Thanks [@QuinnLee](https://github.com/QuinnLee)! - Add vaultId to getAccount - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/wallet@0.16.0 - - @fuel-ts/address@0.16.0 - - @fuel-ts/interfaces@0.16.0 - - @fuel-ts/keystore@0.16.0 - - @fuel-ts/mnemonic@0.16.0 - -## 0.15.0 - -### Patch Changes - -- Updated dependencies [[`5828934`](https://github.com/FuelLabs/fuels-ts/commit/5828934ccd96cec82fc0cece0f207dafaee5b89a), [`7ad3d79`](https://github.com/FuelLabs/fuels-ts/commit/7ad3d79bf7a1db766912a7b3d52e4fa2e550af56)]: - - @fuel-ts/address@0.15.0 - - @fuel-ts/interfaces@0.15.0 - - @fuel-ts/wallet@0.15.0 - - @fuel-ts/keystore@0.15.0 - - @fuel-ts/mnemonic@0.15.0 - -## 0.14.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/address@0.14.0 - - @fuel-ts/interfaces@0.14.0 - - @fuel-ts/keystore@0.14.0 - - @fuel-ts/mnemonic@0.14.0 - - @fuel-ts/wallet@0.14.0 - -## 0.13.0 - -### Minor Changes - -- [#477](https://github.com/FuelLabs/fuels-ts/pull/477) [`61d6e6b`](https://github.com/FuelLabs/fuels-ts/commit/61d6e6b3d0fde7f28d3a94a967ce0ac85c2f1bf7) Thanks [@luizstacio](https://github.com/luizstacio)! - Change default derivation from non-hardened to hardened address. And add custom derive path config. - -* [#458](https://github.com/FuelLabs/fuels-ts/pull/458) [`9190cee`](https://github.com/FuelLabs/fuels-ts/commit/9190cee45529b6c3fcffb2a12b1ef6319b2b39df) Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - Upgrade compatibility to fuel-core v0.10.1 - -### Patch Changes - -- Updated dependencies [[`9190cee`](https://github.com/FuelLabs/fuels-ts/commit/9190cee45529b6c3fcffb2a12b1ef6319b2b39df), [`5d4d6ce`](https://github.com/FuelLabs/fuels-ts/commit/5d4d6ce7fa1a23deae3f41be94c9fe2ee9851772)]: - - @fuel-ts/wallet@0.13.0 - - @fuel-ts/address@0.13.0 - - @fuel-ts/interfaces@0.13.0 - - @fuel-ts/keystore@0.13.0 - - @fuel-ts/mnemonic@0.13.0 - -## 0.12.0 - -### Minor Changes - -- [#441](https://github.com/FuelLabs/fuels-ts/pull/441) [`f3dcd27`](https://github.com/FuelLabs/fuels-ts/commit/f3dcd272dc5a237c6a8ce235a542ad804039f13b) Thanks [@camsjams](https://github.com/camsjams)! - Added support for Bech32 Address format - -### Patch Changes - -- Updated dependencies [[`f3dcd27`](https://github.com/FuelLabs/fuels-ts/commit/f3dcd272dc5a237c6a8ce235a542ad804039f13b)]: - - @fuel-ts/address@0.12.0 - - @fuel-ts/interfaces@0.12.0 - - @fuel-ts/wallet@0.12.0 - - @fuel-ts/keystore@0.12.0 - - @fuel-ts/mnemonic@0.12.0 - -## 0.11.0 - -### Patch Changes - -- [#437](https://github.com/FuelLabs/fuels-ts/pull/437) [`b2f1c66`](https://github.com/FuelLabs/fuels-ts/commit/b2f1c665b8d75f635edb4b75691abc9ebf6850b5) Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - - Fixed linking packages to inside `node_modules` folder - - Remove old Lerna config -- Updated dependencies [[`b2f1c66`](https://github.com/FuelLabs/fuels-ts/commit/b2f1c665b8d75f635edb4b75691abc9ebf6850b5)]: - - @fuel-ts/keystore@0.11.0 - - @fuel-ts/mnemonic@0.11.0 - - @fuel-ts/wallet@0.11.0 - -## 0.10.0 - -### Patch Changes - -- Updated dependencies [[`b9cf1a3`](https://github.com/FuelLabs/fuels-ts/commit/b9cf1a3fce660b2a04adcd0b3782a27aead48762)]: - - @fuel-ts/wallet@0.10.0 - - @fuel-ts/keystore@0.10.0 - - @fuel-ts/mnemonic@0.10.0 - -## 0.9.0 - -### Patch Changes - -- Updated dependencies []: - - @fuel-ts/wallet@0.9.0 - - @fuel-ts/keystore@0.9.0 - - @fuel-ts/mnemonic@0.9.0 - -## 0.8.0 - -### Minor Changes - -- [#405](https://github.com/FuelLabs/fuels-ts/pull/405) [`19dee43`](https://github.com/FuelLabs/fuels-ts/commit/19dee437f0ea2fe02a4a7f56b0b55d84279c2dc0) Thanks [@camsjams](https://github.com/camsjams)! - Bumping all packages to next minor version - -### Patch Changes - -- [#374](https://github.com/FuelLabs/fuels-ts/pull/374) [`0dd4870`](https://github.com/FuelLabs/fuels-ts/commit/0dd48702fd187eeebdf9f6e1882c400ee44b956e) Thanks [@camsjams](https://github.com/camsjams)! - Add readme - -* [#397](https://github.com/FuelLabs/fuels-ts/pull/397) [`9ac636b`](https://github.com/FuelLabs/fuels-ts/commit/9ac636b7b1f31d2f68c55af2062b4476217ef563) Thanks [@camsjams](https://github.com/camsjams)! - fix list on fuels - -* Updated dependencies [[`0dd4870`](https://github.com/FuelLabs/fuels-ts/commit/0dd48702fd187eeebdf9f6e1882c400ee44b956e), [`9ac636b`](https://github.com/FuelLabs/fuels-ts/commit/9ac636b7b1f31d2f68c55af2062b4476217ef563), [`19dee43`](https://github.com/FuelLabs/fuels-ts/commit/19dee437f0ea2fe02a4a7f56b0b55d84279c2dc0)]: - - @fuel-ts/keystore@0.8.0 - - @fuel-ts/mnemonic@0.8.0 - - @fuel-ts/wallet@0.8.0 - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - ---- - - - -## [0.7.0](https://github.com/FuelLabs/fuels-ts/compare/v0.6.0...0.7.0) - -> 2022-05-11 - -### 🐞 Bug Fixes - -- change build tasks in order to use pnpm link correctly ([#246](https://github.com/FuelLabs/fuels-ts/issues/246)) - -### 📃 Code Refactoring - -- add turborepo, pnpm and tsup ([#238](https://github.com/FuelLabs/fuels-ts/issues/238)) - - - -## [v0.6.0](https://github.com/FuelLabs/fuels-ts/compare/v0.5.0...v0.6.0) - -> 2022-04-25 - - - -## [v0.5.0](https://github.com/FuelLabs/fuels-ts/compare/v0.4.0...v0.5.0) - -> 2022-03-30 - - - -## [v0.4.0](https://github.com/FuelLabs/fuels-ts/compare/v0.3.0...v0.4.0) - -> 2022-03-13 - - - -## [v0.3.0](https://github.com/FuelLabs/fuels-ts/compare/v0.1.0...v0.3.0) - -> 2022-03-04 - - - -## v0.1.0 - -> 2022-03-04 diff --git a/packages/wallet-manager/LICENSE b/packages/wallet-manager/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/packages/wallet-manager/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/packages/wallet-manager/README.md b/packages/wallet-manager/README.md deleted file mode 100644 index 9b443fd0ef..0000000000 --- a/packages/wallet-manager/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# `@fuel-ts/wallet-manager` - -**@fuel-ts/wallet-manager** is a sub-module for interacting with **Fuel**. - -This module is a coordination wrapper to manage multiple wallet `Vaults` and store private keys and mnemonic phrases. - -# Table of contents - -- [Documentation](#documentation) -- [Usage](#usage) - - [Installation](#installation) - - [Full SDK Installation](#full-sdk-installation) -- [Contributing](#contributing) -- [Changelog](#changelog) -- [License](#license) - -## Documentation - - - -See [Fuels-ts Documentation](https://docs.fuel.network/docs/fuels-ts/) - -## Usage - -### Installation - -```sh -pnpm add @fuel-ts/wallet-manager -# or -npm add @fuel-ts/wallet-manager -``` - -### Full SDK Installation - -Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package: - -```sh -pnpm add fuels -# or -npm add fuels -``` - -## Contributing - -In order to contribute to `@fuel-ts/wallet-manager`, please see the main [fuels-ts](https://github.com/FuelLabs/fuels-ts) monorepo. - -## Changelog - -The `@fuel-ts/wallet-manager` changelog can be found at [CHANGELOG](./CHANGELOG.md). - -## License - -The primary license for `@fuel-ts/wallet-manager` is `Apache 2.0`, see [LICENSE](./LICENSE). diff --git a/packages/wallet-manager/package.json b/packages/wallet-manager/package.json deleted file mode 100644 index 5fccca2e40..0000000000 --- a/packages/wallet-manager/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@fuel-ts/wallet-manager", - "version": "0.73.0", - "description": "", - "author": "Fuel Labs (https://fuel.network/)", - "main": "dist/index.js", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "engines": { - "node": "^18.18.2 || ^20.0.0" - }, - "exports": { - ".": { - "require": "./dist/index.js", - "import": "./dist/index.mjs", - "types": "./dist/index.d.ts" - } - }, - "files": [ - "dist" - ], - "scripts": { - "build": "tsup", - "postbuild": "tsx ../../scripts/postbuild.ts" - }, - "license": "Apache-2.0", - "dependencies": { - "@fuel-ts/address": "workspace:*", - "@fuel-ts/interfaces": "workspace:*", - "@fuel-ts/crypto": "workspace:*", - "@fuel-ts/mnemonic": "workspace:*", - "@fuel-ts/wallet": "workspace:*", - "@fuel-ts/providers": "workspace:*", - "@fuel-ts/errors": "workspace:*", - "events": "^3.3.0" - }, - "devDependencies": { - "@fuel-ts/hasher": "workspace:*", - "@fuel-ts/signer": "workspace:*" - } -} diff --git a/packages/wallet-manager/src/index.ts b/packages/wallet-manager/src/index.ts deleted file mode 100644 index d8efb6e23e..0000000000 --- a/packages/wallet-manager/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './wallet-manager'; -export * from './types'; diff --git a/packages/wallet-manager/tsconfig.dts.json b/packages/wallet-manager/tsconfig.dts.json deleted file mode 100644 index ccca2ac1f3..0000000000 --- a/packages/wallet-manager/tsconfig.dts.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./dist", - "rootDir": "./src" - }, - "include": ["src"], - "exclude": ["**/*.test.ts"] -} diff --git a/packages/wallet-manager/tsconfig.json b/packages/wallet-manager/tsconfig.json deleted file mode 100644 index b0fced27d7..0000000000 --- a/packages/wallet-manager/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./dist" - }, - "include": ["src"] -} diff --git a/packages/wallet-manager/tsdoc.json b/packages/wallet-manager/tsdoc.json deleted file mode 100644 index 4514b07272..0000000000 --- a/packages/wallet-manager/tsdoc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "extends": ["../../tsdoc.base.json"] -} diff --git a/packages/wallet-manager/tsup.config.ts b/packages/wallet-manager/tsup.config.ts deleted file mode 100644 index 4c7f2f0354..0000000000 --- a/packages/wallet-manager/tsup.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { index } from '@internal/tsup'; - -export default index; diff --git a/packages/wallet/LICENSE b/packages/wallet/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/packages/wallet/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/packages/wallet/src/index.ts b/packages/wallet/src/index.ts deleted file mode 100644 index 9e755c6bed..0000000000 --- a/packages/wallet/src/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './base-unlocked-wallet'; -export * from './account'; -export * from './wallet'; -export * from './wallets'; diff --git a/packages/wallet/src/test-utils.ts b/packages/wallet/src/test-utils.ts deleted file mode 100644 index 6659e1b8e0..0000000000 --- a/packages/wallet/src/test-utils.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './test-utils/generateTestWallet'; -export * from './test-utils/seedTestWallet'; -export * from './test-utils/launchNode'; diff --git a/packages/wallet/src/transfer.test.ts b/packages/wallet/src/transfer.test.ts deleted file mode 100644 index 27b652910a..0000000000 --- a/packages/wallet/src/transfer.test.ts +++ /dev/null @@ -1,254 +0,0 @@ -import { Address } from '@fuel-ts/address'; -import { BaseAssetId } from '@fuel-ts/address/configs'; -import type { BN } from '@fuel-ts/math'; -import { bn } from '@fuel-ts/math'; -import type { TransactionResultMessageOutReceipt } from '@fuel-ts/providers'; -import { Provider, ScriptTransactionRequest } from '@fuel-ts/providers'; - -import { Wallet } from '.'; -import { FUEL_NETWORK_URL } from './configs'; -import { generateTestWallet, seedTestWallet } from './test-utils'; - -/** - * @group node - */ -describe('Wallet', () => { - let provider: Provider; - let gasPrice: BN; - - beforeAll(async () => { - provider = await Provider.create(FUEL_NETWORK_URL); - ({ minGasPrice: gasPrice } = provider.getGasConfig()); - }); - - it('can transfer a single type of coin to a single destination', async () => { - const sender = await generateTestWallet(provider, [[500_000, BaseAssetId]]); - const receiver = await generateTestWallet(provider); - - const response = await sender.transfer(receiver.address, 1, BaseAssetId, { - gasPrice, - gasLimit: 10_000, - }); - await response.wait(); - - const senderBalances = await sender.getBalances(); - const receiverBalances = await receiver.getBalances(); - - expect(senderBalances).toEqual([{ assetId: BaseAssetId, amount: bn(499921) }]); - expect(receiverBalances).toEqual([{ assetId: BaseAssetId, amount: bn(1) }]); - }); - - it('can create transfer request just fine', async () => { - const sender = await generateTestWallet(provider, [[500_000, BaseAssetId]]); - const receiver = await generateTestWallet(provider); - - const request = await sender.createTransfer(receiver.address.toB256(), 1, BaseAssetId, { - gasPrice, - gasLimit: 10_000, - }); - - const response = await sender.sendTransaction(request); - await response.wait(); - - const senderBalances = await sender.getBalances(); - const receiverBalances = await receiver.getBalances(); - - expect(senderBalances).toEqual([{ assetId: BaseAssetId, amount: bn(499921) }]); - expect(receiverBalances).toEqual([{ assetId: BaseAssetId, amount: bn(1) }]); - }); - - it('can transfer with custom TX Params', async () => { - const sender = await generateTestWallet(provider, [[500_000, BaseAssetId]]); - const receiver = await generateTestWallet(provider); - - /* Error out because gas is to low */ - await expect(async () => { - const result = await sender.transfer(receiver.address, 1, BaseAssetId, { - gasLimit: 0, - gasPrice, - }); - await result.wait(); - }).rejects.toThrowError(/Gas limit '0' is lower than the required: ./); - - const response = await sender.transfer(receiver.address, 1, BaseAssetId, { - gasLimit: 10_000, - gasPrice, - }); - await response.wait(); - const senderBalances = await sender.getBalances(); - expect(senderBalances).toEqual([{ assetId: BaseAssetId, amount: bn(499_921) }]); - const receiverBalances = await receiver.getBalances(); - expect(receiverBalances).toEqual([{ assetId: BaseAssetId, amount: bn(1) }]); - }); - - it('can exclude IDs when getResourcesToSpend is called', async () => { - const assetIdA = '0x0101010101010101010101010101010101010101010101010101010101010101'; - const assetIdB = '0x0202020202020202020202020202020202020202020202020202020202020202'; - - const user = await generateTestWallet(provider, [ - [500_000, assetIdA], - [500_000, assetIdB], - [500_000, BaseAssetId], - ]); - - const coins = await user.getCoins(); - - // Test excludes the UTXO where the assetIdA gets added to the senders wallet - await expect( - user.getResourcesToSpend([[1, assetIdA, 500_000]], { utxos: [coins[0].id] }) - ).rejects.toThrow(/not enough coins to fit the target/); - }); - - it('can transfer multiple types of coins to multiple destinations', async () => { - const assetIdA = '0x0101010101010101010101010101010101010101010101010101010101010101'; - const assetIdB = '0x0202020202020202020202020202020202020202020202020202020202020202'; - const amount = 1; - - const request = new ScriptTransactionRequest({ gasLimit: 1000000, gasPrice }); - const sender = await generateTestWallet(provider, [ - [500_000, assetIdA], - [500_000, assetIdB], - [500_000, BaseAssetId], - ]); - const receiverA = await generateTestWallet(provider); - const receiverB = await generateTestWallet(provider); - - const resources = await sender.getResourcesToSpend([ - [500_000, BaseAssetId], - [500_000, assetIdA], - [500_000, assetIdB], - ]); - - request.addResources(resources); - request.addCoinOutputs(receiverA.address, [ - [amount, assetIdA], - [amount, assetIdB], - ]); - request.addCoinOutputs(receiverB.address, [ - [amount, assetIdA], - [amount, assetIdB], - ]); - - const response = await sender.sendTransaction(request); - - await response.wait(); - - const receiverACoins = await receiverA.getCoins(); - expect(receiverACoins).toEqual( - expect.arrayContaining([ - expect.objectContaining({ assetId: assetIdA, amount: bn(amount) }), - expect.objectContaining({ assetId: assetIdB, amount: bn(amount) }), - ]) - ); - - const receiverBCoins = await receiverB.getCoins(); - expect(receiverBCoins).toEqual( - expect.arrayContaining([ - expect.objectContaining({ assetId: assetIdA, amount: bn(amount) }), - expect.objectContaining({ assetId: assetIdB, amount: bn(amount) }), - ]) - ); - }); - - it('can withdraw an amount of base asset', async () => { - const sender = await generateTestWallet(provider, [[500_000, BaseAssetId]]); - const recipient = Address.fromB256( - '0x00000000000000000000000047ba61eec8e5e65247d717ff236f504cf3b0a263' - ); - const amount = 10; - - const tx = await sender.withdrawToBaseLayer(recipient, 10, { gasPrice, gasLimit: 10_000 }); - const result = await tx.waitForResult(); - - const messageOutReceipt = result.receipts[0]; - - // The sender is the TX ID on the spec it says it should be the sender address - // but is not returning the sender address instead is returning the tx id - expect(result.id).toEqual(messageOutReceipt.sender); - expect(recipient.toHexString()).toEqual(messageOutReceipt.recipient); - expect(amount.toString()).toEqual(messageOutReceipt.amount.toString()); - - const senderBalances = await sender.getBalances(); - expect(senderBalances).toEqual([{ assetId: BaseAssetId, amount: bn(499911) }]); - }); - - it('can retrieve a valid MessageProof', async () => { - const sender = await generateTestWallet(provider, [[500_000, BaseAssetId]]); - const RECIPIENT_ID = '0x00000000000000000000000047ba61eec8e5e65247d717ff236f504cf3b0a263'; - const AMOUNT = 10; - const recipient = Address.fromB256(RECIPIENT_ID); - - const tx = await sender.withdrawToBaseLayer(recipient.toB256(), AMOUNT, { - gasPrice, - gasLimit: 10_000, - }); - // #region Message-getMessageProof - const result = await tx.waitForResult(); - - // Wait for the next block to be minter on out case we are using a local provider - // so we can create a new tx to generate next block - const resp = await sender.transfer(recipient, AMOUNT, BaseAssetId, { - gasPrice, - gasLimit: 10_000, - }); - const nextBlock = await resp.waitForResult(); - - const messageOutReceipt = result.receipts[0]; - const messageProof = await provider.getMessageProof( - result.gqlTransaction.id, - messageOutReceipt.nonce, - nextBlock.blockId - ); - // #endregion Message-getMessageProof - - expect(messageProof?.amount.toNumber()).toEqual(AMOUNT); - expect(messageProof?.sender.toHexString()).toEqual(result.id); - }); - - it('can transfer amount using mutiple utxos', async () => { - const sender = Wallet.generate({ - provider, - }); - const receiver = Wallet.generate({ - provider, - }); - - // seed wallet with 3 distinct utxos - await seedTestWallet(sender, [[500_000, BaseAssetId]]); - await seedTestWallet(sender, [[500_000, BaseAssetId]]); - await seedTestWallet(sender, [[500_000, BaseAssetId]]); - - const transfer = await sender.transfer(receiver.address, 110, BaseAssetId, { - gasPrice, - gasLimit: 10_000, - }); - await transfer.wait(); - - const receiverBalances = await receiver.getBalances(); - expect(receiverBalances).toEqual([{ assetId: BaseAssetId, amount: bn(110) }]); - }); - - it('can withdraw an amount of base asset using mutiple uxtos', async () => { - const sender = Wallet.generate({ - provider, - }); - // seed wallet with 3 distinct utxos - await seedTestWallet(sender, [[500_000, BaseAssetId]]); - await seedTestWallet(sender, [[500_000, BaseAssetId]]); - await seedTestWallet(sender, [[500_000, BaseAssetId]]); - const recipient = Address.fromB256( - '0x00000000000000000000000047ba61eec8e5e65247d717ff236f504cf3b0a263' - ); - const amount = 110; - const tx = await sender.withdrawToBaseLayer(recipient, amount, { gasPrice, gasLimit: 10_000 }); - const result = await tx.wait(); - - const messageOutReceipt = result.receipts[0]; - expect(result.gqlTransaction.id).toEqual(messageOutReceipt.sender); - expect(recipient.toHexString()).toEqual(messageOutReceipt.recipient); - expect(amount.toString()).toEqual(messageOutReceipt.amount.toString()); - - const senderBalances = await sender.getBalances(); - expect(senderBalances).toEqual([{ assetId: BaseAssetId, amount: bn(1499811) }]); - }); -}); diff --git a/packages/wallet/src/types/GenerateOptions.ts b/packages/wallet/src/types/GenerateOptions.ts deleted file mode 100644 index ef23a3dc50..0000000000 --- a/packages/wallet/src/types/GenerateOptions.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { Provider } from '@fuel-ts/providers'; -import type { BytesLike } from 'ethers'; - -export interface GenerateOptions { - /** Additional entropy for the random bytes */ - entropy?: BytesLike; - provider?: Provider; -} diff --git a/packages/wallet/tsconfig.dts.json b/packages/wallet/tsconfig.dts.json deleted file mode 100644 index ccca2ac1f3..0000000000 --- a/packages/wallet/tsconfig.dts.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./dist", - "rootDir": "./src" - }, - "include": ["src"], - "exclude": ["**/*.test.ts"] -} diff --git a/packages/wallet/tsconfig.json b/packages/wallet/tsconfig.json deleted file mode 100644 index b0fced27d7..0000000000 --- a/packages/wallet/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./dist" - }, - "include": ["src"] -} diff --git a/packages/wallet/tsdoc.json b/packages/wallet/tsdoc.json deleted file mode 100644 index 4514b07272..0000000000 --- a/packages/wallet/tsdoc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "extends": ["../../tsdoc.base.json"] -} diff --git a/packages/wallet/typedoc.json b/packages/wallet/typedoc.json deleted file mode 100644 index 801c3ba632..0000000000 --- a/packages/wallet/typedoc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://typedoc.org/schema.json", - "extends": ["../../typedoc.base.json"], - "entryPoints": ["src/index.ts"] -} diff --git a/packages/wordlists/CHANGELOG.md b/packages/wordlists/CHANGELOG.md deleted file mode 100644 index 04f152343d..0000000000 --- a/packages/wordlists/CHANGELOG.md +++ /dev/null @@ -1,293 +0,0 @@ -# Change Log - -## 0.73.0 - -## 0.72.0 - -## 0.71.1 - -## 0.71.0 - -### Minor Changes - -- Add `pnpm create fuels` CLI tool, by [@arboleya](https://github.com/arboleya) (See [#1624](https://github.com/FuelLabs/fuels-ts/pull/1624)) - -## 0.70.1 - -## 0.70.0 - -### Minor Changes - -- Add `pnpm create fuels` CLI tool, by [@Dhaiwat10](https://github.com/Dhaiwat10) (See [#1565](https://github.com/FuelLabs/fuels-ts/pull/1565)) - -## 0.69.1 - -## 0.69.0 - -## 0.68.0 - -## 0.67.0 - -## 0.66.1 - -### Patch Changes - -- Adjusting package manager configs, by [@arboleya](https://github.com/arboleya) (See [#1415](https://github.com/FuelLabs/fuels-ts/pull/1415)) - -## 0.66.0 - -## 0.65.0 - -## 0.64.1 - -## 0.64.0 - -## 0.63.0 - -## 0.62.0 - -## 0.61.0 - -## 0.60.0 - -## 0.59.0 - -## 0.58.0 - -## 0.57.0 - -## 0.56.1 - -## 0.56.0 - -## 0.55.0 - -## 0.54.1 - -## 0.54.0 - -## 0.53.0 - -## 0.52.0 - -## 0.51.0 - -## 0.50.0 - -## 0.49.1 - -## 0.49.0 - -## 0.48.2 - -## 0.48.1 - -## 0.48.0 - -## 0.47.0 - -## 0.46.0 - -### Patch Changes - -- Removing `publishConfigs`, using `.dts` files with declaration maps (`.dts.map`), by [@arboleya](https://github.com/arboleya) (See [#1055](https://github.com/FuelLabs/fuels-ts/pull/1055)) - -## 0.45.0 - -## 0.44.2 - -## 0.44.1 - -## 0.44.0 - -### Minor Changes - -- Revamping all packages configs, enabling local installation, by [@arboleya](https://github.com/arboleya) (See [#984](https://github.com/FuelLabs/fuels-ts/pull/984)) - -## 0.43.1 - -## 0.43.0 - -## 0.42.0 - -## 0.41.0 - -## 0.40.0 - -## 0.39.1 - -## 0.39.0 - -## 0.38.1 - -## 0.38.0 - -## 0.37.1 - -## 0.37.0 - -## 0.36.0 - -## 0.35.0 - -### Patch Changes - -- [#819](https://github.com/FuelLabs/fuels-ts/pull/819) [`f4e1028a`](https://github.com/FuelLabs/fuels-ts/commit/f4e1028acd5a583d12662dd07ca0d17084a35be2) Thanks [@arboleya](https://github.com/arboleya)! - Adjusting export fields for all packages - -## 0.34.1 - -## 0.34.0 - -## 0.33.0 - -## 0.32.0 - -## 0.31.0 - -## 0.30.0 - -## 0.29.1 - -## 0.29.0 - -## 0.28.1 - -## 0.28.0 - -## 0.27.0 - -## 0.26.0 - -## 0.25.1 - -## 0.25.0 - -## 0.24.2 - -### Patch Changes - -- [#646](https://github.com/FuelLabs/fuels-ts/pull/646) [`fa97383`](https://github.com/FuelLabs/fuels-ts/commit/fa97383114c36ee7a204be7e7f3f974382fa1b2c) Thanks [@camsjams](https://github.com/camsjams)! - Adjust doc update timing - -## 0.24.1 - -## 0.24.0 - -## 0.23.0 - -### Patch Changes - -- [#639](https://github.com/FuelLabs/fuels-ts/pull/639) [`c0a62ed`](https://github.com/FuelLabs/fuels-ts/commit/c0a62ed278d6118f1af177dc98dcdb42febd0c81) Thanks [@camsjams](https://github.com/camsjams)! - Update docs - -## 0.22.2 - -## 0.22.1 - -## 0.22.0 - -## 0.21.2 - -## 0.21.1 - -## 0.21.0 - -## 0.20.0 - -## 0.19.0 - -### Minor Changes - -- [#549](https://github.com/FuelLabs/fuels-ts/pull/549) [`db8cc6b`](https://github.com/FuelLabs/fuels-ts/commit/db8cc6b49616199368463ecd69aae6b3ca0b65d0) Thanks [@QuinnLee](https://github.com/QuinnLee)! - add output variables to transactions - -## 0.18.0 - -## 0.17.0 - -### Minor Changes - -- [#517](https://github.com/FuelLabs/fuels-ts/pull/517) [`6403076`](https://github.com/FuelLabs/fuels-ts/commit/6403076bb9fce9055b436596e23713b0e7909d87) Thanks [@QuinnLee](https://github.com/QuinnLee)! - Parse Logs and Log Data - -## 0.16.0 - -## 0.15.0 - -## 0.14.0 - -## 0.13.0 - -## 0.12.0 - -## 0.11.0 - -### Patch Changes - -- [#437](https://github.com/FuelLabs/fuels-ts/pull/437) [`b2f1c66`](https://github.com/FuelLabs/fuels-ts/commit/b2f1c665b8d75f635edb4b75691abc9ebf6850b5) Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - - Fixed linking packages to inside `node_modules` folder - - Remove old Lerna config - -## 0.10.0 - -## 0.9.0 - -## 0.8.0 - -### Minor Changes - -- [#405](https://github.com/FuelLabs/fuels-ts/pull/405) [`19dee43`](https://github.com/FuelLabs/fuels-ts/commit/19dee437f0ea2fe02a4a7f56b0b55d84279c2dc0) Thanks [@camsjams](https://github.com/camsjams)! - Bumping all packages to next minor version - -### Patch Changes - -- [#374](https://github.com/FuelLabs/fuels-ts/pull/374) [`0dd4870`](https://github.com/FuelLabs/fuels-ts/commit/0dd48702fd187eeebdf9f6e1882c400ee44b956e) Thanks [@camsjams](https://github.com/camsjams)! - Add readme - -* [#397](https://github.com/FuelLabs/fuels-ts/pull/397) [`9ac636b`](https://github.com/FuelLabs/fuels-ts/commit/9ac636b7b1f31d2f68c55af2062b4476217ef563) Thanks [@camsjams](https://github.com/camsjams)! - fix list on fuels - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - ---- - - - -## [0.7.0](https://github.com/FuelLabs/fuels-ts/compare/v0.6.0...0.7.0) - -> 2022-05-11 - -### 🐞 Bug Fixes - -- change build tasks in order to use pnpm link correctly ([#246](https://github.com/FuelLabs/fuels-ts/issues/246)) - -### 📃 Code Refactoring - -- add turborepo, pnpm and tsup ([#238](https://github.com/FuelLabs/fuels-ts/issues/238)) - - - -## [v0.6.0](https://github.com/FuelLabs/fuels-ts/compare/v0.5.0...v0.6.0) - -> 2022-04-25 - -### 🐞 Bug Fixes - -- export wordlist as default object ([#211](https://github.com/FuelLabs/fuels-ts/issues/211)) - - - -## [v0.5.0](https://github.com/FuelLabs/fuels-ts/compare/v0.4.0...v0.5.0) - -> 2022-03-30 - - - -## [v0.4.0](https://github.com/FuelLabs/fuels-ts/compare/v0.3.0...v0.4.0) - -> 2022-03-13 - - - -## [v0.3.0](https://github.com/FuelLabs/fuels-ts/compare/v0.1.0...v0.3.0) - -> 2022-03-04 - - - -## v0.1.0 - -> 2022-03-04 diff --git a/packages/wordlists/LICENSE b/packages/wordlists/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/packages/wordlists/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/packages/wordlists/README.md b/packages/wordlists/README.md deleted file mode 100644 index 3ffb7b78ad..0000000000 --- a/packages/wordlists/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# `@fuel-ts/wordlists` - -**@fuel-ts/wordlists** is a sub-module for interacting with **Fuel**. - -This module contains a wordlist for BIP 39 mnemonic phrases, currently limited to English words. - -# Table of contents - -- [Documentation](#documentation) -- [Usage](#usage) - - [Installation](#installation) - - [Full SDK Installation](#full-sdk-installation) -- [Contributing](#contributing) -- [Changelog](#changelog) -- [License](#license) - -## Documentation - - - -See [Fuels-ts Documentation](https://docs.fuel.network/docs/fuels-ts/) - -## Usage - -### Installation - -```sh -pnpm add @fuel-ts/wordlists -# or -npm add @fuel-ts/wordlists -``` - -### Full SDK Installation - -Alternatively, we recommend you install the [complete SDK](https://github.com/FuelLabs/fuels-ts) using the umbrella package: - -```sh -pnpm add fuels -# or -npm add fuels -``` - -## Contributing - -In order to contribute to `@fuel-ts/wordlists`, please see the main [fuels-ts](https://github.com/FuelLabs/fuels-ts) monorepo. - -## Changelog - -The `@fuel-ts/wordlists` changelog can be found at [CHANGELOG](./CHANGELOG.md). - -## License - -The primary license for `@fuel-ts/wordlists` is `Apache 2.0`, see [LICENSE](./LICENSE). diff --git a/packages/wordlists/package.json b/packages/wordlists/package.json deleted file mode 100644 index c7b96cc80a..0000000000 --- a/packages/wordlists/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@fuel-ts/wordlists", - "version": "0.73.0", - "description": "", - "license": "Apache-2.0", - "author": "Fuel Labs (https://fuel.network/)", - "main": "dist/index.js", - "module": "dist/index.mjs", - "types": "dist/index.d.ts", - "engines": { - "node": "^18.18.2 || ^20.0.0" - }, - "exports": { - ".": { - "require": "./dist/index.js", - "import": "./dist/index.mjs", - "types": "./dist/index.d.ts" - } - }, - "files": [ - "dist" - ], - "scripts": { - "build": "tsup", - "postbuild": "tsx ../../scripts/postbuild.ts" - } -} diff --git a/packages/wordlists/tsconfig.dts.json b/packages/wordlists/tsconfig.dts.json deleted file mode 100644 index ccca2ac1f3..0000000000 --- a/packages/wordlists/tsconfig.dts.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./dist", - "rootDir": "./src" - }, - "include": ["src"], - "exclude": ["**/*.test.ts"] -} diff --git a/packages/wordlists/tsconfig.json b/packages/wordlists/tsconfig.json deleted file mode 100644 index b0fced27d7..0000000000 --- a/packages/wordlists/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./dist" - }, - "include": ["src"] -} diff --git a/packages/wordlists/tsdoc.json b/packages/wordlists/tsdoc.json deleted file mode 100644 index 4514b07272..0000000000 --- a/packages/wordlists/tsdoc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "extends": ["../../tsdoc.base.json"] -} diff --git a/packages/wordlists/tsup.config.ts b/packages/wordlists/tsup.config.ts deleted file mode 100644 index 4c7f2f0354..0000000000 --- a/packages/wordlists/tsup.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { index } from '@internal/tsup'; - -export default index; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d956477726..247ff9c053 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -167,12 +167,12 @@ importers: apps/demo-fuels: dependencies: + '@fuel-ts/account': + specifier: workspace:^ + version: link:../../packages/account '@fuel-ts/errors': specifier: workspace:^ version: link:../../packages/errors - '@fuel-ts/wallet': - specifier: workspace:^ - version: link:../../packages/wallet fuels: specifier: workspace:* version: link:../../packages/fuels @@ -313,6 +313,9 @@ importers: specifier: workspace:* version: link:../../packages/fuels devDependencies: + '@fuel-ts/account': + specifier: workspace:* + version: link:../../packages/account '@fuel-ts/errors': specifier: workspace:* version: link:../../packages/errors @@ -322,9 +325,6 @@ importers: '@fuel-ts/utils': specifier: workspace:* version: link:../../packages/utils - '@fuel-ts/wallet': - specifier: workspace:* - version: link:../../packages/wallet apps/docs: dependencies: @@ -377,18 +377,15 @@ importers: apps/docs-snippets: devDependencies: + '@fuel-ts/account': + specifier: workspace:* + version: link:../../packages/account '@fuel-ts/errors': specifier: workspace:* version: link:../../packages/errors '@fuel-ts/utils': specifier: workspace:* version: link:../../packages/utils - '@fuel-ts/wallet': - specifier: workspace:* - version: link:../../packages/wallet - '@fuel-ts/wallet-manager': - specifier: workspace:* - version: link:../../packages/wallet-manager fuels: specifier: workspace:* version: link:../../packages/fuels @@ -401,6 +398,9 @@ importers: '@fuel-ts/abi-typegen': specifier: workspace:* version: link:../../packages/abi-typegen + '@fuel-ts/account': + specifier: workspace:* + version: link:../../packages/account '@fuel-ts/address': specifier: workspace:* version: link:../../packages/address @@ -416,9 +416,6 @@ importers: '@fuel-ts/hasher': specifier: workspace:* version: link:../../packages/hasher - '@fuel-ts/hdwallet': - specifier: workspace:* - version: link:../../packages/hdwallet '@fuel-ts/interfaces': specifier: workspace:* version: link:../../packages/interfaces @@ -428,24 +425,12 @@ importers: '@fuel-ts/merkle': specifier: workspace:* version: link:../../packages/merkle - '@fuel-ts/mnemonic': - specifier: workspace:* - version: link:../../packages/mnemonic - '@fuel-ts/predicate': - specifier: workspace:* - version: link:../../packages/predicate '@fuel-ts/program': specifier: workspace:* version: link:../../packages/program - '@fuel-ts/providers': - specifier: workspace:* - version: link:../../packages/providers '@fuel-ts/script': specifier: workspace:* version: link:../../packages/script - '@fuel-ts/signer': - specifier: workspace:* - version: link:../../packages/signer '@fuel-ts/transactions': specifier: workspace:* version: link:../../packages/transactions @@ -455,15 +440,6 @@ importers: '@fuel-ts/versions': specifier: workspace:* version: link:../../packages/versions - '@fuel-ts/wallet': - specifier: workspace:* - version: link:../../packages/wallet - '@fuel-ts/wallet-manager': - specifier: workspace:* - version: link:../../packages/wallet-manager - '@fuel-ts/wordlists': - specifier: workspace:* - version: link:../../packages/wordlists fuels: specifier: workspace:* version: link:../../packages/fuels @@ -542,6 +518,103 @@ importers: specifier: ^3.0.2 version: 3.0.2 + packages/account: + dependencies: + '@fuel-ts/abi-coder': + specifier: workspace:* + version: link:../abi-coder + '@fuel-ts/address': + specifier: workspace:* + version: link:../address + '@fuel-ts/crypto': + specifier: workspace:* + version: link:../crypto + '@fuel-ts/errors': + specifier: workspace:* + version: link:../errors + '@fuel-ts/fuel-core': + specifier: workspace:* + version: link:../fuel-core + '@fuel-ts/hasher': + specifier: workspace:* + version: link:../hasher + '@fuel-ts/interfaces': + specifier: workspace:* + version: link:../interfaces + '@fuel-ts/math': + specifier: workspace:* + version: link:../math + '@fuel-ts/merkle': + specifier: workspace:* + version: link:../merkle + '@fuel-ts/transactions': + specifier: workspace:* + version: link:../transactions + '@fuel-ts/utils': + specifier: workspace:* + version: link:../utils + '@fuel-ts/versions': + specifier: workspace:* + version: link:../versions + '@fuels/vm-asm': + specifier: 0.42.1 + version: 0.42.1 + '@noble/curves': + specifier: ^1.3.0 + version: 1.3.0 + ethers: + specifier: ^6.7.1 + version: 6.7.1 + events: + specifier: ^3.3.0 + version: 3.3.0 + graphql: + specifier: ^16.6.0 + version: 16.6.0 + graphql-request: + specifier: 5.0.0 + version: 5.0.0(graphql@16.6.0) + graphql-tag: + specifier: ^2.12.6 + version: 2.12.6(graphql@16.6.0) + portfinder: + specifier: ^1.0.32 + version: 1.0.32 + ramda: + specifier: ^0.29.0 + version: 0.29.0 + tai64: + specifier: ^1.0.0 + version: 1.0.0 + tree-kill: + specifier: ^1.2.2 + version: 1.2.2 + uuid: + specifier: ^9.0.0 + version: 9.0.0 + devDependencies: + '@graphql-codegen/cli': + specifier: ^2.13.7 + version: 2.13.7(@babel/core@7.23.3)(@types/node@20.10.5)(graphql@16.6.0)(ts-node@10.9.1)(typescript@5.2.2) + '@graphql-codegen/typescript': + specifier: ^2.8.0 + version: 2.8.0(graphql@16.6.0) + '@graphql-codegen/typescript-generic-sdk': + specifier: ^3.1.0 + version: 3.1.0(graphql-tag@2.12.6)(graphql@16.6.0) + '@graphql-codegen/typescript-operations': + specifier: ^2.5.5 + version: 2.5.5(graphql@16.6.0) + '@types/ramda': + specifier: ^0.29.3 + version: 0.29.3 + '@types/uuid': + specifier: ^9.0.1 + version: 9.0.1 + get-graphql-schema: + specifier: ^2.1.2 + version: 2.1.2 + packages/address: dependencies: '@fuel-ts/crypto': @@ -568,6 +641,9 @@ importers: '@fuel-ts/abi-coder': specifier: workspace:* version: link:../abi-coder + '@fuel-ts/account': + specifier: workspace:* + version: link:../account '@fuel-ts/address': specifier: workspace:* version: link:../address @@ -583,9 +659,6 @@ importers: '@fuel-ts/program': specifier: workspace:* version: link:../program - '@fuel-ts/providers': - specifier: workspace:* - version: link:../providers '@fuel-ts/transactions': specifier: workspace:* version: link:../transactions @@ -595,9 +668,6 @@ importers: '@fuel-ts/versions': specifier: workspace:* version: link:../versions - '@fuel-ts/wallet': - specifier: workspace:* - version: link:../wallet ethers: specifier: ^6.7.1 version: 6.7.1 @@ -664,6 +734,9 @@ importers: specifier: workspace:* version: link:../fuels devDependencies: + '@fuel-ts/account': + specifier: workspace:* + version: link:../account '@fuel-ts/errors': specifier: workspace:* version: link:../errors @@ -673,9 +746,6 @@ importers: '@fuel-ts/utils': specifier: workspace:* version: link:../utils - '@fuel-ts/wallet': - specifier: workspace:* - version: link:../wallet packages/fuels: dependencies: @@ -685,6 +755,9 @@ importers: '@fuel-ts/abi-typegen': specifier: workspace:* version: link:../abi-typegen + '@fuel-ts/account': + specifier: workspace:* + version: link:../account '@fuel-ts/address': specifier: workspace:* version: link:../address @@ -706,9 +779,6 @@ importers: '@fuel-ts/hasher': specifier: workspace:* version: link:../hasher - '@fuel-ts/hdwallet': - specifier: workspace:* - version: link:../hdwallet '@fuel-ts/interfaces': specifier: workspace:* version: link:../interfaces @@ -718,24 +788,12 @@ importers: '@fuel-ts/merkle': specifier: workspace:* version: link:../merkle - '@fuel-ts/mnemonic': - specifier: workspace:* - version: link:../mnemonic - '@fuel-ts/predicate': - specifier: workspace:* - version: link:../predicate '@fuel-ts/program': specifier: workspace:* version: link:../program - '@fuel-ts/providers': - specifier: workspace:* - version: link:../providers '@fuel-ts/script': specifier: workspace:* version: link:../script - '@fuel-ts/signer': - specifier: workspace:* - version: link:../signer '@fuel-ts/transactions': specifier: workspace:* version: link:../transactions @@ -745,15 +803,6 @@ importers: '@fuel-ts/versions': specifier: workspace:* version: link:../versions - '@fuel-ts/wallet': - specifier: workspace:* - version: link:../wallet - '@fuel-ts/wallet-manager': - specifier: workspace:* - version: link:../wallet-manager - '@fuel-ts/wordlists': - specifier: workspace:* - version: link:../wordlists bundle-require: specifier: ^4.0.1 version: 4.0.1(esbuild@0.19.3) @@ -835,24 +884,6 @@ importers: specifier: ^0.29.3 version: 0.29.3 - packages/hdwallet: - dependencies: - '@fuel-ts/errors': - specifier: workspace:* - version: link:../errors - '@fuel-ts/math': - specifier: workspace:* - version: link:../math - '@fuel-ts/mnemonic': - specifier: workspace:* - version: link:../mnemonic - '@fuel-ts/signer': - specifier: workspace:* - version: link:../signer - ethers: - specifier: ^6.7.1 - version: 6.7.1 - packages/interfaces: {} packages/math: @@ -876,69 +907,14 @@ importers: specifier: ^6.7.1 version: 6.7.1 - packages/mnemonic: - dependencies: - '@fuel-ts/crypto': - specifier: workspace:* - version: link:../crypto - '@fuel-ts/errors': - specifier: workspace:* - version: link:../errors - '@fuel-ts/wordlists': - specifier: workspace:* - version: link:../wordlists - ethers: - specifier: ^6.7.1 - version: 6.7.1 - - packages/predicate: - dependencies: - '@fuel-ts/abi-coder': - specifier: workspace:* - version: link:../abi-coder - '@fuel-ts/address': - specifier: workspace:* - version: link:../address - '@fuel-ts/errors': - specifier: workspace:* - version: link:../errors - '@fuel-ts/hasher': - specifier: workspace:* - version: link:../hasher - '@fuel-ts/interfaces': - specifier: workspace:* - version: link:../interfaces - '@fuel-ts/merkle': - specifier: workspace:* - version: link:../merkle - '@fuel-ts/providers': - specifier: workspace:* - version: link:../providers - '@fuel-ts/transactions': - specifier: workspace:* - version: link:../transactions - '@fuel-ts/utils': - specifier: workspace:* - version: link:../utils - '@fuel-ts/versions': - specifier: workspace:* - version: link:../versions - '@fuel-ts/wallet': - specifier: workspace:* - version: link:../wallet - ethers: - specifier: ^6.7.1 - version: 6.7.1 - devDependencies: - '@fuel-ts/math': - specifier: workspace:* - version: link:../math - packages/program: dependencies: '@fuel-ts/abi-coder': specifier: workspace:* version: link:../abi-coder + '@fuel-ts/account': + specifier: workspace:* + version: link:../account '@fuel-ts/address': specifier: workspace:* version: link:../address @@ -954,9 +930,6 @@ importers: '@fuel-ts/math': specifier: workspace:* version: link:../math - '@fuel-ts/providers': - specifier: workspace:* - version: link:../providers '@fuel-ts/transactions': specifier: workspace:* version: link:../transactions @@ -966,9 +939,6 @@ importers: '@fuel-ts/versions': specifier: workspace:* version: link:../versions - '@fuel-ts/wallet': - specifier: workspace:* - version: link:../wallet '@fuels/vm-asm': specifier: 0.42.1 version: 0.42.1 @@ -980,73 +950,6 @@ importers: specifier: workspace:* version: link:../forc - packages/providers: - dependencies: - '@fuel-ts/abi-coder': - specifier: workspace:* - version: link:../abi-coder - '@fuel-ts/address': - specifier: workspace:* - version: link:../address - '@fuel-ts/crypto': - specifier: workspace:* - version: link:../crypto - '@fuel-ts/errors': - specifier: workspace:* - version: link:../errors - '@fuel-ts/hasher': - specifier: workspace:* - version: link:../hasher - '@fuel-ts/interfaces': - specifier: workspace:* - version: link:../interfaces - '@fuel-ts/math': - specifier: workspace:* - version: link:../math - '@fuel-ts/transactions': - specifier: workspace:* - version: link:../transactions - '@fuel-ts/versions': - specifier: workspace:* - version: link:../versions - ethers: - specifier: ^6.7.1 - version: 6.7.1 - graphql: - specifier: ^16.6.0 - version: 16.6.0 - graphql-request: - specifier: 5.0.0 - version: 5.0.0(graphql@16.6.0) - graphql-tag: - specifier: ^2.12.6 - version: 2.12.6(graphql@16.6.0) - ramda: - specifier: ^0.29.0 - version: 0.29.0 - tai64: - specifier: ^1.0.0 - version: 1.0.0 - devDependencies: - '@graphql-codegen/cli': - specifier: ^2.13.7 - version: 2.13.7(@babel/core@7.23.3)(@types/node@20.10.5)(graphql@16.6.0)(ts-node@10.9.1)(typescript@5.2.2) - '@graphql-codegen/typescript': - specifier: ^2.8.0 - version: 2.8.0(graphql@16.6.0) - '@graphql-codegen/typescript-generic-sdk': - specifier: ^3.1.0 - version: 3.1.0(graphql-tag@2.12.6)(graphql@16.6.0) - '@graphql-codegen/typescript-operations': - specifier: ^2.5.5 - version: 2.5.5(graphql@16.6.0) - '@types/ramda': - specifier: ^0.29.3 - version: 0.29.3 - get-graphql-schema: - specifier: ^2.1.2 - version: 2.1.2 - packages/script: dependencies: '@fuel-ts/abi-coder': @@ -1055,6 +958,9 @@ importers: '@fuel-ts/abi-typegen': specifier: workspace:* version: link:../abi-typegen + '@fuel-ts/account': + specifier: workspace:* + version: link:../account '@fuel-ts/address': specifier: workspace:* version: link:../address @@ -1070,18 +976,12 @@ importers: '@fuel-ts/program': specifier: workspace:* version: link:../program - '@fuel-ts/providers': - specifier: workspace:* - version: link:../providers '@fuel-ts/transactions': specifier: workspace:* version: link:../transactions '@fuel-ts/utils': specifier: workspace:* version: link:../utils - '@fuel-ts/wallet': - specifier: workspace:* - version: link:../wallet ethers: specifier: ^6.7.1 version: 6.7.1 @@ -1090,27 +990,6 @@ importers: specifier: workspace:* version: link:../forc - packages/signer: - dependencies: - '@fuel-ts/address': - specifier: workspace:* - version: link:../address - '@fuel-ts/crypto': - specifier: workspace:* - version: link:../crypto - '@fuel-ts/hasher': - specifier: workspace:* - version: link:../hasher - '@fuel-ts/math': - specifier: workspace:* - version: link:../math - '@noble/curves': - specifier: ^1.3.0 - version: 1.3.0 - ethers: - specifier: ^6.7.1 - version: 6.7.1 - packages/transactions: dependencies: '@fuel-ts/abi-coder': @@ -1160,106 +1039,6 @@ importers: specifier: ^0.3.1 version: 0.3.1 - packages/wallet: - dependencies: - '@fuel-ts/abi-coder': - specifier: workspace:* - version: link:../abi-coder - '@fuel-ts/address': - specifier: workspace:* - version: link:../address - '@fuel-ts/crypto': - specifier: workspace:* - version: link:../crypto - '@fuel-ts/errors': - specifier: workspace:* - version: link:../errors - '@fuel-ts/fuel-core': - specifier: workspace:* - version: link:../fuel-core - '@fuel-ts/hasher': - specifier: workspace:* - version: link:../hasher - '@fuel-ts/hdwallet': - specifier: workspace:* - version: link:../hdwallet - '@fuel-ts/interfaces': - specifier: workspace:* - version: link:../interfaces - '@fuel-ts/math': - specifier: workspace:* - version: link:../math - '@fuel-ts/mnemonic': - specifier: workspace:* - version: link:../mnemonic - '@fuel-ts/providers': - specifier: workspace:* - version: link:../providers - '@fuel-ts/signer': - specifier: workspace:* - version: link:../signer - '@fuel-ts/transactions': - specifier: workspace:* - version: link:../transactions - '@fuel-ts/utils': - specifier: workspace:* - version: link:../utils - '@fuels/vm-asm': - specifier: 0.42.1 - version: 0.42.1 - ethers: - specifier: ^6.7.1 - version: 6.7.1 - portfinder: - specifier: ^1.0.32 - version: 1.0.32 - tree-kill: - specifier: ^1.2.2 - version: 1.2.2 - uuid: - specifier: ^9.0.0 - version: 9.0.0 - devDependencies: - '@types/uuid': - specifier: ^9.0.1 - version: 9.0.1 - - packages/wallet-manager: - dependencies: - '@fuel-ts/address': - specifier: workspace:* - version: link:../address - '@fuel-ts/crypto': - specifier: workspace:* - version: link:../crypto - '@fuel-ts/errors': - specifier: workspace:* - version: link:../errors - '@fuel-ts/interfaces': - specifier: workspace:* - version: link:../interfaces - '@fuel-ts/mnemonic': - specifier: workspace:* - version: link:../mnemonic - '@fuel-ts/providers': - specifier: workspace:* - version: link:../providers - '@fuel-ts/wallet': - specifier: workspace:* - version: link:../wallet - events: - specifier: ^3.3.0 - version: 3.3.0 - devDependencies: - '@fuel-ts/hasher': - specifier: workspace:* - version: link:../hasher - '@fuel-ts/signer': - specifier: workspace:* - version: link:../signer - - packages/wordlists: {} - templates/nextjs: dependencies: '@fuel-ui/css': @@ -1487,11 +1266,11 @@ packages: graphql: '*' dependencies: '@babel/core': 7.22.5 - '@babel/generator': 7.22.5 - '@babel/parser': 7.22.5 + '@babel/generator': 7.23.4 + '@babel/parser': 7.23.9 '@babel/runtime': 7.22.5 '@babel/traverse': 7.22.5 - '@babel/types': 7.22.5 + '@babel/types': 7.23.9 babel-preset-fbjs: 3.4.0(@babel/core@7.22.5) chalk: 4.1.2 fb-watchman: 2.0.2 @@ -1620,7 +1399,7 @@ packages: resolution: {integrity: sha512-esuS49Cga3HcThFNebGhlgsrVLkvhqvYDTzgjfFFlHJcIfLe5jFmRRfCQ1KuBfc4Jrtn3ndLgKWAKjBE+IraYQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.23.4 + '@babel/types': 7.23.9 '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.20 jsesc: 2.5.2 @@ -1936,7 +1715,6 @@ packages: hasBin: true dependencies: '@babel/types': 7.23.4 - dev: true /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.5(@babel/core@7.22.5): resolution: {integrity: sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ==} @@ -3280,8 +3058,8 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.23.4 - '@babel/parser': 7.23.4 - '@babel/types': 7.23.4 + '@babel/parser': 7.23.9 + '@babel/types': 7.23.9 /@babel/template@7.22.5: resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} @@ -4596,9 +4374,9 @@ packages: peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@babel/generator': 7.22.5 - '@babel/template': 7.22.5 - '@babel/types': 7.22.5 + '@babel/generator': 7.23.4 + '@babel/template': 7.22.15 + '@babel/types': 7.23.9 '@graphql-codegen/core': 2.6.2(graphql@16.6.0) '@graphql-codegen/plugin-helpers': 2.7.2(graphql@16.6.0) '@graphql-tools/apollo-engine-loader': 7.3.26(graphql@16.6.0) @@ -5029,7 +4807,7 @@ packages: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: graphql: 16.6.0 - tslib: 2.4.1 + tslib: 2.6.0 dev: true /@graphql-tools/prisma-loader@7.2.72(@types/node@20.10.5)(graphql@16.6.0): @@ -5072,7 +4850,7 @@ packages: '@ardatan/relay-compiler': 12.0.0(graphql@16.6.0) '@graphql-tools/utils': 9.2.1(graphql@16.6.0) graphql: 16.6.0 - tslib: 2.4.1 + tslib: 2.6.0 transitivePeerDependencies: - encoding - supports-color @@ -5268,7 +5046,7 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: '@jest/types': 28.1.3 - '@types/node': 16.18.34 + '@types/node': 20.10.5 chalk: 4.1.2 jest-message-util: 28.1.3 jest-util: 28.1.3 @@ -5289,7 +5067,7 @@ packages: '@jest/test-result': 27.5.1 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 16.18.34 + '@types/node': 20.10.5 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.8.1 @@ -5487,7 +5265,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 16.18.34 + '@types/node': 20.10.5 '@types/yargs': 16.0.5 chalk: 4.1.2 dev: false @@ -5499,7 +5277,7 @@ packages: '@jest/schemas': 28.1.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 16.18.34 + '@types/node': 20.10.5 '@types/yargs': 17.0.24 chalk: 4.1.2 dev: false @@ -5511,7 +5289,7 @@ packages: '@jest/schemas': 29.4.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 16.18.34 + '@types/node': 20.10.5 '@types/yargs': 17.0.24 chalk: 4.1.2 dev: false @@ -8325,14 +8103,14 @@ packages: resolution: {integrity: sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==} dependencies: '@noble/curves': 1.1.0 - '@noble/hashes': 1.3.1 + '@noble/hashes': 1.3.3 '@scure/base': 1.1.1 dev: false /@scure/bip39@1.2.1: resolution: {integrity: sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==} dependencies: - '@noble/hashes': 1.3.1 + '@noble/hashes': 1.3.3 '@scure/base': 1.1.1 dev: false @@ -8907,7 +8685,7 @@ packages: resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 16.18.34 + '@types/node': 20.10.5 dev: true /@types/graceful-fs@4.1.6: @@ -9044,7 +8822,7 @@ packages: /@types/mkdirp@0.5.2: resolution: {integrity: sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==} dependencies: - '@types/node': 16.18.34 + '@types/node': 20.10.5 dev: true /@types/mkdirp@1.0.2: @@ -9136,7 +8914,7 @@ packages: /@types/resolve@0.0.8: resolution: {integrity: sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==} dependencies: - '@types/node': 16.18.34 + '@types/node': 20.10.5 dev: true /@types/resolve@1.17.1: @@ -9234,7 +9012,7 @@ packages: /@types/ws@8.5.5: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} dependencies: - '@types/node': 16.18.34 + '@types/node': 20.10.5 /@types/yargs-parser@21.0.0: resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} @@ -16571,7 +16349,7 @@ packages: dependencies: '@jest/types': 27.5.1 '@types/graceful-fs': 4.1.6 - '@types/node': 16.18.34 + '@types/node': 20.10.5 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -16642,7 +16420,7 @@ packages: resolution: {integrity: sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.23.4 '@jest/types': 27.5.1 '@types/stack-utils': 2.0.1 chalk: 4.1.2 @@ -16657,7 +16435,7 @@ packages: resolution: {integrity: sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.23.4 '@jest/types': 28.1.3 '@types/stack-utils': 2.0.1 chalk: 4.1.2 @@ -16815,10 +16593,10 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@babel/core': 7.23.3 - '@babel/generator': 7.22.5 + '@babel/generator': 7.23.4 '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.23.3) '@babel/traverse': 7.22.5 - '@babel/types': 7.23.4 + '@babel/types': 7.23.9 '@jest/transform': 27.5.1 '@jest/types': 27.5.1 '@types/babel__traverse': 7.20.1 @@ -16845,7 +16623,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 16.18.34 + '@types/node': 20.10.5 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.11 @@ -16857,7 +16635,7 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: '@jest/types': 28.1.3 - '@types/node': 16.18.34 + '@types/node': 20.10.5 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.11 @@ -16869,7 +16647,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.5.0 - '@types/node': 16.18.34 + '@types/node': 20.10.5 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.11 @@ -16923,7 +16701,7 @@ packages: dependencies: '@jest/test-result': 28.1.3 '@jest/types': 28.1.3 - '@types/node': 16.18.34 + '@types/node': 20.10.5 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.10.2 @@ -16953,7 +16731,7 @@ packages: resolution: {integrity: sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: - '@types/node': 16.18.34 + '@types/node': 20.10.5 merge-stream: 2.0.0 supports-color: 8.1.1 dev: false