From 7293e92f7c5554cb979354c10cd320d898abadb8 Mon Sep 17 00:00:00 2001 From: Ken Date: Tue, 3 Nov 2020 15:30:15 -0500 Subject: [PATCH] feat: remove profiles page --- src/common/navigation.yaml | 1 - src/pages/authentication/profiles.md | 78 ---------------------------- 2 files changed, 79 deletions(-) delete mode 100644 src/pages/authentication/profiles.md diff --git a/src/common/navigation.yaml b/src/common/navigation.yaml index d433f8ef..731a6de5 100644 --- a/src/common/navigation.yaml +++ b/src/common/navigation.yaml @@ -20,7 +20,6 @@ sections: - path: /authentication pages: - path: /overview - - path: /profiles sections: - title: Tutorials usePageTitles: true diff --git a/src/pages/authentication/profiles.md b/src/pages/authentication/profiles.md deleted file mode 100644 index f06aab2a..00000000 --- a/src/pages/authentication/profiles.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: Guide to Profiles -description: Learn about profiles on the Blockstack network ---- - -## About profiles - -Profile data is stored using Gaia on the user's selected storage provider. An example of a `profile.json` file URL using -Blockstack provided storage: - -``` -https://gaia.blockstack.org/hub/1EeZtGNdFrVB2AgLFsZbyBCF7UTZcEWhHk/profile.json -``` - -Follow these steps to create and register a profile for a Blockstack username (`identifier`): - -1. Create a JSON profile object -2. Split up the profile into tokens, sign the tokens, and put them in a token file -3. Create a zone file that points to the web location of the profile token file - -```jsx -"account": [ - { - "@type": "Account", - "service": "twitter", - "identifier": "naval", - "proofType": "http", - "proofUrl": "https://twitter.com/naval/status/12345678901234567890" - } -] -``` - -## Create a profile - -```jsx -const profileOfNaval = { - '@context': 'http://schema.org/', - '@type': 'Person', - name: 'Naval Ravikant', - description: 'Co-founder of AngelList', -}; -``` - -## Sign a profile as a single token - -```jsx -import { makeECPrivateKey, wrapProfileToken, Person } from 'blockstack'; - -const privateKey = makeECPrivateKey(); - -const person = new Person(profileOfNaval); -const token = person.toToken(privateKey); -const tokenFile = [wrapProfileToken(token)]; -``` - -## Verify an individual token - -```jsx -import { verifyProfileToken } from 'blockstack'; - -try { - const decodedToken = verifyProfileToken(tokenFile[0].token, publicKey); -} catch (e) { - console.log(e); -} -``` - -## Recover a profile from a token file - -```jsx -const recoveredProfile = Person.fromToken(tokenFile, publicKey); -``` - -## Validate profile schema - -```jsx -const validationResults = Person.validateSchema(recoveredProfile); -```