Comment on page
ISCN Widget Reference
ISCN web widget API Reference
Query String | Description |
---|---|
language | Force UI display locale, options are zh , cn , en |
fingerprint | IPFS hash of content, cid v0 |
type | Type of content, default is article |
tags | (optional) list of tags separated by comma |
title | Title of the content |
license | License of the content. Fixed as CCSA 4.0 for now if publisher is not set |
url | URL of the content |
publisher | (optional) name of the platform if your content was published through a platform. Currently only matters is valid option. |
state | (optional) local state to be passed back after signing success, used for data/security purpose |
redirect_uri | (optional) Act as a whitelist host for postMessage, actual redirect is not implemented, please use with opener below |
opener | (optional) default false. If set, would fire a postMessage back to window.opener with redirect_uri host as target, then close current window |
blocking | (optional) default false, wait until transaction is confirmed before finishing |
Query String | Description |
tx_hash | transaction hash of resulting payment, verify status using transaction status query API |
error | set if any catchable error occur |
success | only if blocking is set, return true if transaction success |
state | locale state that was passed as input, used for data/security purpose |
if
opener
and redirect_uri
is set, the widget would fire a postMessage
to redirect_uri
's origin. const message = JSON.stringify({
action: 'ISCN_SUBMITTED',
data: {
tx_hash,
error,
state,
success,
},
});
this.windowOpener.postMessage(message, this.redirectOrigin);
window.close();
Following links are in testnet.
Last modified 10mo ago