mirror of
https://github.com/alexgo-io/stacks.js.git
synced 2026-01-12 22:52:34 +08:00
230 lines
12 KiB
HTML
Vendored
230 lines
12 KiB
HTML
Vendored
<!doctype html>
|
|
<html class="default no-js">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<title>Stacks.js 1.4.1 Library Reference</title>
|
|
<meta name="description" content="Documentation for Stacks.js 1.4.1 Library Reference">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="assets/css/main.css">
|
|
<script async src="assets/js/search.js" id="search-script"></script>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<div class="tsd-page-toolbar">
|
|
<div class="container">
|
|
<div class="table-wrap">
|
|
<div class="table-cell" id="tsd-search" data-index="assets/js/search.json" data-base=".">
|
|
<div class="field">
|
|
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
|
<input id="tsd-search-field" type="text" />
|
|
</div>
|
|
<ul class="results">
|
|
<li class="state loading">Preparing search index...</li>
|
|
<li class="state failure">The search index is not available</li>
|
|
</ul>
|
|
<a href="index.html" class="title">Stacks.js 1.4.1 Library Reference</a>
|
|
</div>
|
|
<div class="table-cell" id="tsd-widgets">
|
|
<div id="tsd-filter">
|
|
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
|
<div class="tsd-filter-group">
|
|
<div class="tsd-select" id="tsd-filter-visibility">
|
|
<span class="tsd-select-label">All</span>
|
|
<ul class="tsd-select-list">
|
|
<li data-value="public">Public</li>
|
|
<li data-value="protected">Public/Protected</li>
|
|
<li data-value="private" class="selected">All</li>
|
|
</ul>
|
|
</div>
|
|
<input type="checkbox" id="tsd-filter-inherited" checked />
|
|
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
|
<input type="checkbox" id="tsd-filter-externals" checked />
|
|
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
|
</div>
|
|
</div>
|
|
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="tsd-page-title">
|
|
<div class="container">
|
|
<h1>Stacks.js 1.4.1 Library Reference</h1>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<div class="container container-main">
|
|
<div class="row">
|
|
<div class="col-8 col-content">
|
|
<div class="tsd-panel tsd-typography">
|
|
<a href="#stacksjs-" id="stacksjs-" style="color: inherit; text-decoration: none;">
|
|
<h1>Stacks.js <a href="https://circleci.com/gh/blockstack/stacks.js/tree/master"><img src="https://img.shields.io/circleci/project/blockstack/stacks.js/master.svg" alt="CircleCI"></a></h1>
|
|
</a>
|
|
<p>This repo is home to the Stacks.js libraries which provide everything you need to work with the <a href="https://www.stacks.co/what-is-stacks">Stacks blockchain</a>.</p>
|
|
<ul>
|
|
<li><a href="https://github.com/blockstack/stacks.js/tree/master/packages/auth"><code>@stacks/auth</code></a> Construct and decode authentication requests for Stacks apps.</li>
|
|
<li><a href="https://github.com/blockstack/stacks.js/tree/master/packages/storage"><code>@stacks/storage</code></a> Store and fetch files with Gaia, the decentralized storage system.</li>
|
|
<li><a href="https://github.com/blockstack/stacks.js/tree/master/packages/transactions"><code>@stacks/transactions</code></a> Construct, decode transactions and work with Clarity smart contracts on the Stacks blockchain.</li>
|
|
<li><a href="https://github.com/blockstack/stacks.js/tree/master/packages/cli"><code>@stacks/cli</code></a> Command line interface to interact with auth, storage and Stacks transactions.</li>
|
|
<li><a href="https://github.com/blockstack/stacks.js/tree/master/packages/stacking"><code>@stacks/stacking</code></a> Library for PoX stacking.</li>
|
|
<li><a href="https://github.com/blockstack/stacks.js/tree/master/packages/keychain"><code>@stacks/keychain</code></a> Create and manage keys/wallets for the Stacks blockchain.</li>
|
|
<li><a href="https://github.com/blockstack/stacks.js/tree/master/packages/network"><code>@stacks/network</code></a> Network and API library for working with Stacks blockchain nodes.</li>
|
|
<li><a href="https://github.com/blockstack/stacks.js/tree/master/packages/encryption"><code>@stacks/encryption</code></a> Encryption functions used by Stacks.js packages.</li>
|
|
<li><a href="https://github.com/blockstack/stacks.js/tree/master/packages/profile"><code>@stacks/profile</code></a> Functions for manipulating user profiles.</li>
|
|
<li><a href="https://github.com/blockstack/stacks.js/tree/master/packages/common"><code>@stacks/common</code></a> Common utilities used by Stacks.js packages.</li>
|
|
<li><a href="https://github.com/blockstack/stacks.js/tree/master/packages/bns"><code>@stacks/bns</code></a> Library for interacting with the BNS contract.</li>
|
|
</ul>
|
|
<p>See <code>README</code> in each package directory for installation instructions and usage.</p>
|
|
<a href="#migrating-from-blockstackjs" id="migrating-from-blockstackjs" style="color: inherit; text-decoration: none;">
|
|
<h2>Migrating from blockstack.js</h2>
|
|
</a>
|
|
<p>To migrate your app from blockstack.js to stacks.js follow the steps in the <a href="https://github.com/blockstack/stacks.js/tree/master/migration-guide.md">migration guide</a>.</p>
|
|
<a href="#development-environment-setup" id="development-environment-setup" style="color: inherit; text-decoration: none;">
|
|
<h2>Development: environment setup</h2>
|
|
</a>
|
|
<p>To setup the development environment for this repository, follow these steps:</p>
|
|
<ol>
|
|
<li>Clone this package.</li>
|
|
<li>Run <code>npm install</code> to install dependencies</li>
|
|
<li>Run <code>npm run bootstrap</code> to <a href="https://github.com/lerna/lerna/tree/main/commands/bootstrap">bootstrap</a> project</li>
|
|
<li>Run <code>npm run build</code> to build packages</li>
|
|
<li>Run <code>npm run test</code> to run tests</li>
|
|
</ol>
|
|
<a href="#development-adding-dependencies" id="development-adding-dependencies" style="color: inherit; text-decoration: none;">
|
|
<h2>Development: adding dependencies</h2>
|
|
</a>
|
|
<p>This repo uses Lerna <a href="https://github.com/lerna/lerna/blob/main/doc/hoist.md">hoisting</a> for package dependencies.</p>
|
|
<p>In order to install a new dependency to a package, the <a href="https://github.com/lerna/lerna/tree/main/commands/add"><code>lerna add</code></a> command must be used, rather than <code>npm install <package></code>.</p>
|
|
<p>For example, the following command installs <code>lodash</code> as a dependency to the <code>@stacks/storage</code> package:</p>
|
|
<pre><code class="language-shell"><span style="color: #008000"># Run within the root directory</span>
|
|
<span style="color: #000000">npm run lerna -- add lodash --scope @stacks/storage</span>
|
|
</code></pre>
|
|
<p>Add <code>--dev</code> to install as a development dependency:</p>
|
|
<pre><code class="language-shell"><span style="color: #000000">npm run lerna -- add lodash --scope @stacks/storage --dev</span>
|
|
</code></pre>
|
|
<a href="#documentation" id="documentation" style="color: inherit; text-decoration: none;">
|
|
<h2>Documentation</h2>
|
|
</a>
|
|
<p>Documentation for the Stacks.js packages is located <a href="https://stacks-js-git-master-blockstack.vercel.app/">here</a>.</p>
|
|
<a href="#contributing" id="contributing" style="color: inherit; text-decoration: none;">
|
|
<h2>Contributing</h2>
|
|
</a>
|
|
<p>Github issues marked <a href="https://github.com/blockstack/stacks.js/labels/help-wanted">help-wanted</a>
|
|
are great places to start. Please ask in a github issue or discord before embarking
|
|
on larger issues that aren't labeled as help wanted or adding additional
|
|
functionality so that we can make sure your contribution can be included!</p>
|
|
</div>
|
|
</div>
|
|
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
<nav class="tsd-navigation primary">
|
|
<ul>
|
|
<li class=" ">
|
|
<a href="modules.html">Modules</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/auth.html">auth</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/bns.html">bns</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/cli.html">cli</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/common.html">common</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/encryption.html">encryption</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/keychain.html">keychain</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/network.html">network</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/profile.html">profile</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/stacking.html">stacking</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/storage.html">storage</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/transactions.html">transactions</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
<nav class="tsd-navigation secondary menu-sticky">
|
|
<ul class="before-current">
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/auth.html" class="tsd-kind-icon">auth</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/bns.html" class="tsd-kind-icon">bns</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/cli.html" class="tsd-kind-icon">cli</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/common.html" class="tsd-kind-icon">common</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/encryption.html" class="tsd-kind-icon">encryption</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/keychain.html" class="tsd-kind-icon">keychain</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/network.html" class="tsd-kind-icon">network</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/profile.html" class="tsd-kind-icon">profile</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/stacking.html" class="tsd-kind-icon">stacking</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/storage.html" class="tsd-kind-icon">storage</a>
|
|
</li>
|
|
<li class=" tsd-kind-module">
|
|
<a href="modules/transactions.html" class="tsd-kind-icon">transactions</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<footer class="with-border-bottom">
|
|
<div class="container">
|
|
<h2>Legend</h2>
|
|
<div class="tsd-legend-group">
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
|
|
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
|
|
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
|
|
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
|
|
<li class="tsd-kind-type-alias tsd-has-type-parameter"><span class="tsd-kind-icon">Type alias with type parameter</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
|
|
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
|
|
</ul>
|
|
<ul class="tsd-legend">
|
|
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
<div class="container tsd-generator">
|
|
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
|
</div>
|
|
<div class="overlay"></div>
|
|
<script src="assets/js/main.js"></script>
|
|
</body>
|
|
</html> |