FaucetInvokeBuilder
Defined in: ootle/src/builtin-templates.ts:109
Fluent builder for common faucet component invocations.
Mirrors FaucetInvokeBuilder from the Rust ootle-rs crate.
Example
Section titled “Example”const tx = new FaucetInvokeBuilder(network, faucetAddress) .feeTransactionPayFromComponent(accountAddress, 1000n) .takeFaucetFunds(accountAddress, 10_000n) .build();Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new FaucetInvokeBuilder(
network,faucetAddress):FaucetInvokeBuilder
Defined in: ootle/src/builtin-templates.ts:113
Parameters
Section titled “Parameters”network
Section titled “network”number
faucetAddress
Section titled “faucetAddress”string
Returns
Section titled “Returns”FaucetInvokeBuilder
Methods
Section titled “Methods”build()
Section titled “build()”build():
UnsignedTransactionWithBlobs
Defined in: ootle/src/builtin-templates.ts:157
Returns
Section titled “Returns”feeTransactionPayFromComponent()
Section titled “feeTransactionPayFromComponent()”feeTransactionPayFromComponent(
componentAddress,maxFee):this
Defined in: ootle/src/builtin-templates.ts:118
Parameters
Section titled “Parameters”componentAddress
Section titled “componentAddress”string
maxFee
Section titled “maxFee”bigint
Returns
Section titled “Returns”this
publishTemplate()
Section titled “publishTemplate()”publishTemplate(
templateAddress,workspaceBucket?):this
Defined in: ootle/src/builtin-templates.ts:151
Publishes a template from the faucet component address.
Mirrors FaucetInvokeBuilder::publish_template from ootle-rs.
Parameters
Section titled “Parameters”templateAddress
Section titled “templateAddress”string
workspaceBucket?
Section titled “workspaceBucket?”string
Returns
Section titled “Returns”this
takeFaucetFunds()
Section titled “takeFaucetFunds()”takeFaucetFunds(
destinationAccount,amount):this
Defined in: ootle/src/builtin-templates.ts:127
Takes amount of funds from the faucet and deposits them into destinationAccount.
Mirrors FaucetInvokeBuilder::take_faucet_funds from ootle-rs.
Parameters
Section titled “Parameters”destinationAccount
Section titled “destinationAccount”string
amount
Section titled “amount”bigint
Returns
Section titled “Returns”this
takeMaxFaucetFunds()
Section titled “takeMaxFaucetFunds()”takeMaxFaucetFunds(
destinationAccount):this
Defined in: ootle/src/builtin-templates.ts:139
Takes the maximum available funds from the faucet into destinationAccount.
Mirrors FaucetInvokeBuilder::take_max_faucet_funds from ootle-rs.
Parameters
Section titled “Parameters”destinationAccount
Section titled “destinationAccount”string
Returns
Section titled “Returns”this