Interface Account

  • All Implemented Interfaces:

    
    public interface Account
    
                        

    An account interface.

    Implementers of this interface provide methods for signing transactions.

    • Constructor Detail

    • Method Detail

      • signV1

         InvokeTransactionV1 signV1(Call call, ExecutionParams params, Boolean forFeeEstimate)

        Sign a version 1 invoke transaction.

        Sign a transaction to be executed on Starknet.

        Parameters:
        call - a call to be signed
        params - additional execution parameters for the transaction
        forFeeEstimate - when set to true, it changes the version to 2^128+version so the signed transaction can only be used for fee estimation
      • signV1

         InvokeTransactionV1 signV1(Call call, ExecutionParams params)

        Sign a version 1 invoke transaction.

        Sign a transaction to be executed on Starknet.

        Parameters:
        call - a call to be signed
        params - additional execution parameters for the transaction
      • signV1

         abstract InvokeTransactionV1 signV1(List<Call> calls, ExecutionParams params, Boolean forFeeEstimate)

        Sign multiple calls as a single version 1 invoke transaction.

        Sign a list of calls to be executed on Starknet.

        Parameters:
        calls - a list of calls to be signed
        params - additional execution parameters for the transaction
        forFeeEstimate - when set to true, it changes the version to 2^128+version so the signed transaction can only be used for fee estimation
      • signV1

         InvokeTransactionV1 signV1(List<Call> calls, ExecutionParams params)

        Sign multiple calls as a single version 1 invoke transaction.

        Sign a list of calls to be executed on Starknet.

        Parameters:
        calls - a list of calls to be signed
        params - additional execution parameters for the transaction
      • signV3

         InvokeTransactionV3 signV3(Call call, InvokeParamsV3 params, Boolean forFeeEstimate)

        Sign a version 3 invoke transaction.

        Sign a transaction to be executed on Starknet.

        Parameters:
        call - a call to be signed
        params - additional execution parameters for the transaction
        forFeeEstimate - when set to true, it changes the version to 2^128+version so the signed transaction can only be used for fee estimation
      • signV3

         InvokeTransactionV3 signV3(Call call, InvokeParamsV3 params)

        Sign a version 3 invoke transaction.

        Sign a transaction to be executed on Starknet.

        Parameters:
        call - a call to be signed
        params - additional execution parameters for the transaction
      • signV3

         abstract InvokeTransactionV3 signV3(List<Call> calls, InvokeParamsV3 params, Boolean forFeeEstimate)

        Sign multiple calls as a single version 3 invoke transaction.

        Sign a list of calls to be executed on Starknet.

        Parameters:
        calls - a list of calls to be signed
        params - additional execution parameters for the transaction
        forFeeEstimate - when set to true, it changes the version to 2^128+version so the signed transaction can only be used for fee estimation
      • signV3

         InvokeTransactionV3 signV3(List<Call> calls, InvokeParamsV3 params)

        Sign multiple calls as a single version 3 invoke transaction.

        Sign a list of calls to be executed on Starknet.

        Parameters:
        calls - a list of calls to be signed
        params - additional execution parameters for the transaction
      • signDeployAccountV1

         abstract DeployAccountTransactionV1 signDeployAccountV1(Felt classHash, List<Felt> calldata, Felt salt, Felt maxFee, Felt nonce, Boolean forFeeEstimate)

        Sign version 1 deploy account transaction.

        Sign a deploy account transaction that requires prefunding deployed address.

        Parameters:
        classHash - hash of the contract that will be deployed.
        calldata - constructor calldata for the contract deployment
        salt - salt used to calculate address of the new contract
        maxFee - max fee to be consumed by this transaction
        nonce - nonce
        forFeeEstimate - when set to true, it changes the version to 2^128+version so the signed transaction can only be used for fee estimation
      • signDeployAccountV1

         DeployAccountTransactionV1 signDeployAccountV1(Felt classHash, List<Felt> calldata, Felt salt, Felt maxFee)

        Sign version 1 deploy account transaction.

        Sign a deploy account transaction that requires prefunding deployed address.

        Parameters:
        classHash - hash of the contract that will be deployed.
        calldata - constructor calldata for the contract deployment
        salt - salt used to calculate address of the new contract
        maxFee - max fee to be consumed by this transaction
      • signDeployAccountV3

         abstract DeployAccountTransactionV3 signDeployAccountV3(Felt classHash, List<Felt> calldata, Felt salt, DeployAccountParamsV3 params, Boolean forFeeEstimate)

        Sign version 3 deploy account transaction.

        Sign a deploy account transaction that requires prefunding said account.

        Parameters:
        classHash - hash of the contract that will be deployed
        calldata - constructor calldata for the contract deployment
        salt - salt used to calculate address of the new contract
        params - additional params for the transaction
        forFeeEstimate - when set to true, it changes the version to 2^128+version so the signed transaction can only be used for fee estimation
      • signDeployAccountV3

         DeployAccountTransactionV3 signDeployAccountV3(Felt classHash, List<Felt> calldata, Felt salt, ResourceBounds l1ResourceBounds, Boolean forFeeEstimate)

        Sign version 3 deploy account transaction.

        Sign a deploy account transaction that requires prefunding deployed address.

        Parameters:
        classHash - hash of the contract that will be deployed.
        calldata - constructor calldata for the contract deployment
        salt - salt used to calculate address of the new contract
        forFeeEstimate - when set to true, it changes the version to 2^128+version so the signed transaction can only be used for fee estimation
      • signDeployAccountV3

         DeployAccountTransactionV3 signDeployAccountV3(Felt classHash, List<Felt> calldata, Felt salt, ResourceBounds l1ResourceBounds)

        Sign version 3 deploy account transaction.

        Sign a deploy account transaction that requires prefunding deployed address.

        Parameters:
        classHash - hash of the contract that will be deployed.
        calldata - constructor calldata for the contract deployment
        salt - salt used to calculate address of the new contract
      • signDeclareV2

         abstract DeclareTransactionV2 signDeclareV2(Cairo1ContractDefinition sierraContractDefinition, CasmContractDefinition casmContractDefinition, ExecutionParams params, Boolean forFeeEstimate)

        Sign a version 2 declare transaction.

        Prepare and sign a version 2 declare transaction to be executed on Starknet.

        Parameters:
        sierraContractDefinition - a cairo 1/2 sierra compiled definition of the contract to be declared
        casmContractDefinition - a casm representation of cairo 1/2 compiled contract to be declared
        params - additional execution parameters for the transaction
        forFeeEstimate - when set to true, it changes the version to 2^128+version so the signed transaction can only be used for fee estimation
      • signDeclareV2

         DeclareTransactionV2 signDeclareV2(Cairo1ContractDefinition sierraContractDefinition, CasmContractDefinition casmContractDefinition, ExecutionParams params)

        Sign a version 2 declare transaction.

        Prepare and sign a version 2 declare transaction to be executed on Starknet.

        Parameters:
        sierraContractDefinition - a cairo 1/2 sierra compiled definition of the contract to be declared
        casmContractDefinition - a casm representation of cairo 1/2 compiled contract to be declared
        params - additional execution parameters for the transaction
      • signDeclareV3

         abstract DeclareTransactionV3 signDeclareV3(Cairo1ContractDefinition sierraContractDefinition, CasmContractDefinition casmContractDefinition, DeclareParamsV3 params, Boolean forFeeEstimate)

        Sign a version 3 declare transaction.

        Prepare and sign a version 3 declare transaction to be executed on Starknet.

        Parameters:
        sierraContractDefinition - a cairo 1/2 sierra compiled definition of the contract to be declared
        casmContractDefinition - a casm representation of cairo 1/2 compiled contract to be declared
        params - additional parameters for the transaction
        forFeeEstimate - when set to true, it changes the version to 2^128+version so the signed transaction can only be used for fee estimation
      • signDeclareV3

         DeclareTransactionV3 signDeclareV3(Cairo1ContractDefinition sierraContractDefinition, CasmContractDefinition casmContractDefinition, DeclareParamsV3 params)

        Sign a version 3 declare transaction.

        Prepare and sign a version 3 declare transaction to be executed on Starknet.

        Parameters:
        sierraContractDefinition - a cairo 1/2 sierra compiled definition of the contract to be declared
        casmContractDefinition - a casm representation of cairo 1/2 compiled contract to be declared
        params - additional parameters for the transaction
      • signTypedData

         abstract List<Felt> signTypedData(TypedData typedData)

        Sign TypedData for off-chain usage with this account privateKey

        Parameters:
        typedData - a TypedData instance to sign
      • verifyTypedDataSignature

         abstract Request<Boolean> verifyTypedDataSignature(TypedData typedData, List<Felt> signature)

        Verify a signature of TypedData on Starknet

        Parameters:
        typedData - a TypedData instance which signature will be verified
        signature - a signature of typedData
      • executeV1

         abstract Request<InvokeFunctionResponse> executeV1(List<Call> calls, Felt maxFee)

        Execute a list of calls using version 1 invoke transaction.

        Execute list of calls on Starknet.

        Parameters:
        calls - a list of calls to be executed.
        maxFee - a max fee to pay for the transaction.
      • executeV1

         abstract Request<InvokeFunctionResponse> executeV1(Call call, Felt maxFee)

        Execute single call using version 1 invoke transaction.

        Execute single call on Starknet.

        Parameters:
        call - a call to be executed.
        maxFee - a max fee to pay for the transaction.
      • executeV1

         abstract Request<InvokeFunctionResponse> executeV1(List<Call> calls, Double estimateFeeMultiplier)

        Execute a list of calls using version 1 invoke transaction with automatically estimated fee that will be multiplied by the specified multiplier when max fee is calculated.

        Parameters:
        calls - a list of calls to be executed.
        estimateFeeMultiplier - how big multiplier should be used for the estimated fee.
      • executeV1

         abstract Request<InvokeFunctionResponse> executeV1(Call call, Double estimateFeeMultiplier)

        Execute single call using version 1 invoke transaction with automatically estimated fee that will be multiplied by the specified multiplier when max fee is calculated.

        Parameters:
        call - a call to be executed.
        estimateFeeMultiplier - how big multiplier should be used for the estimated fee.
      • executeV3

         abstract Request<InvokeFunctionResponse> executeV3(List<Call> calls, ResourceBounds l1ResourceBounds)

        Execute a list of calls using version 3 invoke transaction.

        Execute list of calls on Starknet.

        Parameters:
        calls - a list of calls to be executed.
        l1ResourceBounds - L1 resource bounds for the transaction.
      • executeV3

         abstract Request<InvokeFunctionResponse> executeV3(Call call, ResourceBounds l1ResourceBounds)

        Execute single call using version 3 invoke transaction.

        Execute single call on Starknet.

        Parameters:
        call - a call to be executed.
        l1ResourceBounds - L1 resource bounds for the transaction.
      • executeV3

         abstract Request<InvokeFunctionResponse> executeV3(List<Call> calls, Double estimateAmountMultiplier, Double estimateUnitPriceMultiplier)

        Execute a list of calls using version 3 invoke transaction with automatically estimated fee that will be multiplied by the specified multipliers when resource bounds are calculated.

        Parameters:
        calls - a list of calls to be executed.
        estimateAmountMultiplier - how big multiplier should be used for the estimated amount.
        estimateUnitPriceMultiplier - how big multiplier should be used for the estimated unit price.
      • executeV3

         abstract Request<InvokeFunctionResponse> executeV3(Call call, Double estimateAmountMultiplier, Double estimateUnitPriceMultiplier)

        Execute single call using version 3 invoke transaction with automatically estimated fee that will be multiplied by the specified multipliers when resource bounds are calculated.

        Parameters:
        call - a call to be executed.
        estimateAmountMultiplier - how big multiplier should be used for the estimated amount.
        estimateUnitPriceMultiplier - how big multiplier should be used for the estimated unit price.
      • estimateFeeV1

         abstract Request<EstimateFeeResponseList> estimateFeeV1(Call call)

        Estimate fee for a call as a version 1 invoke transaction.

        Estimate fee for a signed call on Starknet.

        Parameters:
        call - a call used to estimate a fee.
      • estimateFeeV1

         abstract Request<EstimateFeeResponseList> estimateFeeV1(Call call, Boolean skipValidate)

        Estimate fee for a call as a version 1 invoke transaction.

        Estimate fee for a signed call on Starknet.

        Parameters:
        call - a call used to estimate a fee.
        skipValidate - when set to true, the validation part of the transaction is skipped.
      • estimateFeeV1

         abstract Request<EstimateFeeResponseList> estimateFeeV1(Call call, BlockTag blockTag)

        Estimate fee for a call as a version 1 invoke transaction.

        Estimate fee for a signed call on Starknet for specified block tag.

        Parameters:
        call - a call used to estimate a fee.
        blockTag - a tag of the block in respect to what the query will be made.
      • estimateFeeV1

         abstract Request<EstimateFeeResponseList> estimateFeeV1(Call call, BlockTag blockTag, Boolean skipValidate)

        Estimate fee for a call as a version 1 invoke transaction.

        Estimate fee for a signed call on Starknet for specified block tag.

        Parameters:
        call - a call used to estimate a fee.
        blockTag - a tag of the block in respect to what the query will be made.
        skipValidate - when set to true, the validation part of the transaction is skipped.
      • estimateFeeV1

         abstract Request<EstimateFeeResponseList> estimateFeeV1(List<Call> calls)

        Estimate fee for a list of calls as a version 1 invoke transaction.

        Estimate fee for a signed list of calls on Starknet.

        Parameters:
        calls - a list of calls used to estimate a fee.
      • estimateFeeV1

         abstract Request<EstimateFeeResponseList> estimateFeeV1(List<Call> calls, Boolean skipValidate)

        Estimate fee for a list of calls as a version 1 invoke transaction.

        Estimate fee for a signed list of calls on Starknet.

        Parameters:
        calls - a list of calls used to estimate a fee.
        skipValidate - when set to true, the validation part of the transaction is skipped.
      • estimateFeeV1

         abstract Request<EstimateFeeResponseList> estimateFeeV1(List<Call> calls, BlockTag blockTag)

        Estimate fee for a list of calls as a version 1 invoke transaction.

        Estimate fee for a signed list of calls on Starknet.

        Parameters:
        calls - a list of calls used to estimate a fee.
        blockTag - a tag of the block in respect to what the query will be made.
      • estimateFeeV1

         abstract Request<EstimateFeeResponseList> estimateFeeV1(List<Call> calls, BlockTag blockTag, Boolean skipValidate)

        Estimate fee for a list of calls using version 3 invoke transaction.

        Estimate fee for a signed list of calls on Starknet.

        Parameters:
        calls - a list of calls used to estimate a fee.
        blockTag - a tag of the block in respect to what the query will be made.
        skipValidate - when set to true, the validation part of the transaction is skipped.
      • estimateFeeV3

         abstract Request<EstimateFeeResponseList> estimateFeeV3(Call call)

        Estimate fee for a call as a version 3 invoke transaction.

        Estimate fee for a signed call on Starknet.

        Parameters:
        call - a call used to estimate a fee.
      • estimateFeeV3

         abstract Request<EstimateFeeResponseList> estimateFeeV3(Call call, Boolean skipValidate)

        Estimate fee for a call as a version 3 invoke transaction.

        Estimate fee for a signed call on Starknet.

        Parameters:
        call - a call used to estimate a fee.
        skipValidate - when set to true, the validation part of the transaction is skipped.
      • estimateFeeV3

         abstract Request<EstimateFeeResponseList> estimateFeeV3(Call call, BlockTag blockTag)

        Estimate fee for a call as a version 3 invoke transaction.

        Estimate fee for a signed call on Starknet for specified block tag.

        Parameters:
        call - a call used to estimate a fee.
        blockTag - a tag of the block in respect to what the query will be made.
      • estimateFeeV3

         abstract Request<EstimateFeeResponseList> estimateFeeV3(Call call, BlockTag blockTag, Boolean skipValidate)

        Estimate fee for a call as a version 3 invoke transaction.

        Estimate fee for a signed call on Starknet for specified block tag.

        Parameters:
        call - a call used to estimate a fee.
        blockTag - a tag of the block in respect to what the query will be made.
        skipValidate - when set to true, the validation part of the transaction is skipped.
      • estimateFeeV3

         abstract Request<EstimateFeeResponseList> estimateFeeV3(List<Call> calls)

        Estimate fee for a list of calls as a version 3 invoke transaction.

        Estimate fee for a signed list of calls on Starknet.

        Parameters:
        calls - a list of calls used to estimate a fee.
      • estimateFeeV3

         abstract Request<EstimateFeeResponseList> estimateFeeV3(List<Call> calls, Boolean skipValidate)

        Estimate fee for a list of calls as a version 3 invoke transaction.

        Estimate fee for a signed list of calls on Starknet.

        Parameters:
        calls - a list of calls used to estimate a fee.
        skipValidate - when set to true, the validation part of the transaction is skipped.
      • estimateFeeV3

         abstract Request<EstimateFeeResponseList> estimateFeeV3(List<Call> calls, BlockTag blockTag)

        Estimate fee for a list of calls.

        Estimate fee for a signed list of calls on Starknet.

        Parameters:
        calls - a list of calls used to estimate a fee.
        blockTag - a tag of the block in respect to what the query will be made.
      • estimateFeeV3

         abstract Request<EstimateFeeResponseList> estimateFeeV3(List<Call> calls, BlockTag blockTag, Boolean skipValidate)

        Estimate fee for a list of calls.

        Estimate fee for a signed list of calls on Starknet.

        Parameters:
        calls - a list of calls used to estimate a fee.
        blockTag - a tag of the block in respect to what the query will be made.
        skipValidate - when set to true, the validation part of the transaction is skipped.
      • getNonce

         abstract Request<Felt> getNonce()

        Get account nonce.

        Get account nonce for pending block.

      • getNonce

         abstract Request<Felt> getNonce(BlockTag blockTag)

        Get account nonce.

        Get account nonce for specified block tag.

        Parameters:
        blockTag - block tag used for returning this value.
      • getNonce

         abstract Request<Felt> getNonce(Felt blockHash)

        Get account nonce.

        Get account nonce for specified block hash.

        Parameters:
        blockHash - block hash used for returning this value.
      • getNonce

         abstract Request<Felt> getNonce(Integer blockNumber)

        Get account nonce.

        Get account nonce for specified block number.

        Parameters:
        blockNumber - block number used for returning this value.