Functions

The following functions are available globally.

  • Build flow transaction with cadence code with String input.

    Declaration

    Swift

    public func cadence(text: () -> String) -> Flow.TransactionBuild

    Parameters

    text

    Cadence code in String type.

    Return Value

    The type of Flow.TransactionBuild.script

  • Build flow transaction with cadence code with Flow.Script input.

    Declaration

    Swift

    public func cadence(text: () -> Flow.Script) -> Flow.TransactionBuild

    Parameters

    text

    Cadence code in Flow.Script type.

    Return Value

    The type of Flow.TransactionBuild.script

  • Build flow transaction with arguments with a list of Flow.Cadence.FValue input.

    Declaration

    Swift

    public func arguments(text: () -> [Flow.Cadence.FValue]) -> Flow.TransactionBuild

    Parameters

    text

    The list of Flow.Cadence.FValue type.

    Return Value

    The type of Flow.TransactionBuild.argument

  • Build flow transaction with arguments with a list of Flow.Argument input.

    Declaration

    Swift

    public func arguments(text: () -> [Flow.Argument]) -> Flow.TransactionBuild

    Parameters

    text

    The list of Flow.Argument type.

    Return Value

    The type of Flow.TransactionBuild.argument

  • Build flow transaction with arguments with a list of Flow.Argument input.

    Declaration

    Swift

    public func arguments(text: () -> Flow.Argument...) -> Flow.TransactionBuild

    Parameters

    text

    The list of Flow.Argument type.

    Return Value

    The type of Flow.TransactionBuild.argument

  • Build flow transaction with payer

    Declaration

    Swift

    public func payer(text: () -> String) -> Flow.TransactionBuild

    Parameters

    text

    payer address in String type

    Return Value

    The type of Flow.TransactionBuild.payer

  • Build flow transaction with payer

    Declaration

    Swift

    public func payer(text: () -> Flow.Address) -> Flow.TransactionBuild

    Parameters

    text

    payer address in Flow.Address type

    Return Value

    The type of Flow.TransactionBuild.payer

  • Build flow transaction with authorizers

    Declaration

    Swift

    public func authorizers(text: () -> [Flow.Address]) -> Flow.TransactionBuild

    Parameters

    text

    A list of authorizer’s account

    Return Value

    The type of Flow.TransactionBuild.authorizers

  • Build flow transaction with authorizers

    Declaration

    Swift

    public func authorizers(text: () -> Flow.Address...) -> Flow.TransactionBuild

    Parameters

    text

    A list of authorizer’s account

    Return Value

    The type of Flow.TransactionBuild.authorizers

  • Build flow transaction with proposer

    - returns: The type of Flow.TransactionBuild.proposer

    The default proposal key will use key index 0, and the sequence number will fetch from network

    Declaration

    Swift

    public func proposer(text: () -> String) -> Flow.TransactionBuild

    Parameters

    text

    proposer key in String type

  • Build flow transaction with proposer

    - returns: The type of Flow.TransactionBuild.proposer

    The default proposal key will use key index 0, and the sequence number will fetch from network

    Declaration

    Swift

    public func proposer(text: () -> Flow.Address) -> Flow.TransactionBuild

    Parameters

    text

    proposer key in Flow.Address type

  • Build flow transaction with proposer

    Declaration

    Swift

    public func proposer(text: () -> Flow.TransactionProposalKey) -> Flow.TransactionBuild

    Parameters

    text

    proposer key in Flow.TransactionProposalKey type

    Return Value

    The type of Flow.TransactionBuild.proposer

  • Build flow transaction with gas limit

    Declaration

    Swift

    public func gasLimit(text: () -> BigUInt) -> Flow.TransactionBuild

    Parameters

    text

    gas limit in BigUInt type

    Return Value

    The type of Flow.TransactionBuild.gasLimit

  • Build flow transaction with gas limit

    Declaration

    Swift

    public func gasLimit(text: () -> Int) -> Flow.TransactionBuild

    Parameters

    text

    gas limit in Int type

    Return Value

    The type of Flow.TransactionBuild.gasLimit

  • Build flow transaction with reference block id

    Declaration

    Swift

    public func refBlock(text: () -> String?) -> Flow.TransactionBuild

    Parameters

    text

    block id in String type

    Return Value

    The type of Flow.TransactionBuild.refBlock

  • Build flow transaction with reference block id

    Declaration

    Swift

    public func refBlock(text: () -> Flow.ID) -> Flow.TransactionBuild

    Parameters

    text

    reference block id in Flow.ID type

    Return Value

    The type of Flow.TransactionBuild.refBlock