@fuel-ts/account 0.0.0-rc-1815-20240322115843 → 0.0.0-rc-1889-20240322122653
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/dist/account-E9nGNf5X.d.mts +3837 -0
- package/dist/account-E9nGNf5X.d.ts +3837 -0
- package/dist/configs.d.mts +3 -0
- package/dist/configs.d.ts +3 -2
- package/dist/index.d.mts +904 -0
- package/dist/index.d.ts +904 -13
- package/dist/index.global.js +390 -515
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +207 -309
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +207 -311
- package/dist/index.mjs.map +1 -1
- package/dist/test-utils.d.mts +66 -0
- package/dist/{test-utils/launchNode.d.ts → test-utils.d.ts} +24 -12
- package/dist/test-utils.global.js +294 -381
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +107 -174
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +107 -176
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +21 -25
- package/dist/account.d.ts +0 -184
- package/dist/account.d.ts.map +0 -1
- package/dist/configs.d.ts.map +0 -1
- package/dist/connectors/fuel-connector.d.ts +0 -198
- package/dist/connectors/fuel-connector.d.ts.map +0 -1
- package/dist/connectors/fuel.d.ts +0 -133
- package/dist/connectors/fuel.d.ts.map +0 -1
- package/dist/connectors/index.d.ts +0 -5
- package/dist/connectors/index.d.ts.map +0 -1
- package/dist/connectors/types/connector-metadata.d.ts +0 -12
- package/dist/connectors/types/connector-metadata.d.ts.map +0 -1
- package/dist/connectors/types/connector-types.d.ts +0 -34
- package/dist/connectors/types/connector-types.d.ts.map +0 -1
- package/dist/connectors/types/data-type.d.ts +0 -34
- package/dist/connectors/types/data-type.d.ts.map +0 -1
- package/dist/connectors/types/events.d.ts +0 -111
- package/dist/connectors/types/events.d.ts.map +0 -1
- package/dist/connectors/types/index.d.ts +0 -7
- package/dist/connectors/types/index.d.ts.map +0 -1
- package/dist/connectors/types/local-storage.d.ts +0 -11
- package/dist/connectors/types/local-storage.d.ts.map +0 -1
- package/dist/connectors/types/target-object.d.ts +0 -14
- package/dist/connectors/types/target-object.d.ts.map +0 -1
- package/dist/connectors/utils/cache.d.ts +0 -14
- package/dist/connectors/utils/cache.d.ts.map +0 -1
- package/dist/connectors/utils/dispatch-fuel-connector-event.d.ts +0 -7
- package/dist/connectors/utils/dispatch-fuel-connector-event.d.ts.map +0 -1
- package/dist/connectors/utils/index.d.ts +0 -4
- package/dist/connectors/utils/index.d.ts.map +0 -1
- package/dist/connectors/utils/promises.d.ts +0 -8
- package/dist/connectors/utils/promises.d.ts.map +0 -1
- package/dist/hdwallet/hdwallet.d.ts +0 -58
- package/dist/hdwallet/hdwallet.d.ts.map +0 -1
- package/dist/hdwallet/index.d.ts +0 -2
- package/dist/hdwallet/index.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/mnemonic/index.d.ts +0 -3
- package/dist/mnemonic/index.d.ts.map +0 -1
- package/dist/mnemonic/mnemonic.d.ts +0 -85
- package/dist/mnemonic/mnemonic.d.ts.map +0 -1
- package/dist/mnemonic/utils.d.ts +0 -8
- package/dist/mnemonic/utils.d.ts.map +0 -1
- package/dist/predicate/index.d.ts +0 -3
- package/dist/predicate/index.d.ts.map +0 -1
- package/dist/predicate/predicate.d.ts +0 -94
- package/dist/predicate/predicate.d.ts.map +0 -1
- package/dist/predicate/utils/getPredicateRoot.d.ts +0 -12
- package/dist/predicate/utils/getPredicateRoot.d.ts.map +0 -1
- package/dist/predicate/utils/index.d.ts +0 -2
- package/dist/predicate/utils/index.d.ts.map +0 -1
- package/dist/providers/__generated__/operations.d.ts +0 -3477
- package/dist/providers/__generated__/operations.d.ts.map +0 -1
- package/dist/providers/assets/index.d.ts +0 -5
- package/dist/providers/assets/index.d.ts.map +0 -1
- package/dist/providers/assets/types.d.ts +0 -36
- package/dist/providers/assets/types.d.ts.map +0 -1
- package/dist/providers/assets/utils/index.d.ts +0 -4
- package/dist/providers/assets/utils/index.d.ts.map +0 -1
- package/dist/providers/assets/utils/network.d.ts +0 -33
- package/dist/providers/assets/utils/network.d.ts.map +0 -1
- package/dist/providers/assets/utils/resolveIconPaths.d.ts +0 -14
- package/dist/providers/assets/utils/resolveIconPaths.d.ts.map +0 -1
- package/dist/providers/assets/utils/url.d.ts +0 -2
- package/dist/providers/assets/utils/url.d.ts.map +0 -1
- package/dist/providers/chains.d.ts +0 -11
- package/dist/providers/chains.d.ts.map +0 -1
- package/dist/providers/coin-quantity.d.ts +0 -21
- package/dist/providers/coin-quantity.d.ts.map +0 -1
- package/dist/providers/coin.d.ts +0 -15
- package/dist/providers/coin.d.ts.map +0 -1
- package/dist/providers/fuel-graphql-subscriber.d.ts +0 -23
- package/dist/providers/fuel-graphql-subscriber.d.ts.map +0 -1
- package/dist/providers/index.d.ts +0 -13
- package/dist/providers/index.d.ts.map +0 -1
- package/dist/providers/memory-cache.d.ts +0 -11
- package/dist/providers/memory-cache.d.ts.map +0 -1
- package/dist/providers/message.d.ts +0 -60
- package/dist/providers/message.d.ts.map +0 -1
- package/dist/providers/provider.d.ts +0 -522
- package/dist/providers/provider.d.ts.map +0 -1
- package/dist/providers/resource.d.ts +0 -37
- package/dist/providers/resource.d.ts.map +0 -1
- package/dist/providers/transaction-request/create-transaction-request.d.ts +0 -73
- package/dist/providers/transaction-request/create-transaction-request.d.ts.map +0 -1
- package/dist/providers/transaction-request/errors.d.ts +0 -25
- package/dist/providers/transaction-request/errors.d.ts.map +0 -1
- package/dist/providers/transaction-request/hash-transaction.d.ts +0 -9
- package/dist/providers/transaction-request/hash-transaction.d.ts.map +0 -1
- package/dist/providers/transaction-request/index.d.ts +0 -10
- package/dist/providers/transaction-request/index.d.ts.map +0 -1
- package/dist/providers/transaction-request/input.d.ts +0 -59
- package/dist/providers/transaction-request/input.d.ts.map +0 -1
- package/dist/providers/transaction-request/output.d.ts +0 -39
- package/dist/providers/transaction-request/output.d.ts.map +0 -1
- package/dist/providers/transaction-request/script-transaction-request.d.ts +0 -106
- package/dist/providers/transaction-request/script-transaction-request.d.ts.map +0 -1
- package/dist/providers/transaction-request/scripts.d.ts +0 -6
- package/dist/providers/transaction-request/scripts.d.ts.map +0 -1
- package/dist/providers/transaction-request/storage-slot.d.ts +0 -10
- package/dist/providers/transaction-request/storage-slot.d.ts.map +0 -1
- package/dist/providers/transaction-request/transaction-request.d.ts +0 -278
- package/dist/providers/transaction-request/transaction-request.d.ts.map +0 -1
- package/dist/providers/transaction-request/types.d.ts +0 -10
- package/dist/providers/transaction-request/types.d.ts.map +0 -1
- package/dist/providers/transaction-request/utils.d.ts +0 -4
- package/dist/providers/transaction-request/utils.d.ts.map +0 -1
- package/dist/providers/transaction-request/witness.d.ts +0 -5
- package/dist/providers/transaction-request/witness.d.ts.map +0 -1
- package/dist/providers/transaction-response/getDecodedLogs.d.ts +0 -5
- package/dist/providers/transaction-response/getDecodedLogs.d.ts.map +0 -1
- package/dist/providers/transaction-response/index.d.ts +0 -3
- package/dist/providers/transaction-response/index.d.ts.map +0 -1
- package/dist/providers/transaction-response/transaction-response.d.ts +0 -106
- package/dist/providers/transaction-response/transaction-response.d.ts.map +0 -1
- package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts +0 -20
- package/dist/providers/transaction-summary/assemble-transaction-summary.d.ts.map +0 -1
- package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts +0 -21
- package/dist/providers/transaction-summary/calculate-transaction-fee.d.ts.map +0 -1
- package/dist/providers/transaction-summary/call.d.ts +0 -18
- package/dist/providers/transaction-summary/call.d.ts.map +0 -1
- package/dist/providers/transaction-summary/get-transaction-summary.d.ts +0 -31
- package/dist/providers/transaction-summary/get-transaction-summary.d.ts.map +0 -1
- package/dist/providers/transaction-summary/index.d.ts +0 -10
- package/dist/providers/transaction-summary/index.d.ts.map +0 -1
- package/dist/providers/transaction-summary/input.d.ts +0 -21
- package/dist/providers/transaction-summary/input.d.ts.map +0 -1
- package/dist/providers/transaction-summary/operations.d.ts +0 -40
- package/dist/providers/transaction-summary/operations.d.ts.map +0 -1
- package/dist/providers/transaction-summary/output.d.ts +0 -15
- package/dist/providers/transaction-summary/output.d.ts.map +0 -1
- package/dist/providers/transaction-summary/receipt.d.ts +0 -7
- package/dist/providers/transaction-summary/receipt.d.ts.map +0 -1
- package/dist/providers/transaction-summary/status.d.ts +0 -9
- package/dist/providers/transaction-summary/status.d.ts.map +0 -1
- package/dist/providers/transaction-summary/types.d.ts +0 -146
- package/dist/providers/transaction-summary/types.d.ts.map +0 -1
- package/dist/providers/utils/auto-retry-fetch.d.ts +0 -36
- package/dist/providers/utils/auto-retry-fetch.d.ts.map +0 -1
- package/dist/providers/utils/block-explorer.d.ts +0 -14
- package/dist/providers/utils/block-explorer.d.ts.map +0 -1
- package/dist/providers/utils/gas.d.ts +0 -38
- package/dist/providers/utils/gas.d.ts.map +0 -1
- package/dist/providers/utils/index.d.ts +0 -6
- package/dist/providers/utils/index.d.ts.map +0 -1
- package/dist/providers/utils/json.d.ts +0 -7
- package/dist/providers/utils/json.d.ts.map +0 -1
- package/dist/providers/utils/merge-quantities.d.ts +0 -3
- package/dist/providers/utils/merge-quantities.d.ts.map +0 -1
- package/dist/providers/utils/receipts.d.ts +0 -10
- package/dist/providers/utils/receipts.d.ts.map +0 -1
- package/dist/providers/utils/sleep.d.ts +0 -3
- package/dist/providers/utils/sleep.d.ts.map +0 -1
- package/dist/signer/index.d.ts +0 -2
- package/dist/signer/index.d.ts.map +0 -1
- package/dist/signer/signer.d.ts +0 -64
- package/dist/signer/signer.d.ts.map +0 -1
- package/dist/test-utils/generateTestWallet.d.ts +0 -4
- package/dist/test-utils/generateTestWallet.d.ts.map +0 -1
- package/dist/test-utils/index.d.ts +0 -4
- package/dist/test-utils/index.d.ts.map +0 -1
- package/dist/test-utils/launchNode.d.ts.map +0 -1
- package/dist/test-utils/seedTestWallet.d.ts +0 -4
- package/dist/test-utils/seedTestWallet.d.ts.map +0 -1
- package/dist/utils/formatTransferToContractScriptData.d.ts +0 -14
- package/dist/utils/formatTransferToContractScriptData.d.ts.map +0 -1
- package/dist/wallet/base-wallet-unlocked.d.ts +0 -73
- package/dist/wallet/base-wallet-unlocked.d.ts.map +0 -1
- package/dist/wallet/index.d.ts +0 -4
- package/dist/wallet/index.d.ts.map +0 -1
- package/dist/wallet/keystore-wallet.d.ts +0 -38
- package/dist/wallet/keystore-wallet.d.ts.map +0 -1
- package/dist/wallet/wallet.d.ts +0 -68
- package/dist/wallet/wallet.d.ts.map +0 -1
- package/dist/wallet/wallets.d.ts +0 -76
- package/dist/wallet/wallets.d.ts.map +0 -1
- package/dist/wallet-manager/index.d.ts +0 -6
- package/dist/wallet-manager/index.d.ts.map +0 -1
- package/dist/wallet-manager/storages/memory-storage.d.ts +0 -9
- package/dist/wallet-manager/storages/memory-storage.d.ts.map +0 -1
- package/dist/wallet-manager/types.d.ts +0 -42
- package/dist/wallet-manager/types.d.ts.map +0 -1
- package/dist/wallet-manager/vaults/mnemonic-vault.d.ts +0 -29
- package/dist/wallet-manager/vaults/mnemonic-vault.d.ts.map +0 -1
- package/dist/wallet-manager/vaults/privatekey-vault.d.ts +0 -29
- package/dist/wallet-manager/vaults/privatekey-vault.d.ts.map +0 -1
- package/dist/wallet-manager/wallet-manager.d.ts +0 -104
- package/dist/wallet-manager/wallet-manager.d.ts.map +0 -1
- package/dist/wordlists/index.d.ts +0 -5
- package/dist/wordlists/index.d.ts.map +0 -1
- package/dist/wordlists/words/english.d.ts +0 -2
- package/dist/wordlists/words/english.d.ts.map +0 -1
@@ -1,9 +0,0 @@
|
|
1
|
-
import type { TransactionRequest } from './types';
|
2
|
-
/**
|
3
|
-
* Hash transaction request with sha256. [Read more](https://github.com/FuelLabs/fuel-specs/blob/master/specs/protocol/identifiers.md#transaction-id)
|
4
|
-
*
|
5
|
-
* @param transactionRequest - Transaction request to be hashed
|
6
|
-
* @returns sha256 hash of the transaction
|
7
|
-
*/
|
8
|
-
export declare function hashTransaction(transactionRequest: TransactionRequest, chainId: number): string;
|
9
|
-
//# sourceMappingURL=hash-transaction.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"hash-transaction.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/hash-transaction.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,UA2EtF"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
export * from './input';
|
2
|
-
export * from './output';
|
3
|
-
export * from './transaction-request';
|
4
|
-
export * from './create-transaction-request';
|
5
|
-
export * from './script-transaction-request';
|
6
|
-
export * from './errors';
|
7
|
-
export * from './scripts';
|
8
|
-
export * from './types';
|
9
|
-
export * from './utils';
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
@@ -1,59 +0,0 @@
|
|
1
|
-
import type { BytesLike } from '@fuel-ts/interfaces';
|
2
|
-
import type { BigNumberish } from '@fuel-ts/math';
|
3
|
-
import type { Input } from '@fuel-ts/transactions';
|
4
|
-
import { InputType } from '@fuel-ts/transactions';
|
5
|
-
export type CoinTransactionRequestInput = {
|
6
|
-
type: InputType.Coin;
|
7
|
-
/** UTXO ID */
|
8
|
-
id: BytesLike;
|
9
|
-
/** Owning address or script hash */
|
10
|
-
owner: BytesLike;
|
11
|
-
/** Amount of coins */
|
12
|
-
amount: BigNumberish;
|
13
|
-
/** Asset ID of the coins */
|
14
|
-
assetId: BytesLike;
|
15
|
-
/** Points to the TX whose output is being spent. (TxPointer) */
|
16
|
-
txPointer: BytesLike;
|
17
|
-
/** Index of witness that authorizes spending the coin */
|
18
|
-
witnessIndex: number;
|
19
|
-
/** UTXO being spent must have been created at least this many blocks ago */
|
20
|
-
maturity?: number;
|
21
|
-
/** Gas used by predicate */
|
22
|
-
predicateGasUsed?: BigNumberish;
|
23
|
-
/** Predicate bytecode */
|
24
|
-
predicate?: BytesLike;
|
25
|
-
/** Predicate input data (parameters) */
|
26
|
-
predicateData?: BytesLike;
|
27
|
-
};
|
28
|
-
export type MessageTransactionRequestInput = {
|
29
|
-
type: InputType.Message;
|
30
|
-
/** Address of sender */
|
31
|
-
sender: BytesLike;
|
32
|
-
/** Address of recipient */
|
33
|
-
recipient: BytesLike;
|
34
|
-
/** Amount of coins */
|
35
|
-
amount: BigNumberish;
|
36
|
-
/** Index of witness that authorizes the message */
|
37
|
-
witnessIndex: number;
|
38
|
-
/** Unique nonce of message */
|
39
|
-
nonce: BytesLike;
|
40
|
-
/** Gas used by predicate */
|
41
|
-
predicateGasUsed?: BigNumberish;
|
42
|
-
/** Predicate bytecode */
|
43
|
-
predicate?: BytesLike;
|
44
|
-
/** Predicate input data (parameters) */
|
45
|
-
predicateData?: BytesLike;
|
46
|
-
/** data of message */
|
47
|
-
data?: BytesLike;
|
48
|
-
};
|
49
|
-
export type ContractTransactionRequestInput = {
|
50
|
-
type: InputType.Contract;
|
51
|
-
/** Points to the TX whose output is being spent. (TxPointer) */
|
52
|
-
txPointer: BytesLike;
|
53
|
-
/** Contract ID */
|
54
|
-
contractId: BytesLike;
|
55
|
-
};
|
56
|
-
export type TransactionRequestInput = CoinTransactionRequestInput | ContractTransactionRequestInput | MessageTransactionRequestInput;
|
57
|
-
/** @hidden */
|
58
|
-
export declare const inputify: (value: TransactionRequestInput) => Input;
|
59
|
-
//# sourceMappingURL=input.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/input.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC;IAErB,cAAc;IACd,EAAE,EAAE,SAAS,CAAC;IAEd,oCAAoC;IACpC,KAAK,EAAE,SAAS,CAAC;IAEjB,sBAAsB;IACtB,MAAM,EAAE,YAAY,CAAC;IAErB,4BAA4B;IAC5B,OAAO,EAAE,SAAS,CAAC;IAEnB,gEAAgE;IAChE,SAAS,EAAE,SAAS,CAAC;IAErB,yDAAyD;IACzD,YAAY,EAAE,MAAM,CAAC;IAErB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,4BAA4B;IAC5B,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAEhC,yBAAyB;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,wCAAwC;IACxC,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC;IAExB,wBAAwB;IACxB,MAAM,EAAE,SAAS,CAAC;IAElB,2BAA2B;IAC3B,SAAS,EAAE,SAAS,CAAC;IAErB,sBAAsB;IACtB,MAAM,EAAE,YAAY,CAAC;IAErB,mDAAmD;IACnD,YAAY,EAAE,MAAM,CAAC;IAErB,8BAA8B;IAC9B,KAAK,EAAE,SAAS,CAAC;IAEjB,4BAA4B;IAC5B,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAEhC,yBAAyB;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,wCAAwC;IACxC,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B,sBAAsB;IACtB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC;IAEzB,gEAAgE;IAChE,SAAS,EAAE,SAAS,CAAC;IAErB,kBAAkB;IAClB,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AACF,MAAM,MAAM,uBAAuB,GAC/B,2BAA2B,GAC3B,+BAA+B,GAC/B,8BAA8B,CAAC;AAEnC,cAAc;AACd,eAAO,MAAM,QAAQ,UAAW,uBAAuB,KAAG,KAoEzD,CAAC"}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
import type { BytesLike } from '@fuel-ts/interfaces';
|
2
|
-
import type { BigNumberish } from '@fuel-ts/math';
|
3
|
-
import type { Output } from '@fuel-ts/transactions';
|
4
|
-
import { OutputType } from '@fuel-ts/transactions';
|
5
|
-
export type CoinTransactionRequestOutput = {
|
6
|
-
type: OutputType.Coin;
|
7
|
-
/** Receiving address or script hash */
|
8
|
-
to: BytesLike;
|
9
|
-
/** Amount of coins to send */
|
10
|
-
amount: BigNumberish;
|
11
|
-
/** Asset ID of coins */
|
12
|
-
assetId: BytesLike;
|
13
|
-
};
|
14
|
-
export type ContractTransactionRequestOutput = {
|
15
|
-
type: OutputType.Contract;
|
16
|
-
/** Index of input contract */
|
17
|
-
inputIndex: number;
|
18
|
-
};
|
19
|
-
export type ChangeTransactionRequestOutput = {
|
20
|
-
type: OutputType.Change;
|
21
|
-
/** Receiving address or script hash */
|
22
|
-
to: BytesLike;
|
23
|
-
/** Asset ID of coins */
|
24
|
-
assetId: BytesLike;
|
25
|
-
};
|
26
|
-
export type VariableTransactionRequestOutput = {
|
27
|
-
type: OutputType.Variable;
|
28
|
-
};
|
29
|
-
export type ContractCreatedTransactionRequestOutput = {
|
30
|
-
type: OutputType.ContractCreated;
|
31
|
-
/** Contract ID */
|
32
|
-
contractId: BytesLike;
|
33
|
-
/** State Root */
|
34
|
-
stateRoot: BytesLike;
|
35
|
-
};
|
36
|
-
export type TransactionRequestOutput = CoinTransactionRequestOutput | ContractTransactionRequestOutput | ChangeTransactionRequestOutput | VariableTransactionRequestOutput | ContractCreatedTransactionRequestOutput;
|
37
|
-
/** @hidden */
|
38
|
-
export declare const outputify: (value: TransactionRequestOutput) => Output;
|
39
|
-
//# sourceMappingURL=output.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/output.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC;IACtB,uCAAuC;IACvC,EAAE,EAAE,SAAS,CAAC;IACd,8BAA8B;IAC9B,MAAM,EAAE,YAAY,CAAC;IACrB,wBAAwB;IACxB,OAAO,EAAE,SAAS,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,gCAAgC,GAAG;IAC7C,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC;IAC1B,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC;IACxB,uCAAuC;IACvC,EAAE,EAAE,SAAS,CAAC;IACd,wBAAwB;IACxB,OAAO,EAAE,SAAS,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,gCAAgC,GAAG;IAC7C,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC;CAC3B,CAAC;AACF,MAAM,MAAM,uCAAuC,GAAG;IACpD,IAAI,EAAE,UAAU,CAAC,eAAe,CAAC;IACjC,kBAAkB;IAClB,UAAU,EAAE,SAAS,CAAC;IACtB,iBAAiB;IACjB,SAAS,EAAE,SAAS,CAAC;CACtB,CAAC;AACF,MAAM,MAAM,wBAAwB,GAChC,4BAA4B,GAC5B,gCAAgC,GAChC,8BAA8B,GAC9B,gCAAgC,GAChC,uCAAuC,CAAC;AAE5C,cAAc;AACd,eAAO,MAAM,SAAS,UAAW,wBAAwB,KAAG,MAkD3D,CAAC"}
|
@@ -1,106 +0,0 @@
|
|
1
|
-
import type { InputValue, JsonAbi } from '@fuel-ts/abi-coder';
|
2
|
-
import type { AbstractScriptRequest, ContractIdLike, BytesLike } from '@fuel-ts/interfaces';
|
3
|
-
import type { BN, BigNumberish } from '@fuel-ts/math';
|
4
|
-
import type { TransactionScript } from '@fuel-ts/transactions';
|
5
|
-
import { TransactionType } from '@fuel-ts/transactions';
|
6
|
-
import type { GqlGasCosts } from '../__generated__/operations';
|
7
|
-
import type { ChainInfo } from '../provider';
|
8
|
-
import type { ContractTransactionRequestInput } from './input';
|
9
|
-
import type { ContractTransactionRequestOutput, VariableTransactionRequestOutput } from './output';
|
10
|
-
import type { BaseTransactionRequestLike } from './transaction-request';
|
11
|
-
import { BaseTransactionRequest } from './transaction-request';
|
12
|
-
/**
|
13
|
-
* @hidden
|
14
|
-
*/
|
15
|
-
export interface ScriptTransactionRequestLike extends BaseTransactionRequestLike {
|
16
|
-
/** Gas limit for transaction */
|
17
|
-
gasLimit?: BigNumberish;
|
18
|
-
/** Script to execute */
|
19
|
-
script?: BytesLike;
|
20
|
-
/** Script input data (parameters) */
|
21
|
-
scriptData?: BytesLike;
|
22
|
-
}
|
23
|
-
/**
|
24
|
-
* `ScriptTransactionRequest` provides functionalities for creating a transaction request that uses a script.
|
25
|
-
*/
|
26
|
-
export declare class ScriptTransactionRequest extends BaseTransactionRequest {
|
27
|
-
static from(obj: ScriptTransactionRequestLike): ScriptTransactionRequest;
|
28
|
-
/** Type of the transaction */
|
29
|
-
type: TransactionType.Script;
|
30
|
-
/** Gas limit for transaction */
|
31
|
-
gasLimit: BN;
|
32
|
-
/** Script to execute */
|
33
|
-
script: Uint8Array;
|
34
|
-
/** Script input data (parameters) */
|
35
|
-
scriptData: Uint8Array;
|
36
|
-
/**
|
37
|
-
* Constructor for `ScriptTransactionRequest`.
|
38
|
-
*
|
39
|
-
* @param scriptTransactionRequestLike - The initial values for the instance.
|
40
|
-
*/
|
41
|
-
constructor({ script, scriptData, gasLimit, ...rest }?: ScriptTransactionRequestLike);
|
42
|
-
/**
|
43
|
-
* Converts the transaction request to a `TransactionScript`.
|
44
|
-
*
|
45
|
-
* @returns The transaction script object.
|
46
|
-
*/
|
47
|
-
toTransaction(): TransactionScript;
|
48
|
-
/**
|
49
|
-
* Get contract inputs for the transaction.
|
50
|
-
*
|
51
|
-
* @returns An array of contract transaction request inputs.
|
52
|
-
*/
|
53
|
-
getContractInputs(): ContractTransactionRequestInput[];
|
54
|
-
/**
|
55
|
-
* Get contract outputs for the transaction.
|
56
|
-
*
|
57
|
-
* @returns An array of contract transaction request outputs.
|
58
|
-
*/
|
59
|
-
getContractOutputs(): ContractTransactionRequestOutput[];
|
60
|
-
/**
|
61
|
-
* Get variable outputs for the transaction.
|
62
|
-
*
|
63
|
-
* @returns An array of variable transaction request outputs.
|
64
|
-
*/
|
65
|
-
getVariableOutputs(): VariableTransactionRequestOutput[];
|
66
|
-
/**
|
67
|
-
* Set the script and its data.
|
68
|
-
*
|
69
|
-
* @param script - The abstract script request.
|
70
|
-
* @param data - The script data.
|
71
|
-
*/
|
72
|
-
setScript<T>(script: AbstractScriptRequest<T>, data: T): void;
|
73
|
-
/**
|
74
|
-
* Adds variable outputs to the transaction request.
|
75
|
-
*
|
76
|
-
* @param numberOfVariables - The number of variables to add.
|
77
|
-
* @returns The new length of the outputs array.
|
78
|
-
*/
|
79
|
-
addVariableOutputs(numberOfVariables?: number): number;
|
80
|
-
calculateMaxGas(chainInfo: ChainInfo, minGas: BN): BN;
|
81
|
-
/**
|
82
|
-
* Adds a contract input and output to the transaction request.
|
83
|
-
*
|
84
|
-
* @param contract - The contract ID.
|
85
|
-
* @returns The current instance of the `ScriptTransactionRequest`.
|
86
|
-
*/
|
87
|
-
addContractInputAndOutput(contract: ContractIdLike): ScriptTransactionRequest;
|
88
|
-
/**
|
89
|
-
* Gets the Transaction Request by hashing the transaction.
|
90
|
-
*
|
91
|
-
* @param chainId - The chain ID.
|
92
|
-
*
|
93
|
-
* @returns - A hash of the transaction, which is the transaction ID.
|
94
|
-
*/
|
95
|
-
getTransactionId(chainId: number): string;
|
96
|
-
/**
|
97
|
-
* Sets the data for the transaction request.
|
98
|
-
*
|
99
|
-
* @param abi - Script JSON ABI.
|
100
|
-
* @param args - The input arguments.
|
101
|
-
* @returns The current instance of the `ScriptTransactionRequest`.
|
102
|
-
*/
|
103
|
-
setData(abi: JsonAbi, args: InputValue[]): ScriptTransactionRequest;
|
104
|
-
metadataGas(gasCosts: GqlGasCosts): BN;
|
105
|
-
}
|
106
|
-
//# sourceMappingURL=script-transaction-request.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"script-transaction-request.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/script-transaction-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAI9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAE5F,OAAO,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO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;IAMxD;;;;;OAKG;IACH,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;IAKtD;;;;;OAKG;IACH,kBAAkB,CAAC,iBAAiB,GAAE,MAAU;IAahD,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE;IAkBrD;;;;;OAKG;IACH,yBAAyB,CAAC,QAAQ,EAAE,cAAc,GAAG,wBAAwB;IAsB7E;;;;;;OAMG;IACH,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAIzC;;;;;;OAMG;IACH,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,wBAAwB;IAMnE,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,EAAE;CAMvC"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import type { AbstractScriptRequest } from '@fuel-ts/interfaces';
|
2
|
-
/** @hidden */
|
3
|
-
export declare const returnZeroScript: AbstractScriptRequest<void>;
|
4
|
-
/** @hidden */
|
5
|
-
export declare const withdrawScript: AbstractScriptRequest<void>;
|
6
|
-
//# sourceMappingURL=scripts.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"scripts.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAKjE,cAAc;AACd,eAAO,MAAM,gBAAgB,EAAE,qBAAqB,CAAC,IAAI,CAQxD,CAAC;AAEF,cAAc;AACd,eAAO,MAAM,cAAc,EAAE,qBAAqB,CAAC,IAAI,CAatD,CAAC"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import type { BytesLike } from '@fuel-ts/interfaces';
|
2
|
-
import type { StorageSlot } from '@fuel-ts/transactions';
|
3
|
-
export type TransactionRequestStorageSlot = {
|
4
|
-
/** Key */
|
5
|
-
key: BytesLike;
|
6
|
-
/** Value */
|
7
|
-
value: BytesLike;
|
8
|
-
} | [key: BytesLike, value: BytesLike];
|
9
|
-
export declare const storageSlotify: (storageSlot: TransactionRequestStorageSlot) => StorageSlot;
|
10
|
-
//# sourceMappingURL=storage-slot.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"storage-slot.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/storage-slot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD,MAAM,MAAM,6BAA6B,GACrC;IACE,UAAU;IACV,GAAG,EAAE,SAAS,CAAC;IACf,YAAY;IACZ,KAAK,EAAE,SAAS,CAAC;CAClB,GACD,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;AASvC,eAAO,MAAM,cAAc,gBAAiB,6BAA6B,KAAG,WAgB3E,CAAC"}
|
@@ -1,278 +0,0 @@
|
|
1
|
-
import type { InputValue } from '@fuel-ts/abi-coder';
|
2
|
-
import type { AddressLike, AbstractAddress, BytesLike } from '@fuel-ts/interfaces';
|
3
|
-
import type { BN, BigNumberish } from '@fuel-ts/math';
|
4
|
-
import type { TransactionScript, Policy, TransactionCreate } from '@fuel-ts/transactions';
|
5
|
-
import { TransactionType } from '@fuel-ts/transactions';
|
6
|
-
import type { Account } from '../../account';
|
7
|
-
import type { Predicate } from '../../predicate';
|
8
|
-
import type { GqlGasCosts } from '../__generated__/operations';
|
9
|
-
import type { Coin } from '../coin';
|
10
|
-
import type { CoinQuantity, CoinQuantityLike } from '../coin-quantity';
|
11
|
-
import type { MessageCoin } from '../message';
|
12
|
-
import type { ChainInfo } from '../provider';
|
13
|
-
import type { Resource } from '../resource';
|
14
|
-
import type { TransactionRequestInput, CoinTransactionRequestInput } from './input';
|
15
|
-
import type { TransactionRequestOutput, ChangeTransactionRequestOutput, CoinTransactionRequestOutput } from './output';
|
16
|
-
import type { TransactionRequestWitness } from './witness';
|
17
|
-
export {
|
18
|
-
/**
|
19
|
-
* @hidden
|
20
|
-
*/
|
21
|
-
TransactionType, };
|
22
|
-
/**
|
23
|
-
* @hidden
|
24
|
-
*
|
25
|
-
* Interface defining a like structure for a base transaction request.
|
26
|
-
*/
|
27
|
-
export interface BaseTransactionRequestLike {
|
28
|
-
/** Gas price for transaction */
|
29
|
-
gasPrice?: BigNumberish;
|
30
|
-
/** Block until which tx cannot be included */
|
31
|
-
maturity?: number;
|
32
|
-
/** The maximum fee payable by this transaction using BASE_ASSET. */
|
33
|
-
maxFee?: BigNumberish;
|
34
|
-
/** The maximum amount of witness data allowed for the transaction */
|
35
|
-
witnessLimit?: BigNumberish;
|
36
|
-
/** List of inputs */
|
37
|
-
inputs?: TransactionRequestInput[];
|
38
|
-
/** List of outputs */
|
39
|
-
outputs?: TransactionRequestOutput[];
|
40
|
-
/** List of witnesses */
|
41
|
-
witnesses?: TransactionRequestWitness[];
|
42
|
-
}
|
43
|
-
type ToBaseTransactionResponse = Pick<TransactionScript, 'inputs' | 'inputsCount' | 'outputs' | 'outputsCount' | 'witnesses' | 'witnessesCount' | 'policies' | 'policyTypes'>;
|
44
|
-
/**
|
45
|
-
* Abstract class to define the functionalities of a transaction request transaction request.
|
46
|
-
*/
|
47
|
-
export declare abstract class BaseTransactionRequest implements BaseTransactionRequestLike {
|
48
|
-
/** Type of the transaction */
|
49
|
-
abstract type: TransactionType;
|
50
|
-
/** Gas price for transaction */
|
51
|
-
gasPrice: BN;
|
52
|
-
/** Block until which tx cannot be included */
|
53
|
-
maturity: number;
|
54
|
-
/** The maximum fee payable by this transaction using BASE_ASSET. */
|
55
|
-
maxFee?: BN;
|
56
|
-
/** The maximum amount of witness data allowed for the transaction */
|
57
|
-
witnessLimit?: BN | undefined;
|
58
|
-
/** List of inputs */
|
59
|
-
inputs: TransactionRequestInput[];
|
60
|
-
/** List of outputs */
|
61
|
-
outputs: TransactionRequestOutput[];
|
62
|
-
/** List of witnesses */
|
63
|
-
witnesses: TransactionRequestWitness[];
|
64
|
-
/**
|
65
|
-
* Constructor for initializing a base transaction request.
|
66
|
-
*
|
67
|
-
* @param baseTransactionRequest - Optional object containing properties to initialize the transaction request.
|
68
|
-
*/
|
69
|
-
constructor({ gasPrice, maturity, maxFee, witnessLimit, inputs, outputs, witnesses, }?: BaseTransactionRequestLike);
|
70
|
-
static getPolicyMeta(req: BaseTransactionRequest): {
|
71
|
-
policyTypes: number;
|
72
|
-
policies: Policy[];
|
73
|
-
};
|
74
|
-
/**
|
75
|
-
* Method to obtain the base transaction details.
|
76
|
-
*
|
77
|
-
* @returns The base transaction details.
|
78
|
-
*/
|
79
|
-
protected getBaseTransaction(): ToBaseTransactionResponse;
|
80
|
-
abstract toTransaction(): TransactionCreate | TransactionScript;
|
81
|
-
/**
|
82
|
-
* Converts the transaction request to a byte array.
|
83
|
-
*
|
84
|
-
* @returns The transaction bytes.
|
85
|
-
*/
|
86
|
-
toTransactionBytes(): Uint8Array;
|
87
|
-
/**
|
88
|
-
* @hidden
|
89
|
-
*
|
90
|
-
* Pushes an input to the list without any side effects and returns the index
|
91
|
-
*/
|
92
|
-
protected pushInput(input: TransactionRequestInput): number;
|
93
|
-
/**
|
94
|
-
* @hidden
|
95
|
-
*
|
96
|
-
* Pushes an output to the list without any side effects and returns the index
|
97
|
-
*/
|
98
|
-
protected pushOutput(output: TransactionRequestOutput): number;
|
99
|
-
/**
|
100
|
-
* @hidden
|
101
|
-
*
|
102
|
-
* Pushes a witness to the list and returns the index
|
103
|
-
*
|
104
|
-
* @param signature - The signature to add to the witness.
|
105
|
-
* @returns The index of the created witness.
|
106
|
-
*/
|
107
|
-
addWitness(signature: BytesLike): number;
|
108
|
-
/**
|
109
|
-
* @hidden
|
110
|
-
*
|
111
|
-
* Creates an empty witness without any side effects and returns the index
|
112
|
-
*
|
113
|
-
* @returns The index of the created witness.
|
114
|
-
*/
|
115
|
-
protected addEmptyWitness(): number;
|
116
|
-
/**
|
117
|
-
* Updates the witness for a given owner and signature.
|
118
|
-
*
|
119
|
-
* @param address - The address to get the coin input witness index for.
|
120
|
-
* @param signature - The signature to update the witness with.
|
121
|
-
*/
|
122
|
-
updateWitnessByOwner(address: string | AbstractAddress, signature: BytesLike): void;
|
123
|
-
/**
|
124
|
-
* Updates an existing witness without any side effects.
|
125
|
-
*
|
126
|
-
* @param index - The index of the witness to update.
|
127
|
-
* @param witness - The new witness.
|
128
|
-
* @throws If the witness does not exist.
|
129
|
-
*/
|
130
|
-
updateWitness(index: number, witness: TransactionRequestWitness): void;
|
131
|
-
/**
|
132
|
-
* Helper function to add an external signature to the transaction.
|
133
|
-
*
|
134
|
-
* @param account - The account/s to sign to the transaction.
|
135
|
-
* @returns The transaction with the signature witness added.
|
136
|
-
*/
|
137
|
-
addAccountWitnesses(account: Account | Account[]): Promise<this>;
|
138
|
-
/**
|
139
|
-
* Gets the coin inputs for a transaction.
|
140
|
-
*
|
141
|
-
* @returns The coin inputs.
|
142
|
-
*/
|
143
|
-
getCoinInputs(): CoinTransactionRequestInput[];
|
144
|
-
/**
|
145
|
-
* Gets the coin outputs for a transaction.
|
146
|
-
*
|
147
|
-
* @returns The coin outputs.
|
148
|
-
*/
|
149
|
-
getCoinOutputs(): CoinTransactionRequestOutput[];
|
150
|
-
/**
|
151
|
-
* Gets the change outputs for a transaction.
|
152
|
-
*
|
153
|
-
* @returns The change outputs.
|
154
|
-
*/
|
155
|
-
getChangeOutputs(): ChangeTransactionRequestOutput[];
|
156
|
-
/**
|
157
|
-
* @hidden
|
158
|
-
*
|
159
|
-
* Returns the witnessIndex of the found CoinInput.
|
160
|
-
*/
|
161
|
-
getCoinInputWitnessIndexByOwner(owner: AddressLike): number | undefined;
|
162
|
-
/**
|
163
|
-
* Adds a single coin input to the transaction and a change output for the related
|
164
|
-
* assetId, if one it was not added yet.
|
165
|
-
*
|
166
|
-
* @param coin - Coin resource.
|
167
|
-
* @param predicate - Predicate bytes.
|
168
|
-
* @param predicateData - Predicate data bytes.
|
169
|
-
*/
|
170
|
-
addCoinInput(coin: Coin, predicate?: Predicate<InputValue[]>): void;
|
171
|
-
/**
|
172
|
-
* Adds a single message input to the transaction and a change output for the
|
173
|
-
* baseAssetId, if one it was not added yet.
|
174
|
-
*
|
175
|
-
* @param message - Message resource.
|
176
|
-
* @param predicate - Predicate bytes.
|
177
|
-
* @param predicateData - Predicate data bytes.
|
178
|
-
*/
|
179
|
-
addMessageInput(message: MessageCoin, predicate?: Predicate<InputValue[]>): void;
|
180
|
-
/**
|
181
|
-
* Adds a single resource to the transaction by adding a coin/message input and a
|
182
|
-
* change output for the related assetId, if one it was not added yet.
|
183
|
-
*
|
184
|
-
* @param resource - The resource to add.
|
185
|
-
* @returns This transaction.
|
186
|
-
*/
|
187
|
-
addResource(resource: Resource): this;
|
188
|
-
/**
|
189
|
-
* Adds multiple resources to the transaction by adding coin/message inputs and change
|
190
|
-
* outputs from the related assetIds.
|
191
|
-
*
|
192
|
-
* @param resources - The resources to add.
|
193
|
-
* @returns This transaction.
|
194
|
-
*/
|
195
|
-
addResources(resources: ReadonlyArray<Resource>): this;
|
196
|
-
/**
|
197
|
-
* Adds multiple resources to the transaction by adding coin/message inputs and change
|
198
|
-
* outputs from the related assetIds.
|
199
|
-
*
|
200
|
-
* @param resources - The resources to add.
|
201
|
-
* @returns This transaction.
|
202
|
-
*/
|
203
|
-
addPredicateResource(resource: Resource, predicate: Predicate<InputValue[]>): this;
|
204
|
-
/**
|
205
|
-
* Adds multiple predicate coin/message inputs to the transaction and change outputs
|
206
|
-
* from the related assetIds.
|
207
|
-
*
|
208
|
-
* @param resources - The resources to add.
|
209
|
-
* @returns This transaction.
|
210
|
-
*/
|
211
|
-
addPredicateResources(resources: Resource[], predicate: Predicate<InputValue[]>): this;
|
212
|
-
/**
|
213
|
-
* Adds a coin output to the transaction.
|
214
|
-
*
|
215
|
-
* @param to - Address of the owner.
|
216
|
-
* @param amount - Amount of coin.
|
217
|
-
* @param assetId - Asset ID of coin.
|
218
|
-
*/
|
219
|
-
addCoinOutput(to: AddressLike, amount: BigNumberish, assetId?: BytesLike): this;
|
220
|
-
/**
|
221
|
-
* Adds multiple coin outputs to the transaction.
|
222
|
-
*
|
223
|
-
* @param to - Address of the destination.
|
224
|
-
* @param quantities - Quantities of coins.
|
225
|
-
*/
|
226
|
-
addCoinOutputs(to: AddressLike, quantities: CoinQuantityLike[]): this;
|
227
|
-
/**
|
228
|
-
* Adds a change output to the transaction.
|
229
|
-
*
|
230
|
-
* @param to - Address of the owner.
|
231
|
-
* @param assetId - Asset ID of coin.
|
232
|
-
*/
|
233
|
-
addChangeOutput(to: AddressLike, assetId?: BytesLike): void;
|
234
|
-
/**
|
235
|
-
* @hidden
|
236
|
-
*/
|
237
|
-
byteSize(): number;
|
238
|
-
/**
|
239
|
-
* @hidden
|
240
|
-
*/
|
241
|
-
metadataGas(_gasCosts: GqlGasCosts): BN;
|
242
|
-
/**
|
243
|
-
* @hidden
|
244
|
-
*/
|
245
|
-
calculateMinGas(chainInfo: ChainInfo): BN;
|
246
|
-
calculateMaxGas(chainInfo: ChainInfo, minGas: BN): BN;
|
247
|
-
/**
|
248
|
-
* Funds the transaction with fake UTXOs for each assetId and amount in the
|
249
|
-
* quantities array.
|
250
|
-
*
|
251
|
-
* @param quantities - CoinQuantity Array.
|
252
|
-
*/
|
253
|
-
fundWithFakeUtxos(quantities: CoinQuantity[], resourcesOwner?: AbstractAddress): void;
|
254
|
-
/**
|
255
|
-
* Retrieves an array of CoinQuantity for each coin output present in the transaction.
|
256
|
-
* a transaction.
|
257
|
-
*
|
258
|
-
* @returns CoinQuantity array.
|
259
|
-
*/
|
260
|
-
getCoinOutputsQuantities(): CoinQuantity[];
|
261
|
-
/**
|
262
|
-
* Gets the Transaction Request by hashing the transaction.
|
263
|
-
*
|
264
|
-
* @param chainId - The chain ID.
|
265
|
-
*
|
266
|
-
* @returns - A hash of the transaction, which is the transaction ID.
|
267
|
-
*/
|
268
|
-
abstract getTransactionId(chainId: number): string;
|
269
|
-
/**
|
270
|
-
* Return the minimum amount in native coins required to create
|
271
|
-
* a transaction.
|
272
|
-
*
|
273
|
-
* @returns The transaction as a JSON object.
|
274
|
-
*/
|
275
|
-
toJSON(): any;
|
276
|
-
updatePredicateInputs(inputs: TransactionRequestInput[]): void;
|
277
|
-
}
|
278
|
-
//# sourceMappingURL=transaction-request.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"transaction-request.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/transaction-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EAKL,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,C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KG;IACH,MAAM;IAIN,qBAAqB,CAAC,MAAM,EAAE,uBAAuB,EAAE;CA6BxD"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import type { TransactionType } from '@fuel-ts/transactions';
|
2
|
-
import type { CreateTransactionRequest, CreateTransactionRequestLike } from './create-transaction-request';
|
3
|
-
import type { ScriptTransactionRequest, ScriptTransactionRequestLike } from './script-transaction-request';
|
4
|
-
export type TransactionRequest = ScriptTransactionRequest | CreateTransactionRequest;
|
5
|
-
export type TransactionRequestLike = ({
|
6
|
-
type: TransactionType.Script;
|
7
|
-
} & ScriptTransactionRequestLike) | ({
|
8
|
-
type: TransactionType.Create;
|
9
|
-
} & CreateTransactionRequestLike);
|
10
|
-
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EACV,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG,wBAAwB,CAAC;AACrF,MAAM,MAAM,sBAAsB,GAC9B,CAAC;IAAE,IAAI,EAAE,eAAe,CAAC,MAAM,CAAA;CAAE,GAAG,4BAA4B,CAAC,GACjE,CAAC;IAAE,IAAI,EAAE,eAAe,CAAC,MAAM,CAAA;CAAE,GAAG,4BAA4B,CAAC,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE1E,cAAc;AACd,eAAO,MAAM,qBAAqB,QAAS,sBAAsB,KAAG,kBAkBnE,CAAC"}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import type { BytesLike } from '@fuel-ts/interfaces';
|
2
|
-
import type { Witness } from '@fuel-ts/transactions';
|
3
|
-
export type TransactionRequestWitness = BytesLike;
|
4
|
-
export declare const witnessify: (value: TransactionRequestWitness) => Witness;
|
5
|
-
//# sourceMappingURL=witness.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"witness.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/witness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGrD,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAAC;AAElD,eAAO,MAAM,UAAU,UAAW,yBAAyB,KAAG,OAO7D,CAAC"}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import type { Interface } from '@fuel-ts/abi-coder';
|
2
|
-
import type { TransactionResultReceipt } from './transaction-response';
|
3
|
-
/** @hidden */
|
4
|
-
export declare function getDecodedLogs<T = unknown>(receipts: Array<TransactionResultReceipt>, abiInterface: Interface): T[];
|
5
|
-
//# sourceMappingURL=getDecodedLogs.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"getDecodedLogs.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-response/getDecodedLogs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAIpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,cAAc;AACd,wBAAgB,cAAc,CAAC,CAAC,GAAG,OAAO,EACxC,QAAQ,EAAE,KAAK,CAAC,wBAAwB,CAAC,EACzC,YAAY,EAAE,SAAS,GACtB,CAAC,EAAE,CAcL"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-response/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC"}
|