QSign
QSign functions
requestPublicKey
- Function type: External
- Modifiers:
payable
: Allows the function to receive Ether along with the function callwithFee
: Ensures that enough Ether has been sent as a fee for the transactionwalletTypeGuard
: 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 transactionwalletTypeGuard
: Ensures that the specified wallet type ID is valid and supportedchainIdGuard
: Ensures that the specified destination chain ID is valid and supported
- Parameters:
walletTypeId
(bytes32
): The ID of the wallet type, based on CAIPspublicKeyIndex
(uint256
): The index of the public keydstChainId
(bytes32
): The ID of the destination chainpayloadHash
(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 transactionwalletTypeGuard
: Ensures that the specified wallet type ID is valid and supportedchainIdGuard
: Ensures that the requested chain ID is supported
- Parameters:
walletTypeId
(bytes32
): The ID of the wallet type, based on CAIPspublicKeyIndex
(uint256
): The index of the public keydstChainId
(bytes32
): The ID of the destination chainpayload
(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 transactionwalletTypeGuard
: Ensures that the specified wallet type ID is valid and supportedchainIdGuard
: Ensures that the requested chain ID is supported
- Parameters:
walletTypeId
(bytes32
): The ID of the wallet type, based on CAIPspublicKeyIndex
(uint256
): The index of the public keydstChainId
(bytes32
): The ID of the destination chainpayload
(bytes
): The payload of the transaction to be signedbroadcast
(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.