@fuel-ts/account 0.83.0 → 0.85.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @fuel-ts/account might be problematic. Click here for more details.
- package/README.md +15 -12
- package/dist/account.d.ts +6 -6
- package/dist/account.d.ts.map +1 -1
- package/dist/index.global.js +1800 -1753
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +619 -414
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +520 -319
- package/dist/index.mjs.map +1 -1
- package/dist/providers/__generated__/operations.d.ts +532 -615
- package/dist/providers/__generated__/operations.d.ts.map +1 -1
- package/dist/providers/assets/assets.d.ts +9 -0
- package/dist/providers/assets/assets.d.ts.map +1 -0
- package/dist/providers/assets/index.d.ts +1 -2
- package/dist/providers/assets/index.d.ts.map +1 -1
- package/dist/providers/assets/utils/fuelAssetsBaseUrl.d.ts +2 -0
- package/dist/providers/assets/utils/fuelAssetsBaseUrl.d.ts.map +1 -0
- package/dist/providers/assets/utils/index.d.ts +1 -0
- package/dist/providers/assets/utils/index.d.ts.map +1 -1
- package/dist/providers/assets/utils/resolveIconPaths.d.ts.map +1 -1
- package/dist/providers/message.d.ts +2 -2
- package/dist/providers/message.d.ts.map +1 -1
- package/dist/providers/provider.d.ts +28 -31
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/resource.d.ts +0 -1
- package/dist/providers/resource.d.ts.map +1 -1
- package/dist/providers/transaction-request/helpers.d.ts +8 -0
- package/dist/providers/transaction-request/helpers.d.ts.map +1 -0
- package/dist/providers/transaction-request/script-transaction-request.d.ts +2 -3
- package/dist/providers/transaction-request/script-transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/transaction-request.d.ts +5 -6
- package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/utils.d.ts +2 -1
- package/dist/providers/transaction-request/utils.d.ts.map +1 -1
- package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts +2 -2
- package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts.map +1 -1
- package/dist/providers/transaction-summary/calculate-tx-fee-for-summary.d.ts +20 -0
- package/dist/providers/transaction-summary/calculate-tx-fee-for-summary.d.ts.map +1 -0
- package/dist/providers/transaction-summary/get-transaction-summary.d.ts.map +1 -1
- package/dist/providers/transaction-summary/index.d.ts +1 -1
- package/dist/providers/transaction-summary/index.d.ts.map +1 -1
- package/dist/providers/transaction-summary/operations.d.ts +4 -0
- package/dist/providers/transaction-summary/operations.d.ts.map +1 -1
- package/dist/providers/transaction-summary/receipt.d.ts +2 -2
- package/dist/providers/transaction-summary/receipt.d.ts.map +1 -1
- package/dist/providers/transaction-summary/status.d.ts +5 -1
- package/dist/providers/transaction-summary/status.d.ts.map +1 -1
- package/dist/providers/transaction-summary/types.d.ts +11 -14
- package/dist/providers/transaction-summary/types.d.ts.map +1 -1
- package/dist/providers/utils/extract-tx-error.d.ts +2 -2
- package/dist/providers/utils/extract-tx-error.d.ts.map +1 -1
- package/dist/providers/utils/gas.d.ts +7 -6
- package/dist/providers/utils/gas.d.ts.map +1 -1
- package/dist/providers/utils/receipts.d.ts +2 -2
- package/dist/providers/utils/receipts.d.ts.map +1 -1
- package/dist/test-utils/launchNode.d.ts.map +1 -1
- package/dist/test-utils/resources.d.ts +4 -0
- package/dist/test-utils/resources.d.ts.map +1 -0
- package/dist/test-utils/transactionRequest.d.ts +5 -0
- package/dist/test-utils/transactionRequest.d.ts.map +1 -0
- package/dist/test-utils.global.js +1826 -1756
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +609 -398
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +521 -310
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +17 -17
- package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts +0 -22
- package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts.map +0 -1
package/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
# `@fuel-ts/
|
1
|
+
# `@fuel-ts/account`
|
2
2
|
|
3
|
-
**@fuel-ts/
|
3
|
+
**@fuel-ts/account** is a sub-module for interacting with **Fuel**.
|
4
4
|
|
5
|
-
This module contains the class to manage a private key and signing for a standard Externally Owned Account (EOA)
|
5
|
+
This module contains the class to manage a private key and signing for a standard Externally Owned Account (EOA).
|
6
6
|
|
7
|
-
|
7
|
+
## Table of contents
|
8
8
|
|
9
9
|
- [Documentation](#documentation)
|
10
10
|
- [Usage](#usage)
|
@@ -23,9 +23,9 @@ See [Fuels-ts Documentation](https://docs.fuel.network/docs/fuels-ts/wallets/)
|
|
23
23
|
### Installation
|
24
24
|
|
25
25
|
```sh
|
26
|
-
pnpm add @fuel-ts/
|
26
|
+
pnpm add @fuel-ts/account
|
27
27
|
# or
|
28
|
-
npm add @fuel-ts/
|
28
|
+
npm add @fuel-ts/account
|
29
29
|
```
|
30
30
|
|
31
31
|
### Full SDK Installation
|
@@ -38,13 +38,16 @@ pnpm add fuels
|
|
38
38
|
npm add fuels
|
39
39
|
```
|
40
40
|
|
41
|
-
|
41
|
+
## Test Utilities
|
42
42
|
|
43
43
|
These test utilities are exported to assist in testing apps using Fuels.
|
44
44
|
|
45
45
|
```ts
|
46
46
|
import { bn } from "@fuel-ts/math";
|
47
|
-
import {
|
47
|
+
import {
|
48
|
+
seedTestWallet,
|
49
|
+
generateTestWallet,
|
50
|
+
} from "@fuel-ts/account/test-utils";
|
48
51
|
|
49
52
|
const provider = await Provider.create("http://127.0.0.1:4000/v1/graphql");
|
50
53
|
|
@@ -54,17 +57,17 @@ const baseAssetId = provider.getBaseAssetId();
|
|
54
57
|
seedTestWallet(wallet, [{ assetId: baseAssetId, amount: bn(100_000) }]);
|
55
58
|
|
56
59
|
// generating
|
57
|
-
const wallet = await generateTestWallet(provider, [[1_000,
|
60
|
+
const wallet = await generateTestWallet(provider, [[1_000, baseAssetId]]);
|
58
61
|
```
|
59
62
|
|
60
63
|
## Contributing
|
61
64
|
|
62
|
-
In order to contribute to `@fuel-ts/
|
65
|
+
In order to contribute to `@fuel-ts/account`, please see the main [fuels-ts](https://github.com/FuelLabs/fuels-ts) monorepo.
|
63
66
|
|
64
67
|
## Changelog
|
65
68
|
|
66
|
-
The `@fuel-ts/
|
69
|
+
The `@fuel-ts/account` changelog can be found at [CHANGELOG](./CHANGELOG.md).
|
67
70
|
|
68
71
|
## License
|
69
72
|
|
70
|
-
The primary license for `@fuel-ts/
|
73
|
+
The primary license for `@fuel-ts/account` is `Apache 2.0`, see [LICENSE](./LICENSE).
|
package/dist/account.d.ts
CHANGED
@@ -4,7 +4,7 @@ import type { BigNumberish, BN } from '@fuel-ts/math';
|
|
4
4
|
import type { FuelConnector } from './connectors';
|
5
5
|
import type { TransactionRequestLike, CallResult, TransactionRequest, Coin, CoinQuantityLike, CoinQuantity, Message, Resource, ExcludeResourcesOption, Provider, ScriptTransactionRequestLike, ProviderSendTxParams, TransactionResponse, EstimateTransactionParams, TransactionCost } from './providers';
|
6
6
|
export type TxParamsType = Pick<ScriptTransactionRequestLike, 'gasLimit' | 'tip' | 'maturity' | 'maxFee' | 'witnessLimit'>;
|
7
|
-
export type EstimatedTxParams = Pick<TransactionCost, '
|
7
|
+
export type EstimatedTxParams = Pick<TransactionCost, 'estimatedPredicates' | 'addedSignatures' | 'requiredQuantities' | 'updateMaxFee'>;
|
8
8
|
/**
|
9
9
|
* `Account` provides an abstraction for interacting with accounts or wallets on the network.
|
10
10
|
*/
|
@@ -81,12 +81,12 @@ export declare class Account extends AbstractAccount {
|
|
81
81
|
*/
|
82
82
|
getBalances(): Promise<CoinQuantity[]>;
|
83
83
|
/**
|
84
|
-
*
|
84
|
+
* Funds a transaction request by adding the necessary resources.
|
85
85
|
*
|
86
|
-
* @
|
87
|
-
* @param
|
88
|
-
* @param
|
89
|
-
* @returns
|
86
|
+
* @typeParam T - The type of the TransactionRequest.
|
87
|
+
* @param request - The transaction request to fund.
|
88
|
+
* @param params - The estimated transaction parameters.
|
89
|
+
* @returns The funded transaction request.
|
90
90
|
*/
|
91
91
|
fund<T extends TransactionRequest>(request: T, params: EstimatedTxParams): Promise<T>;
|
92
92
|
/**
|
package/dist/account.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAKtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EACV,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAClB,IAAI,EACJ,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,sBAAsB,EACtB,QAAQ,EACR,4BAA4B,EAC5B,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EAChB,MAAM,aAAa,CAAC;
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAKtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EACV,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAClB,IAAI,EACJ,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,sBAAsB,EACtB,QAAQ,EACR,4BAA4B,EAC5B,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EAChB,M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