Icon HelpCircleForumIcon Link

⌘K

Icon HelpCircleForumIcon Link
BlobTransactionRequest

Icon LinkClass: BlobTransactionRequest

@fuel-ts/account .BlobTransactionRequest

Abstract class to define the functionalities of a transaction request transaction request.

Icon LinkHierarchy

Icon LinkConstructors

Icon Linkconstructor

new BlobTransactionRequest(blobTransactionRequestLike): BlobTransactionRequest

Creates an instance BlobTransactionRequest.

Icon LinkParameters

NameTypeDescription
blobTransactionRequestLikeBlobTransactionRequestLike The initial values for the instance

Icon LinkReturns

BlobTransactionRequest

Icon LinkOverrides

BaseTransactionRequest .constructor

Icon LinkDefined in

packages/account/src/providers/transaction-request/blob-transaction-request.ts:38 Icon Link

Icon LinkProperties

Icon LinkblobId

blobId: string

Blob ID

Icon LinkDefined in

packages/account/src/providers/transaction-request/blob-transaction-request.ts:29 Icon Link


Icon Linkinputs

inputs: TransactionRequestInput [] = []

List of inputs

Icon LinkInherited from

BaseTransactionRequest .inputs

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:113 Icon Link


Icon Linkmaturity

Optional maturity: number

Block until which tx cannot be included

Icon LinkInherited from

BaseTransactionRequest .maturity

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:107 Icon Link


Icon LinkmaxFee

maxFee: BN

The maximum fee payable by this transaction using BASE_ASSET.

Icon LinkInherited from

BaseTransactionRequest .maxFee

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:109 Icon Link


Icon Linkoutputs

outputs: TransactionRequestOutput [] = []

List of outputs

Icon LinkInherited from

BaseTransactionRequest .outputs

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:115 Icon Link


Icon Linktip

Optional tip: BN

Gas price for transaction

Icon LinkInherited from

BaseTransactionRequest .tip

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:105 Icon Link


Icon Linktype

type: Blob

Type of the transaction

Icon LinkOverrides

BaseTransactionRequest .type

Icon LinkDefined in

packages/account/src/providers/transaction-request/blob-transaction-request.ts:27 Icon Link


Icon LinkwitnessIndex

witnessIndex: number

Witness index of contract bytecode to create

Icon LinkDefined in

packages/account/src/providers/transaction-request/blob-transaction-request.ts:31 Icon Link


Icon LinkwitnessLimit

Optional witnessLimit: BN

The maximum amount of witness data allowed for the transaction

Icon LinkInherited from

BaseTransactionRequest .witnessLimit

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:111 Icon Link


Icon Linkwitnesses

witnesses: BytesLike [] = []

List of witnesses

Icon LinkInherited from

BaseTransactionRequest .witnesses

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:117 Icon Link

Icon LinkMethods

Icon LinkaddAccountWitnesses

addAccountWitnesses(account): Promise<BlobTransactionRequest >

Helper function to add an external signature to the transaction.

Icon LinkParameters

NameTypeDescription
accountAccount | Account []The account/s to sign to the transaction.

Icon LinkReturns

Promise<BlobTransactionRequest >

The transaction with the signature witness added.

Icon LinkInherited from

BaseTransactionRequest .addAccountWitnesses

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:286 Icon Link


Icon LinkaddChangeOutput

addChangeOutput(to, assetId): void

Adds a change output to the transaction.

Icon LinkParameters

NameTypeDescription
toAddressLike Address of the owner.
assetIdBytesLike Asset ID of coin.

Icon LinkReturns

void

Icon LinkInherited from

BaseTransactionRequest .addChangeOutput

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:508 Icon Link


Icon LinkaddCoinInput

addCoinInput(coin): void

Adds a single coin input to the transaction and a change output for the related assetId, if one it was not added yet.

Icon LinkParameters

NameTypeDescription
coinCoin Coin resource.

Icon LinkReturns

void

Icon LinkInherited from

BaseTransactionRequest .addCoinInput

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:360 Icon Link


Icon LinkaddCoinOutput

addCoinOutput(to, amount, assetId): BlobTransactionRequest

Adds a coin output to the transaction.

Icon LinkParameters

