ChainflipBroker
ChainflipBroker(
chainflipToolbox
):object
Defined in: packages/plugins/src/chainflip/broker.ts:123
Parameters
Section titled “Parameters”chainflipToolbox
Section titled “chainflipToolbox”ApiPromise
broadcast
Section titled “broadcast”(tx
, callback?
) => Promise
<string
| () => void
>
convertAddress
Section titled “convertAddress”(address
, newPrefix
) => string
createKeyring
Section titled “createKeyring”(phrase
) => Promise
<KeyringPair
> = ...
createTransaction
Section titled “createTransaction”(params
) => undefined
| SubmittableExtrinsic
<"promise"
, ISubmittableResult
> = ...
decodeAddress
Section titled “decodeAddress”(address
, networkPrefix?
) => Uint8Array
<ArrayBufferLike
>
encodeAddress
Section titled “encodeAddress”(address
, encoding
, networkPrefix?
) => string
estimateTransactionFee
Section titled “estimateTransactionFee”(params
) => Promise
<undefined
| AssetValue
> = ...
gasAsset
Section titled “gasAsset”AssetValue
getAddress
Section titled “getAddress”(keyring?
) => undefined
| string
= ...
getBalance
Section titled “getBalance”(address
, scamFilter
) => Promise
<AssetValue
[]> = ...
network
Section titled “network”SubstrateNetwork
(tx
) => Promise
<SubmittableExtrinsic
<"promise"
, ISubmittableResult
>> = ...
signAndBroadcast
Section titled “signAndBroadcast”(__namedParameters
) => string
| Promise
<string
> | Promise
<() => void
> = ...
transfer
Section titled “transfer”(params
) => Promise
<undefined
| string
> = ...
validateAddress
Section titled “validateAddress”(address
) => boolean
= ...
Returns
Section titled “Returns”object
fundStateChainAccount()
Section titled “fundStateChainAccount()”fundStateChainAccount: (
__namedParameters
) =>Promise
<string
>
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”assetValue
Section titled “assetValue”AssetValue
evmToolbox
Section titled “evmToolbox”{ approve
: (__namedParameters
) => Promise
<string
>; approvedAmount
: (__namedParameters
) => Promise
<bigint
>; broadcastTransaction
: (signedTx
) => Promise
<TransactionResponse
> | (signedTx
) => Promise
<TransactionResponse
>; call
: <T
>(__namedParameters
) => Promise
<T
>; createApprovalTx
: (__namedParameters
) => Promise
<ContractTransaction
>; createContract
: (address
, abi
) => Contract
; createContractTxObject
: (__namedParameters
) => Promise
<ContractTransaction
>; createTransaction
: (__namedParameters
) => Promise
<ContractTransaction
>; createTransferTx
: (__namedParameters
) => Promise
<ContractTransaction
>; EIP1193SendTransaction
: (__namedParameters
) => Promise
<string
>; estimateCall
: (__namedParameters
) => Promise
<bigint
>; estimateGasLimit
: (__namedParameters
) => Promise
<bigint
>; estimateGasPrices
: () => Promise
<{ average
: { gasPrice?
: bigint
; l1GasPrice?
: bigint
; maxFeePerGas?
: bigint
; maxPriorityFeePerGas?
: bigint
; }; fast
: { gasPrice?
: bigint
; l1GasPrice?
: bigint
; maxFeePerGas?
: bigint
; maxPriorityFeePerGas?
: bigint
; }; fastest
: { gasPrice?
: bigint
; l1GasPrice?
: bigint
; maxFeePerGas?
: bigint
; maxPriorityFeePerGas?
: bigint
; }; }>; estimateTransactionFee
: (__namedParameters
) => Promise
<AssetValue
>; getAddress
: () => undefined
| Promise
<string
>; getBalance
: (address
, scamFilter
) => Promise
<AssetValue
[]>; getNetworkParams
: () => undefined
; isApproved
: (__namedParameters
) => Promise
<boolean
>; multicall
: (callTuples
, multicallAddress
, funcName
, feeOptionKey
) => Promise
<string
>; sendTransaction
: (__namedParameters
) => Promise
<string
>; signMessage
: undefined
| (message
) => Promise
<string
> | (message
) => Promise
<string
> | (_message
) => Promise
<string
>; transfer
: (__namedParameters
) => Promise
<string
>; validateAddress
: (address
) => boolean
; } | { approve
: (__namedParameters
) => Promise
<string
>; approvedAmount
: (__namedParameters
) => Promise
<bigint
>; broadcastTransaction
: (signedTx
) => Promise
<TransactionResponse
> | (signedTx
) => Promise
<TransactionResponse
>; call
: <T
>(__namedParameters
) => Promise
<T
>; createApprovalTx
: (__namedParameters
) => Promise
<ContractTransaction
>; createContract
: (address
, abi
) => Contract
; createContractTxObject
: (__namedParameters
) => Promise
<ContractTransaction
>; createTransaction
: (__namedParameters
) => Promise
<ContractTransaction
>; createTransferTx
: (__namedParameters
) => Promise
<ContractTransaction
>; EIP1193SendTransaction
: (__namedParameters
) => Promise
<string
>; estimateCall
: (__namedParameters
) => Promise
<bigint
>; estimateGasLimit
: (__namedParameters
) => Promise
<bigint
>; estimateGasPrices
: () => Promise
<{ average
: { gasPrice?
: bigint
; l1GasPrice?
: bigint
; maxFeePerGas?
: bigint
; maxPriorityFeePerGas?
: bigint
; }; fast
: { gasPrice?
: bigint
; l1GasPrice?
: bigint
; maxFeePerGas?
: bigint
; maxPriorityFeePerGas?
: bigint
; }; fastest
: { gasPrice?
: bigint
; l1GasPrice?
: bigint
; maxFeePerGas?
: bigint
; maxPriorityFeePerGas?
: bigint
; }; }>; estimateL1Gas
: (tx
) => Promise
<any
>; estimateL1GasCost
: (tx
) => Promise
<any
>; estimateL2GasCost
: (tx
) => Promise
<any
>; estimateTotalGasCost
: (tx
) => Promise
<any
>; getAddress
: () => undefined
| Promise
<string
>; getBalance
: (address
, scamFilter
) => Promise
<AssetValue
[]>; getL1GasPrice
: () => undefined
| bigint
; getNetworkParams
: () => object
; isApproved
: (__namedParameters
) => Promise
<boolean
>; sendTransaction
: (__namedParameters
) => Promise
<string
>; signMessage
: undefined
| (message
) => Promise
<string
> | (message
) => Promise
<string
> | (_message
) => Promise
<string
>; transfer
: (__namedParameters
) => Promise
<string
>; validateAddress
: (address
) => boolean
; } | { approve
: (__namedParameters
) => Promise
<string
>; approvedAmount
: (__namedParameters
) => Promise
<bigint
>; broadcastTransaction
: (signedTx
) => Promise
<TransactionResponse
> | (signedTx
) => Promise
<TransactionResponse
>; call
: <T
>(__namedParameters
) => Promise
<T
>; createApprovalTx
: (__namedParameters
) => Promise
<ContractTransaction
>; createContract
: (address
, abi
) => Contract
; createContractTxObject
: (__namedParameters
) => Promise
<ContractTransaction
>; createTransaction
: (__namedParameters
) => Promise
<ContractTransaction
>; createTransferTx
: (__namedParameters
) => Promise
<ContractTransaction
>; EIP1193SendTransaction
: (__namedParameters
) => Promise
<string
>; estimateCall
: (__namedParameters
) => Promise
<bigint
>; estimateGasLimit
: (__namedParameters
) => Promise
<bigint
>; estimateGasPrices
: () => Promise
<{ average
: { gasPrice?
: bigint
; l1GasPrice?
: bigint
; maxFeePerGas?
: bigint
; maxPriorityFeePerGas?
: bigint
; }; fast
: { gasPrice?
: bigint
; l1GasPrice?
: bigint
; maxFeePerGas?
: bigint
; maxPriorityFeePerGas?
: bigint
; }; fastest
: { gasPrice?
: bigint
; l1GasPrice?
: bigint
; maxFeePerGas?
: bigint
; maxPriorityFeePerGas?
: bigint
; }; }>; estimateTransactionFee
: (__namedParameters
) => Promise
<AssetValue
>; getAddress
: () => undefined
| Promise
<string
>; getBalance
: (address
, scamFilter
) => Promise
<AssetValue
[]>; getNetworkParams
: () => NetworkParams
; isApproved
: (__namedParameters
) => Promise
<boolean
>; sendTransaction
: (__namedParameters
) => Promise
<string
>; signMessage
: undefined
| (message
) => Promise
<string
> | (message
) => Promise
<string
> | (_message
) => Promise
<string
>; transfer
: (__namedParameters
) => Promise
<string
>; validateAddress
: (address
) => boolean
; }
stateChainAccount
Section titled “stateChainAccount”string
Returns
Section titled “Returns”Promise
<string
>
registerAsBroker()
Section titled “registerAsBroker()”registerAsBroker: () =>
string
|Promise
<string
> |Promise
<() =>void
>
Returns
Section titled “Returns”string
| Promise
<string
> | Promise
<() => void
>
withdrawFee()
Section titled “withdrawFee()”withdrawFee: (
__namedParameters
) =>Promise
<WithdrawFeeResponse
>
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”feeAsset
Section titled “feeAsset”AssetValue
recipient
Section titled “recipient”string
Returns
Section titled “Returns”Promise
<WithdrawFeeResponse
>