Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:02
What would you like to do?
An example for how to authenticate against Chain using CORS
<!doctype html>
<script src=""></script>
<p>Balance: <span id="balance"></span></p>
<script type="text/javascript">
$(document).ready(function() {
var addr = window.location.hash.split('#').pop();
var url = '';
url += '/addresses/' + addr;
url += '?key=GUEST-TOKEN';
url: url,
type: 'GET',
success: function(data) {
error: function(req, msg, err) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment