New versions of the Qredo API and Signing Agent are now available! To get started, just contact us here.
Qredo Logo

QSign

QSign functions

requestPublicKey

  • Function type: External
  • Modifiers:
    • payable: Allows the function to receive Ether along with the function call
    • withFee: Ensures that enough Ether has been sent as a fee for the transaction
    • walletTypeGuard: Ensures that the specified wallet type ID is valid and supported
  • Parameters:
    • walletTypeId (bytes32): The ID of the wallet type, based on CAIPs
  • Return type: None

This is an external function that can be called by any address to request a public key for a specific wallet type.

After checking all modifiers, the function emits a RequestPublicKey event, passing the requested walletTypeId, the address of the caller (_msgSender()), and the number of wallets associated with the caller's address (wallets[id].length). You can query generated addresses by invoking the getEVMWallets function after the transaction was confirmed.

requestSignatureForHash

  • Function type: External, Non-constant
  • Modifiers:
    • withFee: Ensures that enough Ether has been sent as a fee for the transaction
    • walletTypeGuard: Ensures that the specified wallet type ID is valid and supported
    • chainIdGuard: Ensures that the specified destination chain ID is valid and supported
  • Parameters:
    • walletTypeId (bytes32): The ID of the wallet type, based on CAIPs
    • publicKeyIndex (uint256): The index of the public key
    • dstChainId (bytes32): The ID of the destination chain
    • payloadHash (bytes32): The hash of the payload
  • Return type: None

This function is used to request a signature for a specified hash of a payload.

After checking all modifiers, the function calls the _requestSignature function with the necessary parameters to initiate the signature request for the MPCs.

requestSignatureForData

  • Function type: External, payable
  • Modifiers:
    • withFee: Ensures that enough Ether has been sent as a fee for the transaction
    • walletTypeGuard: Ensures that the specified wallet type ID is valid and supported
    • chainIdGuard: Ensures that the requested chain ID is supported
  • Parameters:
    • walletTypeId (bytes32): The ID of the wallet type, based on CAIPs
    • publicKeyIndex (uint256): The index of the public key
    • dstChainId (bytes32): The ID of the destination chain
    • payload (bytes): The data to be signed
  • Return Type: None

This function allows a user to request a signature for a given arbitrary payload of data.

After checking all modifiers, the function calls the _requestSignature function to handle the signature request, passing the specified parameters along with some additional parameters indicating that the request is for data, rather than a hash.

requestSignatureForTransaction

  • Function type: External, View
  • Modifiers:
    • withFee: Ensures that enough Ether has been sent as a fee for the transaction
    • walletTypeGuard: Ensures that the specified wallet type ID is valid and supported
    • chainIdGuard: Ensures that the requested chain ID is supported
  • Parameters:
    • walletTypeId (bytes32): The ID of the wallet type, based on CAIPs
    • publicKeyIndex (uint256): The index of the public key
    • dstChainId (bytes32): The ID of the destination chain
    • payload (bytes): The payload of the transaction to be signed
    • broadcast (bool): A flag for broadcasting the transaction after signing
  • Return type: None

This function is used to request a signature for a transaction.

After checking all modifiers, the function calls the _requestSignature function, passing the transaction payload along with other specified parameters. You can set the broadcast flag to true to indicate that the signed transaction should be broadcasted to the network after signing.

Previous
QSign addresses