@fuel-ts/account 0.97.1 → 0.98.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.
- package/dist/account.d.ts +19 -16
- package/dist/account.d.ts.map +1 -1
- package/dist/connectors/fuel-connector.d.ts +4 -4
- package/dist/connectors/fuel-connector.d.ts.map +1 -1
- package/dist/connectors/fuel.d.ts +3 -3
- package/dist/connectors/fuel.d.ts.map +1 -1
- package/dist/connectors/types/data-type.d.ts +8 -0
- package/dist/connectors/types/data-type.d.ts.map +1 -1
- package/dist/hdwallet/hdwallet.d.ts +1 -1
- package/dist/hdwallet/hdwallet.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.global.js +2923 -1250
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +333 -279
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +358 -309
- package/dist/index.mjs.map +1 -1
- package/dist/mnemonic/mnemonic.d.ts +1 -1
- package/dist/mnemonic/mnemonic.d.ts.map +1 -1
- package/dist/mnemonic/utils.d.ts +1 -1
- package/dist/mnemonic/utils.d.ts.map +1 -1
- package/dist/predicate/predicate.d.ts +9 -1
- package/dist/predicate/predicate.d.ts.map +1 -1
- package/dist/predicate/utils/getPredicateRoot.d.ts +1 -1
- package/dist/predicate/utils/getPredicateRoot.d.ts.map +1 -1
- package/dist/providers/__generated__/operations.d.ts +0 -169
- package/dist/providers/__generated__/operations.d.ts.map +1 -1
- package/dist/providers/coin-quantity.d.ts +1 -1
- package/dist/providers/coin-quantity.d.ts.map +1 -1
- package/dist/providers/coin.d.ts +3 -2
- package/dist/providers/coin.d.ts.map +1 -1
- package/dist/providers/message.d.ts +8 -7
- package/dist/providers/message.d.ts.map +1 -1
- package/dist/providers/provider.d.ts +27 -34
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/resource.d.ts +1 -1
- package/dist/providers/resource.d.ts.map +1 -1
- package/dist/providers/transaction-request/create-transaction-request.d.ts +1 -1
- package/dist/providers/transaction-request/create-transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/errors.d.ts +3 -3
- package/dist/providers/transaction-request/errors.d.ts.map +1 -1
- package/dist/providers/transaction-request/helpers.d.ts +26 -4
- package/dist/providers/transaction-request/helpers.d.ts.map +1 -1
- package/dist/providers/transaction-request/input.d.ts +1 -1
- package/dist/providers/transaction-request/input.d.ts.map +1 -1
- package/dist/providers/transaction-request/output.d.ts +1 -1
- package/dist/providers/transaction-request/output.d.ts.map +1 -1
- package/dist/providers/transaction-request/script-transaction-request.d.ts +13 -3
- package/dist/providers/transaction-request/script-transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/scripts.d.ts +1 -1
- package/dist/providers/transaction-request/scripts.d.ts.map +1 -1
- package/dist/providers/transaction-request/storage-slot.d.ts +1 -1
- package/dist/providers/transaction-request/storage-slot.d.ts.map +1 -1
- package/dist/providers/transaction-request/transaction-request.d.ts +5 -3
- package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/types.d.ts +7 -0
- package/dist/providers/transaction-request/types.d.ts.map +1 -1
- package/dist/providers/transaction-request/upgrade-transaction-request.d.ts +1 -1
- package/dist/providers/transaction-request/upgrade-transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/upload-transaction-request.d.ts +1 -1
- package/dist/providers/transaction-request/upload-transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/witness.d.ts +1 -1
- package/dist/providers/transaction-request/witness.d.ts.map +1 -1
- package/dist/providers/transaction-response/transaction-response.d.ts +1 -1
- package/dist/providers/transaction-response/transaction-response.d.ts.map +1 -1
- 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 +0 -1
- package/dist/providers/transaction-summary/calculate-tx-fee-for-summary.d.ts.map +1 -1
- package/dist/providers/transaction-summary/get-transaction-summary.d.ts.map +1 -1
- package/dist/providers/transaction-summary/input.d.ts +1 -1
- package/dist/providers/transaction-summary/status.d.ts +9 -2
- package/dist/providers/transaction-summary/status.d.ts.map +1 -1
- package/dist/providers/transaction-summary/types.d.ts +1 -21
- package/dist/providers/transaction-summary/types.d.ts.map +1 -1
- package/dist/providers/utils/receipts.d.ts.map +1 -1
- package/dist/signer/signer.d.ts +1 -1
- package/dist/signer/signer.d.ts.map +1 -1
- package/dist/test-utils/launchNode.d.ts +4 -1
- package/dist/test-utils/launchNode.d.ts.map +1 -1
- package/dist/test-utils/setup-test-provider-and-wallets.d.ts.map +1 -1
- package/dist/test-utils/test-coin.d.ts +1 -0
- package/dist/test-utils/test-coin.d.ts.map +1 -0
- package/dist/test-utils/test-message.d.ts +6 -6
- package/dist/test-utils/test-message.d.ts.map +1 -1
- package/dist/test-utils.global.js +3033 -1799
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +294 -223
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +323 -252
- package/dist/test-utils.mjs.map +1 -1
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/formatTransferToContractScriptData.d.ts +1 -1
- package/dist/utils/formatTransferToContractScriptData.d.ts.map +1 -1
- package/dist/wallet/base-wallet-unlocked.d.ts +2 -2
- package/dist/wallet/base-wallet-unlocked.d.ts.map +1 -1
- package/dist/wallet/keystore-wallet.d.ts +2 -2
- package/dist/wallet/keystore-wallet.d.ts.map +1 -1
- package/dist/wallet/wallet.d.ts +3 -2
- package/dist/wallet/wallet.d.ts.map +1 -1
- package/dist/wallet/wallets.d.ts +1 -1
- package/dist/wallet/wallets.d.ts.map +1 -1
- package/dist/wallet-manager/types.d.ts +4 -4
- package/dist/wallet-manager/types.d.ts.map +1 -1
- package/dist/wallet-manager/vaults/mnemonic-vault.d.ts +5 -5
- package/dist/wallet-manager/vaults/mnemonic-vault.d.ts.map +1 -1
- package/dist/wallet-manager/vaults/privatekey-vault.d.ts +5 -5
- package/dist/wallet-manager/vaults/privatekey-vault.d.ts.map +1 -1
- package/dist/wallet-manager/wallet-manager.d.ts +3 -3
- package/dist/wallet-manager/wallet-manager.d.ts.map +1 -1
- package/package.json +27 -28
package/dist/types.d.ts
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Address } from '@fuel-ts/address';
|
2
|
+
export declare abstract class AbstractAccount {
|
3
|
+
abstract address: Address;
|
4
|
+
abstract provider: unknown;
|
5
|
+
abstract getResourcesToSpend(quantities: any[], options?: any): any;
|
6
|
+
abstract sendTransaction(transactionRequest: any, options?: any): any;
|
7
|
+
abstract simulateTransaction(transactionRequest: any, options?: any): any;
|
8
|
+
abstract getTransactionCost(transactionRequest: any, options?: any): Promise<any>;
|
9
|
+
abstract fund(transactionRequest: any, txCost: any): Promise<any>;
|
10
|
+
}
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD,8BAAsB,eAAe;IACnC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,mBAAmB,CAAC,UAAU,EAAE,GAAG,EAAE,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,GAAG;IACnE,QAAQ,CAAC,eAAe,CAAC,kBAAkB,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,GAAG;IACrE,QAAQ,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,GAAG;IACzE,QAAQ,CAAC,kBAAkB,CAAC,kBAAkB,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IACjF,QAAQ,CAAC,IAAI,CAAC,kBAAkB,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;CAClE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"formatTransferToContractScriptData.d.ts","sourceRoot":"","sources":["../../src/utils/formatTransferToContractScriptData.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"formatTransferToContractScriptData.d.ts","sourceRoot":"","sources":["../../src/utils/formatTransferToContractScriptData.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD,UAAU,gCAAgC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,SAAS,CAAC;IACnB,MAAM,EAAE,EAAE,CAAC;CACZ;AAED,eAAO,MAAM,kCAAkC,mBAC7B,KAAK,CAAC,gCAAgC,CAAC,eAaxD,CAAC;AAEF,eAAO,MAAM,gCAAgC,mBAC3B,KAAK,CAAC,gCAAgC,CAAC;;;EAiCxD,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { BytesLike } from '@fuel-ts/
|
1
|
+
import type { BytesLike } from '@fuel-ts/utils';
|
2
2
|
import { Account } from '../account';
|
3
3
|
import type { TransactionRequestLike, CallResult, Provider, ProviderSendTxParams, EstimateTransactionParams, TransactionRequest, TransactionResponse } from '../providers';
|
4
4
|
import { Signer } from '../signer';
|
@@ -61,7 +61,7 @@ export declare class BaseWalletUnlocked extends Account {
|
|
61
61
|
* @param estimateTxDependencies - Whether to estimate the transaction dependencies.
|
62
62
|
* @returns A promise that resolves to the TransactionResponse object.
|
63
63
|
*/
|
64
|
-
sendTransaction(transactionRequestLike: TransactionRequestLike, { estimateTxDependencies }?: ProviderSendTxParams): Promise<TransactionResponse>;
|
64
|
+
sendTransaction(transactionRequestLike: TransactionRequestLike, { estimateTxDependencies, enableAssetBurn }?: ProviderSendTxParams): Promise<TransactionResponse>;
|
65
65
|
/**
|
66
66
|
* Populates the witness signature for a transaction and sends a call to the network using `provider.dryRun`.
|
67
67
|
*
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"base-wallet-unlocked.d.ts","sourceRoot":"","sources":["../../src/wallet/base-wallet-unlocked.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"base-wallet-unlocked.d.ts","sourceRoot":"","sources":["../../src/wallet/base-wallet-unlocked.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,KAAK,EACV,sBAAsB,EACtB,UAAU,EACV,QAAQ,EACR,oBAAoB,EACpB,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAInC;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,OAAO;IAC7C;;OAEG;IACH,MAAM,CAAC,WAAW,SAA8B;IAEhD;;OAEG;IACH,MAAM,EAAE,MAAM,MAAM,CAAC;IAErB;;;;;OAKG;gBACS,UAAU,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,QAAQ;IAMtD;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED;;;;OAIG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;;;;OAKG;IACY,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAK5D;;;;;OAKG;IACY,eAAe,CAAC,sBAAsB,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC;IAQ/F;;;;;OAKG;IACG,qCAAqC,CAAC,CAAC,SAAS,kBAAkB,EACtE,sBAAsB,EAAE,sBAAsB;IAUhD;;;;;;OAMG;IACY,eAAe,CAC5B,sBAAsB,EAAE,sBAAsB,EAC9C,EAAE,sBAA8B,EAAE,eAAe,EAAE,GAAE,oBAAyB,GAC7E,OAAO,CAAC,mBAAmB,CAAC;IAgB/B;;;;;OAKG;IACY,mBAAmB,CAChC,sBAAsB,EAAE,sBAAsB,EAC9C,EAAE,sBAA6B,EAAE,GAAE,yBAA8B,GAChE,OAAO,CAAC,UAAU,CAAC;IActB;;;;;OAKG;IACG,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAGjD"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { Address } from '@fuel-ts/address';
|
2
2
|
export type KeystoreWallet = {
|
3
3
|
id: string;
|
4
4
|
version: number;
|
@@ -32,7 +32,7 @@ export declare const DEFAULT_IV_SIZE = 16;
|
|
32
32
|
* If the prefix does not exist, it returns the original string.
|
33
33
|
*/
|
34
34
|
export declare const removeHexPrefix: (hexString: string) => string;
|
35
|
-
export declare function encryptKeystoreWallet(privateKey: string, address: string |
|
35
|
+
export declare function encryptKeystoreWallet(privateKey: string, address: string | Address, password: string): Promise<string>;
|
36
36
|
export declare function decryptKeystoreWallet(jsonWallet: string, password: string): Promise<string>;
|
37
37
|
export {};
|
38
38
|
//# sourceMappingURL=keystore-wallet.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"keystore-wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/keystore-wallet.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"keystore-wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/keystore-wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAc3C,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,cAAc,CAAC;CACxB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,aAAa,CAAC;IACtB,YAAY,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,KAAK,SAAS,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAGF,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC;;;GAGG;AACH,eAAO,MAAM,eAAe,cAAe,MAAM,WAMhD,CAAC;AAEF,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GAAG,OAAO,EACzB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,CAkDjB;AAED,wBAAsB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAgDjG"}
|
package/dist/wallet/wallet.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Address } from '@fuel-ts/address';
|
2
|
+
import type { BytesLike } from '@fuel-ts/utils';
|
2
3
|
import type { Provider } from '../providers';
|
3
4
|
import { WalletLocked, WalletUnlocked } from './wallets';
|
4
5
|
/**
|
@@ -12,7 +13,7 @@ export declare class Wallet {
|
|
12
13
|
* @param provider - A Provider instance (optional).
|
13
14
|
* @returns A locked wallet instance.
|
14
15
|
*/
|
15
|
-
static fromAddress(address: string |
|
16
|
+
static fromAddress(address: string | Address, provider?: Provider): WalletLocked;
|
16
17
|
/**
|
17
18
|
* Creates an unlocked wallet instance from a private key and a provider.
|
18
19
|
*
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD;;GAEG;AACH,qBAAa,MAAM;IACjB;;;;;;OAMG;IACH,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,YAAY;IAIhF;;;;;;OAMG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,QAAQ;IAIhE;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,iCAA2B;IAE1C;;;;;;;OAOG;IACH,MAAM,CAAC,QAAQ,iCAA2B;IAE1C;;;;;;;;OAQG;IACH,MAAM,CAAC,YAAY,qCAA+B;IAElD;;;;;;OAMG;IACH,MAAM,CAAC,eAAe,wCAAkC;IAExD;;;;;;;OAOG;IACH,MAAM,CAAC,iBAAiB,0CAAoC;CAC7D"}
|
package/dist/wallet/wallets.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../../src/wallet/wallets.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../../src/wallet/wallets.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAG5D,MAAM,WAAW,eAAe;IAC9B,8CAA8C;IAC9C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,OAAO;IACvC;;;;;OAKG;IACH,MAAM,CAAC,UAAU,EAAE,SAAS,GAAG,cAAc;CAI9C;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,kBAAkB;IACpD;;;;OAIG;IACH,IAAI,IAAI,YAAY;IAKpB;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,GAAG,cAAc;IAMlE;;;;;;;OAOG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,cAAc;IAOjF;;;;;;;;OAQG;IACH,MAAM,CAAC,YAAY,CACjB,QAAQ,EAAE,MAAM,EAChB,IAAI,CAAC,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,SAAS,EACtB,QAAQ,CAAC,EAAE,QAAQ,GAClB,cAAc;IAQjB;;;;;;OAMG;IACH,MAAM,CAAC,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,cAAc;IAMhF;;;;;;;OAOG;WACU,iBAAiB,CAC5B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,QAAQ,GAClB,OAAO,CAAC,cAAc,CAAC;CAK3B"}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import type {
|
1
|
+
import type { Address } from '@fuel-ts/address';
|
2
2
|
import type { WalletUnlocked } from '../wallet';
|
3
3
|
export type WalletManagerAccount = {
|
4
|
-
address:
|
4
|
+
address: Address;
|
5
5
|
publicKey: string;
|
6
6
|
vaultId?: number;
|
7
7
|
};
|
@@ -30,8 +30,8 @@ export declare abstract class Vault<TOptions = {
|
|
30
30
|
serialize(): TOptions;
|
31
31
|
getAccounts(): WalletManagerAccount[];
|
32
32
|
addAccount(): WalletManagerAccount;
|
33
|
-
exportAccount(_address:
|
34
|
-
getWallet(_address:
|
33
|
+
exportAccount(_address: Address): string;
|
34
|
+
getWallet(_address: Address): WalletUnlocked;
|
35
35
|
}
|
36
36
|
export declare abstract class StorageAbstract {
|
37
37
|
abstract setItem(key: string, value: string): Promise<void>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/wallet-manager/types.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/wallet-manager/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,KAAK,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;CACd,CAAC,CAAC;AAEH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,8BAAsB,KAAK,CAAC,QAAQ,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;IACxD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEjB,QAAQ,EAAE,QAAQ;IAI9B,SAAS,IAAI,QAAQ;IAIrB,WAAW,IAAI,oBAAoB,EAAE;IAIrC,UAAU,IAAI,oBAAoB;IAIlC,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM;IAIxC,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,cAAc;CAG7C;AAED,8BAAsB,eAAe;IACnC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAC3D,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjE,QAAQ,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAC/C,QAAQ,CAAC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAChC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { Address } from '@fuel-ts/address';
|
2
2
|
import type { WalletUnlocked } from '../../wallet';
|
3
3
|
import type { Vault } from '../types';
|
4
4
|
export interface MnemonicVaultOptions {
|
@@ -17,13 +17,13 @@ export declare class MnemonicVault implements Vault<MnemonicVaultOptions> {
|
|
17
17
|
serialize(): MnemonicVaultOptions;
|
18
18
|
getAccounts(): {
|
19
19
|
publicKey: string;
|
20
|
-
address:
|
20
|
+
address: Address;
|
21
21
|
}[];
|
22
22
|
addAccount(): {
|
23
23
|
publicKey: string;
|
24
|
-
address:
|
24
|
+
address: Address;
|
25
25
|
};
|
26
|
-
exportAccount(address: string |
|
27
|
-
getWallet(address: string |
|
26
|
+
exportAccount(address: string | Address): string;
|
27
|
+
getWallet(address: string | Address): WalletUnlocked;
|
28
28
|
}
|
29
29
|
//# sourceMappingURL=mnemonic-vault.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mnemonic-vault.d.ts","sourceRoot":"","sources":["../../../src/wallet-manager/vaults/mnemonic-vault.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"mnemonic-vault.d.ts","sourceRoot":"","sources":["../../../src/wallet-manager/vaults/mnemonic-vault.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,qBAAa,aAAc,YAAW,KAAK,CAAC,oBAAoB,CAAC;;IAC/D,MAAM,CAAC,QAAQ,CAAC,IAAI,cAAc;IAGlC,OAAO,SAAQ;IACf,QAAQ,EAAE,MAAM,CAA4C;IAC5D,gBAAgB,EAAE,MAAM,CAAK;gBAEjB,OAAO,EAAE,oBAAoB;IAOzC,aAAa,CAAC,KAAK,EAAE,MAAM;IAO3B,SAAS,IAAI,oBAAoB;IAQjC,WAAW;;;;IAiBX,UAAU;;;;IAUV,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM;IAkBhD,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,cAAc;CAIrD"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { Address } from '@fuel-ts/address';
|
2
2
|
import type { WalletUnlocked } from '../../wallet';
|
3
3
|
import type { WalletManagerAccount, Vault } from '../types';
|
4
4
|
export interface PkVaultOptions {
|
@@ -15,15 +15,15 @@ export declare class PrivateKeyVault implements Vault<PkVaultOptions> {
|
|
15
15
|
constructor(options?: PkVaultOptions);
|
16
16
|
serialize(): PkVaultOptions;
|
17
17
|
getPublicAccount(privateKey: string): {
|
18
|
-
address:
|
18
|
+
address: Address;
|
19
19
|
publicKey: string;
|
20
20
|
};
|
21
21
|
getAccounts(): WalletManagerAccount[];
|
22
22
|
addAccount(): {
|
23
|
-
address:
|
23
|
+
address: Address;
|
24
24
|
publicKey: string;
|
25
25
|
};
|
26
|
-
exportAccount(address: string |
|
27
|
-
getWallet(address: string |
|
26
|
+
exportAccount(address: string | Address): string;
|
27
|
+
getWallet(address: string | Address): WalletUnlocked;
|
28
28
|
}
|
29
29
|
//# sourceMappingURL=privatekey-vault.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"privatekey-vault.d.ts","sourceRoot":"","sources":["../../../src/wallet-manager/vaults/privatekey-vault.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"privatekey-vault.d.ts","sourceRoot":"","sources":["../../../src/wallet-manager/vaults/privatekey-vault.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAG3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC1B;AAED,qBAAa,eAAgB,YAAW,KAAK,CAAC,cAAc,CAAC;;IAC3D,MAAM,CAAC,QAAQ,CAAC,IAAI,gBAAgB;IAIpC;;;OAGG;gBACS,OAAO,GAAE,cAAmB;IAQxC,SAAS,IAAI,cAAc;IAM3B,gBAAgB,CAAC,UAAU,EAAE,MAAM;;;;IAQnC,WAAW,IAAI,oBAAoB,EAAE;IAIrC,UAAU;;;;IAQV,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM;IAgBhD,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,cAAc;CAIrD"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { Address } from '@fuel-ts/address';
|
2
2
|
import { EventEmitter } from 'events';
|
3
3
|
import type { WalletUnlocked } from '../wallet';
|
4
4
|
import type { StorageAbstract, WalletManagerAccount, VaultConfig, WalletManagerOptions, Vault } from './types';
|
@@ -51,11 +51,11 @@ export declare class WalletManager extends EventEmitter {
|
|
51
51
|
/**
|
52
52
|
* Create a Wallet instance for the specific account
|
53
53
|
*/
|
54
|
-
getWallet(address: string |
|
54
|
+
getWallet(address: string | Address): WalletUnlocked;
|
55
55
|
/**
|
56
56
|
* Export specific account privateKey
|
57
57
|
*/
|
58
|
-
exportPrivateKey(address: string |
|
58
|
+
exportPrivateKey(address: string | Address): string;
|
59
59
|
/**
|
60
60
|
* Add account to a selected vault or on the first vault as default.
|
61
61
|
* If not vaults are adds it will return error
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"wallet-manager.d.ts","sourceRoot":"","sources":["../../src/wallet-manager/wallet-manager.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"wallet-manager.d.ts","sourceRoot":"","sources":["../../src/wallet-manager/wallet-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,WAAW,EAEX,oBAAoB,EAEpB,KAAK,EACN,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAmB5D;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,YAAY;;IAC7C;;;;;;;;OAQG;IACH,MAAM,CAAC,MAAM,oDAAoC;IACjD;;;;OAIG;IACH,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAuB;IAExD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAmB;gBAOnC,OAAO,CAAC,EAAE,oBAAoB;IAK1C,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED;;;OAGG;IACH,WAAW,CAAC,CAAC,SAAS,KAAK,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IAOzE;;OAEG;IACH,SAAS,IAAI,KAAK,CAAC;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAQrE;;OAEG;IACH,WAAW,IAAI,KAAK,CAAC,oBAAoB,CAAC;IAO1C;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,cAAc;IAUpD;;OAEG;IACH,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAW1C;;;OAGG;IACG,UAAU,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE;IAc9C;;;OAGG;IACG,WAAW,CAAC,KAAK,EAAE,MAAM;IAK/B;;;OAGG;IACG,QAAQ,CAAC,WAAW,EAAE,WAAW;IAiBvC;;;OAGG;IACH,IAAI;IAUJ;;;OAGG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM;IAmB/B;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAgBvD;;OAEG;IACG,SAAS;IAUf;;OAEG;YACW,SAAS;IAuCvB;;OAEG;IACH,OAAO,CAAC,aAAa;CAOtB"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fuel-ts/account",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.98.0",
|
4
4
|
"description": "",
|
5
5
|
"author": "Fuel Labs <contact@fuel.sh> (https://fuel.network/)",
|
6
6
|
"main": "dist/index.js",
|
@@ -42,35 +42,34 @@
|
|
42
42
|
"license": "Apache-2.0",
|
43
43
|
"dependencies": {
|
44
44
|
"@fuels/vm-asm": "0.58.2",
|
45
|
-
"@noble/curves": "
|
46
|
-
"events": "
|
47
|
-
"graphql": "
|
48
|
-
"graphql-request": "
|
49
|
-
"graphql-tag": "
|
50
|
-
"ramda": "
|
51
|
-
"@fuel-ts/abi-coder": "0.
|
52
|
-
"@fuel-ts/address": "0.
|
53
|
-
"@fuel-ts/crypto": "0.
|
54
|
-
"@fuel-ts/errors": "0.
|
55
|
-
"@fuel-ts/hasher": "0.
|
56
|
-
"@fuel-ts/
|
57
|
-
"@fuel-ts/
|
58
|
-
"@fuel-ts/
|
59
|
-
"@fuel-ts/
|
60
|
-
"@fuel-ts/
|
61
|
-
"@fuel-ts/versions": "0.97.1"
|
45
|
+
"@noble/curves": "1.6.0",
|
46
|
+
"events": "3.3.0",
|
47
|
+
"graphql": "16.9.0",
|
48
|
+
"graphql-request": "6.1.0",
|
49
|
+
"graphql-tag": "2.12.6",
|
50
|
+
"ramda": "0.30.1",
|
51
|
+
"@fuel-ts/abi-coder": "0.98.0",
|
52
|
+
"@fuel-ts/address": "0.98.0",
|
53
|
+
"@fuel-ts/crypto": "0.98.0",
|
54
|
+
"@fuel-ts/errors": "0.98.0",
|
55
|
+
"@fuel-ts/hasher": "0.98.0",
|
56
|
+
"@fuel-ts/math": "0.98.0",
|
57
|
+
"@fuel-ts/merkle": "0.98.0",
|
58
|
+
"@fuel-ts/transactions": "0.98.0",
|
59
|
+
"@fuel-ts/utils": "0.98.0",
|
60
|
+
"@fuel-ts/versions": "0.98.0"
|
62
61
|
},
|
63
62
|
"devDependencies": {
|
64
|
-
"@graphql-codegen/cli": "
|
65
|
-
"@graphql-codegen/typescript": "
|
66
|
-
"@graphql-codegen/typescript-generic-sdk": "
|
67
|
-
"@graphql-codegen/typescript-operations": "
|
68
|
-
"@types/ramda": "
|
69
|
-
"get-graphql-schema": "
|
70
|
-
"type-fest": "
|
71
|
-
"@fuel-ts/hasher": "0.
|
72
|
-
"@fuel-ts/math": "0.
|
73
|
-
"@fuel-ts/utils": "0.
|
63
|
+
"@graphql-codegen/cli": "5.0.3",
|
64
|
+
"@graphql-codegen/typescript": "4.0.9",
|
65
|
+
"@graphql-codegen/typescript-generic-sdk": "4.0.1",
|
66
|
+
"@graphql-codegen/typescript-operations": "4.2.3",
|
67
|
+
"@types/ramda": "0.30.2",
|
68
|
+
"get-graphql-schema": "2.1.2",
|
69
|
+
"type-fest": "4.26.1",
|
70
|
+
"@fuel-ts/hasher": "0.98.0",
|
71
|
+
"@fuel-ts/math": "0.98.0",
|
72
|
+
"@fuel-ts/utils": "0.98.0",
|
74
73
|
"@internal/utils": "0.0.2"
|
75
74
|
},
|
76
75
|
"scripts": {
|