NameTypeDescription
toAddressLike Address of the owner.
amountBigNumberishAmount of coin.
assetIdBytesLike Asset ID of coin.

Icon LinkReturns

BlobTransactionRequest

Icon LinkInherited from

BaseTransactionRequest .addCoinOutput

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:472 Icon Link


Icon LinkaddCoinOutputs

addCoinOutputs(to, quantities): BlobTransactionRequest

Adds multiple coin outputs to the transaction.

Icon LinkParameters

NameTypeDescription
toAddressLike Address of the destination.
quantitiesCoinQuantityLike []Quantities of coins.

Icon LinkReturns

BlobTransactionRequest

Icon LinkInherited from

BaseTransactionRequest .addCoinOutputs

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:489 Icon Link


Icon LinkaddMessageInput

addMessageInput(message): void

Adds a single message input to the transaction and a change output for the asset against the message

Icon LinkParameters

NameTypeDescription
messageMessageCoin Message resource.

Icon LinkReturns

void

Icon LinkInherited from

BaseTransactionRequest .addMessageInput

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:401 Icon Link


Icon LinkaddResource

addResource(resource): BlobTransactionRequest

Adds a single resource to the transaction by adding a coin/message input and a change output for the related assetId, if one it was not added yet.

Icon LinkParameters

NameTypeDescription
resourceResource The resource to add.

Icon LinkReturns

BlobTransactionRequest

This transaction.

Icon LinkInherited from

BaseTransactionRequest .addResource

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:442 Icon Link


Icon LinkaddResources

addResources(resources): BlobTransactionRequest

Adds multiple resources to the transaction by adding coin/message inputs and change outputs from the related assetIds.

Icon LinkParameters

NameTypeDescription
resourcesreadonly Resource []The resources to add.

Icon LinkReturns

BlobTransactionRequest

This transaction.

Icon LinkInherited from

BaseTransactionRequest .addResources

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:459 Icon Link


Icon LinkbyteLength

byteLength(): number

Icon LinkReturns

number

Icon LinkInherited from

BaseTransactionRequest .byteLength

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:696 Icon Link


Icon LinkcalculateMaxGas

calculateMaxGas(chainInfo, minGas): BN

Icon LinkParameters

NameType
chainInfoChainInfo
minGasBN

Icon LinkReturns

BN

Icon LinkInherited from

BaseTransactionRequest .calculateMaxGas

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:556 Icon Link


Icon LinkfundWithFakeUtxos

fundWithFakeUtxos(quantities, baseAssetId, resourcesOwner?): BlobTransactionRequest

Funds the transaction with fake UTXOs for each assetId and amount in the quantities array.

Icon LinkParameters

NameTypeDescription
quantitiesCoinQuantity []CoinQuantity Array.
baseAssetIdstringThe base asset to fund the transaction.
resourcesOwner?AbstractAddress -

Icon LinkReturns

BlobTransactionRequest

Icon LinkInherited from

BaseTransactionRequest .fundWithFakeUtxos

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:583 Icon Link


Icon LinkgetBaseTransaction

getBaseTransaction(): ToBaseTransactionResponse

Method to obtain the base transaction details.

Icon LinkReturns

ToBaseTransactionResponse

The base transaction details.

Icon LinkInherited from

BaseTransactionRequest .getBaseTransaction

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:176 Icon Link


Icon LinkgetChangeOutputs

getChangeOutputs(): ChangeTransactionRequestOutput []

Gets the change outputs for a transaction.

Icon LinkReturns

ChangeTransactionRequestOutput []

The change outputs.

Icon LinkInherited from

BaseTransactionRequest .getChangeOutputs

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:324 Icon Link


Icon LinkgetCoinInputs

getCoinInputs(): CoinTransactionRequestInput []

Gets the coin inputs for a transaction.

Icon LinkReturns

CoinTransactionRequestInput []

The coin inputs.

Icon LinkInherited from

BaseTransactionRequest .getCoinInputs

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:302 Icon Link


Icon LinkgetCoinOutputs

getCoinOutputs(): CoinTransactionRequestOutput []

Gets the coin outputs for a transaction.

Icon LinkReturns

CoinTransactionRequestOutput []

The coin outputs.

Icon LinkInherited from

BaseTransactionRequest .getCoinOutputs

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:313 Icon Link


