mirror of
https://github.com/alexgo-io/stacks.js.git
synced 2026-05-29 16:57:23 +08:00
11105 lines
299 KiB
JSON
11105 lines
299 KiB
JSON
[
|
|
{
|
|
"name": "Authentication",
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Single sign on and authentication without third parties or remote servers.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 75,
|
|
"offset": 74
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 75,
|
|
"offset": 74
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "link",
|
|
"title": null,
|
|
"url": "https://github.com/blockstack/blockstack.js/blob/master/src/auth/README.md",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Read more about authentication",
|
|
"position": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 2,
|
|
"offset": 77
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 32,
|
|
"offset": 107
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 1,
|
|
"offset": 76
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 109,
|
|
"offset": 184
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 1,
|
|
"offset": 76
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 109,
|
|
"offset": 184
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 1,
|
|
"offset": 185
|
|
}
|
|
}
|
|
},
|
|
"kind": "note",
|
|
"path": [
|
|
{
|
|
"name": "Authentication",
|
|
"kind": "note"
|
|
}
|
|
],
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"namespace": "Authentication"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Configuration data for the current app.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 40,
|
|
"offset": 39
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 40,
|
|
"offset": 39
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "On browser platforms, creating an instance of this\nclass without any arguments will use\n",
|
|
"position": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 1,
|
|
"offset": 41
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 1,
|
|
"offset": 129
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "window.location.origin",
|
|
"position": {
|
|
"start": {
|
|
"line": 5,
|
|
"column": 1,
|
|
"offset": 129
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 25,
|
|
"offset": 153
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": " as the app domain.\nOn non-browser platforms, you need to\nspecify an app domain as the first argument.",
|
|
"position": {
|
|
"start": {
|
|
"line": 5,
|
|
"column": 25,
|
|
"offset": 153
|
|
},
|
|
"end": {
|
|
"line": 7,
|
|
"column": 45,
|
|
"offset": 255
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 1,
|
|
"offset": 41
|
|
},
|
|
"end": {
|
|
"line": 7,
|
|
"column": 45,
|
|
"offset": 255
|
|
},
|
|
"indent": [
|
|
1,
|
|
1,
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 7,
|
|
"column": 45,
|
|
"offset": 255
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "type",
|
|
"description": null,
|
|
"lineNumber": 8,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "AppConfig"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 5,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 14,
|
|
"column": 3
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 15,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 106,
|
|
"column": 1
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/appConfig.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "appDomain",
|
|
"lineNumber": 1,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the app domain",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"default": "window.location.origin"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "scopes",
|
|
"lineNumber": 2,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "permissions this app is requesting",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 35,
|
|
"offset": 34
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 35,
|
|
"offset": 34
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 35,
|
|
"offset": 34
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "TypeApplication",
|
|
"expression": {
|
|
"type": "NameExpression",
|
|
"name": "Array"
|
|
},
|
|
"applications": [
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
]
|
|
},
|
|
"default": "DEFAULT_SCOPE.slice()"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "redirectPath",
|
|
"lineNumber": 3,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "path on app domain to redirect users to after authentication",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 61,
|
|
"offset": 60
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 61,
|
|
"offset": 60
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 61,
|
|
"offset": 60
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"default": "''"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "manifestPath",
|
|
"lineNumber": 4,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "path relative to app domain of app's manifest file",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 51,
|
|
"offset": 50
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 51,
|
|
"offset": 50
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 51,
|
|
"offset": 50
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"default": "'/manifest.json'"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "coreNode",
|
|
"lineNumber": 5,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "override the default or user selected core node",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 48,
|
|
"offset": 47
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 48,
|
|
"offset": 47
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 48,
|
|
"offset": 47
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"default": "null"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "authenticatorURL",
|
|
"lineNumber": 6,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the web-based fall back authenticator",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 38,
|
|
"offset": 37
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 38,
|
|
"offset": 37
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 38,
|
|
"offset": 37
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"default": "DEFAULT_BLOCKSTACK_HOST"
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "AppConfig"
|
|
},
|
|
"constructorComment": {
|
|
"description": "",
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "the app domain",
|
|
"lineNumber": 1,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"name": "appDomain"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "permissions this app is requesting",
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "TypeApplication",
|
|
"expression": {
|
|
"type": "NameExpression",
|
|
"name": "Array"
|
|
},
|
|
"applications": [
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
]
|
|
},
|
|
"name": "scopes"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "path on app domain to redirect users to after authentication",
|
|
"lineNumber": 3,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"name": "redirectPath"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "path relative to app domain of app's manifest file",
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"name": "manifestPath"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "override the default or user selected core node",
|
|
"lineNumber": 5,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"name": "coreNode"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "the web-based fall back authenticator",
|
|
"lineNumber": 6,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"name": "authenticatorURL"
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 62,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 69,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 70,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 88,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/appConfig.js",
|
|
"sortKey": "!/Users/larry/git/blockstack.js/src/auth/appConfig.js 00000070",
|
|
"code": "{\n\n /**\n * Blockstack apps are uniquely identified by their app domain.\n * @type {string}\n */\n appDomain: string\n\n /**\n * An array of string representing permissions requested by the app.\n * @type {[Array<string>}\n */\n scopes: Array<string>\n\n\n /**\n * Path on app domain to redirect users to after authentication. The\n * authentication response token will be postpended in a query.\n * @type {string}\n */\n redirectPath: string\n\n /**\n * Path relative to app domain of app's manifest file.\n *\n * This file needs to have CORS headers set so that it can be fetched\n * from any origin. Typically this means return the header `Access-Control-Allow-Origin: *`.\n * @type {string}\n */\n manifestPath: string\n\n /**\n * The URL of Blockstack core node to use for this app. If this is\n * `null`, the core node specified by the user or default core node\n * will be used.\n * @type {string}\n */\n coreNode: string\n\n /**\n * The URL of a web-based Blockstack Authenticator to use in the event\n * the user doesn't have Blockstack installed on their machine. If this\n * is not specified, the current default in this library will be used.\n * @type {string}\n */\n authenticatorURL: ?string\n\n /**\n * @param {string} appDomain - the app domain\n * @param {Array<string>} scopes - permissions this app is requesting\n * @param {string} redirectPath - path on app domain to redirect users to after authentication\n * @param {string} manifestPath - path relative to app domain of app's manifest file\n * @param {string} coreNode - override the default or user selected core node\n * @param {string} authenticatorURL - the web-based fall back authenticator\n */\n constructor(appDomain: string = window.location.origin,\n scopes: Array<string> = DEFAULT_SCOPE.slice(),\n redirectPath: string = '',\n manifestPath: string = '/manifest.json',\n coreNode: ?string = null,\n authenticatorURL: string = DEFAULT_BLOCKSTACK_HOST) {\n this.appDomain = appDomain\n this.scopes = scopes\n this.redirectPath = redirectPath\n this.manifestPath = manifestPath\n\n if (!coreNode) {\n this.coreNode = DEFAULT_CORE_NODE\n } else {\n this.coreNode = coreNode\n }\n\n this.authenticatorURL = authenticatorURL\n }\n\n /**\n * The location to which the authenticator should\n * redirect the user.\n * @returns {string} - URI\n */\n redirectURI() : string {\n return `${this.appDomain}${this.redirectPath}`\n }\n\n /**\n * The location of the app's manifest file.\n * @returns {string} - URI\n */\n manifestURI() : string {\n return `${this.appDomain}${this.manifestPath}`\n }\n}"
|
|
},
|
|
"augments": [],
|
|
"errors": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "appDomain",
|
|
"lineNumber": 1,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the app domain",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"default": "window.location.origin"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "scopes",
|
|
"lineNumber": 2,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "permissions this app is requesting",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 35,
|
|
"offset": 34
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 35,
|
|
"offset": 34
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 35,
|
|
"offset": 34
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "TypeApplication",
|
|
"expression": {
|
|
"type": "NameExpression",
|
|
"name": "Array"
|
|
},
|
|
"applications": [
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
]
|
|
},
|
|
"default": "DEFAULT_SCOPE.slice()"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "redirectPath",
|
|
"lineNumber": 3,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "path on app domain to redirect users to after authentication",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 61,
|
|
"offset": 60
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 61,
|
|
"offset": 60
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 61,
|
|
"offset": 60
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"default": "''"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "manifestPath",
|
|
"lineNumber": 4,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "path relative to app domain of app's manifest file",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 51,
|
|
"offset": 50
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 51,
|
|
"offset": 50
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 51,
|
|
"offset": 50
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"default": "'/manifest.json'"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "coreNode",
|
|
"lineNumber": 5,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "override the default or user selected core node",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 48,
|
|
"offset": 47
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 48,
|
|
"offset": 47
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 48,
|
|
"offset": 47
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"default": "null"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "authenticatorURL",
|
|
"lineNumber": 6,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the web-based fall back authenticator",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 38,
|
|
"offset": 37
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 38,
|
|
"offset": 37
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 38,
|
|
"offset": 37
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"default": "DEFAULT_BLOCKSTACK_HOST"
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": []
|
|
},
|
|
"name": "AppConfig",
|
|
"kind": "class",
|
|
"path": [
|
|
{
|
|
"name": "AppConfig",
|
|
"kind": "class"
|
|
}
|
|
],
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Blockstack apps are uniquely identified by their app domain.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 61,
|
|
"offset": 60
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 61,
|
|
"offset": 60
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 61,
|
|
"offset": 60
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "type",
|
|
"description": null,
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 17,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 20,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 21,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 21,
|
|
"column": 19
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/appConfig.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [],
|
|
"properties": [],
|
|
"returns": [],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"name": "appDomain",
|
|
"kind": "member",
|
|
"memberof": "AppConfig",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "AppConfig",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "appDomain",
|
|
"kind": "member",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "AppConfig#appDomain"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "An array of string representing permissions requested by the app.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 66,
|
|
"offset": 65
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 66,
|
|
"offset": 65
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 66,
|
|
"offset": 65
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "type",
|
|
"description": null,
|
|
"lineNumber": 2,
|
|
"type": null,
|
|
"errors": [
|
|
"unexpected token"
|
|
]
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 23,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 26,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 27,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 27,
|
|
"column": 23
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/appConfig.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [],
|
|
"properties": [],
|
|
"returns": [],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "scopes",
|
|
"kind": "member",
|
|
"memberof": "AppConfig",
|
|
"scope": "instance",
|
|
"type": {
|
|
"type": "TypeApplication",
|
|
"expression": {
|
|
"type": "NameExpression",
|
|
"name": "Array"
|
|
},
|
|
"applications": [
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
]
|
|
},
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "AppConfig",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "scopes",
|
|
"kind": "member",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "AppConfig#scopes"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Path on app domain to redirect users to after authentication. The\nauthentication response token will be postpended in a query.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 61,
|
|
"offset": 126
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 61,
|
|
"offset": 126
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 61,
|
|
"offset": 126
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "type",
|
|
"description": null,
|
|
"lineNumber": 3,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 30,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 34,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 35,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 35,
|
|
"column": 22
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/appConfig.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [],
|
|
"properties": [],
|
|
"returns": [],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"name": "redirectPath",
|
|
"kind": "member",
|
|
"memberof": "AppConfig",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "AppConfig",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "redirectPath",
|
|
"kind": "member",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "AppConfig#redirectPath"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Path relative to app domain of app's manifest file.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 52,
|
|
"offset": 51
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 52,
|
|
"offset": 51
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "This file needs to have CORS headers set so that it can be fetched\nfrom any origin. Typically this means return the header ",
|
|
"position": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 1,
|
|
"offset": 53
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 57,
|
|
"offset": 176
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "Access-Control-Allow-Origin: *",
|
|
"position": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 57,
|
|
"offset": 176
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 89,
|
|
"offset": 208
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": ".",
|
|
"position": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 89,
|
|
"offset": 208
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 90,
|
|
"offset": 209
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 1,
|
|
"offset": 53
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 90,
|
|
"offset": 209
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 90,
|
|
"offset": 209
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "type",
|
|
"description": null,
|
|
"lineNumber": 5,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 37,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 43,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 44,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 44,
|
|
"column": 22
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/appConfig.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [],
|
|
"properties": [],
|
|
"returns": [],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"name": "manifestPath",
|
|
"kind": "member",
|
|
"memberof": "AppConfig",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "AppConfig",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "manifestPath",
|
|
"kind": "member",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "AppConfig#manifestPath"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "The URL of Blockstack core node to use for this app. If this is\n",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 1,
|
|
"offset": 64
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "null",
|
|
"position": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 1,
|
|
"offset": 64
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 7,
|
|
"offset": 70
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": ", the core node specified by the user or default core node\nwill be used.",
|
|
"position": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 7,
|
|
"offset": 70
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 14,
|
|
"offset": 142
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 14,
|
|
"offset": 142
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 14,
|
|
"offset": 142
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "type",
|
|
"description": null,
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 46,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 51,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 52,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 52,
|
|
"column": 18
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/appConfig.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [],
|
|
"properties": [],
|
|
"returns": [],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"name": "coreNode",
|
|
"kind": "member",
|
|
"memberof": "AppConfig",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "AppConfig",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "coreNode",
|
|
"kind": "member",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "AppConfig#coreNode"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "The URL of a web-based Blockstack Authenticator to use in the event\nthe user doesn't have Blockstack installed on their machine. If this\nis not specified, the current default in this library will be used.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 68,
|
|
"offset": 204
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 68,
|
|
"offset": 204
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 68,
|
|
"offset": 204
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "type",
|
|
"description": null,
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 54,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 59,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 60,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 60,
|
|
"column": 27
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/appConfig.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [],
|
|
"properties": [],
|
|
"returns": [],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"name": "authenticatorURL",
|
|
"kind": "member",
|
|
"memberof": "AppConfig",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "AppConfig",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "authenticatorURL",
|
|
"kind": "member",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "AppConfig#authenticatorURL"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "The location to which the authenticator should\nredirect the user.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 19,
|
|
"offset": 65
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 19,
|
|
"offset": 65
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 19,
|
|
"offset": 65
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "returns",
|
|
"description": "URI",
|
|
"lineNumber": 3,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 90,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 94,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 95,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 97,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/appConfig.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "URI",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 4,
|
|
"offset": 3
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 4,
|
|
"offset": 3
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 4,
|
|
"offset": 3
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "redirectURI",
|
|
"kind": "function",
|
|
"memberof": "AppConfig",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "AppConfig",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "redirectURI",
|
|
"kind": "function",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "AppConfig#redirectURI"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "The location of the app's manifest file.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 41,
|
|
"offset": 40
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 41,
|
|
"offset": 40
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 41,
|
|
"offset": 40
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "returns",
|
|
"description": "URI",
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 99,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 102,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 103,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 105,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/appConfig.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "URI",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 4,
|
|
"offset": 3
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 4,
|
|
"offset": 3
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 4,
|
|
"offset": 3
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "manifestURI",
|
|
"kind": "function",
|
|
"memberof": "AppConfig",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "AppConfig",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "manifestURI",
|
|
"kind": "function",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "AppConfig#manifestURI"
|
|
}
|
|
],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"namespace": "AppConfig"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Represents an instance of a signed in user for a particular app.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 65,
|
|
"offset": 64
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 65,
|
|
"offset": 64
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "A signed in user has access to two major pieces of information\nabout the user, the user's private key for that app and the location\nof the user's gaia storage bucket for the app.",
|
|
"position": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 1,
|
|
"offset": 66
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 47,
|
|
"offset": 244
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 1,
|
|
"offset": 66
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 47,
|
|
"offset": 244
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "A user can be signed in either directly through the interactive\nsign in process or by directly providing the app private key.",
|
|
"position": {
|
|
"start": {
|
|
"line": 7,
|
|
"column": 1,
|
|
"offset": 246
|
|
},
|
|
"end": {
|
|
"line": 8,
|
|
"column": 62,
|
|
"offset": 371
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 7,
|
|
"column": 1,
|
|
"offset": 246
|
|
},
|
|
"end": {
|
|
"line": 8,
|
|
"column": 62,
|
|
"offset": 371
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 8,
|
|
"column": 62,
|
|
"offset": 371
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "type",
|
|
"description": null,
|
|
"lineNumber": 9,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "UserSession"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 32,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 42,
|
|
"column": 3
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 43,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 292,
|
|
"column": 1
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/userSession.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "initialValue",
|
|
"lineNumber": 46,
|
|
"type": {
|
|
"type": "UnionType",
|
|
"elements": [
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "AppConfig"
|
|
},
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "SessionData"
|
|
}
|
|
]
|
|
},
|
|
"default": "new AppConfig()"
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "UserSession"
|
|
},
|
|
"name": "UserSession",
|
|
"kind": "class",
|
|
"path": [
|
|
{
|
|
"name": "UserSession",
|
|
"kind": "class"
|
|
}
|
|
],
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Generates an authentication request and redirects the user to the Blockstack\nbrowser to approve the sign in request.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 40,
|
|
"offset": 116
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 40,
|
|
"offset": 116
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Please note that this requires that the web browser properly handles the\n",
|
|
"position": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 1,
|
|
"offset": 118
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 1,
|
|
"offset": 191
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "blockstack:",
|
|
"position": {
|
|
"start": {
|
|
"line": 5,
|
|
"column": 1,
|
|
"offset": 191
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 14,
|
|
"offset": 204
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": " URL protocol handler.",
|
|
"position": {
|
|
"start": {
|
|
"line": 5,
|
|
"column": 14,
|
|
"offset": 204
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 36,
|
|
"offset": 226
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 1,
|
|
"offset": 118
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 36,
|
|
"offset": 226
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Most applications should use this\nmethod for sign in unless they require more fine grained control over how the\nauthentication request is generated. If your app falls into this category,\nuse ",
|
|
"position": {
|
|
"start": {
|
|
"line": 7,
|
|
"column": 1,
|
|
"offset": 228
|
|
},
|
|
"end": {
|
|
"line": 10,
|
|
"column": 5,
|
|
"offset": 419
|
|
},
|
|
"indent": [
|
|
1,
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "generateAndStoreTransitKey",
|
|
"position": {
|
|
"start": {
|
|
"line": 10,
|
|
"column": 5,
|
|
"offset": 419
|
|
},
|
|
"end": {
|
|
"line": 10,
|
|
"column": 33,
|
|
"offset": 447
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": ", ",
|
|
"position": {
|
|
"start": {
|
|
"line": 10,
|
|
"column": 33,
|
|
"offset": 447
|
|
},
|
|
"end": {
|
|
"line": 10,
|
|
"column": 35,
|
|
"offset": 449
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "makeAuthRequest",
|
|
"position": {
|
|
"start": {
|
|
"line": 10,
|
|
"column": 35,
|
|
"offset": 449
|
|
},
|
|
"end": {
|
|
"line": 10,
|
|
"column": 52,
|
|
"offset": 466
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": ",\nand ",
|
|
"position": {
|
|
"start": {
|
|
"line": 10,
|
|
"column": 52,
|
|
"offset": 466
|
|
},
|
|
"end": {
|
|
"line": 11,
|
|
"column": 5,
|
|
"offset": 472
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "redirectToSignInWithAuthRequest",
|
|
"position": {
|
|
"start": {
|
|
"line": 11,
|
|
"column": 5,
|
|
"offset": 472
|
|
},
|
|
"end": {
|
|
"line": 11,
|
|
"column": 38,
|
|
"offset": 505
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": " to build your own sign in process.",
|
|
"position": {
|
|
"start": {
|
|
"line": 11,
|
|
"column": 38,
|
|
"offset": 505
|
|
},
|
|
"end": {
|
|
"line": 11,
|
|
"column": 73,
|
|
"offset": 540
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 7,
|
|
"column": 1,
|
|
"offset": 228
|
|
},
|
|
"end": {
|
|
"line": 11,
|
|
"column": 73,
|
|
"offset": 540
|
|
},
|
|
"indent": [
|
|
1,
|
|
1,
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 11,
|
|
"column": 73,
|
|
"offset": 540
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "return",
|
|
"description": null,
|
|
"lineNumber": 13,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "void"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 59,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 73,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 74,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 76,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/userSession.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "void"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "redirectToSignIn",
|
|
"kind": "function",
|
|
"memberof": "UserSession",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "UserSession",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "redirectToSignIn",
|
|
"kind": "function",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "UserSession#redirectToSignIn"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Redirects the user to the Blockstack browser to approve the sign in request\ngiven.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 7,
|
|
"offset": 82
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 7,
|
|
"offset": 82
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "The user is redirected to the authenticator URL specified in the ",
|
|
"position": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 1,
|
|
"offset": 84
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 66,
|
|
"offset": 149
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "AppConfig",
|
|
"position": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 66,
|
|
"offset": 149
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 77,
|
|
"offset": 160
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": "\nif the ",
|
|
"position": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 77,
|
|
"offset": 160
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 8,
|
|
"offset": 168
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "blockstack:",
|
|
"position": {
|
|
"start": {
|
|
"line": 5,
|
|
"column": 8,
|
|
"offset": 168
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 21,
|
|
"offset": 181
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": " protocol handler is not detected.\nPlease note that the protocol handler detection\ndoes not work on all browsers.",
|
|
"position": {
|
|
"start": {
|
|
"line": 5,
|
|
"column": 21,
|
|
"offset": 181
|
|
},
|
|
"end": {
|
|
"line": 7,
|
|
"column": 31,
|
|
"offset": 294
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 1,
|
|
"offset": 84
|
|
},
|
|
"end": {
|
|
"line": 7,
|
|
"column": 31,
|
|
"offset": 294
|
|
},
|
|
"indent": [
|
|
1,
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 7,
|
|
"column": 31,
|
|
"offset": 294
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "the authentication request generated by `makeAuthRequest`",
|
|
"lineNumber": 8,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "authRequest"
|
|
},
|
|
{
|
|
"title": "return",
|
|
"description": null,
|
|
"lineNumber": 9,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "void"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 78,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 88,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 89,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 91,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/userSession.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "authRequest",
|
|
"lineNumber": 8,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the authentication request generated by ",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 41,
|
|
"offset": 40
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "makeAuthRequest",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 41,
|
|
"offset": 40
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 58,
|
|
"offset": 57
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 58,
|
|
"offset": 57
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 58,
|
|
"offset": 57
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "void"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "redirectToSignInWithAuthRequest",
|
|
"kind": "function",
|
|
"memberof": "UserSession",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "UserSession",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "redirectToSignInWithAuthRequest",
|
|
"kind": "function",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "UserSession#redirectToSignInWithAuthRequest"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Generates a ECDSA keypair to\nuse as the ephemeral app transit private key\nand store in the session",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 25,
|
|
"offset": 98
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 25,
|
|
"offset": 98
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 25,
|
|
"offset": 98
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "return",
|
|
"description": "the hex encoded private key",
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 121,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 127,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 128,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 132,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/userSession.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the hex encoded private key",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 28,
|
|
"offset": 27
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 28,
|
|
"offset": 27
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 28,
|
|
"offset": 27
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "generateAndStoreTransitKey",
|
|
"kind": "function",
|
|
"memberof": "UserSession",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "UserSession",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "generateAndStoreTransitKey",
|
|
"kind": "function",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "UserSession#generateAndStoreTransitKey"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Retrieve the authentication token from the URL query",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 53,
|
|
"offset": 52
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 53,
|
|
"offset": 52
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 53,
|
|
"offset": 52
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "return",
|
|
"description": "the authentication token if it exists otherwise `null`",
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 134,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 137,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 138,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 141,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/userSession.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the authentication token if it exists otherwise ",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 49,
|
|
"offset": 48
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "null",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 49,
|
|
"offset": 48
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 55,
|
|
"offset": 54
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 55,
|
|
"offset": 54
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 55,
|
|
"offset": 54
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "getAuthResponseToken",
|
|
"kind": "function",
|
|
"memberof": "UserSession",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "UserSession",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "getAuthResponseToken",
|
|
"kind": "function",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "UserSession#getAuthResponseToken"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Check if there is a authentication request that hasn't been handled.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 69,
|
|
"offset": 68
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 69,
|
|
"offset": 68
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 69,
|
|
"offset": 68
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "return",
|
|
"description": "`true` if there is a pending sign in, otherwise `false`",
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Boolean"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 143,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 146,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 147,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 149,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/userSession.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "true",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 7,
|
|
"offset": 6
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": " if there is a pending sign in, otherwise ",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 7,
|
|
"offset": 6
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 49,
|
|
"offset": 48
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "false",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 49,
|
|
"offset": 48
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 56,
|
|
"offset": 55
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 56,
|
|
"offset": 55
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 56,
|
|
"offset": 55
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Boolean"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "isSignInPending",
|
|
"kind": "function",
|
|
"memberof": "UserSession",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "UserSession",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "isSignInPending",
|
|
"kind": "function",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "UserSession#isSignInPending"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Check if a user is currently signed in.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 40,
|
|
"offset": 39
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 40,
|
|
"offset": 39
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 40,
|
|
"offset": 39
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "return",
|
|
"description": "`true` if the user is signed in, `false` if not.",
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Boolean"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 151,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 154,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 155,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 157,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/userSession.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "true",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 7,
|
|
"offset": 6
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": " if the user is signed in, ",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 7,
|
|
"offset": 6
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 34,
|
|
"offset": 33
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "false",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 34,
|
|
"offset": 33
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 41,
|
|
"offset": 40
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": " if not.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 41,
|
|
"offset": 40
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 49,
|
|
"offset": 48
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 49,
|
|
"offset": 48
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 49,
|
|
"offset": 48
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Boolean"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "isUserSignedIn",
|
|
"kind": "function",
|
|
"memberof": "UserSession",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "UserSession",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "isUserSignedIn",
|
|
"kind": "function",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "UserSession#isUserSignedIn"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Try to process any pending sign in request by returning a ",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 59,
|
|
"offset": 58
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "Promise",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 59,
|
|
"offset": 58
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 68,
|
|
"offset": 67
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": " that resolves\nto the user data object if the sign in succeeds.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 68,
|
|
"offset": 67
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 49,
|
|
"offset": 130
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 49,
|
|
"offset": 130
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 49,
|
|
"offset": 130
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "the signed authentication response token",
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "authResponseToken"
|
|
},
|
|
{
|
|
"title": "return",
|
|
"description": "that resolves to the user data object if successful and rejects\nif handling the sign in request fails or there was no pending sign in request.",
|
|
"lineNumber": 5,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Promise"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 159,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 166,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 167,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 169,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/userSession.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "authResponseToken",
|
|
"lineNumber": 4,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the signed authentication response token",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 41,
|
|
"offset": 40
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 41,
|
|
"offset": 40
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 41,
|
|
"offset": 40
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"default": "this.getAuthResponseToken()"
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "that resolves to the user data object if successful and rejects\nif handling the sign in request fails or there was no pending sign in request.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 79,
|
|
"offset": 142
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 79,
|
|
"offset": 142
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 79,
|
|
"offset": 142
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Promise"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "handlePendingSignIn",
|
|
"kind": "function",
|
|
"memberof": "UserSession",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "UserSession",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "handlePendingSignIn",
|
|
"kind": "function",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "UserSession#handlePendingSignIn"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Retrieves the user data object. The user's profile is stored in the key ",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 73,
|
|
"offset": 72
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "profile",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 73,
|
|
"offset": 72
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 82,
|
|
"offset": 81
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": ".",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 82,
|
|
"offset": 81
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 83,
|
|
"offset": 82
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 83,
|
|
"offset": 82
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 83,
|
|
"offset": 82
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "return",
|
|
"description": "User data object.",
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 171,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 174,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 175,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 177,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/userSession.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "User data object.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 18,
|
|
"offset": 17
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 18,
|
|
"offset": 17
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 18,
|
|
"offset": 17
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "loadUserData",
|
|
"kind": "function",
|
|
"memberof": "UserSession",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "UserSession",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "loadUserData",
|
|
"kind": "function",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "UserSession#loadUserData"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Sign the user out",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 18,
|
|
"offset": 17
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 18,
|
|
"offset": 17
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 18,
|
|
"offset": 17
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "return",
|
|
"description": null,
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "void"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 180,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 183,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 184,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 186,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/userSession.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "void"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "signUserOut",
|
|
"kind": "function",
|
|
"memberof": "UserSession",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "UserSession",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "signUserOut",
|
|
"kind": "function",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "UserSession#signUserOut"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Encrypts the data provided with the app public key.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 52,
|
|
"offset": 51
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 52,
|
|
"offset": 51
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 52,
|
|
"offset": 51
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "data to encrypt",
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "UnionType",
|
|
"elements": [
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "Buffer"
|
|
}
|
|
]
|
|
},
|
|
"name": "content"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "options object",
|
|
"lineNumber": 3,
|
|
"type": {
|
|
"type": "OptionalType",
|
|
"expression": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
}
|
|
},
|
|
"name": "options",
|
|
"default": "null"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "the hex string of the ECDSA public\nkey to use for encryption. If not provided, will use user's appPrivateKey.",
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "options.publicKey"
|
|
},
|
|
{
|
|
"title": "return",
|
|
"description": "Stringified ciphertext object",
|
|
"lineNumber": 6,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 201,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 208,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 209,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 212,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/userSession.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "content",
|
|
"lineNumber": 2,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "data to encrypt",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 16,
|
|
"offset": 15
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 16,
|
|
"offset": 15
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 16,
|
|
"offset": 15
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "UnionType",
|
|
"elements": [
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "Buffer"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "options",
|
|
"lineNumber": 3,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "options object",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
},
|
|
"default": "null",
|
|
"properties": [
|
|
{
|
|
"title": "param",
|
|
"name": "options.publicKey",
|
|
"lineNumber": 4,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the hex string of the ECDSA public\nkey to use for encryption. If not provided, will use user's appPrivateKey.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 75,
|
|
"offset": 109
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 75,
|
|
"offset": 109
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 75,
|
|
"offset": 109
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Stringified ciphertext object",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 30,
|
|
"offset": 29
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 30,
|
|
"offset": 29
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 30,
|
|
"offset": 29
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "encryptContent",
|
|
"kind": "function",
|
|
"memberof": "UserSession",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "UserSession",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "encryptContent",
|
|
"kind": "function",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "UserSession#encryptContent"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Decrypts data encrypted with ",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 30,
|
|
"offset": 29
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "encryptContent",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 30,
|
|
"offset": 29
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 46,
|
|
"offset": 45
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": " with the\ntransit private key.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 46,
|
|
"offset": 45
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 21,
|
|
"offset": 75
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 21,
|
|
"offset": 75
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 21,
|
|
"offset": 75
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "encrypted content.",
|
|
"lineNumber": 3,
|
|
"type": {
|
|
"type": "UnionType",
|
|
"elements": [
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "Buffer"
|
|
}
|
|
]
|
|
},
|
|
"name": "content"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "options object",
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "OptionalType",
|
|
"expression": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
}
|
|
},
|
|
"name": "options",
|
|
"default": "null"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "the hex string of the ECDSA private\nkey to use for decryption. If not provided, will use user's appPrivateKey.",
|
|
"lineNumber": 5,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "options.privateKey"
|
|
},
|
|
{
|
|
"title": "return",
|
|
"description": "decrypted content.",
|
|
"lineNumber": 7,
|
|
"type": {
|
|
"type": "UnionType",
|
|
"elements": [
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "Buffer"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 214,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 222,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 223,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 225,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/userSession.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "content",
|
|
"lineNumber": 3,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "encrypted content.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 19,
|
|
"offset": 18
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 19,
|
|
"offset": 18
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 19,
|
|
"offset": 18
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "UnionType",
|
|
"elements": [
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "Buffer"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "options",
|
|
"lineNumber": 4,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "options object",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
},
|
|
"default": "null",
|
|
"properties": [
|
|
{
|
|
"title": "param",
|
|
"name": "options.privateKey",
|
|
"lineNumber": 5,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the hex string of the ECDSA private\nkey to use for decryption. If not provided, will use user's appPrivateKey.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 75,
|
|
"offset": 110
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 75,
|
|
"offset": 110
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 75,
|
|
"offset": 110
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "decrypted content.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 19,
|
|
"offset": 18
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 19,
|
|
"offset": 18
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 19,
|
|
"offset": 18
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "UnionType",
|
|
"elements": [
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "Buffer"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "decryptContent",
|
|
"kind": "function",
|
|
"memberof": "UserSession",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "UserSession",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "decryptContent",
|
|
"kind": "function",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "UserSession#decryptContent"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Stores the data provided in the app's data store to to the file specified.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 75,
|
|
"offset": 74
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 75,
|
|
"offset": 74
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 75,
|
|
"offset": 74
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "the path to store the data in",
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "path"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "the data to store in the file",
|
|
"lineNumber": 3,
|
|
"type": {
|
|
"type": "UnionType",
|
|
"elements": [
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "Buffer"
|
|
}
|
|
]
|
|
},
|
|
"name": "content"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "options object",
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "OptionalType",
|
|
"expression": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
}
|
|
},
|
|
"name": "options",
|
|
"default": "null"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "encrypt the data with the app private key\n or the provided public key",
|
|
"lineNumber": 5,
|
|
"type": {
|
|
"type": "OptionalType",
|
|
"expression": {
|
|
"type": "UnionType",
|
|
"elements": [
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "Boolean"
|
|
},
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"name": "options.encrypt",
|
|
"default": "true"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "sign the data using ECDSA on SHA256 hashes with\n the app private key",
|
|
"lineNumber": 7,
|
|
"type": {
|
|
"type": "OptionalType",
|
|
"expression": {
|
|
"type": "NameExpression",
|
|
"name": "Boolean"
|
|
}
|
|
},
|
|
"name": "options.sign",
|
|
"default": "false"
|
|
},
|
|
{
|
|
"title": "return",
|
|
"description": "that resolves if the operation succeed and rejects\nif it failed",
|
|
"lineNumber": 9,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Promise"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 227,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 238,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 239,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 244,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/userSession.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "path",
|
|
"lineNumber": 2,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the path to store the data in",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 30,
|
|
"offset": 29
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 30,
|
|
"offset": 29
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 30,
|
|
"offset": 29
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "content",
|
|
"lineNumber": 3,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the data to store in the file",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 30,
|
|
"offset": 29
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 30,
|
|
"offset": 29
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 30,
|
|
"offset": 29
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "UnionType",
|
|
"elements": [
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "Buffer"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "options",
|
|
"lineNumber": 4,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "options object",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
},
|
|
"default": "null",
|
|
"properties": [
|
|
{
|
|
"title": "param",
|
|
"name": "options.encrypt",
|
|
"lineNumber": 5,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "encrypt the data with the app private key\n or the provided public key",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 76,
|
|
"offset": 117
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 76,
|
|
"offset": 117
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 76,
|
|
"offset": 117
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "UnionType",
|
|
"elements": [
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "Boolean"
|
|
},
|
|
{
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
]
|
|
},
|
|
"default": "true"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "options.sign",
|
|
"lineNumber": 7,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "sign the data using ECDSA on SHA256 hashes with\n the app private key",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 60,
|
|
"offset": 107
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 60,
|
|
"offset": 107
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 60,
|
|
"offset": 107
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Boolean"
|
|
},
|
|
"default": "false"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "that resolves if the operation succeed and rejects\nif it failed",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 13,
|
|
"offset": 63
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 13,
|
|
"offset": 63
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 13,
|
|
"offset": 63
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Promise"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "putFile",
|
|
"kind": "function",
|
|
"memberof": "UserSession",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "UserSession",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "putFile",
|
|
"kind": "function",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "UserSession#putFile"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Retrieves the specified file from the app's data store.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 56,
|
|
"offset": 55
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 56,
|
|
"offset": 55
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 56,
|
|
"offset": 55
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "the path to the file to read",
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "path"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "options object",
|
|
"lineNumber": 3,
|
|
"type": {
|
|
"type": "OptionalType",
|
|
"expression": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
}
|
|
},
|
|
"name": "options",
|
|
"default": "null"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "try to decrypt the data with the app private key",
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "OptionalType",
|
|
"expression": {
|
|
"type": "NameExpression",
|
|
"name": "Boolean"
|
|
}
|
|
},
|
|
"name": "options.decrypt",
|
|
"default": "true"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "the Blockstack ID to lookup for multi-player storage",
|
|
"lineNumber": 5,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "options.username"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "Whether the content should be verified, only to be used\nwhen `putFile` was set to `sign = true`",
|
|
"lineNumber": 6,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Boolean"
|
|
},
|
|
"name": "options.verify"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "the app to lookup for multi-player storage -\ndefaults to current origin",
|
|
"lineNumber": 8,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "options.app"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "The URL\nto use for zonefile lookup. If falsey, this will use the\nblockstack.js's getNameInfo function instead.",
|
|
"lineNumber": 10,
|
|
"type": {
|
|
"type": "OptionalType",
|
|
"expression": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
},
|
|
"name": "options.zoneFileLookupURL",
|
|
"default": "null"
|
|
},
|
|
{
|
|
"title": "returns",
|
|
"description": "that resolves to the raw data in the file\nor rejects with an error",
|
|
"lineNumber": 13,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Promise"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 246,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 261,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 262,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 270,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/userSession.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "path",
|
|
"lineNumber": 2,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the path to the file to read",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 29,
|
|
"offset": 28
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 29,
|
|
"offset": 28
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 29,
|
|
"offset": 28
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "options",
|
|
"lineNumber": 3,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "options object",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
},
|
|
"default": "null",
|
|
"properties": [
|
|
{
|
|
"title": "param",
|
|
"name": "options.decrypt",
|
|
"lineNumber": 4,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "try to decrypt the data with the app private key",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 49,
|
|
"offset": 48
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 49,
|
|
"offset": 48
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 49,
|
|
"offset": 48
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Boolean"
|
|
},
|
|
"default": "true"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "options.username",
|
|
"lineNumber": 5,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the Blockstack ID to lookup for multi-player storage",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 53,
|
|
"offset": 52
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 53,
|
|
"offset": 52
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 53,
|
|
"offset": 52
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "options.verify",
|
|
"lineNumber": 6,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Whether the content should be verified, only to be used\nwhen ",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 6,
|
|
"offset": 61
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "putFile",
|
|
"position": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 6,
|
|
"offset": 61
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 15,
|
|
"offset": 70
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": " was set to ",
|
|
"position": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 15,
|
|
"offset": 70
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 27,
|
|
"offset": 82
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "sign = true",
|
|
"position": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 27,
|
|
"offset": 82
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 40,
|
|
"offset": 95
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 40,
|
|
"offset": 95
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 40,
|
|
"offset": 95
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Boolean"
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "options.app",
|
|
"lineNumber": 8,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the app to lookup for multi-player storage -\ndefaults to current origin",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 27,
|
|
"offset": 71
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 27,
|
|
"offset": 71
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 27,
|
|
"offset": 71
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "options.zoneFileLookupURL",
|
|
"lineNumber": 10,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "The URL\nto use for zonefile lookup. If falsey, this will use the\nblockstack.js's getNameInfo function instead.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 46,
|
|
"offset": 110
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 46,
|
|
"offset": 110
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 46,
|
|
"offset": 110
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"default": "null"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "that resolves to the raw data in the file\nor rejects with an error",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 25,
|
|
"offset": 66
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 25,
|
|
"offset": 66
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 25,
|
|
"offset": 66
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Promise"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "getFile",
|
|
"kind": "function",
|
|
"memberof": "UserSession",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "UserSession",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "getFile",
|
|
"kind": "function",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "UserSession#getFile"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "List the set of files in this application's Gaia storage bucket.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 65,
|
|
"offset": 64
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 65,
|
|
"offset": 64
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 65,
|
|
"offset": 64
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "a callback to invoke on each named file that\nreturns `true` to continue the listing operation or `false` to end it",
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "function"
|
|
},
|
|
"name": "callback"
|
|
},
|
|
{
|
|
"title": "return",
|
|
"description": "that resolves to the number of files listed",
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Promise"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 272,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 277,
|
|
"column": 5
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 278,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 280,
|
|
"column": 3
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/auth/userSession.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "callback",
|
|
"lineNumber": 2,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "a callback to invoke on each named file that\nreturns ",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 9,
|
|
"offset": 53
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "true",
|
|
"position": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 9,
|
|
"offset": 53
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 15,
|
|
"offset": 59
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": " to continue the listing operation or ",
|
|
"position": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 15,
|
|
"offset": 59
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 53,
|
|
"offset": 97
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "false",
|
|
"position": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 53,
|
|
"offset": 97
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 60,
|
|
"offset": 104
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": " to end it",
|
|
"position": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 60,
|
|
"offset": 104
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 70,
|
|
"offset": 114
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 70,
|
|
"offset": 114
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 70,
|
|
"offset": 114
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "function"
|
|
}
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "that resolves to the number of files listed",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 44,
|
|
"offset": 43
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 44,
|
|
"offset": 43
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 44,
|
|
"offset": 43
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Promise"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "listFiles",
|
|
"kind": "function",
|
|
"memberof": "UserSession",
|
|
"scope": "instance",
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"path": [
|
|
{
|
|
"name": "UserSession",
|
|
"kind": "class"
|
|
},
|
|
{
|
|
"name": "listFiles",
|
|
"kind": "function",
|
|
"scope": "instance"
|
|
}
|
|
],
|
|
"namespace": "UserSession#listFiles"
|
|
}
|
|
],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"namespace": "UserSession"
|
|
},
|
|
{
|
|
"name": "Profiles",
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Identity you own and control.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 30,
|
|
"offset": 29
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 30,
|
|
"offset": 29
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "link",
|
|
"title": null,
|
|
"url": "https://github.com/blockstack/blockstack.js/blob/master/src/profiles/README.md",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Read more about profiles",
|
|
"position": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 2,
|
|
"offset": 32
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 26,
|
|
"offset": 56
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 1,
|
|
"offset": 31
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 107,
|
|
"offset": 137
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 1,
|
|
"offset": 31
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 107,
|
|
"offset": 137
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 1,
|
|
"offset": 138
|
|
}
|
|
}
|
|
},
|
|
"kind": "note",
|
|
"path": [
|
|
{
|
|
"name": "Profiles",
|
|
"kind": "note"
|
|
}
|
|
],
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"namespace": "Profiles"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Extracts a profile from an encoded token and optionally verifies it,\nif ",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 4,
|
|
"offset": 72
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "publicKeyOrAddress",
|
|
"position": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 4,
|
|
"offset": 72
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 24,
|
|
"offset": 92
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": " is provided.",
|
|
"position": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 24,
|
|
"offset": 92
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 37,
|
|
"offset": 105
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 37,
|
|
"offset": 105
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 37,
|
|
"offset": 105
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "the token to be extracted",
|
|
"lineNumber": 3,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "token"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "the public key or address of the\n keypair that is thought to have signed the token",
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "publicKeyOrAddress"
|
|
},
|
|
{
|
|
"title": "returns",
|
|
"description": "the profile extracted from the encoded token",
|
|
"lineNumber": 6,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
}
|
|
},
|
|
{
|
|
"title": "throws",
|
|
"description": "if the token isn't signed by the provided `publicKeyOrAddress`",
|
|
"lineNumber": 7,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Error"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 132,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 140,
|
|
"column": 4
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 141,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 158,
|
|
"column": 1
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/profiles/profileTokens.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "token",
|
|
"lineNumber": 3,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the token to be extracted",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 26,
|
|
"offset": 25
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 26,
|
|
"offset": 25
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 26,
|
|
"offset": 25
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "publicKeyOrAddress",
|
|
"lineNumber": 4,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the public key or address of the\n keypair that is thought to have signed the token",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 51,
|
|
"offset": 83
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 51,
|
|
"offset": 83
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 51,
|
|
"offset": 83
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"default": "null"
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the profile extracted from the encoded token",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 45,
|
|
"offset": 44
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 45,
|
|
"offset": 44
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 45,
|
|
"offset": 44
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "if the token isn't signed by the provided ",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 43,
|
|
"offset": 42
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "publicKeyOrAddress",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 43,
|
|
"offset": 42
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 63,
|
|
"offset": 62
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 63,
|
|
"offset": 62
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 63,
|
|
"offset": 62
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Error"
|
|
}
|
|
}
|
|
],
|
|
"todos": [],
|
|
"name": "extractProfile",
|
|
"kind": "function",
|
|
"path": [
|
|
{
|
|
"name": "extractProfile",
|
|
"kind": "function"
|
|
}
|
|
],
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"namespace": "extractProfile"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Wraps a token for a profile token file",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 39,
|
|
"offset": 38
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 39,
|
|
"offset": 38
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 39,
|
|
"offset": 38
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "the token to be wrapped",
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "token"
|
|
},
|
|
{
|
|
"title": "returns",
|
|
"description": "including `token` and `decodedToken`",
|
|
"lineNumber": 3,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 54,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 58,
|
|
"column": 4
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 59,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 64,
|
|
"column": 1
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/profiles/profileTokens.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "token",
|
|
"lineNumber": 2,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the token to be wrapped",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 24,
|
|
"offset": 23
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 24,
|
|
"offset": 23
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 24,
|
|
"offset": 23
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "including ",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 11,
|
|
"offset": 10
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "token",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 11,
|
|
"offset": 10
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 18,
|
|
"offset": 17
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "text",
|
|
"value": " and ",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 18,
|
|
"offset": 17
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 23,
|
|
"offset": 22
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "inlineCode",
|
|
"value": "decodedToken",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 23,
|
|
"offset": 22
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 37,
|
|
"offset": 36
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 37,
|
|
"offset": 36
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 37,
|
|
"offset": 36
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "wrapProfileToken",
|
|
"kind": "function",
|
|
"path": [
|
|
{
|
|
"name": "wrapProfileToken",
|
|
"kind": "function"
|
|
}
|
|
],
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"namespace": "wrapProfileToken"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Signs a profile token",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 22,
|
|
"offset": 21
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 22,
|
|
"offset": 21
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 22,
|
|
"offset": 21
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "the JSON of the profile to be signed",
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
},
|
|
"name": "profile"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "the signing private key",
|
|
"lineNumber": 3,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "privateKey"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "the entity that the information is about",
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
},
|
|
"name": "subject"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "the entity that is issuing the token",
|
|
"lineNumber": 5,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
},
|
|
"name": "issuer"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "the signing algorithm to use",
|
|
"lineNumber": 6,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "signingAlgorithm"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "the time of issuance of the token",
|
|
"lineNumber": 7,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Date"
|
|
},
|
|
"name": "issuedAt"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "the time of expiration of the token",
|
|
"lineNumber": 8,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Date"
|
|
},
|
|
"name": "expiresAt"
|
|
},
|
|
{
|
|
"title": "returns",
|
|
"description": "the signed profile token",
|
|
"lineNumber": 9,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 8,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 18,
|
|
"column": 4
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 19,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 52,
|
|
"column": 1
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/profiles/profileTokens.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "profile",
|
|
"lineNumber": 2,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the JSON of the profile to be signed",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 37,
|
|
"offset": 36
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 37,
|
|
"offset": 36
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 37,
|
|
"offset": 36
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "privateKey",
|
|
"lineNumber": 3,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the signing private key",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 24,
|
|
"offset": 23
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 24,
|
|
"offset": 23
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 24,
|
|
"offset": 23
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "subject",
|
|
"lineNumber": 4,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the entity that the information is about",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 41,
|
|
"offset": 40
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 41,
|
|
"offset": 40
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 41,
|
|
"offset": 40
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
},
|
|
"default": "null"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "issuer",
|
|
"lineNumber": 5,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the entity that is issuing the token",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 37,
|
|
"offset": 36
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 37,
|
|
"offset": 36
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 37,
|
|
"offset": 36
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
},
|
|
"default": "null"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "signingAlgorithm",
|
|
"lineNumber": 6,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the signing algorithm to use",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 29,
|
|
"offset": 28
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 29,
|
|
"offset": 28
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 29,
|
|
"offset": 28
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"default": "'ES256K'"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "issuedAt",
|
|
"lineNumber": 7,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the time of issuance of the token",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 34,
|
|
"offset": 33
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 34,
|
|
"offset": 33
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 34,
|
|
"offset": 33
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Date"
|
|
},
|
|
"default": "new Date()"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "expiresAt",
|
|
"lineNumber": 8,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the time of expiration of the token",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 36,
|
|
"offset": 35
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 36,
|
|
"offset": 35
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 36,
|
|
"offset": 35
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Date"
|
|
},
|
|
"default": "nextYear()"
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the signed profile token",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 25,
|
|
"offset": 24
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 25,
|
|
"offset": 24
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 25,
|
|
"offset": 24
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "signProfileToken",
|
|
"kind": "function",
|
|
"path": [
|
|
{
|
|
"name": "signProfileToken",
|
|
"kind": "function"
|
|
}
|
|
],
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"namespace": "signProfileToken"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Verifies a profile token",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 25,
|
|
"offset": 24
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 25,
|
|
"offset": 24
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 25,
|
|
"offset": 24
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "the token to be verified",
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "token"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "the public key or address of the\n keypair that is thought to have signed the token",
|
|
"lineNumber": 3,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "publicKeyOrAddress"
|
|
},
|
|
{
|
|
"title": "returns",
|
|
"description": "the verified, decoded profile token",
|
|
"lineNumber": 5,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
}
|
|
},
|
|
{
|
|
"title": "throws",
|
|
"description": "throws an error if token verification fails",
|
|
"lineNumber": 6,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Error"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 66,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 73,
|
|
"column": 4
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 74,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 130,
|
|
"column": 1
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/profiles/profileTokens.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "token",
|
|
"lineNumber": 2,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the token to be verified",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 25,
|
|
"offset": 24
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 25,
|
|
"offset": 24
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 25,
|
|
"offset": 24
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "publicKeyOrAddress",
|
|
"lineNumber": 3,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the public key or address of the\n keypair that is thought to have signed the token",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 51,
|
|
"offset": 83
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 51,
|
|
"offset": 83
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 51,
|
|
"offset": 83
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the verified, decoded profile token",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 36,
|
|
"offset": 35
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 36,
|
|
"offset": 35
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 36,
|
|
"offset": 35
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "throws an error if token verification fails",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 44,
|
|
"offset": 43
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 44,
|
|
"offset": 43
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 44,
|
|
"offset": 43
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Error"
|
|
}
|
|
}
|
|
],
|
|
"todos": [],
|
|
"name": "verifyProfileToken",
|
|
"kind": "function",
|
|
"path": [
|
|
{
|
|
"name": "verifyProfileToken",
|
|
"kind": "function"
|
|
}
|
|
],
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"namespace": "verifyProfileToken"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Validates the social proofs in a user's profile. Currently supports validation of \nFacebook, Twitter, GitHub, Instagram, LinkedIn and HackerNews accounts.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 72,
|
|
"offset": 154
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 72,
|
|
"offset": 154
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 72,
|
|
"offset": 154
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "The JSON of the profile to be validated",
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
},
|
|
"name": "profile"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "The owner bitcoin address to be validated",
|
|
"lineNumber": 5,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"name": "ownerAddress"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "The Blockstack name to be validated",
|
|
"lineNumber": 6,
|
|
"type": {
|
|
"type": "OptionalType",
|
|
"expression": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
},
|
|
"name": "name",
|
|
"default": "null"
|
|
},
|
|
{
|
|
"title": "returns",
|
|
"description": "that resolves to an array of validated proof objects",
|
|
"lineNumber": 7,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Promise"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 12,
|
|
"column": 3
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 13,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 56,
|
|
"column": 1
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/profiles/profileProofs.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "profile",
|
|
"lineNumber": 4,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "The JSON of the profile to be validated",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 40,
|
|
"offset": 39
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 40,
|
|
"offset": 39
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 40,
|
|
"offset": 39
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Object"
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "ownerAddress",
|
|
"lineNumber": 5,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "The owner bitcoin address to be validated",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 42,
|
|
"offset": 41
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 42,
|
|
"offset": 41
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 42,
|
|
"offset": 41
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "name",
|
|
"lineNumber": 6,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "The Blockstack name to be validated",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 36,
|
|
"offset": 35
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 36,
|
|
"offset": 35
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 36,
|
|
"offset": 35
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"default": "null"
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "that resolves to an array of validated proof objects",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 53,
|
|
"offset": 52
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 53,
|
|
"offset": 52
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 53,
|
|
"offset": 52
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Promise"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "validateProofs",
|
|
"kind": "function",
|
|
"path": [
|
|
{
|
|
"name": "validateProofs",
|
|
"kind": "function"
|
|
}
|
|
],
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"namespace": "validateProofs"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Look up a user profile by blockstack ID",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 40,
|
|
"offset": 39
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 40,
|
|
"offset": 39
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 40,
|
|
"offset": 39
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "The Blockstack ID of the profile to look up",
|
|
"lineNumber": 3,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"name": "username"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "The URL\nto use for zonefile lookup. If falsey, lookupProfile will use the\nblockstack.js getNameInfo function.",
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "OptionalType",
|
|
"expression": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
},
|
|
"name": "zoneFileLookupURL",
|
|
"default": "null"
|
|
},
|
|
{
|
|
"title": "returns",
|
|
"description": "that resolves to a profile object",
|
|
"lineNumber": 7,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Promise"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 5,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 13,
|
|
"column": 3
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 14,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 36,
|
|
"column": 1
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/profiles/profileLookup.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "username",
|
|
"lineNumber": 3,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "The Blockstack ID of the profile to look up",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 44,
|
|
"offset": 43
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 44,
|
|
"offset": 43
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 44,
|
|
"offset": 43
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "zoneFileLookupURL",
|
|
"lineNumber": 4,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "The URL\nto use for zonefile lookup. If falsey, lookupProfile will use the\nblockstack.js getNameInfo function.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 36,
|
|
"offset": 109
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 36,
|
|
"offset": 109
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 36,
|
|
"offset": 109
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "string"
|
|
},
|
|
"default": "null"
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "that resolves to a profile object",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 34,
|
|
"offset": 33
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 34,
|
|
"offset": 33
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 34,
|
|
"offset": 33
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Promise"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "lookupProfile",
|
|
"kind": "function",
|
|
"path": [
|
|
{
|
|
"name": "lookupProfile",
|
|
"kind": "function"
|
|
}
|
|
],
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"namespace": "lookupProfile"
|
|
},
|
|
{
|
|
"name": "Storage",
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Store your app's data without servers in storage your user controls.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 69,
|
|
"offset": 68
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 69,
|
|
"offset": 68
|
|
},
|
|
"indent": []
|
|
}
|
|
},
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "emphasis",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Note: Blockstack Gaia Storage APIs and on-disk format will change in\nupcoming pre-releases breaking backward compatibility. File encryption is currently\nopt-in on a file by file basis.",
|
|
"position": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 2,
|
|
"offset": 71
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 32,
|
|
"offset": 255
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 1,
|
|
"offset": 70
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 33,
|
|
"offset": 256
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 1,
|
|
"offset": 70
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 33,
|
|
"offset": 256
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "emphasis",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Certain storage features such as and collections are not implemented in the current\nversion. These features will be rolled out in future updates.",
|
|
"position": {
|
|
"start": {
|
|
"line": 7,
|
|
"column": 2,
|
|
"offset": 259
|
|
},
|
|
"end": {
|
|
"line": 8,
|
|
"column": 62,
|
|
"offset": 404
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 7,
|
|
"column": 1,
|
|
"offset": 258
|
|
},
|
|
"end": {
|
|
"line": 8,
|
|
"column": 63,
|
|
"offset": 405
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 7,
|
|
"column": 1,
|
|
"offset": 258
|
|
},
|
|
"end": {
|
|
"line": 8,
|
|
"column": 63,
|
|
"offset": 405
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "link",
|
|
"title": null,
|
|
"url": "https://github.com/blockstack/blockstack.js/blob/master/src/storage/README.md",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Read more about storage",
|
|
"position": {
|
|
"start": {
|
|
"line": 10,
|
|
"column": 2,
|
|
"offset": 408
|
|
},
|
|
"end": {
|
|
"line": 10,
|
|
"column": 25,
|
|
"offset": 431
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 10,
|
|
"column": 1,
|
|
"offset": 407
|
|
},
|
|
"end": {
|
|
"line": 10,
|
|
"column": 105,
|
|
"offset": 511
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 10,
|
|
"column": 1,
|
|
"offset": 407
|
|
},
|
|
"end": {
|
|
"line": 10,
|
|
"column": 105,
|
|
"offset": 511
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 11,
|
|
"column": 1,
|
|
"offset": 512
|
|
}
|
|
}
|
|
},
|
|
"kind": "note",
|
|
"path": [
|
|
{
|
|
"name": "Storage",
|
|
"kind": "note"
|
|
}
|
|
],
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"namespace": "Storage"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Get the app storage bucket URL",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 31,
|
|
"offset": 30
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 31,
|
|
"offset": 30
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 31,
|
|
"offset": 30
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "the gaia hub URL",
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "gaiaHubUrl"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "the app private key used to generate the app address",
|
|
"lineNumber": 3,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "appPrivateKey"
|
|
},
|
|
{
|
|
"title": "returns",
|
|
"description": "That resolves to the URL of the app index file\nor rejects if it fails",
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Promise"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 462,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 468,
|
|
"column": 3
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 469,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 471,
|
|
"column": 1
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/storage/index.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "gaiaHubUrl",
|
|
"lineNumber": 2,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the gaia hub URL",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 17,
|
|
"offset": 16
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 17,
|
|
"offset": 16
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 17,
|
|
"offset": 16
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "appPrivateKey",
|
|
"lineNumber": 3,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the app private key used to generate the app address",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 53,
|
|
"offset": 52
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 53,
|
|
"offset": 52
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 53,
|
|
"offset": 52
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "That resolves to the URL of the app index file\nor rejects if it fails",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 23,
|
|
"offset": 69
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 23,
|
|
"offset": 69
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 23,
|
|
"offset": 69
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Promise"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "getAppBucketUrl",
|
|
"kind": "function",
|
|
"path": [
|
|
{
|
|
"name": "getAppBucketUrl",
|
|
"kind": "function"
|
|
}
|
|
],
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"namespace": "getAppBucketUrl"
|
|
},
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "Fetch the public read URL of a user file for the specified app.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 64,
|
|
"offset": 63
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 64,
|
|
"offset": 63
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 64,
|
|
"offset": 63
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
{
|
|
"title": "param",
|
|
"description": "the path to the file to read",
|
|
"lineNumber": 2,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "path"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "The Blockstack ID of the user to look up",
|
|
"lineNumber": 3,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "username"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "The app origin",
|
|
"lineNumber": 4,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"name": "appOrigin"
|
|
},
|
|
{
|
|
"title": "param",
|
|
"description": "The URL\nto use for zonefile lookup. If falsey, this will use the\nblockstack.js's getNameInfo function instead.",
|
|
"lineNumber": 5,
|
|
"type": {
|
|
"type": "OptionalType",
|
|
"expression": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
},
|
|
"name": "zoneFileLookupURL",
|
|
"default": "null"
|
|
},
|
|
{
|
|
"title": "return",
|
|
"description": "that resolves to the public read URL of the file\nor rejects with an error",
|
|
"lineNumber": 8,
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Promise"
|
|
}
|
|
}
|
|
],
|
|
"loc": {
|
|
"start": {
|
|
"line": 25,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 35,
|
|
"column": 3
|
|
}
|
|
},
|
|
"context": {
|
|
"loc": {
|
|
"start": {
|
|
"line": 36,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 58,
|
|
"column": 1
|
|
}
|
|
},
|
|
"file": "/Users/larry/git/blockstack.js/src/storage/index.js"
|
|
},
|
|
"augments": [],
|
|
"examples": [],
|
|
"params": [
|
|
{
|
|
"title": "param",
|
|
"name": "path",
|
|
"lineNumber": 2,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "the path to the file to read",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 29,
|
|
"offset": 28
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 29,
|
|
"offset": 28
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 29,
|
|
"offset": 28
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "username",
|
|
"lineNumber": 3,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "The Blockstack ID of the user to look up",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 41,
|
|
"offset": 40
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 41,
|
|
"offset": 40
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 41,
|
|
"offset": 40
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "appOrigin",
|
|
"lineNumber": 4,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "The app origin",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
},
|
|
"indent": []
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15,
|
|
"offset": 14
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
}
|
|
},
|
|
{
|
|
"title": "param",
|
|
"name": "zoneFileLookupURL",
|
|
"lineNumber": 5,
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "The URL\nto use for zonefile lookup. If falsey, this will use the\nblockstack.js's getNameInfo function instead.",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 46,
|
|
"offset": 110
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 46,
|
|
"offset": 110
|
|
},
|
|
"indent": [
|
|
1,
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 46,
|
|
"offset": 110
|
|
}
|
|
}
|
|
},
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "String"
|
|
},
|
|
"default": "null"
|
|
}
|
|
],
|
|
"properties": [],
|
|
"returns": [
|
|
{
|
|
"description": {
|
|
"type": "root",
|
|
"children": [
|
|
{
|
|
"type": "paragraph",
|
|
"children": [
|
|
{
|
|
"type": "text",
|
|
"value": "that resolves to the public read URL of the file\nor rejects with an error",
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 25,
|
|
"offset": 73
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 25,
|
|
"offset": 73
|
|
},
|
|
"indent": [
|
|
1
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"position": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1,
|
|
"offset": 0
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 25,
|
|
"offset": 73
|
|
}
|
|
}
|
|
},
|
|
"title": "returns",
|
|
"type": {
|
|
"type": "NameExpression",
|
|
"name": "Promise"
|
|
}
|
|
}
|
|
],
|
|
"sees": [],
|
|
"throws": [],
|
|
"todos": [],
|
|
"name": "getUserAppFileUrl",
|
|
"kind": "function",
|
|
"path": [
|
|
{
|
|
"name": "getUserAppFileUrl",
|
|
"kind": "function"
|
|
}
|
|
],
|
|
"members": {
|
|
"global": [],
|
|
"inner": [],
|
|
"instance": [],
|
|
"events": [],
|
|
"static": []
|
|
},
|
|
"namespace": "getUserAppFileUrl"
|
|
}
|
|
] |