For chains supported at the Tier 2 level , you can invoke Privy’s raw sign functionality to sign over a hash, e.g. the hash of a transaction. You can then use the returned signature to submit and send your transaction.
Sign a raw hash along the blockchain’s cryptographic curve using the wallet’s private key. Make a POST
request to
https://api.privy.io/v1/wallets/ {wallet_id} /raw_sign
Usage curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/raw_sign \
--header 'Authorization: Basic Y20xNWh4eDUyMDVlNWx2NHVkdmE3enBqejoybWhVOWhhVTFQYjhYNXV1cVdxQVRIdW5xTWIyUlBKRm5GSHRzWDVzbXNkdUJRUDZtTW05YldmalBwS3hocjJQZHNHY0Q5NkFUeDc5em03WWhicUZLWkM4' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"params": {
"hash": "0x0775aeed9c9ce6e0fbc4db25c5e4e6368029651c905c286f813126a09025a21e"
}
}'
A successful response will look like:
{
"data" : {
"signature" : "0x0775aeed9c9ce6e0fbc4db25c5e4e6368029651c905c286f813126a09025a21e" ,
"encoding" : "hex"
}
}
Authorization App secret authentication.
privy-authorization-signature
Request authorization signature. If multiple signatures are required, they should be comma
separated.
Path Body The hex-encoded hash to sign, prefixed with 0x
.
Response The signature, prefixed with 0x
.
The encoding of the signature.
Sign a raw hash along the blockchain’s cryptographic curve using the wallet’s private key. Make a POST
request to
https://api.privy.io/v1/wallets/ {wallet_id} /raw_sign
Usage curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/raw_sign \
--header 'Authorization: Basic Y20xNWh4eDUyMDVlNWx2NHVkdmE3enBqejoybWhVOWhhVTFQYjhYNXV1cVdxQVRIdW5xTWIyUlBKRm5GSHRzWDVzbXNkdUJRUDZtTW05YldmalBwS3hocjJQZHNHY0Q5NkFUeDc5em03WWhicUZLWkM4' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"params": {
"hash": "0x0775aeed9c9ce6e0fbc4db25c5e4e6368029651c905c286f813126a09025a21e"
}
}'
A successful response will look like:
{
"data" : {
"signature" : "0x0775aeed9c9ce6e0fbc4db25c5e4e6368029651c905c286f813126a09025a21e" ,
"encoding" : "hex"
}
}
Authorization App secret authentication.
privy-authorization-signature
Request authorization signature. If multiple signatures are required, they should be comma
separated.
Path Body The hex-encoded hash to sign, prefixed with 0x
.
Response The signature, prefixed with 0x
.
The encoding of the signature.