Icon LinkgetCoinOutputsQuantities

getCoinOutputsQuantities(): CoinQuantity []

Retrieves an array of CoinQuantity for each coin output present in the transaction. a transaction.

Icon LinkReturns

CoinQuantity []

CoinQuantity array.

Icon LinkInherited from

BaseTransactionRequest .getCoinOutputsQuantities

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:634 Icon Link


Icon LinkgetTransactionId

getTransactionId(chainId): string

Gets the Transaction Request by hashing the transaction.

Icon LinkParameters

NameTypeDescription
chainIdnumberThe chain ID.

Icon LinkReturns

string

  • A hash of the transaction, which is the transaction ID.

Icon LinkOverrides

BaseTransactionRequest .getTransactionId

Icon LinkDefined in

packages/account/src/providers/transaction-request/blob-transaction-request.ts:67 Icon Link


Icon LinkmetadataGas

metadataGas(gasCosts): BN

Calculates the metadata gas cost for a blob transaction.

Icon LinkParameters

NameTypeDescription
gasCostsGasCosts gas costs passed from the chain.

Icon LinkReturns

BN

metadata gas cost for the blob transaction.

Icon LinkOverrides

BaseTransactionRequest.metadataGas

Icon LinkDefined in

packages/account/src/providers/transaction-request/blob-transaction-request.ts:77 Icon Link


Icon LinkremoveWitness

removeWitness(index): void

Icon LinkParameters

NameType
indexnumber

Icon LinkReturns

void

Icon LinkInherited from

BaseTransactionRequest .removeWitness

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:662 Icon Link


Icon LinktoJSON

toJSON(): any

Return the minimum amount in native coins required to create a transaction.

Icon LinkReturns

any

The transaction as a JSON object.

Icon LinkInherited from

BaseTransactionRequest .toJSON

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:658 Icon Link


Icon LinktoTransaction

toTransaction(): TransactionBlob

Converts the transaction request to a TransactionBlob.

Icon LinkReturns

TransactionBlob

The transaction create object.

Icon LinkOverrides

BaseTransactionRequest .toTransaction

Icon LinkDefined in

packages/account/src/providers/transaction-request/blob-transaction-request.ts:49 Icon Link


Icon LinktoTransactionBytes

toTransactionBytes(): Uint8Array

Converts the transaction request to a byte array.

Icon LinkReturns

Uint8Array

The transaction bytes.

Icon LinkInherited from

BaseTransactionRequest .toTransactionBytes

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:202 Icon Link


Icon LinkupdatePredicateGasUsed

updatePredicateGasUsed(inputs): void

Icon LinkParameters

NameType
inputsTransactionRequestInput []

Icon LinkReturns

void

Icon LinkInherited from

BaseTransactionRequest .updatePredicateGasUsed

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:676 Icon Link


Icon LinkupdateWitness

updateWitness(index, witness): void

Updates an existing witness without any side effects.

Throws

If the witness does not exist.

Icon LinkParameters

NameTypeDescription
indexnumberThe index of the witness to update.
witnessBytesLike The new witness.

Icon LinkReturns

void

Icon LinkInherited from

BaseTransactionRequest .updateWitness

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:273 Icon Link


Icon LinkupdateWitnessByOwner

updateWitnessByOwner(address, signature): void

Updates the witness for a given owner and signature.

Icon LinkParameters

NameTypeDescription
addressstring | AbstractAddress The address to get the coin input witness index for.
signatureBytesLike The signature to update the witness with.

Icon LinkReturns

void

Icon LinkInherited from

BaseTransactionRequest .updateWitnessByOwner

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:258 Icon Link


Icon Linkfrom

from(obj): BlobTransactionRequest

Icon LinkParameters

Icon LinkReturns

BlobTransactionRequest

Icon LinkDefined in

packages/account/src/providers/transaction-request/blob-transaction-request.ts:19 Icon Link


Icon LinkgetPolicyMeta

getPolicyMeta(req): Object

Icon LinkParameters

Icon LinkReturns

Object

NameType
policiesPolicy[]
policyTypesnumber

Icon LinkInherited from

BaseTransactionRequest .getPolicyMeta

Icon LinkDefined in

packages/account/src/providers/transaction-request/transaction-request.ts:142 Icon Link