Browse Source

Update transaction signing docs for testnet release

master-legacy
Mark Hendrickson 5 years ago
committed by Alexander Graebe
parent
commit
4e1173e6dc
  1. 29
      develop/connect/use-with-clarity.md

29
develop/connect/use-with-clarity.md

@ -5,27 +5,14 @@
# Signing transactions # Signing transactions
{:.no_toc} {:.no_toc}
With Connect, you can interact with the Stacks 2.0 blockchain. You can allow your users to send transactions and interact with smart contracts. With Blockstack Connect, you can interact with the Stacks 2.0 blockchain, empowering your users to sign transactions and interact with smart contracts.
<div class="uk-card uk-card-default uk-card-body"> <div class="uk-card uk-card-default uk-card-body">
<h5 class="uk-card-title">Transaction signing is still in progress</h5> <h5 class="uk-card-title">This functionality currently operates on <a href="http://testnet.blockstack.org/">the Stacks 2.0 Testnet</a></h5>
<p> <p>The user interface has been designed with developers in mind and prominently displays debug information. STX testnet tokens for paying transaction fees can be obtained for free with <a href="https://testnet.blockstack.org/faucet">the testnet faucet</a>. We will update this functionality and experience for mainnet upon its release.</p>
To use these features, make sure you install the <code>testnet</code> tag the <code>@blockstack/connect</code> NPM package. You can do this by running <code>npm install --save @blockstack/connect@testnet</code>, or by specifying <code>testnet</code> as the version in
your package.json file.
</p>
<p>
The Stacks 2.0 blockchain is still in testnet, and our web app integration is also still in beta. In order to use transaction signing in your application, you need to use the configuration `authOrigin` with `@blockstack/connect`.
</p>
<pre>
<code>
const options = {
// your other options
authOrigin: 'https://deploy-preview-301--stacks-authenticator.netlify.app'
};
</code>
</pre>
</div> </div>
* TOC * TOC
{:toc} {:toc}
@ -44,9 +31,6 @@ To initiate a contract call transaction, use the `openContractCall` function.
```ts ```ts
import { openContractCall } from '@blockstack/connect'; import { openContractCall } from '@blockstack/connect';
// While in beta, you must provide this option:
const authOrigin = 'https://deploy-preview-301--stacks-authenticator.netlify.app';
// Here's an example of options: // Here's an example of options:
const myStatus = 'hey there'; const myStatus = 'hey there';
const options = { const options = {
@ -134,9 +118,6 @@ STX token transfers can be initiated with the `openSTXTransfer` function.
```ts ```ts
import { openSTXTransfer } from '@blockstack/connect'; import { openSTXTransfer } from '@blockstack/connect';
// While in beta, you must provide this option:
const authOrigin = 'https://deploy-preview-301--stacks-authenticator.netlify.app';
openSTXTransfer({ openSTXTransfer({
recipient: 'ST2EB9WEQNR9P0K28D2DC352TM75YG3K0GT7V13CV', recipient: 'ST2EB9WEQNR9P0K28D2DC352TM75YG3K0GT7V13CV',
amount: '100', amount: '100',
@ -185,8 +166,6 @@ To allow your app's users to deploy arbitrary Clarity contracts, use the `openCo
import { openContractDeploy } from '@blockstack/connect'; import { openContractDeploy } from '@blockstack/connect';
const codeBody = '(begin (print "hello, world"))'; const codeBody = '(begin (print "hello, world"))';
// While in beta, you must provide this option:
const authOrigin = 'https://deploy-preview-301--stacks-authenticator.netlify.app';
openContractDeploy({ openContractDeploy({
contractName: 'my-contract-name', contractName: 'my-contract-name',

Loading…
Cancel
Save