@fuel-ts/account 0.98.0 → 0.100.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 +13 -8
- package/dist/account.d.ts.map +1 -1
- package/dist/assets/asset-api.d.ts +69 -0
- package/dist/assets/asset-api.d.ts.map +1 -0
- package/dist/assets/assets.d.ts.map +1 -0
- package/dist/{providers/assets → assets}/index.d.ts +1 -0
- package/dist/assets/index.d.ts.map +1 -0
- package/dist/assets/types.d.ts.map +1 -0
- package/dist/assets/utils/fuelAssetsBaseUrl.d.ts +2 -0
- package/dist/assets/utils/fuelAssetsBaseUrl.d.ts.map +1 -0
- package/dist/assets/utils/index.d.ts.map +1 -0
- package/dist/{providers/assets → assets}/utils/network.d.ts +6 -6
- package/dist/assets/utils/network.d.ts.map +1 -0
- package/dist/assets/utils/resolveIconPaths.d.ts.map +1 -0
- package/dist/assets/utils/url.d.ts.map +1 -0
- package/dist/configs.d.ts +2 -2
- package/dist/configs.global.js.map +1 -1
- package/dist/configs.js.map +1 -1
- package/dist/configs.mjs.map +1 -1
- package/dist/connectors/fuel-connector.d.ts +8 -7
- package/dist/connectors/fuel-connector.d.ts.map +1 -1
- package/dist/connectors/types/data-type.d.ts +8 -1
- package/dist/connectors/types/data-type.d.ts.map +1 -1
- package/dist/connectors/types/events.d.ts +1 -1
- package/dist/connectors/types/events.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.global.js +17708 -16898
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +6877 -6349
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6960 -6448
- package/dist/index.mjs.map +1 -1
- package/dist/mnemonic/mnemonic.d.ts +1 -1
- package/dist/providers/__generated__/operations.d.ts +121 -4
- package/dist/providers/__generated__/operations.d.ts.map +1 -1
- package/dist/providers/coin-quantity.d.ts.map +1 -1
- package/dist/providers/fuel-graphql-subscriber.d.ts +1 -0
- package/dist/providers/fuel-graphql-subscriber.d.ts.map +1 -1
- package/dist/providers/index.d.ts +0 -1
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/message.d.ts.map +1 -1
- package/dist/providers/provider.d.ts +117 -23
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/resource-cache.d.ts +6 -4
- package/dist/providers/resource-cache.d.ts.map +1 -1
- package/dist/providers/transaction-request/helpers.d.ts +10 -1
- package/dist/providers/transaction-request/helpers.d.ts.map +1 -1
- package/dist/providers/transaction-request/transaction-request.d.ts +31 -3
- package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-response/transaction-response.d.ts.map +1 -1
- package/dist/providers/transaction-summary/assemble-transaction-summary-from-serialized.d.ts +7 -0
- package/dist/providers/transaction-summary/assemble-transaction-summary-from-serialized.d.ts.map +1 -0
- package/dist/providers/transaction-summary/call.d.ts +8 -2
- package/dist/providers/transaction-summary/call.d.ts.map +1 -1
- package/dist/providers/transaction-summary/get-transaction-summary.d.ts +1 -1
- package/dist/providers/transaction-summary/get-transaction-summary.d.ts.map +1 -1
- package/dist/providers/transaction-summary/index.d.ts +1 -0
- package/dist/providers/transaction-summary/index.d.ts.map +1 -1
- package/dist/providers/transaction-summary/operations.d.ts.map +1 -1
- package/dist/providers/transaction-summary/receipt.d.ts +3 -2
- package/dist/providers/transaction-summary/receipt.d.ts.map +1 -1
- package/dist/providers/transaction-summary/types.d.ts +5 -3
- package/dist/providers/transaction-summary/types.d.ts.map +1 -1
- package/dist/providers/utils/handle-gql-error-message.d.ts +5 -5
- package/dist/providers/utils/handle-gql-error-message.d.ts.map +1 -1
- package/dist/providers/utils/helpers.d.ts +14 -0
- package/dist/providers/utils/helpers.d.ts.map +1 -0
- package/dist/providers/utils/index.d.ts +1 -0
- package/dist/providers/utils/index.d.ts.map +1 -1
- package/dist/providers/utils/receipts.d.ts +4 -3
- package/dist/providers/utils/receipts.d.ts.map +1 -1
- package/dist/providers/utils/serialization.d.ts +35 -0
- package/dist/providers/utils/serialization.d.ts.map +1 -0
- package/dist/signer/signer.d.ts +1 -1
- package/dist/test-utils/wallet-config.d.ts +2 -1
- package/dist/test-utils/wallet-config.d.ts.map +1 -1
- package/dist/test-utils.global.js +4015 -3890
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +1270 -1464
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +969 -1163
- package/dist/test-utils.mjs.map +1 -1
- package/dist/utils/deployScriptOrPredicate.d.ts.map +1 -1
- package/dist/utils/formatTransferToContractScriptData.d.ts +3 -3
- package/dist/utils/formatTransferToContractScriptData.d.ts.map +1 -1
- package/dist/utils/predicate-script-loader-instructions.d.ts +38 -3
- package/dist/utils/predicate-script-loader-instructions.d.ts.map +1 -1
- package/dist/wallet/base-wallet-unlocked.d.ts +2 -1
- 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-manager/vaults/mnemonic-vault.d.ts +3 -2
- package/dist/wallet-manager/vaults/mnemonic-vault.d.ts.map +1 -1
- package/dist/wallet-manager/vaults/privatekey-vault.d.ts +2 -1
- 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 +22 -23
- package/dist/providers/assets/assets.d.ts.map +0 -1
- package/dist/providers/assets/index.d.ts.map +0 -1
- package/dist/providers/assets/types.d.ts.map +0 -1
- package/dist/providers/assets/utils/fuelAssetsBaseUrl.d.ts +0 -2
- package/dist/providers/assets/utils/fuelAssetsBaseUrl.d.ts.map +0 -1
- package/dist/providers/assets/utils/index.d.ts.map +0 -1
- package/dist/providers/assets/utils/network.d.ts.map +0 -1
- package/dist/providers/assets/utils/resolveIconPaths.d.ts.map +0 -1
- package/dist/providers/assets/utils/url.d.ts.map +0 -1
- /package/dist/{providers/assets → assets}/assets.d.ts +0 -0
- /package/dist/{providers/assets → assets}/types.d.ts +0 -0
- /package/dist/{providers/assets → assets}/utils/index.d.ts +0 -0
- /package/dist/{providers/assets → assets}/utils/resolveIconPaths.d.ts +0 -0
- /package/dist/{providers/assets → assets}/utils/url.d.ts +0 -0
package/dist/account.d.ts
CHANGED
@@ -1,12 +1,13 @@
|
|
1
|
-
import type { WithAddress } from '@fuel-ts/address';
|
1
|
+
import type { AddressInput, WithAddress } from '@fuel-ts/address';
|
2
2
|
import { Address } from '@fuel-ts/address';
|
3
|
+
import type { HashableMessage } from '@fuel-ts/hasher';
|
3
4
|
import type { BigNumberish, BN } from '@fuel-ts/math';
|
4
5
|
import type { BytesLike } from '@fuel-ts/utils';
|
5
6
|
import type { FuelConnector, FuelConnectorSendTxParams } from './connectors';
|
6
7
|
import type { TransactionRequest, CoinQuantityLike, Resource, ExcludeResourcesOption, Provider, ScriptTransactionRequestLike, TransactionCost, EstimateTransactionParams, CursorPaginationArgs, TransactionRequestLike, CallResult, GetCoinsResponse, GetMessagesResponse, GetBalancesResponse, Coin, TransactionCostParams, TransactionResponse, ProviderSendTxParams } from './providers';
|
7
8
|
import { ScriptTransactionRequest } from './providers';
|
8
9
|
import { AbstractAccount } from './types';
|
9
|
-
export type TxParamsType = Pick<ScriptTransactionRequestLike, 'gasLimit' | 'tip' | 'maturity' | 'maxFee' | 'witnessLimit'>;
|
10
|
+
export type TxParamsType = Pick<ScriptTransactionRequestLike, 'gasLimit' | 'tip' | 'maturity' | 'maxFee' | 'witnessLimit' | 'expiration'>;
|
10
11
|
export type TransferParams = {
|
11
12
|
destination: string | Address;
|
12
13
|
amount: BigNumberish;
|
@@ -18,7 +19,7 @@ export type ContractTransferParams = {
|
|
18
19
|
assetId: BytesLike;
|
19
20
|
};
|
20
21
|
export type AccountSendTxParams = ProviderSendTxParams & FuelConnectorSendTxParams;
|
21
|
-
export type EstimatedTxParams = Pick<TransactionCost, 'estimatedPredicates' | 'addedSignatures' | 'requiredQuantities' | 'updateMaxFee' | 'gasPrice'>;
|
22
|
+
export type EstimatedTxParams = Pick<TransactionCost, 'estimatedPredicates' | 'addedSignatures' | 'requiredQuantities' | 'updateMaxFee' | 'gasPrice' | 'transactionSummary'>;
|
22
23
|
export type FakeResources = Partial<Coin> & Required<Pick<Coin, 'amount' | 'assetId'>>;
|
23
24
|
/**
|
24
25
|
* `Account` provides an abstraction for interacting with accounts or wallets on the network.
|
@@ -43,7 +44,7 @@ export declare class Account extends AbstractAccount implements WithAddress {
|
|
43
44
|
* @param provider - A Provider instance (optional).
|
44
45
|
* @param connector - A FuelConnector instance (optional).
|
45
46
|
*/
|
46
|
-
constructor(address:
|
47
|
+
constructor(address: AddressInput, provider?: Provider, connector?: FuelConnector);
|
47
48
|
/**
|
48
49
|
* The provider used to interact with the network.
|
49
50
|
*
|
@@ -171,7 +172,7 @@ export declare class Account extends AbstractAccount implements WithAddress {
|
|
171
172
|
* @param txParams - The transaction parameters (optional).
|
172
173
|
* @returns A promise that resolves to the transaction response.
|
173
174
|
*/
|
174
|
-
withdrawToBaseLayer(recipient:
|
175
|
+
withdrawToBaseLayer(recipient: AddressInput, amount: BigNumberish, txParams?: TxParamsType): Promise<TransactionResponse>;
|
175
176
|
/**
|
176
177
|
* Returns a transaction cost to enable user
|
177
178
|
* to set gasLimit and also reserve balance amounts
|
@@ -182,7 +183,7 @@ export declare class Account extends AbstractAccount implements WithAddress {
|
|
182
183
|
*
|
183
184
|
* @returns A promise that resolves to the transaction cost object.
|
184
185
|
*/
|
185
|
-
getTransactionCost(transactionRequestLike: TransactionRequestLike, { signatureCallback, quantities }?: TransactionCostParams): Promise<TransactionCost>;
|
186
|
+
getTransactionCost(transactionRequestLike: TransactionRequestLike, { signatureCallback, quantities, gasPrice }?: TransactionCostParams): Promise<TransactionCost>;
|
186
187
|
/**
|
187
188
|
* Sign a message from the account via the connector.
|
188
189
|
*
|
@@ -191,7 +192,7 @@ export declare class Account extends AbstractAccount implements WithAddress {
|
|
191
192
|
*
|
192
193
|
* @hidden
|
193
194
|
*/
|
194
|
-
signMessage(message:
|
195
|
+
signMessage(message: HashableMessage): Promise<string>;
|
195
196
|
/**
|
196
197
|
* Signs a transaction from the account via the connector..
|
197
198
|
*
|
@@ -206,7 +207,7 @@ export declare class Account extends AbstractAccount implements WithAddress {
|
|
206
207
|
* @param sendTransactionParams - The provider send transaction parameters (optional).
|
207
208
|
* @returns A promise that resolves to the transaction response.
|
208
209
|
*/
|
209
|
-
sendTransaction(transactionRequestLike: TransactionRequestLike, { estimateTxDependencies,
|
210
|
+
sendTransaction(transactionRequestLike: TransactionRequestLike, { estimateTxDependencies, ...connectorOptions }?: AccountSendTxParams): Promise<TransactionResponse>;
|
210
211
|
/**
|
211
212
|
* Simulates a transaction.
|
212
213
|
*
|
@@ -222,6 +223,10 @@ export declare class Account extends AbstractAccount implements WithAddress {
|
|
222
223
|
* @returns An array of `Resource` objects with generated properties.
|
223
224
|
*/
|
224
225
|
generateFakeResources(coins: FakeResources[]): Array<Resource>;
|
226
|
+
/** @hidden */
|
227
|
+
private prepareTransactionForSend;
|
228
|
+
/** @hidden */
|
229
|
+
private prepareTransactionSummary;
|
225
230
|
/** @hidden * */
|
226
231
|
private validateTransferAmount;
|
227
232
|
/** @hidden * */
|
package/dist/account.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAG3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC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,EAAE,iBAAiB,EAAE,UAAe,EAAE,QAAQ,EAAE,GAAE,qBAA0B,GAC3E,OAAO,CAAC,eAAe,CAAC;IA2D3B;;;;;;;OAOG;IACG,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;IAO5D;;;;;OAKG;IACG,eAAe,CAAC,sBAAsB,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC;IAUtF;;;;;;OAMG;IACG,eAAe,CACnB,sBAAsB,EAAE,sBAAsB,EAC9C,EAAE,sBAA6B,EAAE,GAAG,gBAAgB,EAAE,GAAE,mBAAwB,GAC/E,OAAO,CAAC,mBAAmB,CAAC;IAwC/B;;;;;;OAMG;IACG,mBAAmB,CACvB,sBAAsB,EAAE,sBAAsB,EAC9C,EAAE,sBAA6B,EAAE,GAAE,yBAA8B,GAChE,OAAO,CAAC,UAAU,CAAC;IAQtB;;;;;OAKG;IACH,qBAAqB,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC;IAU9D,cAAc;YACA,yBAAyB;IAqBvC,cAAc;YACA,yBAAyB;IAcvC,gBAAgB;IAChB,OAAO,CAAC,sBAAsB;IAS9B,gBAAgB;YACF,0BAA0B;IAiBxC,gBAAgB;IAChB,OAAO,CAAC,yBAAyB;CAiClC"}
|
@@ -0,0 +1,69 @@
|
|
1
|
+
import { B256Address } from "@fuel-ts/address";
|
2
|
+
import { NetworkEthereum, NetworkFuel } from "./types";
|
3
|
+
declare const networks: {
|
4
|
+
readonly mainnet: "https://mainnet-explorer.fuel.network";
|
5
|
+
readonly testnet: "https://explorer-indexer-testnet.fuel.network";
|
6
|
+
};
|
7
|
+
export interface AssetPaginationOptions {
|
8
|
+
last: number;
|
9
|
+
}
|
10
|
+
export interface AssetPageInfo {
|
11
|
+
count: number;
|
12
|
+
}
|
13
|
+
export interface AssetInfo {
|
14
|
+
assetId: string;
|
15
|
+
contractId?: string;
|
16
|
+
subId?: string;
|
17
|
+
name: string;
|
18
|
+
symbol: string;
|
19
|
+
decimals: number;
|
20
|
+
suspicious: boolean;
|
21
|
+
verified: boolean;
|
22
|
+
totalSupply?: string;
|
23
|
+
networks?: (NetworkEthereum | NetworkFuel)[];
|
24
|
+
rate?: number;
|
25
|
+
icon?: string;
|
26
|
+
owner?: string;
|
27
|
+
amount?: string;
|
28
|
+
amountInUsd?: string;
|
29
|
+
uri?: string;
|
30
|
+
metadata: Record<string, string>;
|
31
|
+
collection?: string;
|
32
|
+
isNFT?: boolean;
|
33
|
+
}
|
34
|
+
/**
|
35
|
+
* Get information about any asset (including NFTs)
|
36
|
+
*
|
37
|
+
* @param opts - The options for the request
|
38
|
+
* @param opts.network {'mainnet' | 'testnet'} - The network to use (default: `mainnet`)
|
39
|
+
* @param opts.assetId {string} - The ID of the asset to get information about
|
40
|
+
* @returns {Promise<AssetInfo>} - The information about the asset
|
41
|
+
*
|
42
|
+
* @see {@link https://github.com/FuelLabs/fuel-explorer/wiki/Assets-API#instructions-for-consuming-assets-data-from-indexer-api}
|
43
|
+
*/
|
44
|
+
export declare const getAssetById: (opts: {
|
45
|
+
assetId: B256Address;
|
46
|
+
network?: keyof typeof networks;
|
47
|
+
}) => Promise<AssetInfo | null>;
|
48
|
+
export interface AssetsByOwner {
|
49
|
+
data: AssetInfo[];
|
50
|
+
pageInfo: AssetPageInfo;
|
51
|
+
}
|
52
|
+
/**
|
53
|
+
* Get assets by owner
|
54
|
+
*
|
55
|
+
* @param opts - The options for the request
|
56
|
+
* @param opts.owner {B256Address} - The owner of the assets
|
57
|
+
* @param opts.network {'mainnet' | 'testnet'} - The network to use (default: `mainnet`)
|
58
|
+
* @param opts.pagination {AssetPaginationOptions} - The pagination options (default: 10)
|
59
|
+
* @returns {Promise<AssetsByOwnerResponse>} - The assets by owner
|
60
|
+
*
|
61
|
+
* @see {@link https://github.com/FuelLabs/fuel-explorer/wiki/Assets-API#instructions-for-consuming-assets-data-owned-by-an-account-from-indexer-api}
|
62
|
+
*/
|
63
|
+
export declare const getAssetsByOwner: (opts: {
|
64
|
+
owner: B256Address;
|
65
|
+
network?: keyof typeof networks;
|
66
|
+
pagination?: AssetPaginationOptions;
|
67
|
+
}) => Promise<AssetsByOwner>;
|
68
|
+
export {};
|
69
|
+
//# sourceMappingURL=asset-api.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"asset-api.d.ts","sourceRoot":"","sources":["../../src/assets/asset-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,QAAQ;;;CAGJ,CAAC;AAEX,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf;AA0BD,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,eAAe,GAAG,WAAW,CAAC,EAAE,CAAC;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,SAAU;IACjC,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;CACjC,KAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAI3B,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,QAAQ,EAAE,aAAa,CAAC;CACzB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,SAAgB;IAC3C,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAChC,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACrC,KAAG,OAAO,CAAC,aAAa,CAaxB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/assets/assets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGtC,eAAO,MAAM,SAAS,EAAE,MAijBvB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;GAAiD,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/assets/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/assets/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,sBAAsB;IACtB,IAAI,EAAE,UAAU,CAAC;IACjB,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,QAAQ,EAAE,KAAK,CAAC,eAAe,GAAG,WAAW,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;AAElC,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,GAAG,eAAe,CAAC;AACjE,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,GAAG,WAAW,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fuelAssetsBaseUrl.d.ts","sourceRoot":"","sources":["../../../src/assets/utils/fuelAssetsBaseUrl.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,2CAA2C,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/assets/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,OAAO,CAAC;AACtB,cAAc,qBAAqB,CAAA"}
|
@@ -4,7 +4,7 @@ export type NetworkTypes = NetworkEthereum['type'] | NetworkFuel['type'];
|
|
4
4
|
type NetworkTypeToNetwork<T> = T extends 'ethereum' ? NetworkEthereum : T extends 'fuel' ? NetworkFuel : Network;
|
5
5
|
/**
|
6
6
|
* Returns the default chainId for the given network
|
7
|
-
*/
|
7
|
+
*/
|
8
8
|
export declare const getDefaultChainId: (networkType: NetworkTypes) => number | undefined;
|
9
9
|
export type GetAssetNetworkParams<T extends NetworkTypes | undefined> = {
|
10
10
|
asset: Asset;
|
@@ -14,20 +14,20 @@ export type GetAssetNetworkParams<T extends NetworkTypes | undefined> = {
|
|
14
14
|
/**
|
15
15
|
* Returns the asset's network on the given network
|
16
16
|
* eg. getAssetNetwork({ asset, chainId: 1, networkType: 'ethereum' }) will return the asset's details on Ethereum mainnet
|
17
|
-
*/
|
17
|
+
*/
|
18
18
|
export declare const getAssetNetwork: <T extends NetworkTypes | undefined>({ asset, chainId, networkType, }: GetAssetNetworkParams<T>) => NetworkTypeToNetwork<T>;
|
19
19
|
/**
|
20
|
-
* Returns the asset's details on the given network
|
20
|
+
* Returns the asset's details on the given network along with the asset itself
|
21
21
|
* eg. getAssetWithNetwork({ asset, chainId: 1, networkType: 'ethereum' }) will return the asset's details on Ethereum mainnet and the asset itself
|
22
|
-
*/
|
22
|
+
*/
|
23
23
|
export declare const getAssetWithNetwork: <T extends NetworkTypes>({ asset, chainId, networkType, }: GetAssetNetworkParams<T>) => AssetEth | AssetFuel | undefined;
|
24
24
|
/**
|
25
25
|
* Returns the asset's details on Ethereum
|
26
|
-
*/
|
26
|
+
*/
|
27
27
|
export declare const getAssetEth: (asset: Asset, chainId?: number) => AssetEth | undefined;
|
28
28
|
/**
|
29
29
|
* Returns the asset's details on Fuel
|
30
|
-
*/
|
30
|
+
*/
|
31
31
|
export declare const getAssetFuel: (asset: Asset, chainId?: number) => AssetFuel | undefined;
|
32
32
|
export {};
|
33
33
|
//# sourceMappingURL=network.d.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
1
|
+
{"version":3,"file":"resolveIconPaths.d.ts","sourceRoot":"","sources":["../../../src/assets/utils/resolveIconPaths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIvC;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAa;;;;;IAKvE"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/assets/utils/url.ts"],"names":[],"mappings":"AAIA,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAQpF"}
|
package/dist/configs.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
/**
|
2
|
-
*
|
2
|
+
* Devnet network URL
|
3
3
|
*/
|
4
4
|
export declare const DEVNET_NETWORK_URL = "https://devnet.fuel.network/v1/graphql";
|
5
5
|
/**
|
6
|
-
*
|
6
|
+
* Testnet network URL
|
7
7
|
*/
|
8
8
|
export declare const TESTNET_NETWORK_URL = "https://testnet.fuel.network/v1/graphql";
|
9
9
|
//# sourceMappingURL=configs.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/configs.ts"],"sourcesContent":["/**\n *
|
1
|
+
{"version":3,"sources":["../src/configs.ts"],"sourcesContent":["/**\n * Devnet network URL\n */\nexport const DEVNET_NETWORK_URL = 'https://devnet.fuel.network/v1/graphql';\n\n/**\n * Testnet network URL\n */\nexport const TESTNET_NETWORK_URL = 'https://testnet.fuel.network/v1/graphql';\n"],"mappings":";;;AAGO,MAAM,qBAAqB;AAK3B,MAAM,sBAAsB;","names":[]}
|
package/dist/configs.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/configs.ts"],"sourcesContent":["/**\n *
|
1
|
+
{"version":3,"sources":["../src/configs.ts"],"sourcesContent":["/**\n * Devnet network URL\n */\nexport const DEVNET_NETWORK_URL = 'https://devnet.fuel.network/v1/graphql';\n\n/**\n * Testnet network URL\n */\nexport const TESTNET_NETWORK_URL = 'https://testnet.fuel.network/v1/graphql';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,IAAM,qBAAqB;AAK3B,IAAM,sBAAsB;","names":[]}
|
package/dist/configs.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/configs.ts"],"sourcesContent":["/**\n *
|
1
|
+
{"version":3,"sources":["../src/configs.ts"],"sourcesContent":["/**\n * Devnet network URL\n */\nexport const DEVNET_NETWORK_URL = 'https://devnet.fuel.network/v1/graphql';\n\n/**\n * Testnet network URL\n */\nexport const TESTNET_NETWORK_URL = 'https://testnet.fuel.network/v1/graphql';\n"],"mappings":";AAGO,IAAM,qBAAqB;AAK3B,IAAM,sBAAsB;","names":[]}
|
@@ -1,6 +1,7 @@
|
|
1
|
+
import type { HashableMessage } from '@fuel-ts/hasher';
|
1
2
|
import { EventEmitter } from 'events';
|
2
|
-
import type {
|
3
|
-
import type {
|
3
|
+
import type { Asset } from '../assets/types';
|
4
|
+
import type { TransactionRequestLike, TransactionResponse } from '../providers';
|
4
5
|
import { FuelConnectorEventTypes } from './types';
|
5
6
|
import type { FuelConnectorEvents, ConnectorMetadata, FuelABI, Network, FuelEventArg, Version, SelectNetworkArguments, FuelConnectorSendTxParams } from './types';
|
6
7
|
interface Connector {
|
@@ -10,9 +11,9 @@ interface Connector {
|
|
10
11
|
accounts(): Promise<Array<string>>;
|
11
12
|
connect(): Promise<boolean>;
|
12
13
|
disconnect(): Promise<boolean>;
|
13
|
-
signMessage(address: string, message:
|
14
|
+
signMessage(address: string, message: HashableMessage): Promise<string>;
|
14
15
|
signTransaction(address: string, transaction: TransactionRequestLike): Promise<string>;
|
15
|
-
sendTransaction(address: string, transaction: TransactionRequestLike, params?: FuelConnectorSendTxParams): Promise<string>;
|
16
|
+
sendTransaction(address: string, transaction: TransactionRequestLike, params?: FuelConnectorSendTxParams): Promise<string | TransactionResponse>;
|
16
17
|
currentAccount(): Promise<string | null>;
|
17
18
|
addAssets(assets: Array<Asset>): Promise<boolean>;
|
18
19
|
addAsset(asset: Asset): Promise<boolean>;
|
@@ -93,7 +94,7 @@ export declare abstract class FuelConnector extends EventEmitter implements Conn
|
|
93
94
|
*
|
94
95
|
* @returns Message signature
|
95
96
|
*/
|
96
|
-
signMessage(_address: string, _message:
|
97
|
+
signMessage(_address: string, _message: HashableMessage): Promise<string>;
|
97
98
|
/**
|
98
99
|
* Should start the sign transaction process and return
|
99
100
|
* the signed transaction.
|
@@ -115,9 +116,9 @@ export declare abstract class FuelConnector extends EventEmitter implements Conn
|
|
115
116
|
* @param address - The address to sign the transaction
|
116
117
|
* @param transaction - The transaction to send
|
117
118
|
* @param params - Optional parameters to send the transaction
|
118
|
-
* @returns The transaction id
|
119
|
+
* @returns The transaction id or transaction response
|
119
120
|
*/
|
120
|
-
sendTransaction(_address: string, _transaction: TransactionRequestLike, _params?: FuelConnectorSendTxParams): Promise<string>;
|
121
|
+
sendTransaction(_address: string, _transaction: TransactionRequestLike, _params?: FuelConnectorSendTxParams): Promise<string | TransactionResponse>;
|
121
122
|
/**
|
122
123
|
* Should return the current account selected inside the connector, if the account
|
123
124
|
* is authorized for the connection.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fuel-connector.d.ts","sourceRoot":"","sources":["../../src/connectors/fuel-connector.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"fuel-connector.d.ts","sourceRoot":"","sources":["../../src/connectors/fuel-connector.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EA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G,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAIlD;;;;;OAKG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3C;;;;;OAKG;IACM,EAAE,CAAC,CAAC,SAAS,mBAAmB,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,YAAY,CAAC,CAAC,CAAC,EAC1E,SAAS,EAAE,CAAC,EACZ,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GAC1B,IAAI;CAIR"}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { JsonAbi } from '@fuel-ts/abi-coder';
|
2
2
|
import type { RequireAtLeastOne } from 'type-fest';
|
3
|
-
import type { TransactionRequest } from '../../providers';
|
3
|
+
import type { TransactionRequest, TransactionStateFlag } from '../../providers';
|
4
|
+
import type { ProviderCacheJson, TransactionSummaryJson } from '../../providers/utils/serialization';
|
4
5
|
/**
|
5
6
|
* @name Version
|
6
7
|
*/
|
@@ -45,5 +46,11 @@ export type FuelABI = JsonAbi;
|
|
45
46
|
export type FuelConnectorSendTxParams = {
|
46
47
|
skipCustomFee?: boolean;
|
47
48
|
onBeforeSend?: (txRequest: TransactionRequest) => Promise<TransactionRequest>;
|
49
|
+
provider?: {
|
50
|
+
url: string;
|
51
|
+
cache?: ProviderCacheJson;
|
52
|
+
};
|
53
|
+
transactionState?: TransactionStateFlag['state'];
|
54
|
+
transactionSummary?: TransactionSummaryJson;
|
48
55
|
};
|
49
56
|
//# sourceMappingURL=data-type.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"data-type.d.ts","sourceRoot":"","sources":["../../../src/connectors/types/data-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;
|
1
|
+
{"version":3,"file":"data-type.d.ts","sourceRoot":"","sources":["../../../src/connectors/types/data-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,qCAAqC,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC,OAAO,EAAE,SAAS,GAAG,KAAK,CAAC,CAAC;AAEnF;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,OAAO,CAAC;AAE9B;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,kBAAkB,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC9E,QAAQ,CAAC,EAAE;QACT,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,CAAC,EAAE,iBAAiB,CAAC;KAC3B,CAAC;IACF,gBAAgB,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACjD,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;CAC7C,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { Asset } from '../../
|
1
|
+
import type { Asset } from '../../assets/types';
|
2
2
|
import type { FuelConnector } from '../fuel-connector';
|
3
3
|
import type { FuelConnectorEventTypes } from './connector-types';
|
4
4
|
import type { Network } from './data-type';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/connectors/types/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/connectors/types/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,mBAAmB,CAAC,MAAM,CAAC,IAAI,OAAO,CACvE,uBAAuB,EACvB;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,CACZ,CAAC,MAAM,CAAC,CAAC;AAEV;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,uBAAuB,CAAC,QAAQ,CAAC;IACvC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,uBAAuB,CAAC,cAAc,CAAC;IAC7C,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,uBAAuB,CAAC,UAAU,CAAC;IACzC,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,uBAAuB,CAAC,cAAc,CAAC;IAC7C,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,uBAAuB,CAAC,QAAQ,CAAC;IACvC,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,uBAAuB,CAAC,UAAU,CAAC;IACzC,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;CAC5B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,uBAAuB,CAAC,gBAAgB,CAAC;IAC/C,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,eAAe,GACf,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,aAAa,GACb,eAAe,GACf,cAAc,GACd,WAAW,CAAC;AAEhB,MAAM,MAAM,uBAAuB,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import './test-utils.js';
|
2
2
|
import './configs.js';
|
3
|
+
export * from './assets';
|
3
4
|
export * from './account';
|
4
5
|
export * from './types';
|
5
6
|
export * from './wallet';
|
@@ -12,4 +13,5 @@ export * from './predicate';
|
|
12
13
|
export * from './providers';
|
13
14
|
export * from './connectors';
|
14
15
|
export { deployScriptOrPredicate } from './utils/deployScriptOrPredicate';
|
16
|
+
export { getBytecodeId, getLegacyBlobId, getBytecodeConfigurableOffset, getBytecodeDataOffset, } from './utils/predicate-script-loader-instructions';
|
15
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EACL,aAAa,EACb,eAAe,EACf,6BAA6B,EAC7B,qBAAqB,GACtB,MAAM,8CAA8C,CAAC"}
|