Overview
Request a Frost user's signature in seconds with our secure embeddable button. By pasting this button on your website, you're able to request a cryptographic signature from any Frost user.
Demo
Option #1: Embeddable Button
Update the parameters below and then paste the code wherever you'd like the button to appear.
- data-sign: (String) The data you'd like the user to review and sign.
<!-- STEP 1: UPDATE THE PARAMETERS INSIDE THE DIV TAG -->
<!-- data-sign: the cryptographic message you'd like the user to sign -->
<div
id="signBtn"
data-type='sign'
data-sign="HODL SLOPPS PLZ"
></div>
<!-- STEP 2: DECIDE WHAT HAPPENS AFTER USER SIGNS -->
<script src="https://api.frostwallet.io/dist/frost-inpage-button.js"></script>
<script type="text/javascript">
Frost.create(
'signBtn',
'Sign with Frost', // Button label
function(err, response) { // Response handler
if(err)
console.log(err);
else
console.log(response);
alert("Signature successful!");
}
);
</script>
Option #2: Programmatic Method
Update the parameters below and then call this method whenever you're ready to request the signature.
- dataToSign: (String) or (Array) The data you'd like the user to review and sign.
<script src="https://api.frostwallet.io/dist/frost-inpage-button.js"></script>
<script type="text/javascript">
const dataToSign = 'HODL SLOPPS PLZ'; // Can also be an array
Frost.personalSign(
dataToSign,
function(err, response) {
if(err)
console.log(err);
else
console.log(response);
}
);
</script>