[ { "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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "Authentication", "kind": "note" } ], "namespace": "Authentication" }, { "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": "param", "description": "The location to which the identity provider will redirect the user after\nthe user approves sign in.", "lineNumber": 13, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "String" } }, "name": "redirectURI", "default": "`${window.location.origin}/`" }, { "title": "param", "description": "Location of the manifest file.", "lineNumber": 16, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "String" } }, "name": "manifestURI", "default": "`${window.location.origin}/manifest.json`" }, { "title": "param", "description": "Defaults to requesting write access to\nthis app's data store.\nAn array of strings indicating which permissions this app is requesting.", "lineNumber": 18, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "Array" } }, "name": "scopes", "default": "DEFAULT_SCOPE" }, { "title": "return", "description": null, "lineNumber": 21, "type": { "type": "NameExpression", "name": "void" } } ], "loc": { "start": { "line": 87, "column": 0 }, "end": { "line": 109, "column": 3 } }, "context": { "loc": { "start": { "line": 110, "column": 0 }, "end": { "line": 116, "column": 1 } }, "file": "/home/aaron/devel/blockstack.js/src/auth/authApp.js" }, "augments": [], "examples": [], "params": [ { "title": "param", "name": "redirectURI", "lineNumber": 13, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "The location to which the identity provider will redirect the user after\nthe user approves sign in.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 27, "offset": 99 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 27, "offset": 99 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 27, "offset": 99 } } }, "type": { "type": "NameExpression", "name": "String" }, "default": "`${window.location.origin}/`" }, { "title": "param", "name": "manifestURI", "lineNumber": 16, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Location of the manifest file.", "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 } } }, "type": { "type": "NameExpression", "name": "String" }, "default": "`${window.location.origin}/manifest.json`" }, { "title": "param", "name": "scopes", "lineNumber": 18, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Defaults to requesting write access to\nthis app's data store.\nAn array of strings indicating which permissions this app is requesting.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 73, "offset": 134 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 73, "offset": 134 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 73, "offset": 134 } } }, "type": { "type": "NameExpression", "name": "Array" }, "default": "DEFAULT_SCOPE" } ], "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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "redirectToSignIn", "kind": "function" } ], "namespace": "redirectToSignIn" }, { "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": 127, "column": 0 }, "end": { "line": 130, "column": 3 } }, "context": { "loc": { "start": { "line": 131, "column": 0 }, "end": { "line": 133, "column": 1 } }, "file": "/home/aaron/devel/blockstack.js/src/auth/authApp.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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "isSignInPending", "kind": "function" } ], "namespace": "isSignInPending" }, { "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 endpoint against which to verify public\nkeys match claimed username", "lineNumber": 4, "type": { "type": "NameExpression", "name": "String" }, "name": "nameLookupURL" }, { "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": 7, "type": { "type": "NameExpression", "name": "Promise" } } ], "loc": { "start": { "line": 136, "column": 0 }, "end": { "line": 145, "column": 3 } }, "context": { "loc": { "start": { "line": 146, "column": 0 }, "end": { "line": 226, "column": 1 } }, "file": "/home/aaron/devel/blockstack.js/src/auth/authApp.js" }, "augments": [], "examples": [], "params": [ { "title": "param", "name": "nameLookupURL", "lineNumber": 4, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the endpoint against which to verify public\nkeys match claimed username", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 28, "offset": 71 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 28, "offset": 71 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 28, "offset": 71 } } }, "type": { "type": "NameExpression", "name": "String" }, "default": "'https://core.blockstack.org/v1/names/'" } ], "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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "handlePendingSignIn", "kind": "function" } ], "namespace": "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": 228, "column": 0 }, "end": { "line": 231, "column": 3 } }, "context": { "loc": { "start": { "line": 232, "column": 0 }, "end": { "line": 234, "column": 1 } }, "file": "/home/aaron/devel/blockstack.js/src/auth/authApp.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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "loadUserData", "kind": "function" } ], "namespace": "loadUserData" }, { "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": 45, "column": 0 }, "end": { "line": 48, "column": 3 } }, "context": { "loc": { "start": { "line": 49, "column": 0 }, "end": { "line": 51, "column": 1 } }, "file": "/home/aaron/devel/blockstack.js/src/auth/authApp.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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "isUserSignedIn", "kind": "function" } ], "namespace": "isUserSignedIn" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Sign the user out and optionally redirect to given location.", "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": "param", "description": "Location to redirect user to after sign out.", "lineNumber": 2, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "String" } }, "name": "redirectURL", "default": "null" }, { "title": "return", "description": null, "lineNumber": 3, "type": { "type": "NameExpression", "name": "void" } } ], "loc": { "start": { "line": 236, "column": 0 }, "end": { "line": 240, "column": 3 } }, "context": { "loc": { "start": { "line": 241, "column": 0 }, "end": { "line": 248, "column": 1 } }, "file": "/home/aaron/devel/blockstack.js/src/auth/authApp.js" }, "augments": [], "examples": [], "params": [ { "title": "param", "name": "redirectURL", "lineNumber": 2, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Location to redirect user to after sign out.", "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 } } }, "type": { "type": "NameExpression", "name": "String" }, "default": "null" } ], "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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "signUserOut", "kind": "function" } ], "namespace": "signUserOut" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Generates an authentication request that can be sent to the Blockstack\nbrowser for the user to approve sign in. This authentication request can\nthen be used for sign in by passing it to the ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 47, "offset": 190 }, "indent": [ 1, 1 ] } }, { "type": "inlineCode", "value": "redirectToSignInWithAuthRequest", "position": { "start": { "line": 3, "column": 47, "offset": 190 }, "end": { "line": 3, "column": 80, "offset": 223 }, "indent": [] } }, { "type": "text", "value": "\nmethod.", "position": { "start": { "line": 3, "column": 80, "offset": 223 }, "end": { "line": 4, "column": 8, "offset": 231 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 4, "column": 8, "offset": 231 }, "indent": [ 1, 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "emphasis", "children": [ { "type": "text", "value": "Note: This method should only be used if you want to roll your own authentication\nflow. Typically you'd use ", "position": { "start": { "line": 6, "column": 2, "offset": 234 }, "end": { "line": 7, "column": 27, "offset": 342 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "redirectToSignIn", "position": { "start": { "line": 7, "column": 27, "offset": 342 }, "end": { "line": 7, "column": 45, "offset": 360 }, "indent": [] } }, { "type": "text", "value": " which takes care of this\nunder the hood.", "position": { "start": { "line": 7, "column": 45, "offset": 360 }, "end": { "line": 8, "column": 16, "offset": 401 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 6, "column": 1, "offset": 233 }, "end": { "line": 8, "column": 17, "offset": 402 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 6, "column": 1, "offset": 233 }, "end": { "line": 8, "column": 17, "offset": 402 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 8, "column": 17, "offset": 402 } } }, "tags": [ { "title": "param", "description": "hex encoded transit\n private key", "lineNumber": 10, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "String" } }, "name": "transitPrivateKey", "default": "generateAndStoreTransitKey()" }, { "title": "param", "description": "location to redirect user to after sign in approval", "lineNumber": 12, "type": { "type": "NameExpression", "name": "String" }, "name": "redirectURI" }, { "title": "param", "description": "location of this app's manifest file", "lineNumber": 13, "type": { "type": "NameExpression", "name": "String" }, "name": "manifestURI" }, { "title": "param", "description": "the permissions this app is requesting", "lineNumber": 14, "type": { "type": "TypeApplication", "expression": { "type": "NameExpression", "name": "Array" }, "applications": [ { "type": "NameExpression", "name": "String" } ] }, "name": "scopes" }, { "title": "param", "description": "the origin of this app", "lineNumber": 15, "type": { "type": "NameExpression", "name": "String" }, "name": "appDomain" }, { "title": "param", "description": "the time at which this request is no longer valid", "lineNumber": 16, "type": { "type": "NameExpression", "name": "Number" }, "name": "expiresAt" }, { "title": "return", "description": "the authentication request", "lineNumber": 17, "type": { "type": "NameExpression", "name": "String" } } ], "loc": { "start": { "line": 27, "column": 0 }, "end": { "line": 45, "column": 3 } }, "context": { "loc": { "start": { "line": 46, "column": 0 }, "end": { "line": 81, "column": 1 } }, "file": "/home/aaron/devel/blockstack.js/src/auth/authMessages.js" }, "augments": [], "examples": [], "params": [ { "title": "param", "name": "transitPrivateKey", "lineNumber": 10, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "hex encoded transit\n private key", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 14, "offset": 33 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 14, "offset": 33 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 14, "offset": 33 } } }, "type": { "type": "NameExpression", "name": "String" }, "default": "generateAndStoreTransitKey()" }, { "title": "param", "name": "redirectURI", "lineNumber": 12, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "location to redirect user to after sign in approval", "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 } } }, "type": { "type": "NameExpression", "name": "String" }, "default": "`${window.location.origin}/`" }, { "title": "param", "name": "manifestURI", "lineNumber": 13, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "location of this app's manifest file", "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": "String" }, "default": "`${window.location.origin}/manifest.json`" }, { "title": "param", "name": "scopes", "lineNumber": 14, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the permissions this app is requesting", "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 } } }, "type": { "type": "TypeApplication", "expression": { "type": "NameExpression", "name": "Array" }, "applications": [ { "type": "NameExpression", "name": "String" } ] }, "default": "DEFAULT_SCOPE" }, { "title": "param", "name": "appDomain", "lineNumber": 15, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the origin of this app", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 23, "offset": 22 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 23, "offset": 22 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 23, "offset": 22 } } }, "type": { "type": "NameExpression", "name": "String" }, "default": "window.location.origin" }, { "title": "param", "name": "expiresAt", "lineNumber": 16, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the time at which this request is no longer valid", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 50, "offset": 49 } } }, "type": { "type": "NameExpression", "name": "Number" }, "default": "nextHour().getTime()" } ], "properties": [], "returns": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the authentication request", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 27, "offset": 26 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 27, "offset": 26 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 27, "offset": 26 } } }, "title": "returns", "type": { "type": "NameExpression", "name": "String" } } ], "sees": [], "throws": [], "todos": [], "name": "makeAuthRequest", "kind": "function", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "makeAuthRequest", "kind": "function" } ], "namespace": "makeAuthRequest" }, { "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 ", "position": { "start": { "line": 4, "column": 1, "offset": 84 }, "end": { "line": 4, "column": 31, "offset": 114 }, "indent": [] } }, { "type": "inlineCode", "value": "blockstackIDHost", "position": { "start": { "line": 4, "column": 31, "offset": 114 }, "end": { "line": 4, "column": 49, "offset": 132 }, "indent": [] } }, { "type": "text", "value": " if the ", "position": { "start": { "line": 4, "column": 49, "offset": 132 }, "end": { "line": 4, "column": 57, "offset": 140 }, "indent": [] } }, { "type": "inlineCode", "value": "blockstack:", "position": { "start": { "line": 4, "column": 57, "offset": 140 }, "end": { "line": 4, "column": 70, "offset": 153 }, "indent": [] } }, { "type": "text", "value": "\nprotocol handler is not detected. Please note that the protocol handler detection\ndoes not work on all browsers.", "position": { "start": { "line": 4, "column": 70, "offset": 153 }, "end": { "line": 6, "column": 31, "offset": 266 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 84 }, "end": { "line": 6, "column": 31, "offset": 266 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 6, "column": 31, "offset": 266 } } }, "tags": [ { "title": "param", "description": "the authentication request generated by `makeAuthRequest`", "lineNumber": 7, "type": { "type": "NameExpression", "name": "String" }, "name": "authRequest" }, { "title": "param", "description": "the URL to redirect the user to if the blockstack\n protocol handler is not detected", "lineNumber": 8, "type": { "type": "NameExpression", "name": "String" }, "name": "blockstackIDHost" }, { "title": "return", "description": null, "lineNumber": 10, "type": { "type": "NameExpression", "name": "void" } } ], "loc": { "start": { "line": 53, "column": 0 }, "end": { "line": 64, "column": 3 } }, "context": { "loc": { "start": { "line": 65, "column": 0 }, "end": { "line": 85, "column": 1 } }, "file": "/home/aaron/devel/blockstack.js/src/auth/authApp.js" }, "augments": [], "examples": [], "params": [ { "title": "param", "name": "authRequest", "lineNumber": 7, "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" }, "default": "makeAuthRequest()" }, { "title": "param", "name": "blockstackIDHost", "lineNumber": 8, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the URL to redirect the user to if the blockstack\n protocol handler is not detected", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 69, "offset": 118 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 69, "offset": 118 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 69, "offset": 118 } } }, "type": { "type": "NameExpression", "name": "String" }, "default": "DEFAULT_BLOCKSTACK_HOST" } ], "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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "redirectToSignInWithAuthRequest", "kind": "function" } ], "namespace": "redirectToSignInWithAuthRequest" }, { "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": 118, "column": 0 }, "end": { "line": 121, "column": 3 } }, "context": { "loc": { "start": { "line": 122, "column": 0 }, "end": { "line": 125, "column": 1 } }, "file": "/home/aaron/devel/blockstack.js/src/auth/authApp.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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "getAuthResponseToken", "kind": "function" } ], "namespace": "getAuthResponseToken" }, { "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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "Profiles", "kind": "note" } ], "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": 134, "column": 0 }, "end": { "line": 142, "column": 4 } }, "context": { "loc": { "start": { "line": 143, "column": 0 }, "end": { "line": 160, "column": 1 } }, "file": "/home/aaron/devel/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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "extractProfile", "kind": "function" } ], "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": 55, "column": 0 }, "end": { "line": 59, "column": 4 } }, "context": { "loc": { "start": { "line": 60, "column": 0 }, "end": { "line": 65, "column": 1 } }, "file": "/home/aaron/devel/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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "wrapProfileToken", "kind": "function" } ], "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": 9, "column": 0 }, "end": { "line": 19, "column": 4 } }, "context": { "loc": { "start": { "line": 20, "column": 0 }, "end": { "line": 53, "column": 1 } }, "file": "/home/aaron/devel/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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "signProfileToken", "kind": "function" } ], "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": 67, "column": 0 }, "end": { "line": 74, "column": 4 } }, "context": { "loc": { "start": { "line": 75, "column": 0 }, "end": { "line": 132, "column": 1 } }, "file": "/home/aaron/devel/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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "verifyProfileToken", "kind": "function" } ], "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": 58, "column": 1 } }, "file": "/home/aaron/devel/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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "validateProofs", "kind": "function" } ], "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": "/home/aaron/devel/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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "lookupProfile", "kind": "function" } ], "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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "Storage", "kind": "note" } ], "namespace": "Storage" }, { "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": "the app to lookup for multi-player storage -\ndefaults to current origin", "lineNumber": 6, "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": 8, "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": 11, "type": { "type": "NameExpression", "name": "Promise" } } ], "loc": { "start": { "line": 47, "column": 0 }, "end": { "line": 60, "column": 3 } }, "context": { "loc": { "start": { "line": 61, "column": 0 }, "end": { "line": 115, "column": 1 } }, "file": "/home/aaron/devel/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": "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.app", "lineNumber": 6, "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": 8, "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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "getFile", "kind": "function" } ], "namespace": "getFile" }, { "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", "lineNumber": 5, "type": { "type": "OptionalType", "expression": { "type": "NameExpression", "name": "Boolean" } }, "name": "options.encrypt", "default": "true" }, { "title": "return", "description": "that resolves if the operation succeed and rejects\nif it failed", "lineNumber": 6, "type": { "type": "NameExpression", "name": "Promise" } } ], "loc": { "start": { "line": 117, "column": 0 }, "end": { "line": 125, "column": 3 } }, "context": { "loc": { "start": { "line": 126, "column": 0 }, "end": { "line": 146, "column": 1 } }, "file": "/home/aaron/devel/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 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", "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": "Boolean" }, "default": "true" } ] } ], "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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "putFile", "kind": "function" } ], "namespace": "putFile" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Deletes the specified file from the app's data store.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 54, "offset": 53 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 54, "offset": 53 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 54, "offset": 53 } } }, "tags": [ { "title": "param", "description": "the path to the file to delete", "lineNumber": 2, "type": { "type": "NameExpression", "name": "String" }, "name": "path" }, { "title": "returns", "description": "that resolves when the file has been removed\nor rejects with an error", "lineNumber": 3, "type": { "type": "NameExpression", "name": "Promise" } } ], "loc": { "start": { "line": 159, "column": 0 }, "end": { "line": 164, "column": 3 } }, "context": { "loc": { "start": { "line": 165, "column": 0 }, "end": { "line": 167, "column": 1 } }, "file": "/home/aaron/devel/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 delete", "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 } } }, "type": { "type": "NameExpression", "name": "String" } } ], "properties": [], "returns": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "that resolves when the file has been removed\nor rejects with an error", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 25, "offset": 69 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 25, "offset": 69 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 25, "offset": 69 } } }, "title": "returns", "type": { "type": "NameExpression", "name": "Promise" } } ], "sees": [], "throws": [], "todos": [], "name": "deleteFile", "kind": "function", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "deleteFile", "kind": "function" } ], "namespace": "deleteFile" }, { "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": 148, "column": 0 }, "end": { "line": 154, "column": 3 } }, "context": { "loc": { "start": { "line": 155, "column": 0 }, "end": { "line": 157, "column": 1 } }, "file": "/home/aaron/devel/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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "getAppBucketUrl", "kind": "function" } ], "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": 12, "column": 0 }, "end": { "line": 22, "column": 3 } }, "context": { "loc": { "start": { "line": 23, "column": 0 }, "end": { "line": 45, "column": 1 } }, "file": "/home/aaron/devel/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", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "getUserAppFileUrl", "kind": "function" } ], "namespace": "getUserAppFileUrl" }, { "name": "Blockchain", "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Generate and broadcast Blockstack blockchain transactions.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 59, "offset": 58 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 59, "offset": 58 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 1, "offset": 59 } } }, "kind": "note", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "Blockchain", "kind": "note" } ], "namespace": "Blockchain" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Decrypts the hex encrypted private key", "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 private key corresponding to the public\nkey for which the ciphertext was encrypted", "lineNumber": 2, "type": { "type": "NameExpression", "name": "String" }, "name": "privateKey" }, { "title": "param", "description": "the ciphertext", "lineNumber": 4, "type": { "type": "NameExpression", "name": "String" }, "name": "hexedEncrypted" }, { "title": "return", "description": "the decrypted private key", "lineNumber": 5, "type": { "type": "NameExpression", "name": "String" } }, { "title": "throws", "description": "if unable to decrypt", "lineNumber": 6, "type": { "type": "NameExpression", "name": "Error" } } ], "loc": { "start": { "line": 98, "column": 0 }, "end": { "line": 105, "column": 3 } }, "context": { "loc": { "start": { "line": 106, "column": 0 }, "end": { "line": 111, "column": 1 } }, "file": "/home/aaron/devel/blockstack.js/src/auth/authMessages.js" }, "augments": [], "examples": [], "params": [ { "title": "param", "name": "privateKey", "lineNumber": 2, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the private key corresponding to the public\nkey for which the ciphertext was encrypted", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 43, "offset": 86 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 43, "offset": 86 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 43, "offset": 86 } } }, "type": { "type": "NameExpression", "name": "String" } }, { "title": "param", "name": "hexedEncrypted", "lineNumber": 4, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the ciphertext", "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" } } ], "properties": [], "returns": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the decrypted private key", "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 } } }, "title": "returns", "type": { "type": "NameExpression", "name": "String" } } ], "sees": [], "throws": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "if unable to decrypt", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 21, "offset": 20 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 21, "offset": 20 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 21, "offset": 20 } } }, "type": { "type": "NameExpression", "name": "Error" } } ], "todos": [], "name": "decryptPrivateKey", "kind": "function", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "decryptPrivateKey", "kind": "function" } ], "namespace": "decryptPrivateKey" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Generates a signed authentication response token for an app. This\ntoken is sent back to apps which use contents to access the\nresources and data requested by the app.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 41, "offset": 166 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 41, "offset": 166 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 41, "offset": 166 } } }, "tags": [ { "title": "param", "description": "the identity key of the Blockstack ID generating\nthe authentication response", "lineNumber": 5, "type": { "type": "NameExpression", "name": "String" }, "name": "privateKey" }, { "title": "param", "description": "the profile object for the Blockstack ID", "lineNumber": 7, "type": { "type": "NameExpression", "name": "Object" }, "name": "profile" }, { "title": "param", "description": "the username of the Blockstack ID if any, otherwise `null`", "lineNumber": 8, "type": { "type": "NameExpression", "name": "String" }, "name": "username" }, { "title": "param", "description": "an object containing metadata sent as part of the authentication\nresponse including `email` if requested and available and a URL to the profile", "lineNumber": 9, "type": { "type": "NameExpression", "name": "AuthMetadata" }, "name": "metadata" }, { "title": "param", "description": "core session token when responding to a legacy auth request\nor `null` for current direct to gaia authentication requests", "lineNumber": 11, "type": { "type": "NameExpression", "name": "String" }, "name": "coreToken" }, { "title": "param", "description": "the application private key. This private key is\nunique and specific for every Blockstack ID and application combination.", "lineNumber": 13, "type": { "type": "NameExpression", "name": "String" }, "name": "appPrivateKey" }, { "title": "param", "description": "an integer in the same format as\n`new Date().getTime()`, milliseconds since the Unix epoch", "lineNumber": 15, "type": { "type": "NameExpression", "name": "Number" }, "name": "expiresAt" }, { "title": "param", "description": "the public key provide by the app\nin its authentication request with which secrets will be encrypted", "lineNumber": 17, "type": { "type": "NameExpression", "name": "String" }, "name": "transitPublicKey" }, { "title": "param", "description": "URL to the write path of the user's Gaia hub", "lineNumber": 19, "type": { "type": "NameExpression", "name": "String" }, "name": "hubUrl" }, { "title": "return", "description": "signed and encoded authentication response token", "lineNumber": 20, "type": { "type": "NameExpression", "name": "String" } } ], "loc": { "start": { "line": 113, "column": 0 }, "end": { "line": 134, "column": 3 } }, "context": { "loc": { "start": { "line": 135, "column": 0 }, "end": { "line": 186, "column": 1 } }, "file": "/home/aaron/devel/blockstack.js/src/auth/authMessages.js" }, "augments": [], "examples": [], "params": [ { "title": "param", "name": "privateKey", "lineNumber": 5, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the identity key of the Blockstack ID generating\nthe authentication response", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 28, "offset": 76 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 28, "offset": 76 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 28, "offset": 76 } } }, "type": { "type": "NameExpression", "name": "String" } }, { "title": "param", "name": "profile", "lineNumber": 7, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the profile object for the Blockstack ID", "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": "{}" }, { "title": "param", "name": "username", "lineNumber": 8, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the username of the Blockstack ID if any, otherwise ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 53, "offset": 52 }, "indent": [] } }, { "type": "inlineCode", "value": "null", "position": { "start": { "line": 1, "column": 53, "offset": 52 }, "end": { "line": 1, "column": 59, "offset": 58 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 59, "offset": 58 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 59, "offset": 58 } } }, "type": { "type": "NameExpression", "name": "String" }, "default": "null" }, { "title": "param", "name": "metadata", "lineNumber": 9, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "an object containing metadata sent as part of the authentication\nresponse including ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 20, "offset": 84 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "email", "position": { "start": { "line": 2, "column": 20, "offset": 84 }, "end": { "line": 2, "column": 27, "offset": 91 }, "indent": [] } }, { "type": "text", "value": " if requested and available and a URL to the profile", "position": { "start": { "line": 2, "column": 27, "offset": 91 }, "end": { "line": 2, "column": 79, "offset": 143 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 79, "offset": 143 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 79, "offset": 143 } } }, "type": { "type": "NameExpression", "name": "AuthMetadata" } }, { "title": "param", "name": "coreToken", "lineNumber": 11, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "core session token when responding to a legacy auth request\nor ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 4, "offset": 63 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "null", "position": { "start": { "line": 2, "column": 4, "offset": 63 }, "end": { "line": 2, "column": 10, "offset": 69 }, "indent": [] } }, { "type": "text", "value": " for current direct to gaia authentication requests", "position": { "start": { "line": 2, "column": 10, "offset": 69 }, "end": { "line": 2, "column": 61, "offset": 120 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 61, "offset": 120 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 61, "offset": 120 } } }, "type": { "type": "NameExpression", "name": "String" }, "default": "null" }, { "title": "param", "name": "appPrivateKey", "lineNumber": 13, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the application private key. This private key is\nunique and specific for every Blockstack ID and application combination.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 73, "offset": 121 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 73, "offset": 121 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 73, "offset": 121 } } }, "type": { "type": "NameExpression", "name": "String" }, "default": "null" }, { "title": "param", "name": "expiresAt", "lineNumber": 15, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "an integer in the same format as\n", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 1, "offset": 33 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "new Date().getTime()", "position": { "start": { "line": 2, "column": 1, "offset": 33 }, "end": { "line": 2, "column": 23, "offset": 55 }, "indent": [] } }, { "type": "text", "value": ", milliseconds since the Unix epoch", "position": { "start": { "line": 2, "column": 23, "offset": 55 }, "end": { "line": 2, "column": 58, "offset": 90 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 58, "offset": 90 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 58, "offset": 90 } } }, "type": { "type": "NameExpression", "name": "Number" }, "default": "nextMonth().getTime()" }, { "title": "param", "name": "transitPublicKey", "lineNumber": 17, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the public key provide by the app\nin its authentication request with which secrets will be encrypted", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 67, "offset": 100 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 67, "offset": 100 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 67, "offset": 100 } } }, "type": { "type": "NameExpression", "name": "String" }, "default": "null" }, { "title": "param", "name": "hubUrl", "lineNumber": 19, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "URL to the write path of the user's Gaia hub", "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 } } }, "type": { "type": "NameExpression", "name": "String" }, "default": "null" } ], "properties": [], "returns": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "signed and encoded authentication response token", "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 } } }, "title": "returns", "type": { "type": "NameExpression", "name": "String" } } ], "sees": [], "throws": [], "todos": [], "name": "makeAuthResponse", "kind": "function", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "makeAuthResponse", "kind": "function" } ], "namespace": "makeAuthResponse" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Checks if the expiration date of the ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 38, "offset": 37 }, "indent": [] } }, { "type": "inlineCode", "value": "token", "position": { "start": { "line": 1, "column": 38, "offset": 37 }, "end": { "line": 1, "column": 45, "offset": 44 }, "indent": [] } }, { "type": "text", "value": " is before the current time", "position": { "start": { "line": 1, "column": 45, "offset": 44 }, "end": { "line": 1, "column": 72, "offset": 71 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 72, "offset": 71 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 72, "offset": 71 } } }, "tags": [ { "title": "param", "description": "encoded and signed authentication token", "lineNumber": 2, "type": { "type": "NameExpression", "name": "String" }, "name": "token" }, { "title": "return", "description": "`true` if the `token` has not yet expired, `false`\nif the `token` has expired", "lineNumber": 3, "type": { "type": "NameExpression", "name": "Boolean" } } ], "loc": { "start": { "line": 151, "column": 0 }, "end": { "line": 156, "column": 3 } }, "context": { "loc": { "start": { "line": 157, "column": 0 }, "end": { "line": 172, "column": 1 } }, "file": "/home/aaron/devel/blockstack.js/src/auth/authVerification.js" }, "augments": [], "examples": [], "params": [ { "title": "param", "name": "token", "lineNumber": 2, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "encoded and signed authentication token", "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": "String" } } ], "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 ", "position": { "start": { "line": 1, "column": 7, "offset": 6 }, "end": { "line": 1, "column": 15, "offset": 14 }, "indent": [] } }, { "type": "inlineCode", "value": "token", "position": { "start": { "line": 1, "column": 15, "offset": 14 }, "end": { "line": 1, "column": 22, "offset": 21 }, "indent": [] } }, { "type": "text", "value": " has not yet expired, ", "position": { "start": { "line": 1, "column": 22, "offset": 21 }, "end": { "line": 1, "column": 44, "offset": 43 }, "indent": [] } }, { "type": "inlineCode", "value": "false", "position": { "start": { "line": 1, "column": 44, "offset": 43 }, "end": { "line": 1, "column": 51, "offset": 50 }, "indent": [] } }, { "type": "text", "value": "\nif the ", "position": { "start": { "line": 1, "column": 51, "offset": 50 }, "end": { "line": 2, "column": 8, "offset": 58 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "token", "position": { "start": { "line": 2, "column": 8, "offset": 58 }, "end": { "line": 2, "column": 15, "offset": 65 }, "indent": [] } }, { "type": "text", "value": " has expired", "position": { "start": { "line": 2, "column": 15, "offset": 65 }, "end": { "line": 2, "column": 27, "offset": 77 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 27, "offset": 77 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 27, "offset": 77 } } }, "title": "returns", "type": { "type": "NameExpression", "name": "Boolean" } } ], "sees": [], "throws": [], "todos": [], "name": "isExpirationDateValid", "kind": "function", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "isExpirationDateValid", "kind": "function" } ], "namespace": "isExpirationDateValid" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Makes sure the ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 16, "offset": 15 }, "indent": [] } }, { "type": "inlineCode", "value": "redirect_uri", "position": { "start": { "line": 1, "column": 16, "offset": 15 }, "end": { "line": 1, "column": 30, "offset": 29 }, "indent": [] } }, { "type": "text", "value": " is a same origin absolute URL.", "position": { "start": { "line": 1, "column": 30, "offset": 29 }, "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": "param", "description": "encoded and signed authentication token", "lineNumber": 2, "type": { "type": "NameExpression", "name": "String" }, "name": "token" }, { "title": "return", "description": "`true` if valid, otherwise `false`", "lineNumber": 3, "type": { "type": "NameExpression", "name": "Boolean" } } ], "loc": { "start": { "line": 185, "column": 0 }, "end": { "line": 189, "column": 3 } }, "context": { "loc": { "start": { "line": 190, "column": 0 }, "end": { "line": 193, "column": 1 } }, "file": "/home/aaron/devel/blockstack.js/src/auth/authVerification.js" }, "augments": [], "examples": [], "params": [ { "title": "param", "name": "token", "lineNumber": 2, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "encoded and signed authentication token", "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": "String" } } ], "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 valid, otherwise ", "position": { "start": { "line": 1, "column": 7, "offset": 6 }, "end": { "line": 1, "column": 28, "offset": 27 }, "indent": [] } }, { "type": "inlineCode", "value": "false", "position": { "start": { "line": 1, "column": 28, "offset": 27 }, "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 } } }, "title": "returns", "type": { "type": "NameExpression", "name": "Boolean" } } ], "sees": [], "throws": [], "todos": [], "name": "isRedirectUriValid", "kind": "function", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "isRedirectUriValid", "kind": "function" } ], "namespace": "isRedirectUriValid" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Broadcasts a signed bitcoin transaction to the network optionally waiting to broadcast the\ntransaction until a second transaction has a certain number of confirmations.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 78, "offset": 168 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 78, "offset": 168 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 78, "offset": 168 } } }, "tags": [ { "title": "param", "description": "the hex-encoded transaction to broadcast", "lineNumber": 4, "type": { "type": "NameExpression", "name": "string" }, "name": "transaction" }, { "title": "param", "description": "the hex transaction id of the transaction to watch for\nthe specified number of confirmations before broadcasting the `transaction`", "lineNumber": 5, "type": { "type": "NameExpression", "name": "string" }, "name": "transactionToWatch" }, { "title": "param", "description": "the number of confirmations `transactionToWatch` must have\nbefore broadcasting `transaction`.", "lineNumber": 7, "type": { "type": "NameExpression", "name": "number" }, "name": "confirmations" }, { "title": "return", "description": "Returns a Promise that resolves to an object with a\n`transaction_hash` key containing the transaction hash of the broadcasted transaction.\n\nIn the event of an error, it rejects with:\n* a `RemoteServiceError` if there is a problem\n with the transaction broadcast service\n* `MissingParameterError` if you call the function without a required\n parameter", "lineNumber": 9, "type": { "type": "TypeApplication", "expression": { "type": "NameExpression", "name": "Promise" }, "applications": [ { "type": "UnionType", "elements": [ { "type": "NameExpression", "name": "Object" }, { "type": "NameExpression", "name": "Error" } ] } ] } } ], "loc": { "start": { "line": 155, "column": 2 }, "end": { "line": 172, "column": 4 } }, "context": { "loc": { "start": { "line": 173, "column": 2 }, "end": { "line": 208, "column": 3 } }, "file": "/home/aaron/devel/blockstack.js/src/network.js" }, "augments": [], "examples": [], "params": [ { "title": "param", "name": "transaction", "lineNumber": 4, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the hex-encoded transaction to broadcast", "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": "transactionToWatch", "lineNumber": 5, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the hex transaction id of the transaction to watch for\nthe specified number of confirmations before broadcasting the ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 63, "offset": 117 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "transaction", "position": { "start": { "line": 2, "column": 63, "offset": 117 }, "end": { "line": 2, "column": 76, "offset": 130 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 76, "offset": 130 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 76, "offset": 130 } } }, "type": { "type": "NameExpression", "name": "string" }, "default": "null" }, { "title": "param", "name": "confirmations", "lineNumber": 7, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the number of confirmations ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 29, "offset": 28 }, "indent": [] } }, { "type": "inlineCode", "value": "transactionToWatch", "position": { "start": { "line": 1, "column": 29, "offset": 28 }, "end": { "line": 1, "column": 49, "offset": 48 }, "indent": [] } }, { "type": "text", "value": " must have\nbefore broadcasting ", "position": { "start": { "line": 1, "column": 49, "offset": 48 }, "end": { "line": 2, "column": 21, "offset": 79 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "transaction", "position": { "start": { "line": 2, "column": 21, "offset": 79 }, "end": { "line": 2, "column": 34, "offset": 92 }, "indent": [] } }, { "type": "text", "value": ".", "position": { "start": { "line": 2, "column": 34, "offset": 92 }, "end": { "line": 2, "column": 35, "offset": 93 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 35, "offset": 93 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 35, "offset": 93 } } }, "type": { "type": "NameExpression", "name": "number" }, "default": "6" } ], "properties": [], "returns": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Returns a Promise that resolves to an object with a\n", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 1, "offset": 52 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "transaction_hash", "position": { "start": { "line": 2, "column": 1, "offset": 52 }, "end": { "line": 2, "column": 19, "offset": 70 }, "indent": [] } }, { "type": "text", "value": " key containing the transaction hash of the broadcasted transaction.", "position": { "start": { "line": 2, "column": 19, "offset": 70 }, "end": { "line": 2, "column": 87, "offset": 138 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 87, "offset": 138 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "In the event of an error, it rejects with:", "position": { "start": { "line": 4, "column": 1, "offset": 140 }, "end": { "line": 4, "column": 43, "offset": 182 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 140 }, "end": { "line": 4, "column": 43, "offset": 182 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "a ", "position": { "start": { "line": 5, "column": 3, "offset": 185 }, "end": { "line": 5, "column": 5, "offset": 187 }, "indent": [] } }, { "type": "inlineCode", "value": "RemoteServiceError", "position": { "start": { "line": 5, "column": 5, "offset": 187 }, "end": { "line": 5, "column": 25, "offset": 207 }, "indent": [] } }, { "type": "text", "value": " if there is a problem\nwith the transaction broadcast service", "position": { "start": { "line": 5, "column": 25, "offset": 207 }, "end": { "line": 6, "column": 41, "offset": 270 }, "indent": [ 3 ] } } ], "position": { "start": { "line": 5, "column": 3, "offset": 185 }, "end": { "line": 6, "column": 41, "offset": 270 }, "indent": [ 3 ] } } ], "position": { "start": { "line": 5, "column": 1, "offset": 183 }, "end": { "line": 6, "column": 41, "offset": 270 }, "indent": [ 1 ] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "MissingParameterError", "position": { "start": { "line": 7, "column": 3, "offset": 273 }, "end": { "line": 7, "column": 26, "offset": 296 }, "indent": [] } }, { "type": "text", "value": " if you call the function without a required\nparameter", "position": { "start": { "line": 7, "column": 26, "offset": 296 }, "end": { "line": 8, "column": 12, "offset": 352 }, "indent": [ 3 ] } } ], "position": { "start": { "line": 7, "column": 3, "offset": 273 }, "end": { "line": 8, "column": 12, "offset": 352 }, "indent": [ 3 ] } } ], "position": { "start": { "line": 7, "column": 1, "offset": 271 }, "end": { "line": 8, "column": 12, "offset": 352 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 5, "column": 1, "offset": 183 }, "end": { "line": 8, "column": 12, "offset": 352 }, "indent": [ 1, 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 8, "column": 12, "offset": 352 } } }, "title": "returns", "type": { "type": "TypeApplication", "expression": { "type": "NameExpression", "name": "Promise" }, "applications": [ { "type": "UnionType", "elements": [ { "type": "NameExpression", "name": "Object" }, { "type": "NameExpression", "name": "Error" } ] } ] } } ], "sees": [], "throws": [], "todos": [], "name": "broadcastTransaction", "kind": "function", "memberof": "BlockstackNetwork", "scope": "instance", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "broadcastTransaction", "kind": "function", "scope": "instance" } ], "namespace": "#broadcastTransaction" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Broadcasts a zone file to the Atlas network via the transaction broadcast service.", "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 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 1, "column": 83, "offset": 82 } } }, "tags": [ { "title": "param", "description": "the zone file to be broadcast to the Atlas network", "lineNumber": 3, "type": { "type": "NameExpression", "name": "String" }, "name": "zoneFile" }, { "title": "param", "description": "the hex transaction id of the transaction\nto watch for confirmation before broadcasting the zone file to the Atlas network", "lineNumber": 4, "type": { "type": "NameExpression", "name": "String" }, "name": "transactionToWatch" }, { "title": "return", "description": "Returns a Promise that resolves to an object with a\n`transaction_hash` key containing the transaction hash of the broadcasted transaction.\n\nIn the event of an error, it rejects with:\n* a `RemoteServiceError` if there is a problem\n with the transaction broadcast service\n* `MissingParameterError` if you call the function without a required\n parameter", "lineNumber": 6, "type": { "type": "TypeApplication", "expression": { "type": "NameExpression", "name": "Promise" }, "applications": [ { "type": "UnionType", "elements": [ { "type": "NameExpression", "name": "Object" }, { "type": "NameExpression", "name": "Error" } ] } ] } } ], "loc": { "start": { "line": 210, "column": 2 }, "end": { "line": 224, "column": 5 } }, "context": { "loc": { "start": { "line": 225, "column": 2 }, "end": { "line": 277, "column": 3 } }, "file": "/home/aaron/devel/blockstack.js/src/network.js" }, "augments": [], "examples": [], "params": [ { "title": "param", "name": "zoneFile", "lineNumber": 3, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the zone file to be broadcast to the Atlas network", "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" } }, { "title": "param", "name": "transactionToWatch", "lineNumber": 4, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the hex transaction id of the transaction\nto watch for confirmation before broadcasting the zone file to the Atlas network", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 81, "offset": 122 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 81, "offset": 122 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 81, "offset": 122 } } }, "type": { "type": "NameExpression", "name": "String" }, "default": "null" } ], "properties": [], "returns": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Returns a Promise that resolves to an object with a\n", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 1, "offset": 52 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "transaction_hash", "position": { "start": { "line": 2, "column": 1, "offset": 52 }, "end": { "line": 2, "column": 19, "offset": 70 }, "indent": [] } }, { "type": "text", "value": " key containing the transaction hash of the broadcasted transaction.", "position": { "start": { "line": 2, "column": 19, "offset": 70 }, "end": { "line": 2, "column": 87, "offset": 138 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 87, "offset": 138 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "In the event of an error, it rejects with:", "position": { "start": { "line": 4, "column": 1, "offset": 140 }, "end": { "line": 4, "column": 43, "offset": 182 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 140 }, "end": { "line": 4, "column": 43, "offset": 182 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "a ", "position": { "start": { "line": 5, "column": 3, "offset": 185 }, "end": { "line": 5, "column": 5, "offset": 187 }, "indent": [] } }, { "type": "inlineCode", "value": "RemoteServiceError", "position": { "start": { "line": 5, "column": 5, "offset": 187 }, "end": { "line": 5, "column": 25, "offset": 207 }, "indent": [] } }, { "type": "text", "value": " if there is a problem\nwith the transaction broadcast service", "position": { "start": { "line": 5, "column": 25, "offset": 207 }, "end": { "line": 6, "column": 41, "offset": 270 }, "indent": [ 3 ] } } ], "position": { "start": { "line": 5, "column": 3, "offset": 185 }, "end": { "line": 6, "column": 41, "offset": 270 }, "indent": [ 3 ] } } ], "position": { "start": { "line": 5, "column": 1, "offset": 183 }, "end": { "line": 6, "column": 41, "offset": 270 }, "indent": [ 1 ] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "MissingParameterError", "position": { "start": { "line": 7, "column": 3, "offset": 273 }, "end": { "line": 7, "column": 26, "offset": 296 }, "indent": [] } }, { "type": "text", "value": " if you call the function without a required\nparameter", "position": { "start": { "line": 7, "column": 26, "offset": 296 }, "end": { "line": 8, "column": 12, "offset": 352 }, "indent": [ 3 ] } } ], "position": { "start": { "line": 7, "column": 3, "offset": 273 }, "end": { "line": 8, "column": 12, "offset": 352 }, "indent": [ 3 ] } } ], "position": { "start": { "line": 7, "column": 1, "offset": 271 }, "end": { "line": 8, "column": 12, "offset": 352 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 5, "column": 1, "offset": 183 }, "end": { "line": 8, "column": 12, "offset": 352 }, "indent": [ 1, 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 8, "column": 12, "offset": 352 } } }, "title": "returns", "type": { "type": "TypeApplication", "expression": { "type": "NameExpression", "name": "Promise" }, "applications": [ { "type": "UnionType", "elements": [ { "type": "NameExpression", "name": "Object" }, { "type": "NameExpression", "name": "Error" } ] } ] } } ], "sees": [], "throws": [], "todos": [], "name": "broadcastZoneFile", "kind": "function", "memberof": "BlockstackNetwork", "scope": "instance", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "broadcastZoneFile", "kind": "function", "scope": "instance" } ], "namespace": "#broadcastZoneFile" }, { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Sends the preorder and registration transactions and zone file\nfor a Blockstack name registration\nalong with the to the transaction broadcast service.", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 53, "offset": 150 }, "indent": [ 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 3, "column": 53, "offset": 150 }, "indent": [ 1, 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "The transaction broadcast:", "position": { "start": { "line": 5, "column": 1, "offset": 152 }, "end": { "line": 5, "column": 27, "offset": 178 }, "indent": [] } } ], "position": { "start": { "line": 5, "column": 1, "offset": 152 }, "end": { "line": 5, "column": 27, "offset": 178 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "immediately broadcasts the preorder transaction", "position": { "start": { "line": 7, "column": 3, "offset": 182 }, "end": { "line": 7, "column": 50, "offset": 229 }, "indent": [] } } ], "position": { "start": { "line": 7, "column": 3, "offset": 182 }, "end": { "line": 7, "column": 50, "offset": 229 }, "indent": [] } } ], "position": { "start": { "line": 7, "column": 1, "offset": 180 }, "end": { "line": 7, "column": 50, "offset": 229 }, "indent": [] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "broadcasts the register transactions after the preorder transaction\nhas an appropriate number of confirmations", "position": { "start": { "line": 8, "column": 3, "offset": 232 }, "end": { "line": 9, "column": 43, "offset": 342 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 8, "column": 3, "offset": 232 }, "end": { "line": 9, "column": 43, "offset": 342 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 8, "column": 1, "offset": 230 }, "end": { "line": 9, "column": 43, "offset": 342 }, "indent": [ 1 ] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "broadcasts the zone file to the Atlas network after the register transaction\nhas an appropriate number of confirmations", "position": { "start": { "line": 10, "column": 3, "offset": 345 }, "end": { "line": 11, "column": 43, "offset": 464 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 10, "column": 3, "offset": 345 }, "end": { "line": 11, "column": 43, "offset": 464 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 10, "column": 1, "offset": 343 }, "end": { "line": 11, "column": 43, "offset": 464 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 7, "column": 1, "offset": 180 }, "end": { "line": 11, "column": 43, "offset": 464 }, "indent": [ 1, 1, 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 11, "column": 43, "offset": 464 } } }, "tags": [ { "title": "param", "description": "the hex-encoded, signed preorder transaction generated\nusing the `makePreorder` function", "lineNumber": 13, "type": { "type": "NameExpression", "name": "String" }, "name": "preorderTransaction" }, { "title": "param", "description": "the hex-encoded, signed register transaction generated\nusing the `makeRegister` function", "lineNumber": 15, "type": { "type": "NameExpression", "name": "String" }, "name": "registerTransaction" }, { "title": "param", "description": "the zone file to be broadcast to the Atlas network", "lineNumber": 17, "type": { "type": "NameExpression", "name": "String" }, "name": "zoneFile" }, { "title": "return", "description": "Returns a Promise that resolves to an object with a\n`transaction_hash` key containing the transaction hash of the broadcasted transaction.\n\nIn the event of an error, it rejects with:\n* a `RemoteServiceError` if there is a problem\n with the transaction broadcast service\n* `MissingParameterError` if you call the function without a required\n parameter", "lineNumber": 18, "type": { "type": "TypeApplication", "expression": { "type": "NameExpression", "name": "Promise" }, "applications": [ { "type": "UnionType", "elements": [ { "type": "NameExpression", "name": "Object" }, { "type": "NameExpression", "name": "Error" } ] } ] } } ], "loc": { "start": { "line": 279, "column": 2 }, "end": { "line": 305, "column": 5 } }, "context": { "loc": { "start": { "line": 306, "column": 2 }, "end": { "line": 343, "column": 3 } }, "file": "/home/aaron/devel/blockstack.js/src/network.js" }, "augments": [], "examples": [], "params": [ { "title": "param", "name": "preorderTransaction", "lineNumber": 13, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the hex-encoded, signed preorder transaction generated\nusing the ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 11, "offset": 65 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "makePreorder", "position": { "start": { "line": 2, "column": 11, "offset": 65 }, "end": { "line": 2, "column": 25, "offset": 79 }, "indent": [] } }, { "type": "text", "value": " function", "position": { "start": { "line": 2, "column": 25, "offset": 79 }, "end": { "line": 2, "column": 34, "offset": 88 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 34, "offset": 88 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 34, "offset": 88 } } }, "type": { "type": "NameExpression", "name": "String" } }, { "title": "param", "name": "registerTransaction", "lineNumber": 15, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the hex-encoded, signed register transaction generated\nusing the ", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 11, "offset": 65 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "makeRegister", "position": { "start": { "line": 2, "column": 11, "offset": 65 }, "end": { "line": 2, "column": 25, "offset": 79 }, "indent": [] } }, { "type": "text", "value": " function", "position": { "start": { "line": 2, "column": 25, "offset": 79 }, "end": { "line": 2, "column": 34, "offset": 88 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 34, "offset": 88 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 34, "offset": 88 } } }, "type": { "type": "NameExpression", "name": "String" } }, { "title": "param", "name": "zoneFile", "lineNumber": 17, "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "the zone file to be broadcast to the Atlas network", "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" } } ], "properties": [], "returns": [ { "description": { "type": "root", "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "Returns a Promise that resolves to an object with a\n", "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 1, "offset": 52 }, "indent": [ 1 ] } }, { "type": "inlineCode", "value": "transaction_hash", "position": { "start": { "line": 2, "column": 1, "offset": 52 }, "end": { "line": 2, "column": 19, "offset": 70 }, "indent": [] } }, { "type": "text", "value": " key containing the transaction hash of the broadcasted transaction.", "position": { "start": { "line": 2, "column": 19, "offset": 70 }, "end": { "line": 2, "column": 87, "offset": 138 }, "indent": [] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 2, "column": 87, "offset": 138 }, "indent": [ 1 ] } }, { "type": "paragraph", "children": [ { "type": "text", "value": "In the event of an error, it rejects with:", "position": { "start": { "line": 4, "column": 1, "offset": 140 }, "end": { "line": 4, "column": 43, "offset": 182 }, "indent": [] } } ], "position": { "start": { "line": 4, "column": 1, "offset": 140 }, "end": { "line": 4, "column": 43, "offset": 182 }, "indent": [] } }, { "type": "list", "ordered": false, "start": null, "loose": false, "children": [ { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "text", "value": "a ", "position": { "start": { "line": 5, "column": 3, "offset": 185 }, "end": { "line": 5, "column": 5, "offset": 187 }, "indent": [] } }, { "type": "inlineCode", "value": "RemoteServiceError", "position": { "start": { "line": 5, "column": 5, "offset": 187 }, "end": { "line": 5, "column": 25, "offset": 207 }, "indent": [] } }, { "type": "text", "value": " if there is a problem\nwith the transaction broadcast service", "position": { "start": { "line": 5, "column": 25, "offset": 207 }, "end": { "line": 6, "column": 41, "offset": 270 }, "indent": [ 3 ] } } ], "position": { "start": { "line": 5, "column": 3, "offset": 185 }, "end": { "line": 6, "column": 41, "offset": 270 }, "indent": [ 3 ] } } ], "position": { "start": { "line": 5, "column": 1, "offset": 183 }, "end": { "line": 6, "column": 41, "offset": 270 }, "indent": [ 1 ] } }, { "type": "listItem", "loose": false, "checked": null, "children": [ { "type": "paragraph", "children": [ { "type": "inlineCode", "value": "MissingParameterError", "position": { "start": { "line": 7, "column": 3, "offset": 273 }, "end": { "line": 7, "column": 26, "offset": 296 }, "indent": [] } }, { "type": "text", "value": " if you call the function without a required\nparameter", "position": { "start": { "line": 7, "column": 26, "offset": 296 }, "end": { "line": 8, "column": 12, "offset": 352 }, "indent": [ 3 ] } } ], "position": { "start": { "line": 7, "column": 3, "offset": 273 }, "end": { "line": 8, "column": 12, "offset": 352 }, "indent": [ 3 ] } } ], "position": { "start": { "line": 7, "column": 1, "offset": 271 }, "end": { "line": 8, "column": 12, "offset": 352 }, "indent": [ 1 ] } } ], "position": { "start": { "line": 5, "column": 1, "offset": 183 }, "end": { "line": 8, "column": 12, "offset": 352 }, "indent": [ 1, 1, 1 ] } } ], "position": { "start": { "line": 1, "column": 1, "offset": 0 }, "end": { "line": 8, "column": 12, "offset": 352 } } }, "title": "returns", "type": { "type": "TypeApplication", "expression": { "type": "NameExpression", "name": "Promise" }, "applications": [ { "type": "UnionType", "elements": [ { "type": "NameExpression", "name": "Object" }, { "type": "NameExpression", "name": "Error" } ] } ] } } ], "sees": [], "throws": [], "todos": [], "name": "broadcastNameRegistration", "kind": "function", "memberof": "BlockstackNetwork", "scope": "instance", "members": { "global": [], "inner": [], "instance": [], "events": [], "static": [] }, "path": [ { "name": "broadcastNameRegistration", "kind": "function", "scope": "instance" } ], "namespace": "#broadcastNameRegistration" } ]