Nail Polishing Minions


    0.0.9 • Public • Published

    Getting Started

    For general information about SteemConnect V2 and setting up your app please see this post from @noisy: How to configure SteemConnect v2 and use it with your application

    Include the SC2 SDK in your HTML page

    You can download a minified version of sc2.js here: and include it in your HTML page:

    <script src="/scripts/sc2.min.js"></script>

    SDK Methods

    Init SDK

    Call the init() method when your app first loads to initialize the SDK:

      app: 'busy',
      callbackURL: 'http://localhost:8000/demo/',
      accessToken: 'access_token',
      scope: ['vote', 'comment']


    • app: This is the name of the app that was registered in the SteemConnect V2 dashboard
    • callbackURL: This is the URL that users will be redirected to after interacting with SC2. It must be listed in the "Redirect URI(s)" list in the app settings EXACTLY the same as it is specified here
    • accessToken: If you have an oauth2 access token for this user already you can specify it here, otherwise you can leave it and set it later using sc2.setAccessToken(accessToken).
    • scope: This is a list of operations the app will be able to access on the user's account. For a complete list of scopes see:

    Get Login URL

    The following method returns a URL that you can redirect the user to so that they may log in to your app through SC2:

    var link = sc2.getLoginURL(state);
    // =>[app]&redirect_uri=[callbackURL]&scope=vote,comment&state=[state]


    • state: Data that will be passed to the callbackURL for your app after the user has logged in.

    After logging in, SC2 will redirect the user to the "redirect_uri" specified in the login url above and add the following query string parameters for your app to use:

    • access_token: This is the oauth2 access token that is required to make any Steem API calls on behalf of the current user. Once you have this you need to tell the SC2 SDK to use it by either specifying it as a parameter to the init() method call or by calling sc2.setAccessToken([accessToken]).
    • expires_in: The number of seconds until the access token expires.
    • username: The username of the current user.

    Get user profile

    Once a user is logged in to your app you can call the following method to get the details of their account: (err, res) {
      console.log(err, res)

    If it is successful, the result will be a JSON object with the following properties:

    account:{id: 338059, name: "yabapmatt", owner: {}, active: {}, posting: {}, ...}


    The vote() method will cast a vote on the specified post or comment from the current user:, author, permlink, weight, function (err, res) {
      console.log(err, res)


    • voter: The Steem username of the current user.
    • author: The Steem username of the author of the post or comment.
    • permlink: The link to the post or comment on which to vote. This is the portion of the URL after the last "/". For example the "permlink" for this post: would be "announcing-smart-media-tokens-smts".
    • weight: The weight of the vote. 10000 equale a 100% vote.
    • callback: A function that is called once the vote is submitted and included in a block. If successful the "res" variable will be a JSON object containing the details of the block and the vote operation.


    The comment() method will post a comment on an existing post or comment from the current user:

    sc2.comment(parentAuthor, parentPermlink, author, permlink, title, body, jsonMetadata, function (err, res) {
      console.log(err, res)

    Generate hot signing link

    The sign() method creates a URL to which your app can redirect the user to perform a signed transaction on the blockchain such as a transfer or delegation:

    var link = sc2.sign('transfer', {
      to: 'fabien',
      amount: '1.000 STEEM',
      memo: 'Hello World!',
    }, 'http://localhost:8000/demo/transfer-complete');
    // =>!&redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Fdemo%2Ftransfer-complete


    The revokeToken() method will log the current user out of your application by revoking the access token provided to your app for that user:

    sc2.revokeToken(function (err, res) {
      console.log(err, res)


    sc2.reblog(account, author, permlink, function (err, res) {
      console.log(err, res)


    sc2.follow(follower, following, function (err, res) {
      console.log(err, res)


    sc2.unfollow(unfollower, unfollowing, function (err, res) {
      console.log(err, res)


    sc2.ignore = (follower, following, function (err, res) {
      console.log(err, res)

    Claim Reward Balance

    sc2.claimRewardBalance = (account, rewardSteem, rewardSbd, rewardVests, function (err, res) {
      console.log(err, res)

    Update User Metadata

    sc2.updateUserMetadata = (metadata, function (err, res) {
      console.log(err, res)


    npm i sc2-sdk-test

    DownloadsWeekly Downloads






    Last publish


    • sekhmet