How to use the blockstack.Person function in blockstack

To help you get started, we’ve selected a few blockstack examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jehunter5811 / graphite-blockstack / src / components / documents / SharedDocs.js View on Github external
renderView() {
    const userData = blockstack.loadUserData();
    const person = new blockstack.Person(userData.profile);
    const show = this.state.show;
    const hideButton = this.state.hideButton;
    let value = this.state.value;
    console.log(loadUserData().username);
    const loading = this.state.loading;
    let contacts = this.state.filteredContacts;
    let link = '/documents/shared/';
    let user = this.state.senderID;
    let fullLink = link + user;
    if(this.state.sharedWithMe == true) {
      return(
      <div>
        <div>
          <h3>Documents Shared With Me</h3>
          <h5>Select the contact who shared with you</h5>
        </div></div>
github blockstack / blockstack-browser / app / js / profiles / AllProfilesPage.js View on Github external
{this.state.localIdentities.map((identity, index) =&gt; {
                    const person = new Person(identity.profile)

                    if (identity.username) {
                      identity.canAddUsername = false
                    } else {
                      identity.canAddUsername = true
                    }
                    return (
                       {
                          event.preventDefault()
                          this.setDefaultIdentity(index)
github nerdic-coder / block-photos / src / pages / Profile.js View on Github external
componentDidMount() {

    if (!isUserSignedIn() || !loadUserData()) {
      const { history } = this.props;
      if (history) {
        history.replace('/');
      }
      return;
    }

    this.uploadService.addEventListeners(false);
    this.setState({ person: new Person(loadUserData().profile) });
  }
github jehunter5811 / graphite-blockstack / src / components / messages / SingleConversation.js View on Github external
'bold', 'italic', 'underline', 'strike', 'blockquote',
    'list', 'bullet', 'indent',
    'link', 'image', 'video'
  ]

  let combinedMessages = this.state.combinedMessages;
  function compare(a,b) {
    return a.id - b.id
  }
  let messages = combinedMessages.sort(compare);

  let myMessages = this.state.myMessages;
  let sharedMessages = this.state.sharedMessages;

  const userData = blockstack.loadUserData();
  const person = new blockstack.Person(userData.profile);
  let loading = this.state.loading;
  let show = this.state.show;

  return (
    <div>
    <div>
      <nav>
        <div>
          <a href="/contacts"><i>arrow_back</i></a>


            <ul>
              <li><a>Conversation with {this.state.conversationUser}</a></li>
            </ul>

        </div></nav></div></div>
github jehunter5811 / graphite-blockstack / src / components / sheets / SentSheetsCollection.js View on Github external
renderView() {
    let sheets = this.state.sharedSheets;
    const loading = this.state.loading;
    const userData = blockstack.loadUserData();
    const person = new blockstack.Person(userData.profile);
    const img = this.state.img;
    if(this.state.deleteId != "") {
      this.deleteShareDoc();
    }
    if (sheets.length &gt; 0) {
      return (
        <div>
          <div>
            <nav>
              <div>
                <a href="/shared-sheets"><i>arrow_back</i></a>
              </div>
            </nav>
          </div>
          <div>
          <div></div></div></div>
github dkb868 / socialvault / src / AboutYou.jsx View on Github external
componentWillMount() {
    const { userSession } = this.props;
    this.setState({
      person: new Person(userSession.loadUserData().profile),
      username: userSession.loadUserData().username
    });
  }
}
github dkb868 / socialvault / src / Pages.jsx View on Github external
componentWillMount() {
    const { userSession } = this.props;
    this.setState({
      person: new Person(userSession.loadUserData().profile),
      username: userSession.loadUserData().username
    });
  }
}
github jehunter5811 / graphite-blockstack / src / components / vault / VaultCollection.js View on Github external
componentWillMount() {
    this.setState({
      person: new Person(loadUserData().profile),
    });
  }
}
github blockstack / blockstack-browser / app / js / profiles / ViewProfilePage.js View on Github external
const verifications = identity.verifications
    const blockNumber = identity.blockNumber
    const transactionIndex = identity.transactionIndex

    let isLocal = false
    if (this.props.routeParams.hasOwnProperty('index')) {
      isLocal = true
    }

    let person = null
    let accounts = []
    let connections = []

    if (profile !== null) {
      if (profile.hasOwnProperty('@type')) {
        person = new Person(profile)
      } else {
        person = Person.fromLegacyFormat(profile)
      }
      accounts = person.profile().account || []
      connections = person.connections() || []
    }

    return (
      <div>

        {isLocal &amp;&amp;
          </div>
github dkb868 / socialvault / src / FollowingAndFollowers.jsx View on Github external
componentWillMount() {
    const { userSession } = this.props;
    this.setState({
      person: new Person(userSession.loadUserData().profile),
      username: userSession.loadUserData().username
    });
  }
}