Skip to content

Commit

Permalink
Refreshing documentation 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
aorumbayev committed Nov 28, 2023
1 parent 7404bae commit 7e3b3c3
Show file tree
Hide file tree
Showing 36 changed files with 79 additions and 79 deletions.
36 changes: 18 additions & 18 deletions classes/SubtopiaClient.html

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions classes/SubtopiaRegistryClient.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions enums/ChainType.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions enums/DiscountType.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions enums/Duration.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions enums/LifecycleState.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions enums/LockerType.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions enums/PriceNormalizationType.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions enums/SubscriptionType.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion functions/SUBTOPIA_REGISTRY_ID.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion functions/durationToMonths.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion functions/getLockerBoxPrefix.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion functions/normalizePrice.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion functions/optInAsset.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion functions/optOutAsset.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</ul>
<a id="md:📦-installation" class="tsd-anchor"></a><h2><a href="#md:📦-installation">📦 Installation</a></h2><a id="md:install-the-package" class="tsd-anchor"></a><h3><a href="#md:install-the-package">Install the package:</a></h3><pre><code class="language-bash"><span class="hl-0"># with npm</span><br/><span class="hl-1">npm</span><span class="hl-2"> </span><span class="hl-3">install</span><span class="hl-2"> </span><span class="hl-3">subtopia-js-sdk</span><br/><br/><span class="hl-0"># or with yarn</span><br/><span class="hl-1">yarn</span><span class="hl-2"> </span><span class="hl-3">add</span><span class="hl-2"> </span><span class="hl-3">subtopia-js-sdk</span>
</code><button>Copy</button></pre>
<a id="md:import-the-package" class="tsd-anchor"></a><h3><a href="#md:import-the-package">Import the package:</a></h3><pre><code class="language-ts"><span class="hl-4">import</span><span class="hl-2"> { </span><span class="hl-5">SubtopiaClient</span><span class="hl-2">, </span><span class="hl-5">SubtopiaRegistryClient</span><span class="hl-2">, </span><span class="hl-5">ChainType</span><span class="hl-2"> } </span><span class="hl-4">from</span><span class="hl-2"> </span><span class="hl-3">&quot;subtopia-js-sdk&quot;</span><span class="hl-2">;</span>
<a id="md:import-the-package" class="tsd-anchor"></a><h3><a href="#md:import-the-package">Import the package:</a></h3><pre><code class="language-ts"><span class="hl-4">import</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">SubtopiaClient</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">SubtopiaRegistryClient</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">ChainType</span><span class="hl-2">,</span><br/><span class="hl-2">} </span><span class="hl-4">from</span><span class="hl-2"> </span><span class="hl-3">&quot;subtopia-js-sdk&quot;</span><span class="hl-2">;</span>
</code><button>Copy</button></pre>
<a id="md:🛠️-usage" class="tsd-anchor"></a><h2><a href="#md:🛠️-usage">🛠️ Usage</a></h2><p>Example snippets of using the Subtopia JS SDK.</p>
<a id="md:subscriptions" class="tsd-anchor"></a><h3><a href="#md:subscriptions"><strong>Subscriptions</strong></a></h3><a id="md:purchasing-a-subscription" class="tsd-anchor"></a><h3><a href="#md:purchasing-a-subscription">Purchasing a subscription:</a></h3><pre><code class="language-ts"><span class="hl-0">// ... your code</span><br/><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">subtopiaClient</span><span class="hl-2"> = </span><span class="hl-4">await</span><span class="hl-2"> </span><span class="hl-5">SubtopiaClient</span><span class="hl-2">.</span><span class="hl-1">init</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-5">algodClient:</span><span class="hl-2"> </span><span class="hl-7">PUT_ALGOD_INSTANCE_HERE</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">chainType:</span><span class="hl-2"> </span><span class="hl-7">PUT_CHAIN_TYPE_ENUM_HERE</span><span class="hl-2"> </span><span class="hl-0">// &#39;testnet&#39;|&#39;mainnet&#39;|&#39;localnet&#39;</span><br/><span class="hl-2"> </span><span class="hl-5">productID</span><span class="hl-2">: </span><span class="hl-7">PUT_PRODUCT_ID_HERE</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-5">creator:</span><span class="hl-2"> { </span><span class="hl-5">addr:</span><span class="hl-2"> </span><span class="hl-7">PUT_WALLET_ADDRESS</span><span class="hl-2">, </span><span class="hl-5">signer:</span><span class="hl-2"> </span><span class="hl-7">PUT_WALLET_SIGNER</span><span class="hl-2"> },</span><br/><span class="hl-2">});</span><br/><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">response</span><span class="hl-2"> = </span><span class="hl-4">await</span><span class="hl-2"> </span><span class="hl-5">subtopiaClient</span><span class="hl-2">.</span><span class="hl-1">createSubscription</span><span class="hl-2">(</span><br/><span class="hl-2"> { </span><span class="hl-5">addr:</span><span class="hl-2"> </span><span class="hl-7">PUT_WALLET_ADDRESS</span><span class="hl-2">, </span><span class="hl-5">signer:</span><span class="hl-2"> </span><span class="hl-7">PUT_WALLET_SIGNER</span><span class="hl-2"> },</span><br/><span class="hl-2"> </span><span class="hl-7">PUT_DURATION_HERE</span><span class="hl-2"> </span><span class="hl-0">// pick duration from Duration enum. If there is a discount available for this duration, it will be auto applied.</span><br/><span class="hl-2">);</span><br/><br/><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-5">response</span><span class="hl-2">.</span><span class="hl-5">txID</span><span class="hl-2">); </span><span class="hl-0">// response is of type string</span><br/><br/><span class="hl-0">// ... rest of your code</span>
Expand Down
4 changes: 2 additions & 2 deletions interfaces/ApplicationSpec.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions interfaces/AssetMetadata.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions interfaces/BaseDiscountRecord.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions interfaces/DiscountMetadata.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions interfaces/DiscountRecord.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions interfaces/ProductState.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions interfaces/SubscriptionRecord.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion variables/DEFAULT_TXN_SIGN_TIMEOUT_SECONDS.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion variables/LOCKER_APPROVAL_KEY.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion variables/LOCKER_CLEAR_KEY.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion variables/LOCKER_VERSION.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion variables/LOCKER_VERSION_KEY.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion variables/ORACLE_VERSION.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion variables/PRODUCT_APPROVAL_KEY.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion variables/PRODUCT_CLEAR_KEY.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion variables/PRODUCT_VERSION.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion variables/PRODUCT_VERSION_KEY.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion variables/REGISTRY_VERSION.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion variables/SUBTOPIA_MAINNET.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion variables/SUBTOPIA_TESTNET.html

Large diffs are not rendered by default.

0 comments on commit 7e3b3c3

Please sign in to comment.