From 2a93d359f46cfc7b20786d94c5aa35404b4d2280 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Fri, 20 Mar 2020 14:02:02 -0400 Subject: [PATCH] feat: update site --- 2020/03/20/hello-world/index.html | 811 +++++++ 404.html | 22 - api.html | 896 ++++++- apollo-client.html | 872 ++++++- archives/2020/03/index.html | 725 ++++++ archives/2020/index.html | 725 ++++++ archives/index.html | 725 ++++++ assets/css/0.styles.b4d346dc.css | 1 - assets/img/logo-small.png | Bin 2756 -> 0 bytes assets/img/logo.svg | 14 - assets/img/search.83621669.svg | 1 - assets/js/10.4595e7f8.js | 1 - assets/js/11.638336c9.js | 1 - assets/js/12.792fcfd2.js | 1 - assets/js/13.a67d614a.js | 1 - assets/js/14.b783779c.js | 1 - assets/js/15.1d9ae469.js | 1 - assets/js/16.d0bf4930.js | 1 - assets/js/17.c66feffd.js | 1 - assets/js/18.ec597d92.js | 1 - assets/js/19.a3968107.js | 1 - assets/js/2.af279185.js | 1 - assets/js/3.072ab49d.js | 1 - assets/js/4.336e58fa.js | 1 - assets/js/5.5969a423.js | 1 - assets/js/6.169a8ab4.js | 1 - assets/js/7.da8dc444.js | 1 - assets/js/8.7bad8100.js | 1 - assets/js/9.01449017.js | 1 - assets/js/app.00a46c5f.js | 13 - css/application.css | 3012 ++++++++++++++++++++++++ css/utilities/text-color.css | 5 + css/utilities/text-size.css | 8 + assets/img/d1.daa5485a.png => d1.png | Bin assets/img/d2.de512122.png => d2.png | Bin assets/img/d3.123a2e18.png => d3.png | Bin assets/img/d4.81f850ef.png => d4.png | Bin de/2020/03/20/hello-world/index.html | 811 +++++++ de/api.html | 881 +++++++ de/apollo-client.html | 838 +++++++ de/getting-started.html | 1019 ++++++++ de/how-it-works.html | 791 +++++++ de/index.html | 778 ++++++ de/integrations-overview.html | 779 ++++++ de/integrations.html | 778 ++++++ de/react.html | 891 +++++++ de/reactive-graphql.html | 835 +++++++ de/readme.html | 780 ++++++ de/redux-observable.html | 809 +++++++ de/redux.html | 860 +++++++ de/tutorial.html | 779 ++++++ de/vue.html | 858 +++++++ fonts/LICENSE.txt | 202 ++ fonts/Roboto-Bold.ttf | Bin 0 -> 170760 bytes fonts/Roboto-Regular.ttf | Bin 0 -> 171676 bytes getting-started.html | 1077 ++++++++- how-it-works.html | 803 ++++++- icons/accounting-calculator.svg | 4 + icons/book-address.svg | 10 + icons/close.svg | 1 + icons/cloud-lock.svg | 11 + icons/contactless-payment.svg | 6 + icons/credit-card-1.svg | 4 + icons/crypto-currency-bitcoin-give.svg | 14 + icons/crypto-currency-bitcoin-lock.svg | 5 + icons/facebook.svg | 13 + icons/gauge-dashboard-1-alternate.svg | 15 + icons/gesture-tap-2.svg | 4 + icons/github.svg | 19 + icons/half-circles.svg | 15 + icons/navigation-menu.svg | 1 + icons/twitter.svg | 13 + images/circles.png | Bin 0 -> 6031 bytes images/embark-logo.svg | 24 + images/favicon.png | Bin 0 -> 602 bytes images/logo.svg | 14 + index.html | 822 ++++++- integrations-overview.html | 788 ++++++- integrations.html | 778 ++++++ inter/Inter-Black.woff | Bin 124512 -> 0 bytes inter/Inter-Black.woff2 | Bin 93812 -> 0 bytes inter/Inter-BlackItalic.woff | Bin 131012 -> 0 bytes inter/Inter-BlackItalic.woff2 | Bin 98332 -> 0 bytes inter/Inter-Bold.woff | Bin 127748 -> 0 bytes inter/Inter-Bold.woff2 | Bin 95992 -> 0 bytes inter/Inter-BoldItalic.woff | Bin 134240 -> 0 bytes inter/Inter-BoldItalic.woff2 | Bin 100864 -> 0 bytes inter/Inter-ExtraBold.woff | Bin 127972 -> 0 bytes inter/Inter-ExtraBold.woff2 | Bin 96572 -> 0 bytes inter/Inter-ExtraBoldItalic.woff | Bin 134428 -> 0 bytes inter/Inter-ExtraBoldItalic.woff2 | Bin 101276 -> 0 bytes inter/Inter-ExtraLight.woff | Bin 130840 -> 0 bytes inter/Inter-ExtraLight.woff2 | Bin 99144 -> 0 bytes inter/Inter-ExtraLightItalic.woff | Bin 137684 -> 0 bytes inter/Inter-ExtraLightItalic.woff2 | Bin 104152 -> 0 bytes inter/Inter-Italic.woff | Bin 128012 -> 0 bytes inter/Inter-Italic.woff2 | Bin 95696 -> 0 bytes inter/Inter-Light.woff | Bin 128864 -> 0 bytes inter/Inter-Light.woff2 | Bin 97580 -> 0 bytes inter/Inter-LightItalic.woff | Bin 136028 -> 0 bytes inter/Inter-LightItalic.woff2 | Bin 102900 -> 0 bytes inter/Inter-Medium.woff | Bin 126788 -> 0 bytes inter/Inter-Medium.woff2 | Bin 95224 -> 0 bytes inter/Inter-MediumItalic.woff | Bin 134060 -> 0 bytes inter/Inter-MediumItalic.woff2 | Bin 100400 -> 0 bytes inter/Inter-Regular.woff | Bin 119304 -> 0 bytes inter/Inter-Regular.woff2 | Bin 89212 -> 0 bytes inter/Inter-SemiBold.woff | Bin 127296 -> 0 bytes inter/Inter-SemiBold.woff2 | Bin 95652 -> 0 bytes inter/Inter-SemiBoldItalic.woff | Bin 134184 -> 0 bytes inter/Inter-SemiBoldItalic.woff2 | Bin 100740 -> 0 bytes inter/Inter-Thin.woff | Bin 131576 -> 0 bytes inter/Inter-Thin.woff2 | Bin 100260 -> 0 bytes inter/Inter-ThinItalic.woff | Bin 137144 -> 0 bytes inter/Inter-ThinItalic.woff2 | Bin 105300 -> 0 bytes inter/Inter-italic.var.woff2 | Bin 281424 -> 0 bytes inter/Inter-upright.var.woff2 | Bin 263956 -> 0 bytes inter/Inter.var.woff2 | Bin 386672 -> 0 bytes inter/inter.css | 184 -- javascripts/jquery.js | 1 + javascripts/scripts.js | 64 + react.html | 954 +++++++- reactive-graphql.html | 872 ++++++- readme.html | 780 ++++++ redux-observable.html | 829 ++++++- redux.html | 895 ++++++- tutorial.html | 788 ++++++- vue.html | 916 ++++++- 128 files changed, 30367 insertions(+), 894 deletions(-) create mode 100644 2020/03/20/hello-world/index.html delete mode 100644 404.html create mode 100644 archives/2020/03/index.html create mode 100644 archives/2020/index.html create mode 100644 archives/index.html delete mode 100644 assets/css/0.styles.b4d346dc.css delete mode 100644 assets/img/logo-small.png delete mode 100644 assets/img/logo.svg delete mode 100644 assets/img/search.83621669.svg delete mode 100644 assets/js/10.4595e7f8.js delete mode 100644 assets/js/11.638336c9.js delete mode 100644 assets/js/12.792fcfd2.js delete mode 100644 assets/js/13.a67d614a.js delete mode 100644 assets/js/14.b783779c.js delete mode 100644 assets/js/15.1d9ae469.js delete mode 100644 assets/js/16.d0bf4930.js delete mode 100644 assets/js/17.c66feffd.js delete mode 100644 assets/js/18.ec597d92.js delete mode 100644 assets/js/19.a3968107.js delete mode 100644 assets/js/2.af279185.js delete mode 100644 assets/js/3.072ab49d.js delete mode 100644 assets/js/4.336e58fa.js delete mode 100644 assets/js/5.5969a423.js delete mode 100644 assets/js/6.169a8ab4.js delete mode 100644 assets/js/7.da8dc444.js delete mode 100644 assets/js/8.7bad8100.js delete mode 100644 assets/js/9.01449017.js delete mode 100644 assets/js/app.00a46c5f.js create mode 100644 css/application.css create mode 100644 css/utilities/text-color.css create mode 100644 css/utilities/text-size.css rename assets/img/d1.daa5485a.png => d1.png (100%) rename assets/img/d2.de512122.png => d2.png (100%) rename assets/img/d3.123a2e18.png => d3.png (100%) rename assets/img/d4.81f850ef.png => d4.png (100%) create mode 100644 de/2020/03/20/hello-world/index.html create mode 100644 de/api.html create mode 100644 de/apollo-client.html create mode 100644 de/getting-started.html create mode 100644 de/how-it-works.html create mode 100644 de/index.html create mode 100644 de/integrations-overview.html create mode 100644 de/integrations.html create mode 100644 de/react.html create mode 100644 de/reactive-graphql.html create mode 100644 de/readme.html create mode 100644 de/redux-observable.html create mode 100644 de/redux.html create mode 100644 de/tutorial.html create mode 100644 de/vue.html create mode 100644 fonts/LICENSE.txt create mode 100644 fonts/Roboto-Bold.ttf create mode 100644 fonts/Roboto-Regular.ttf create mode 100644 icons/accounting-calculator.svg create mode 100644 icons/book-address.svg create mode 100644 icons/close.svg create mode 100644 icons/cloud-lock.svg create mode 100644 icons/contactless-payment.svg create mode 100644 icons/credit-card-1.svg create mode 100644 icons/crypto-currency-bitcoin-give.svg create mode 100644 icons/crypto-currency-bitcoin-lock.svg create mode 100644 icons/facebook.svg create mode 100644 icons/gauge-dashboard-1-alternate.svg create mode 100644 icons/gesture-tap-2.svg create mode 100644 icons/github.svg create mode 100644 icons/half-circles.svg create mode 100644 icons/navigation-menu.svg create mode 100644 icons/twitter.svg create mode 100644 images/circles.png create mode 100644 images/embark-logo.svg create mode 100644 images/favicon.png create mode 100644 images/logo.svg create mode 100644 integrations.html delete mode 100644 inter/Inter-Black.woff delete mode 100644 inter/Inter-Black.woff2 delete mode 100644 inter/Inter-BlackItalic.woff delete mode 100644 inter/Inter-BlackItalic.woff2 delete mode 100644 inter/Inter-Bold.woff delete mode 100644 inter/Inter-Bold.woff2 delete mode 100644 inter/Inter-BoldItalic.woff delete mode 100644 inter/Inter-BoldItalic.woff2 delete mode 100644 inter/Inter-ExtraBold.woff delete mode 100644 inter/Inter-ExtraBold.woff2 delete mode 100644 inter/Inter-ExtraBoldItalic.woff delete mode 100644 inter/Inter-ExtraBoldItalic.woff2 delete mode 100644 inter/Inter-ExtraLight.woff delete mode 100644 inter/Inter-ExtraLight.woff2 delete mode 100644 inter/Inter-ExtraLightItalic.woff delete mode 100644 inter/Inter-ExtraLightItalic.woff2 delete mode 100644 inter/Inter-Italic.woff delete mode 100644 inter/Inter-Italic.woff2 delete mode 100644 inter/Inter-Light.woff delete mode 100644 inter/Inter-Light.woff2 delete mode 100644 inter/Inter-LightItalic.woff delete mode 100644 inter/Inter-LightItalic.woff2 delete mode 100644 inter/Inter-Medium.woff delete mode 100644 inter/Inter-Medium.woff2 delete mode 100644 inter/Inter-MediumItalic.woff delete mode 100644 inter/Inter-MediumItalic.woff2 delete mode 100644 inter/Inter-Regular.woff delete mode 100644 inter/Inter-Regular.woff2 delete mode 100644 inter/Inter-SemiBold.woff delete mode 100644 inter/Inter-SemiBold.woff2 delete mode 100644 inter/Inter-SemiBoldItalic.woff delete mode 100644 inter/Inter-SemiBoldItalic.woff2 delete mode 100644 inter/Inter-Thin.woff delete mode 100644 inter/Inter-Thin.woff2 delete mode 100644 inter/Inter-ThinItalic.woff delete mode 100644 inter/Inter-ThinItalic.woff2 delete mode 100644 inter/Inter-italic.var.woff2 delete mode 100644 inter/Inter-upright.var.woff2 delete mode 100644 inter/Inter.var.woff2 delete mode 100644 inter/inter.css create mode 100644 javascripts/jquery.js create mode 100644 javascripts/scripts.js create mode 100644 readme.html diff --git a/2020/03/20/hello-world/index.html b/2020/03/20/hello-world/index.html new file mode 100644 index 0000000..073494c --- /dev/null +++ b/2020/03/20/hello-world/index.html @@ -0,0 +1,811 @@ + + + + + Hello World | SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ Docs categories + + + +
+
+

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

+

Quick Start

Create a new post

+ +
$ hexo new "My New Post"
+
+ + + +

More info: Writing

+

Run server

+ +
$ hexo server
+
+ + + +

More info: Server

+

Generate static files

+ +
$ hexo generate
+
+ + + +

More info: Generating

+

Deploy to remote sites

+ +
$ hexo deploy
+
+ + + +

More info: Deployment

+ +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/404.html b/404.html deleted file mode 100644 index 2693e38..0000000 --- a/404.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - SUBSPACE - - - - - - - - - - - - -

404

There's nothing here.
Take me home.
- - - diff --git a/api.html b/api.html index b39c109..eaa91fc 100644 --- a/api.html +++ b/api.html @@ -1,22 +1,418 @@ - + - - - API | SUBSPACE - - - - - - - - - - - + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
+ + +

# API

# General

# new Subspace(web3 [, options])

Constructor.

Parameters

  1. web3 - Object: a web3.js object.
  2. options - Object (optional): Options used to initialize Subspace -
    • dbFilename - String (optional): Name of the database where the information will be stored (default 'subspace.db')
  • callInterval - Interval of time in milliseconds to query a contract/address to determine changes in state or balance. It's only used with HttpProviders (default: undefined. Obtains data every block using the average block time as an interval). -
    • refreshLastNBlocks - Ignores last N blocks (from current block), stored in the local db and refresh them via a web3 subscription. Useful for possible reorgs (default: 12),
    • disableSubscriptions - Subspace by default will attempt to use websocket subscriptions if the current provider supports them, otherwise it will use polling because it asumes the provider is an HttpProvider. This functionality can be disabled by passing true to this option. (default: undefined)

# init()

Initializes Subspace

Returns Promise that once it's resolved, will mean that Subspace is available to use

# close()

Dispose and perform the cleanup necessary to remove the internal subscriptions and interval timers created by Subspace during its normal execution.

# contract(instance|{abi,address})

Adds a track method to the web3 contract objects. You can obtain this functionality by passing a web3.eth.Contract instance, or the abi and address of your contract

Returns web3.eth.Contract object enhanced with .track() functions for methods and events.

# Contract methods

# myContract.events.MyEvent.track([options])

Track a contract event.

Parameters

  1. options - Object (optional): web3 filter options object to limit the number of events based on a block number range, or indexed filters -
    • filter - Object (optional): Lets you filter events by indexed parameters, e.g. {filter: {myNumber: [12,13]}} means all events where "myNumber" is 12 or 13.
    • fromBlock - Number (optional): The block number from which to get events on.
    • toBlock - Number (optional): The block number to get events up to (Defaults to "latest")
    • topics - Array (optional): This allows you to manually set the topics for the event filter. If given the filter property and event signature, (topic[0]) will not be set automatically.

Returns RxJS Observable which will stream the event returnValues.

# myContract.methods.myMethod([param1[, ...]]).track([callOptions])

Track a constant function / contract state variable on each block mined, or depending on the callInterval option used during Subspace initialization.

Parameters

  1. callOptions - Object (optional): The options used for calling. -
    • from - String (optional): The address the call “transaction” should be made from.
    • gasPrice - String (optional): The gas price in wei to use for this call “transaction”.
    • gas - Number (optional): The maximum gas provided for this call “transaction” (gas limit).

Returns RxJS Observable which will stream the function / variable values. Data type will depend on the contract function invoked.

# myContract.trackBalance(address [, tokenAddress])

Track a contract's balance changes for an address on each block mined, or depending on the callInterval option used during Subspace initialization.

Parameters

  1. address - String: The address to get the balance of.
  2. tokenAddress - String (optional): If you want to track the balance for an ERC20 contract, here you can specify the token address. Otherwise, Only ETH balances will be returned.

Returns RxJS Observable which will stream a string containing the address balance.

# Blocks, gas price and block time

# trackBlock()

Receive the block information for any new block. It's the reactive equivalent to web3.eth.getBlock("latest").

Returns RxJS Observable which will stream a block object for the latest block received

# trackBlockNumber()

Returns the latest block number. It's the reactive equivalent to web3.eth.getBlockNumber.

Returns RxJS Observable with the latest block number

# trackGasPrice()

Returns the current gas price oracle. It's the reactive equivalent to web3.eth.getGasPrice.

Returns RxJS Observable with the average gas price in wei.

# trackAverageBlocktime()

Average block time of the last 10 blocks.

Returns RxJS Observable with the moving average block time of the last 10 blocks. The time is returned in milliseconds:

# Low level API for data tracking

These are used in case you don't want to decorate your web3 contract objects, or if you want to track the balance for an specific address.

# trackEvent(contractObject, eventName [, options])

Track a contract event.

Parameters

  1. contractObject - web3.eth.Contract: An already initialized contract object pointing to an address and containing a valid ABI.
  2. eventName - String: The name of the event to subscribe.
  3. options - Object (optional): web3 filter options object to limit the number of events based on a block number range, or indexed filters -
    • filter - Object (optional): Lets you filter events by indexed parameters, e.g. {filter: {myNumber: [12,13]}} means all events where "myNumber" is 12 or 13.
    • fromBlock - Number (optional): The block number from which to get events on.
    • toBlock - Number (optional): The block number to get events up to (Defaults to "latest")
    • topics - Array (optional): This allows you to manually set the topics for the event filter. If given the filter property and event signature, (topic[0]) will not be set automatically.

Returns RxJS Observable which will stream the event returnValues.

# trackProperty(contractObject, functionName [, functionArgs] [, callOptions])

Track a constant function / contract state variable on each block mined, or depending on the callInterval option used during Subspace initialization.

Parameters

  1. contractObject - web3.eth.Contract: An already initialized contract object pointing to an address and containing a valid ABI.
  2. functionName - String: Name of the function or variable whose values will be tracked.
  3. functionArgs - Array (optional): Array of arguments that the tracked function receives
  4. callOptions - Object (optional): The options used for calling. -
    • from - String (optional): The address the call “transaction” should be made from.
    • gasPrice - String (optional): The gas price in wei to use for this call “transaction”.
    • gas - Number (optional): The maximum gas provided for this call “transaction” (gas limit).

Returns RxJS Observable which will stream the function / variable values. Data type will depend on the contract function invoked.

# trackBalance(address [, tokenAddress])

Track balance changes for an address on each block mined, or depending on the callInterval option used during Subspace initialization.

Parameters

  1. address - String: The address to get the balance of.
  2. tokenAddress - String (optional): If you want to track the balance for an ERC20 contract, here you can specify the token address. Otherwise, Only ETH balances will be returned.

Returns RxJS Observable which will stream a string containing the address balance.

# trackLogs(options [, abi])

Tracks incoming logs, filtered by the given options.

Parameters

  1. options - Object (optional): web3 filter options object to limit the number of logs -
    • address - String|Array (optional): An address or a list of addresses to only get logs from particular account(s).
    • fromBlock - Number (optional): The block number from which to get events on.
    • topics - Array (optional): An array of values which must each appear in the log entries. The order is important, if you want to leave topics out use null, e.g. [null, '0x00...']. You can also pass another array for each topic with options for that topic e.g. [null, ['option1', 'option2']].
  2. abi - Array (optional): Array containing the ABI for the inputs of the logs received. It will automatically decode the logs using this ABI instead of returning the hexadecimal data.

Returns RxJS Observable which will stream the logs. If the inputs ABI is included in the call, the logs will be automatically decoded.

- + + + + + + + + + + + + + + + + + + + + diff --git a/apollo-client.html b/apollo-client.html index 5492176..eaa55aa 100644 --- a/apollo-client.html +++ b/apollo-client.html @@ -1,22 +1,375 @@ - + - - - apollo-client | SUBSPACE - - - - - - - - - - - + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
+ + +

# apollo-client

To use Subspace with apollo-client, a ReactiveSchemaLink from apollo-link-reactive-schema must be used with a custom schema.

import {InMemoryCache} from "apollo-cache-inmemory";
-import ApolloClient from "apollo-client";
-import {ReactiveSchemaLink} from "apollo-link-reactive-schema";
+
+
 
-const schema = makeExecutableSchema({typeDefs, resolvers});
-const client = new ApolloClient({
-  cache: new InMemoryCache(),
-  link: new ReactiveSchemaLink({schema)})
-});
 
-
1
2
3
4
5
6
7
8
9
10

# Example



































 
 
import { ApolloClient } from "apollo-client";
-import { InMemoryCache } from "apollo-cache-inmemory";
-import {ReactiveSchemaLink} from "apollo-link-reactive-schema";
-import Subspace from "@embarklabs/subspace";
 
-// ...
 
-// Initialize Subspace
-const subspace = new Subspace(web3);
-await subspace.init();
+
 
-const MyContractInstance = ...; // TODO: obtain a web3.eth.Contract instance
-
-const typeDefs = `
-  type MyEvent {
-    someValue: Int
-    anotherValue: String
+
+
+
+
+
+
+
+
+
 
-const schema = makeExecutableSchema({ typeDefs, resolvers });
 
-const client = new ApolloClient({
-  cache: new InMemoryCache(),
-  link: new ReactiveSchemaLink({schema)})
-});
-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

Using react-apollo

A practical example can also be found in examples/react-apollo.

- + diff --git a/archives/2020/03/index.html b/archives/2020/03/index.html new file mode 100644 index 0000000..fa153b5 --- /dev/null +++ b/archives/2020/03/index.html @@ -0,0 +1,725 @@ + + + + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+
+

Features

+

+ You’ll love the thoughtful architecture of Subspace +

+
+
+

Event Tracking & Event Sourcing

+

You can track events and react to their values. With Subspace observables doing event sourcing is easy.

+ + + + + + + + + + + + + View details + +
import { $average, $latest } from "@embarklabs/subspace";
+
+const rating$ = Product.events.Rating.track().map("rating"));
+
+rating$.pipe($latest(5), $average()).subscribe((rating) => {
+  console.log("average rating of the last 5 events is " + rating)
+});
+
+
+

Tracking State

+

You can track changes to a contract state variable, by specifying the view function and arguments to call and query the contract.

+ + + + + + + + + + + + + View details + +
const productTitle$ = ProductList.methods.products(0).track().map("title");
+  productTitle$.subscribe((title) => console.log("product title is " + title));
+});
+
+
+

Tracking balances

+

You can also track changes in both ETH and ERC20 token balances

+ + + + + + + + + + + + + View details + +
const address = "0x0001020304050607080900010203040506070809";
+
+subspace.trackBalance(address).subscribe((balance) => {
+  console.log("ETH balance is ", balance)
+});
+
+subspace.trackBalance(address, "0x744d70fdbe2ba4cf95131626614a1763df805b9e").subscribe((balance) => {
+  console.log("SNT balance is ", balance)
+});
+
+
+

React integration

+

Subspace can make any react component compatible with observables so you easily reactive components

+ + + + + + + + + + + + + View details + +
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archives/2020/index.html b/archives/2020/index.html new file mode 100644 index 0000000..b0e88e6 --- /dev/null +++ b/archives/2020/index.html @@ -0,0 +1,725 @@ + + + + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+
+

Features

+

+ You’ll love the thoughtful architecture of Subspace +

+
+
+

Event Tracking & Event Sourcing

+

You can track events and react to their values. With Subspace observables doing event sourcing is easy.

+ + + + + + + + + + + + + View details + +
import { $average, $latest } from "@embarklabs/subspace";
+
+const rating$ = Product.events.Rating.track().map("rating"));
+
+rating$.pipe($latest(5), $average()).subscribe((rating) => {
+  console.log("average rating of the last 5 events is " + rating)
+});
+
+
+

Tracking State

+

You can track changes to a contract state variable, by specifying the view function and arguments to call and query the contract.

+ + + + + + + + + + + + + View details + +
const productTitle$ = ProductList.methods.products(0).track().map("title");
+  productTitle$.subscribe((title) => console.log("product title is " + title));
+});
+
+
+

Tracking balances

+

You can also track changes in both ETH and ERC20 token balances

+ + + + + + + + + + + + + View details + +
const address = "0x0001020304050607080900010203040506070809";
+
+subspace.trackBalance(address).subscribe((balance) => {
+  console.log("ETH balance is ", balance)
+});
+
+subspace.trackBalance(address, "0x744d70fdbe2ba4cf95131626614a1763df805b9e").subscribe((balance) => {
+  console.log("SNT balance is ", balance)
+});
+
+
+

React integration

+

Subspace can make any react component compatible with observables so you easily reactive components

+ + + + + + + + + + + + + View details + +
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/archives/index.html b/archives/index.html new file mode 100644 index 0000000..04ef0a3 --- /dev/null +++ b/archives/index.html @@ -0,0 +1,725 @@ + + + + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+
+

Features

+

+ You’ll love the thoughtful architecture of Subspace +

+
+
+

Event Tracking & Event Sourcing

+

You can track events and react to their values. With Subspace observables doing event sourcing is easy.

+ + + + + + + + + + + + + View details + +
import { $average, $latest } from "@embarklabs/subspace";
+
+const rating$ = Product.events.Rating.track().map("rating"));
+
+rating$.pipe($latest(5), $average()).subscribe((rating) => {
+  console.log("average rating of the last 5 events is " + rating)
+});
+
+
+

Tracking State

+

You can track changes to a contract state variable, by specifying the view function and arguments to call and query the contract.

+ + + + + + + + + + + + + View details + +
const productTitle$ = ProductList.methods.products(0).track().map("title");
+  productTitle$.subscribe((title) => console.log("product title is " + title));
+});
+
+
+

Tracking balances

+

You can also track changes in both ETH and ERC20 token balances

+ + + + + + + + + + + + + View details + +
const address = "0x0001020304050607080900010203040506070809";
+
+subspace.trackBalance(address).subscribe((balance) => {
+  console.log("ETH balance is ", balance)
+});
+
+subspace.trackBalance(address, "0x744d70fdbe2ba4cf95131626614a1763df805b9e").subscribe((balance) => {
+  console.log("SNT balance is ", balance)
+});
+
+
+

React integration

+

Subspace can make any react component compatible with observables so you easily reactive components

+ + + + + + + + + + + + + View details + +
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/css/0.styles.b4d346dc.css b/assets/css/0.styles.b4d346dc.css deleted file mode 100644 index 4ed2af0..0000000 --- a/assets/css/0.styles.b4d346dc.css +++ /dev/null @@ -1 +0,0 @@ -@import url(/subspace-docs/inter/inter.css);#nprogress{pointer-events:none}#nprogress .bar{background:#3eaf7c;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #3eaf7c,0 0 5px #3eaf7c;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border-color:#3eaf7c transparent transparent #3eaf7c;border-style:solid;border-width:2px;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.icon.outbound{color:#aaa;display:inline-block;vertical-align:middle;position:relative;top:-1px}.home{padding:3.6rem 2rem 0;max-width:960px;margin:0 auto;display:block}.home .hero{text-align:center}.home .hero img{max-width:100%;max-height:280px;display:block;margin:3rem auto 1.5rem}.home .hero h1{font-size:3rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.8rem auto}.home .hero .description{max-width:35rem;font-size:1.6rem;line-height:1.3;color:#6a8bad}.home .hero .action-button{display:inline-block;font-size:1.2rem;color:#fff;background-color:#3eaf7c;padding:.8rem 1.6rem;border-radius:4px;transition:background-color .1s ease;box-sizing:border-box;border-bottom:1px solid #389d70}.home .hero .action-button:hover{background-color:#4abf8a}.home .features{border-top:1px solid #eaecef;padding:1.2rem 0;margin-top:2.5rem;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:stretch;justify-content:space-between}.home .feature{flex-grow:1;flex-basis:30%;max-width:30%}.home .feature h2{font-size:1.4rem;font-weight:500;border-bottom:none;padding-bottom:0;color:#3a5169}.home .feature p{color:#4e6e8e}.home .footer{padding:2.5rem;border-top:1px solid #eaecef;text-align:center;color:#4e6e8e}@media (max-width:719px){.home .features{flex-direction:column}.home .feature{max-width:100%;padding:0 2.5rem}}@media (max-width:419px){.home{padding-left:1.5rem;padding-right:1.5rem}.home .hero img{max-height:210px;margin:2rem auto 1.2rem}.home .hero h1{font-size:2rem}.home .hero .action,.home .hero .description,.home .hero h1{margin:1.2rem auto}.home .hero .description{font-size:1.2rem}.home .hero .action-button{font-size:1rem;padding:.6rem 1.2rem}.home .feature h2{font-size:1.25rem}}.search-box{display:inline-block;position:relative;margin-right:1rem}.search-box input{cursor:text;width:10rem;height:2rem;color:#4e6e8e;display:inline-block;border:1px solid #cfd4db;border-radius:2rem;font-size:.9rem;line-height:2rem;padding:0 .5rem 0 2rem;outline:none;transition:all .2s ease;background:#fff url(/assets/img/search.83621669.svg) .6rem .5rem no-repeat;background-size:1rem}.search-box input:focus{cursor:auto;border-color:#3eaf7c}.search-box .suggestions{background:#fff;width:20rem;position:absolute;top:1.5rem;border:1px solid #cfd4db;border-radius:6px;padding:.4rem;list-style-type:none}.search-box .suggestions.align-right{right:0}.search-box .suggestion{line-height:1.4;padding:.4rem .6rem;border-radius:4px;cursor:pointer}.search-box .suggestion a{white-space:normal;color:#5d82a6}.search-box .suggestion a .page-title{font-weight:600}.search-box .suggestion a .header{font-size:.9em;margin-left:.25em}.search-box .suggestion.focused{background-color:#f3f4f5}.search-box .suggestion.focused a{color:#3eaf7c}@media (max-width:959px){.search-box input{cursor:pointer;width:0;border-color:transparent;position:relative}.search-box input:focus{cursor:text;left:0;width:10rem}}@media (-ms-high-contrast:none){.search-box input{height:2rem}}@media (max-width:959px) and (min-width:719px){.search-box .suggestions{left:0}}@media (max-width:719px){.search-box{margin-right:0}.search-box input{left:1rem}.search-box .suggestions{right:0}}@media (max-width:419px){.search-box .suggestions{width:calc(100vw - 4rem)}.search-box input:focus{width:8rem}}.sidebar-button{cursor:pointer;display:none;width:1.25rem;height:1.25rem;position:absolute;padding:.6rem;top:.6rem;left:1rem}.sidebar-button .icon{display:block;width:1.25rem;height:1.25rem}@media (max-width:719px){.sidebar-button{display:block}}.dropdown-enter,.dropdown-leave-to{height:0!important}.dropdown-wrapper{cursor:pointer}.dropdown-wrapper .dropdown-title{display:block}.dropdown-wrapper .dropdown-title:hover{border-color:transparent}.dropdown-wrapper .dropdown-title .arrow{vertical-align:middle;margin-top:-1px;margin-left:.4rem}.dropdown-wrapper .nav-dropdown .dropdown-item{color:inherit;line-height:1.7rem}.dropdown-wrapper .nav-dropdown .dropdown-item h4{margin:.45rem 0 0;border-top:1px solid #eee;padding:.45rem 1.5rem 0 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper{padding:0;list-style:none}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem-wrapper .dropdown-subitem{font-size:.9em}.dropdown-wrapper .nav-dropdown .dropdown-item a{display:block;line-height:1.7rem;position:relative;border-bottom:none;font-weight:400;margin-bottom:0;padding:0 1.5rem 0 1.25rem}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active,.dropdown-wrapper .nav-dropdown .dropdown-item a:hover{color:#3eaf7c}.dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{content:"";width:0;height:0;border-left:5px solid #3eaf7c;border-top:3px solid transparent;border-bottom:3px solid transparent;position:absolute;top:calc(50% - 2px);left:9px}.dropdown-wrapper .nav-dropdown .dropdown-item:first-child h4{margin-top:0;padding-top:0;border-top:0}@media (max-width:719px){.dropdown-wrapper.open .dropdown-title{margin-bottom:.5rem}.dropdown-wrapper .nav-dropdown{transition:height .1s ease-out;overflow:hidden}.dropdown-wrapper .nav-dropdown .dropdown-item h4{border-top:0;margin-top:0;padding-top:0}.dropdown-wrapper .nav-dropdown .dropdown-item>a,.dropdown-wrapper .nav-dropdown .dropdown-item h4{font-size:15px;line-height:2rem}.dropdown-wrapper .nav-dropdown .dropdown-item .dropdown-subitem{font-size:14px;padding-left:1rem}}@media (min-width:719px){.dropdown-wrapper{height:1.8rem}.dropdown-wrapper:hover .nav-dropdown{display:block!important}.dropdown-wrapper .dropdown-title .arrow{border-left:4px solid transparent;border-right:4px solid transparent;border-top:6px solid #ccc;border-bottom:0}.dropdown-wrapper .nav-dropdown{display:none;height:auto!important;box-sizing:border-box;max-height:calc(100vh - 2.7rem);overflow-y:auto;position:absolute;top:100%;right:0;background-color:#fff;padding:.6rem 0;border:1px solid;border-color:#ddd #ddd #ccc;text-align:left;border-radius:.25rem;white-space:nowrap;margin:0}}.nav-links{display:inline-block}.nav-links a{line-height:1.4rem;color:inherit}.nav-links a.router-link-active,.nav-links a:hover{color:#3eaf7c}.nav-links .nav-item{position:relative;display:inline-block;margin-left:1.5rem;line-height:2rem}.nav-links .nav-item:first-child{margin-left:0}.nav-links .repo-link{margin-left:1.5rem}@media (max-width:719px){.nav-links .nav-item,.nav-links .repo-link{margin-left:0}}@media (min-width:719px){.nav-links a.router-link-active,.nav-links a:hover{color:#2c3e50}.nav-item>a:not(.external).router-link-active,.nav-item>a:not(.external):hover{margin-bottom:-2px;border-bottom:2px solid #46bd87}}.navbar{padding:.7rem 1.5rem;line-height:2.2rem}.navbar a,.navbar img,.navbar span{display:inline-block}.navbar .logo{height:2.2rem;min-width:2.2rem;margin-right:.8rem;vertical-align:top}.navbar .site-name{font-size:1.3rem;font-weight:600;color:#2c3e50;position:relative}.navbar .links{padding-left:1.5rem;box-sizing:border-box;background-color:#fff;white-space:nowrap;font-size:.9rem;position:absolute;right:1.5rem;top:.7rem;display:flex}.navbar .links .search-box{flex:0 0 auto;vertical-align:top}@media (max-width:719px){.navbar{padding-left:4rem}.navbar .can-hide{display:none}.navbar .links{padding-left:1.5rem}.navbar .site-name{width:calc(100vw - 9.4rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.page-edit{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-edit{padding:2rem}}@media (max-width:419px){.page-edit{padding:1.5rem}}.page-edit{padding-top:1rem;padding-bottom:1rem;overflow:auto}.page-edit .edit-link{display:inline-block}.page-edit .edit-link a{color:#4e6e8e;margin-right:.25rem}.page-edit .last-updated{float:right;font-size:.9em}.page-edit .last-updated .prefix{font-weight:500;color:#4e6e8e}.page-edit .last-updated .time{font-weight:400;color:#aaa}@media (max-width:719px){.page-edit .edit-link{margin-bottom:.5rem}.page-edit .last-updated{font-size:.8em;float:none;text-align:left}}.page-nav{max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.page-nav{padding:2rem}}@media (max-width:419px){.page-nav{padding:1.5rem}}.page-nav{padding-top:1rem;padding-bottom:0}.page-nav .inner{min-height:2rem;margin-top:0;border-top:1px solid #eaecef;padding-top:1rem;overflow:auto}.page-nav .next{float:right}.page{padding-bottom:2rem;display:block}.sidebar-group .sidebar-group{padding-left:.5em}.sidebar-group:not(.collapsable) .sidebar-heading:not(.clickable){cursor:auto;color:inherit}.sidebar-group.is-sub-group{padding-left:0}.sidebar-group.is-sub-group>.sidebar-heading{font-size:.95em;line-height:1.4;font-weight:400;padding-left:2rem}.sidebar-group.is-sub-group>.sidebar-heading:not(.clickable){opacity:.5}.sidebar-group.is-sub-group>.sidebar-group-items{padding-left:1rem}.sidebar-group.is-sub-group>.sidebar-group-items>li>.sidebar-link{font-size:.95em;border-left:none}.sidebar-group.depth-2>.sidebar-heading{border-left:none}.sidebar-heading{color:#2c3e50;transition:color .15s ease;cursor:pointer;font-size:1.1em;font-weight:700;padding:.35rem 1.5rem .35rem 1.25rem;width:100%;box-sizing:border-box;margin:0;border-left:.25rem solid transparent}.sidebar-heading.open,.sidebar-heading:hover{color:inherit}.sidebar-heading .arrow{position:relative;top:-.12em;left:.5em}.sidebar-heading.clickable.active{font-weight:600;color:#3eaf7c;border-left-color:#3eaf7c}.sidebar-heading.clickable:hover{color:#3eaf7c}.sidebar-group-items{transition:height .1s ease-out;font-size:.95em;overflow:hidden}.sidebar .sidebar-sub-headers{padding-left:1rem;font-size:.95em}a.sidebar-link{font-size:1em;font-weight:400;display:inline-block;color:#2c3e50;border-left:.25rem solid transparent;padding:.35rem 1rem .35rem 1.25rem;line-height:1.4;width:100%;box-sizing:border-box}a.sidebar-link:hover{color:#3eaf7c}a.sidebar-link.active{font-weight:600;color:#3eaf7c;border-left-color:#3eaf7c}.sidebar-group a.sidebar-link{padding-left:2rem}.sidebar-sub-headers a.sidebar-link{padding-top:.25rem;padding-bottom:.25rem;border-left:none}.sidebar-sub-headers a.sidebar-link.active{font-weight:500}.sidebar ul{padding:0;margin:0;list-style-type:none}.sidebar a{display:inline-block}.sidebar .nav-links{display:none;border-bottom:1px solid #eaecef;padding:.5rem 0 .75rem}.sidebar .nav-links a{font-weight:600}.sidebar .nav-links .nav-item,.sidebar .nav-links .repo-link{display:block;line-height:1.25rem;font-size:1.1em;padding:.5rem 0 .5rem 1.5rem}.sidebar>.sidebar-links{padding:1.5rem 0}.sidebar>.sidebar-links>li>a.sidebar-link{font-size:1.1em;line-height:1.7;font-weight:700}.sidebar>.sidebar-links>li:not(:first-child){margin-top:.75rem}@media (max-width:719px){.sidebar .nav-links{display:block}.sidebar .nav-links .dropdown-wrapper .nav-dropdown .dropdown-item a.router-link-active:after{top:calc(1rem - 2px)}.sidebar>.sidebar-links{padding:1rem 0}}code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green}.theme-default-content code{color:#476582;padding:.25rem .5rem;margin:0;font-size:.85em;background-color:rgba(27,31,35,.05);border-radius:3px}.theme-default-content code .token.deleted{color:#ec5975}.theme-default-content code .token.inserted{color:#3eaf7c}.theme-default-content pre,.theme-default-content pre[class*=language-]{line-height:1.4;padding:1.25rem 1.5rem;margin:.85rem 0;background-color:#282c34;border-radius:6px;overflow:auto}.theme-default-content pre[class*=language-] code,.theme-default-content pre code{color:#fff;padding:0;background-color:transparent;border-radius:0}div[class*=language-]{position:relative;background-color:#282c34;border-radius:6px}div[class*=language-] .highlight-lines{-webkit-user-select:none;-ms-user-select:none;user-select:none;padding-top:1.3rem;position:absolute;top:0;left:0;width:100%;line-height:1.4}div[class*=language-] .highlight-lines .highlighted{background-color:rgba(0,0,0,.66)}div[class*=language-] pre,div[class*=language-] pre[class*=language-]{background:transparent;position:relative;z-index:1}div[class*=language-]:before{position:absolute;z-index:3;top:.8em;right:1em;font-size:.75rem;color:hsla(0,0%,100%,.4)}div[class*=language-]:not(.line-numbers-mode) .line-numbers-wrapper{display:none}div[class*=language-].line-numbers-mode .highlight-lines .highlighted{position:relative}div[class*=language-].line-numbers-mode .highlight-lines .highlighted:before{content:" ";position:absolute;z-index:3;left:0;top:0;display:block;width:3.5rem;height:100%;background-color:rgba(0,0,0,.66)}div[class*=language-].line-numbers-mode pre{padding-left:4.5rem;vertical-align:middle}div[class*=language-].line-numbers-mode .line-numbers-wrapper{position:absolute;top:0;width:3.5rem;text-align:center;color:hsla(0,0%,100%,.3);padding:1.25rem 0;line-height:1.4}div[class*=language-].line-numbers-mode .line-numbers-wrapper br{-webkit-user-select:none;-ms-user-select:none;user-select:none}div[class*=language-].line-numbers-mode .line-numbers-wrapper .line-number{position:relative;z-index:4;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-size:.85em}div[class*=language-].line-numbers-mode:after{content:"";position:absolute;z-index:2;top:0;left:0;width:3.5rem;height:100%;border-radius:6px 0 0 6px;border-right:1px solid rgba(0,0,0,.66);background-color:#282c34}div[class~=language-js]:before{content:"js"}div[class~=language-ts]:before{content:"ts"}div[class~=language-html]:before{content:"html"}div[class~=language-md]:before{content:"md"}div[class~=language-vue]:before{content:"vue"}div[class~=language-css]:before{content:"css"}div[class~=language-sass]:before{content:"sass"}div[class~=language-scss]:before{content:"scss"}div[class~=language-less]:before{content:"less"}div[class~=language-stylus]:before{content:"stylus"}div[class~=language-go]:before{content:"go"}div[class~=language-java]:before{content:"java"}div[class~=language-c]:before{content:"c"}div[class~=language-sh]:before{content:"sh"}div[class~=language-yaml]:before{content:"yaml"}div[class~=language-py]:before{content:"py"}div[class~=language-docker]:before{content:"docker"}div[class~=language-dockerfile]:before{content:"dockerfile"}div[class~=language-makefile]:before{content:"makefile"}div[class~=language-javascript]:before{content:"js"}div[class~=language-typescript]:before{content:"ts"}div[class~=language-markup]:before{content:"html"}div[class~=language-markdown]:before{content:"md"}div[class~=language-json]:before{content:"json"}div[class~=language-ruby]:before{content:"rb"}div[class~=language-python]:before{content:"py"}div[class~=language-bash]:before{content:"sh"}div[class~=language-php]:before{content:"php"}.custom-block .custom-block-title{font-weight:600;margin-bottom:-.4rem}.custom-block.danger,.custom-block.tip,.custom-block.warning{padding:.1rem 1.5rem;border-left-width:.5rem;border-left-style:solid;margin:1rem 0}.custom-block.tip{background-color:#f3f5f7;border-color:#42b983}.custom-block.warning{background-color:rgba(255,229,100,.3);border-color:#e7c000;color:#6b5900}.custom-block.warning .custom-block-title{color:#b29400}.custom-block.warning a{color:#2c3e50}.custom-block.danger{background-color:#ffe6e6;border-color:#c00;color:#4d0000}.custom-block.danger .custom-block-title{color:#900}.custom-block.danger a{color:#2c3e50}.arrow{display:inline-block;width:0;height:0}.arrow.up{border-bottom:6px solid #ccc}.arrow.down,.arrow.up{border-left:4px solid transparent;border-right:4px solid transparent}.arrow.down{border-top:6px solid #ccc}.arrow.right{border-left:6px solid #ccc}.arrow.left,.arrow.right{border-top:4px solid transparent;border-bottom:4px solid transparent}.arrow.left{border-right:6px solid #ccc}.theme-default-content:not(.custom){max-width:740px;margin:0 auto;padding:2rem 2.5rem}@media (max-width:959px){.theme-default-content:not(.custom){padding:2rem}}@media (max-width:419px){.theme-default-content:not(.custom){padding:1.5rem}}.table-of-contents .badge{vertical-align:middle}body,html{padding:0;margin:0;background-color:#fff}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:16px;color:#2c3e50}.page{padding-left:20rem}.navbar{z-index:20;right:0;height:3.6rem;background-color:#fff;box-sizing:border-box;border-bottom:1px solid #eaecef}.navbar,.sidebar-mask{position:fixed;top:0;left:0}.sidebar-mask{z-index:9;width:100vw;height:100vh;display:none}.sidebar{font-size:16px;background-color:#fff;width:20rem;position:fixed;z-index:10;margin:0;top:3.6rem;left:0;bottom:0;box-sizing:border-box;border-right:1px solid #eaecef;overflow-y:auto}.theme-default-content:not(.custom)>:first-child{margin-top:3.6rem}.theme-default-content:not(.custom) a:hover{text-decoration:underline}.theme-default-content:not(.custom) p.demo{padding:1rem 1.5rem;border:1px solid #ddd;border-radius:4px}.theme-default-content:not(.custom) img{max-width:100%}.theme-default-content.custom{padding:0;margin:0}.theme-default-content.custom img{max-width:100%}a{font-weight:500;text-decoration:none}a,p a code{color:#3eaf7c}p a code{font-weight:400}kbd{background:#eee;border:.15rem solid #ddd;border-bottom:.25rem solid #ddd;border-radius:.15rem;padding:0 .15em}blockquote{font-size:1rem;color:#999;border-left:.2rem solid #dfe2e5;margin:1rem 0;padding:.25rem 0 .25rem 1rem}blockquote>p{margin:0}ol,ul{padding-left:1.2em}strong{font-weight:600}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.25}.theme-default-content:not(.custom)>h1,.theme-default-content:not(.custom)>h2,.theme-default-content:not(.custom)>h3,.theme-default-content:not(.custom)>h4,.theme-default-content:not(.custom)>h5,.theme-default-content:not(.custom)>h6{margin-top:-3.1rem;padding-top:4.6rem;margin-bottom:0}.theme-default-content:not(.custom)>h1:first-child,.theme-default-content:not(.custom)>h2:first-child,.theme-default-content:not(.custom)>h3:first-child,.theme-default-content:not(.custom)>h4:first-child,.theme-default-content:not(.custom)>h5:first-child,.theme-default-content:not(.custom)>h6:first-child{margin-top:-1.5rem;margin-bottom:1rem}.theme-default-content:not(.custom)>h1:first-child+.custom-block,.theme-default-content:not(.custom)>h1:first-child+p,.theme-default-content:not(.custom)>h1:first-child+pre,.theme-default-content:not(.custom)>h2:first-child+.custom-block,.theme-default-content:not(.custom)>h2:first-child+p,.theme-default-content:not(.custom)>h2:first-child+pre,.theme-default-content:not(.custom)>h3:first-child+.custom-block,.theme-default-content:not(.custom)>h3:first-child+p,.theme-default-content:not(.custom)>h3:first-child+pre,.theme-default-content:not(.custom)>h4:first-child+.custom-block,.theme-default-content:not(.custom)>h4:first-child+p,.theme-default-content:not(.custom)>h4:first-child+pre,.theme-default-content:not(.custom)>h5:first-child+.custom-block,.theme-default-content:not(.custom)>h5:first-child+p,.theme-default-content:not(.custom)>h5:first-child+pre,.theme-default-content:not(.custom)>h6:first-child+.custom-block,.theme-default-content:not(.custom)>h6:first-child+p,.theme-default-content:not(.custom)>h6:first-child+pre{margin-top:2rem}h1:hover .header-anchor,h2:hover .header-anchor,h3:hover .header-anchor,h4:hover .header-anchor,h5:hover .header-anchor,h6:hover .header-anchor{opacity:1}h1{font-size:2.2rem}h2{font-size:1.65rem;padding-bottom:.3rem;border-bottom:1px solid #eaecef}h3{font-size:1.35rem}a.header-anchor{font-size:.85em;float:left;margin-left:-.87em;padding-right:.23em;margin-top:.125em;opacity:0}a.header-anchor:hover{text-decoration:none}.line-number,code,kbd{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}ol,p,ul{line-height:1.7}hr{border:0;border-top:1px solid #eaecef}table{border-collapse:collapse;margin:1rem 0;display:block;overflow-x:auto}tr{border-top:1px solid #dfe2e5}tr:nth-child(2n){background-color:#f6f8fa}td,th{border:1px solid #dfe2e5;padding:.6em 1em}.theme-container.sidebar-open .sidebar-mask{display:block}.theme-container.no-navbar .theme-default-content:not(.custom)>h1,.theme-container.no-navbar h2,.theme-container.no-navbar h3,.theme-container.no-navbar h4,.theme-container.no-navbar h5,.theme-container.no-navbar h6{margin-top:1.5rem;padding-top:0}.theme-container.no-navbar .sidebar{top:0}@media (min-width:720px){.theme-container.no-sidebar .sidebar{display:none}.theme-container.no-sidebar .page{padding-left:0}}@media (max-width:959px){.sidebar{font-size:15px;width:16.4rem}.page{padding-left:16.4rem}}@media (max-width:719px){.sidebar{top:0;padding-top:3.6rem;transform:translateX(-100%);transition:transform .2s ease}.page{padding-left:0}.theme-container.sidebar-open .sidebar{transform:translateX(0)}.theme-container.no-navbar .sidebar{padding-top:0}}@media (max-width:419px){h1{font-size:1.9rem}.theme-default-content div[class*=language-]{margin:.85rem -1.5rem;border-radius:0}}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.theme-default-content:not(.custom)>h2{margin-top:-1em}.code-container{display:flex;flex-wrap:wrap;margin-top:80px}.code-container+.code-container{margin-top:80px}.code-text{display:block;flex-basis:30%;padding:13px 4%;padding-left:0!important;text-align:justify;color:#000;line-height:29px}.code-content{display:block;width:66%;font-size:16.5px}@media screen and (max-width:1000px){.code-text{flex-basis:100%;margin-right:20px;padding-left:0!important;line-height:29px}.code-content{width:100%}}.home{max-width:1220px!important}#intro{font-size:17px}#intro h3{font-size:25px;line-height:32.5px;margin-top:0}.feature p{color:#000!important;font-size:17px;font-weight:400;line-height:29px}.cls-1[data-v-07c470a6]{fill:url(#linear-gradient-404)}.cls-2[data-v-07c470a6],.cls-6[data-v-07c470a6]{opacity:.65}.cls-2[data-v-07c470a6]{fill:url(#linear-gradient-404-2)}.cls-3[data-v-07c470a6]{fill:url(#linear-gradient-404-3)}.cls-4[data-v-07c470a6]{fill:url(#linear-gradient-404-4)}.cls-5[data-v-07c470a6]{fill:url(#linear-gradient-404-5)}.cls-6[data-v-07c470a6]{fill:url(#linear-gradient-404-6)}.cls-7[data-v-07c470a6]{fill:url(#linear-gradient-404-7)}.cls-8[data-v-07c470a6]{fill:#e2e2e2}.cls-9[data-v-07c470a6]{fill:#cecece}.cls-10[data-v-07c470a6]{fill:#f2f2f2}.cls-11[data-v-07c470a6]{fill:#eaeaea}.cls-12[data-v-07c470a6]{fill:#39b44a}.cls-13[data-v-07c470a6]{fill:#c59b6d}.cls-14[data-v-07c470a6]{fill:#a57c52}.cls-15[data-v-07c470a6]{fill:#009145}.cls-16[data-v-07c470a6]{fill:url(#linear-gradient-404-8)}.cls-17[data-v-07c470a6]{fill:url(#linear-gradient-404-9)}.cls-18[data-v-07c470a6],.cls-19[data-v-07c470a6]{fill:#fff}.cls-18[data-v-07c470a6]{opacity:.26}.cls-20[data-v-07c470a6]{fill:#282828}.cls-21[data-v-07c470a6]{fill:#2d2d2d}.cls-22[data-v-07c470a6],.cls-23[data-v-07c470a6],.cls-27[data-v-07c470a6],.cls-28[data-v-07c470a6],.cls-29[data-v-07c470a6]{fill:none}.cls-22[data-v-07c470a6],.cls-23[data-v-07c470a6]{stroke:#ecf4f8;stroke-linecap:round;stroke-width:.96px}.cls-22[data-v-07c470a6]{stroke-linejoin:round}.cls-23[data-v-07c470a6],.cls-27[data-v-07c470a6],.cls-28[data-v-07c470a6],.cls-29[data-v-07c470a6]{stroke-miterlimit:10}.cls-24[data-v-07c470a6]{fill:#ecf4f8}.cls-25[data-v-07c470a6]{fill:#ff0}.cls-26[data-v-07c470a6]{fill:#0ff}.cls-27[data-v-07c470a6]{stroke:#fbed21}.cls-27[data-v-07c470a6],.cls-28[data-v-07c470a6],.cls-29[data-v-07c470a6]{stroke-width:8px}.cls-28[data-v-07c470a6]{stroke:#ec1e79}.cls-29[data-v-07c470a6]{stroke:#0f0}.cls-30[data-v-07c470a6]{fill:url(#linear-gradient-404-10)}.cls-31[data-v-07c470a6]{opacity:.12}.cls-32[data-v-07c470a6]{opacity:.15}.cls-33[data-v-07c470a6]{opacity:.18}.cls-34[data-v-07c470a6]{opacity:.33}.badge[data-v-f531b196]{display:inline-block;font-size:14px;height:18px;line-height:18px;border-radius:3px;padding:0 6px;color:#fff}.badge.green[data-v-f531b196],.badge.tip[data-v-f531b196],.badge[data-v-f531b196]{background-color:#42b983}.badge.error[data-v-f531b196]{background-color:#da5961}.badge.warn[data-v-f531b196],.badge.warning[data-v-f531b196],.badge.yellow[data-v-f531b196]{background-color:#e7c000}.badge+.badge[data-v-f531b196]{margin-left:5px} \ No newline at end of file diff --git a/assets/img/logo-small.png b/assets/img/logo-small.png deleted file mode 100644 index 05991613c3e8782ab2bb085bdf99cbd97bcb444e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2756 zcmV;#3On_QP)FwP7p9VQ8%evsXd|k%le$@0TC}!f6rvEsQnQhbB1rs` zibjHLrJw~0Bq+qJY9NcyPteH|h;0m;B02Z;+~LTkC35D@of(q(06`SzjwF6O=X~eq zULs5(Dz(~dTh5e8in2tSClW3I@fXhW_t|GFv4un)A-4GWrULjLebs#M=W7iZ6A-2Z znzSdyGgSe&$Ul~!C&~oW0HTKk&@6S2_8YZY3&wzn6ZrD`TNRXYg9)fWBCyqwf1ecW zm;9sVxClG-U%-T5N8B^g#_6U}7(0P4Z*93qayOyHc|__yyXMVFS=uO!mB3fFKfDZz zZYH=z6Sw)``n5VtDaJxza;pneb@SivT}eXrL?9q%{NjTT%LwAYm^`9eGo8mj|1prK z;Xsaf<^3B=Y~#B?V3Lw}sH>J_U?Lj))kI14v$sEgnBcx_5emk429<^e<%@o zT1g$}#SH~&4HDuharg2g?iiU^pa8K#5#%wvWaOPMi-O!!q+CdVaT0fo)E3xRUGblY zC5hDb(Z#ne`$WmA5CV^5-0C=qJ4ObjoNh^tMvu@~ZGX71vXhiNR^m3mN3>vQ+MsKb=Nnm{cc zT&P!uT??9^2669)3vZdHDaS7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3yja-1xuuWf%F%bg0dlxEQDRv=YlFf@`L z-JE*BHC6&OaU}KO>EQ=-BH(p=T8?Xw9%F5f2ShXNXfYzSx&7+99;C!r2uwj-;Iakv zlUi~4rje^@^3J??bU@KD)dL~wkO6WfFcon?4d18DGt2iHrguCekD_x(&K-Je2K`L6loAK3~0ZEc7R1^z?woqdxAKoqVW z++I=S-!z%&3RExMSa>(nxwJ;A82E?@mBBm}U6eG7^y~x^p=yzjEdi>fpwKKqsfC70 z8iyd>%^q#^-BdsokP-NIs&z;mS)>*al!1uO>pbjtZoofL!cH15`{%TRZY0nticof&Fx=ZYQO|A zF#-ciJNu|?Nt(t)i95#F2n-1O>0_>1W^cEp)_))j><#%h6j zN0bs&W+GfJtL7;kElua?lG-u!DLi6gJyVsW~mA4dVaCkkpt?3lmfT0000< KMNUMnLSTZ$=N_p5 diff --git a/assets/img/logo.svg b/assets/img/logo.svg deleted file mode 100644 index ea17383..0000000 --- a/assets/img/logo.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/assets/img/search.83621669.svg b/assets/img/search.83621669.svg deleted file mode 100644 index 03d8391..0000000 --- a/assets/img/search.83621669.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/js/10.4595e7f8.js b/assets/js/10.4595e7f8.js deleted file mode 100644 index 05a4465..0000000 --- a/assets/js/10.4595e7f8.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{212:function(t,s,a){"use strict";a.r(s);var n=a(28),e=Object(n.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"getting-started"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getting-started"}},[t._v("#")]),t._v(" Getting Started")]),t._v(" "),a("h2",{attrs:{id:"installation"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[t._v("#")]),t._v(" Installation")]),t._v(" "),a("p",[a("strong",[t._v("Subspace")]),t._v(" can be used in browser, node and native script environments. To get started install the package "),a("code",[t._v("@embarklabs/subspace")]),t._v(" using "),a("code",[t._v("npm")]),t._v(" or "),a("code",[t._v("yarn")]),t._v(" by executing this command in your project directory:")]),t._v(" "),a("div",{staticClass:"language-bash line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Using npm")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" --save @embarklabs/subspace\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Using yarn")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("yarn")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("add")]),t._v(" @embarklabs/subspace \n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br"),a("span",{staticClass:"line-number"},[t._v("4")]),a("br"),a("span",{staticClass:"line-number"},[t._v("5")]),a("br")])]),a("h2",{attrs:{id:"importing-the-library"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#importing-the-library"}},[t._v("#")]),t._v(" Importing the library")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ESM (might require babel / browserify)")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" Subspace "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'@embarklabs/subspace'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" \n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// CommonJS")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" Subspace "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("require")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'@embarklabs/subspace'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" \n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br"),a("span",{staticClass:"line-number"},[t._v("4")]),a("br"),a("span",{staticClass:"line-number"},[t._v("5")]),a("br")])]),a("h2",{attrs:{id:"connecting-to-a-web3-provider"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#connecting-to-a-web3-provider"}},[t._v("#")]),t._v(" Connecting to a web3 provider")]),t._v(" "),a("p",[t._v("To interact with the EVM, "),a("strong",[t._v("Subspace")]),t._v(" requires a valid Web3 object, connected to a provider")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" subspace "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[t._v("Subspace")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("web3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("init")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br")])]),a("p",[t._v("In addition to the provider, "),a("code",[t._v("Subspace")]),t._v(" also accepts an "),a("code",[t._v("options")]),t._v(" object with settings that can change its behavior:")]),t._v(" "),a("ul",[a("li",[a("code",[t._v("dbFilename")]),t._v(" - Name of the database where the information will be stored (default "),a("code",[t._v("'subspace.db'")]),t._v(")")]),t._v(" "),a("li",[a("code",[t._v("callInterval")]),t._v(" - Interval of time in milliseconds to query a contract/address to determine changes in state or balance. It's only used with HttpProviders (default: "),a("code",[t._v("undefined")]),t._v(". Obtains data every block using the average block time as an interval).")]),t._v(" "),a("li",[a("code",[t._v("refreshLastNBlocks")]),t._v(" - Ignores last N blocks (from current block), stored in the local db and refresh them via a web3 subscription. Useful for possible reorgs (default: 12),")]),t._v(" "),a("li",[a("code",[t._v("disableSubscriptions")]),t._v(" - Subspace by default will attempt to use websocket subscriptions if the current provider supports them, otherwise it will use polling because it asumes the provider is an HttpProvider. This functionality can be disabled by passing true to this option. (default: "),a("code",[t._v("undefined")]),t._v(")")])]),t._v(" "),a("h2",{attrs:{id:"enhancing-your-contract-objects"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#enhancing-your-contract-objects"}},[t._v("#")]),t._v(" Enhancing your contract objects")]),t._v(" "),a("p",[t._v("Subspace provides a method to enhance your web3 Contract objects: "),a("code",[t._v("subspace.contract(instance|{abi,address})")]),t._v(". Calling this method will return a new contract object decorated with a "),a("code",[t._v(".track()")]),t._v(" method for your contract view functions and events.")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" myRxContract "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("contract")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("myContractInstance"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br")])]),a("p",[t._v("You can also instantiate a contract directly by passing the contract ABI and its address:")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" myRXContract "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("contract")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("abi"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" address"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'0x1234...CDEF'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br")])]),a("h2",{attrs:{id:"reacting-to-data"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#reacting-to-data"}},[t._v("#")]),t._v(" Reacting to data")]),t._v(" "),a("p",[t._v("Once it's initialized, you can use "),a("strong",[t._v("Subspace")]),t._v("'s methods to track the contract state, events and balances. These functions return RxJS Observables which you can subscribe to, and obtain and transform the observed data via operators.")]),t._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("What is an Observable?")]),t._v(" "),a("p",[t._v("The "),a("code",[t._v("Observable")]),t._v(" type can be used to model push-based data sources such as DOM events, timer intervals, and sockets. In addition, observables are:")]),t._v(" "),a("ul",[a("li",[t._v("Compositional: Observables can be composed with higher-order combinators.")]),t._v(" "),a("li",[t._v("Lazy: Observables do not start emitting data until an observer has subscribed.")])])]),t._v(" "),a("h4",{attrs:{id:"further-read"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#further-read"}},[t._v("#")]),t._v(" Further read")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://rxjs-dev.firebaseapp.com/guide/observable",target:"_blank",rel:"noopener noreferrer"}},[t._v("RxJS Observables"),a("OutboundLink")],1)])]),t._v(" "),a("h2",{attrs:{id:"tracking-state"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#tracking-state"}},[t._v("#")]),t._v(" Tracking state")]),t._v(" "),a("p",[t._v("You can track changes to a contract state variable, by specifying the view function and arguments to call and query the contract.")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" stateObservable$ "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Contract"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("methods"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("functionName")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("functionArgs"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("track")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br")])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("Tracking the public variables of a contract")]),t._v(" "),a("p",[t._v("State variables implicity create a "),a("code",[t._v("view")]),t._v(" function when they're defined as "),a("code",[t._v("public")]),t._v(". The "),a("code",[t._v("functionName")]),t._v(" would be the same as the variable name, and "),a("code",[t._v("functionArgs")]),t._v(" will have a value when the type is a "),a("code",[t._v("mapping")]),t._v(" or "),a("code",[t._v("array")]),t._v(" (since these require an index value to query them).")])]),t._v(" "),a("p",[t._v("Example:")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" productTitle$ "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" ProductList"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("methods"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("products")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("track")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("map")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"title"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nproductTitle$"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("subscribe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("title")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"product title is "')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" title"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Alternative using Subspace low level API")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" producTitle$ "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("trackProperty")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("ProductList"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"products"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" web3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("eth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("defaultAccount"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("...")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br"),a("span",{staticClass:"line-number"},[t._v("4")]),a("br"),a("span",{staticClass:"line-number"},[t._v("5")]),a("br"),a("span",{staticClass:"line-number"},[t._v("6")]),a("br"),a("span",{staticClass:"line-number"},[t._v("7")]),a("br")])]),a("p",[t._v("The subscription will be triggered whenever the title changes")]),t._v(" "),a("h2",{attrs:{id:"tracking-events"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#tracking-events"}},[t._v("#")]),t._v(" Tracking events")]),t._v(" "),a("p",[t._v("You can track events and react to their returned values.")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" eventObservable$ "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Contract"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("event"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("eventName"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("track")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br")])]),a("p",[t._v("Example:")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rating$ "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Product"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("events"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Rating"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("track")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("map")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rating"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("pipe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("map")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("parseInt")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("x"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nrating$"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("subscribe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("rating")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rating received: "')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" rating"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Alternative using Subspace low level API")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rating$ "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("trackEvent")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("Product"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Rating"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("fromBlock"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("...")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br"),a("span",{staticClass:"line-number"},[t._v("4")]),a("br"),a("span",{staticClass:"line-number"},[t._v("5")]),a("br"),a("span",{staticClass:"line-number"},[t._v("6")]),a("br"),a("span",{staticClass:"line-number"},[t._v("7")]),a("br")])]),a("p",[a("strong",[t._v("Event Sourcing")])]),t._v(" "),a("p",[t._v("You can easily do event sourcing with subspace.")]),t._v(" "),a("p",[t._v("For e.g: if you needed to get the average rating of the last 5 events:")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" $average"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" $latest "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"@embarklabs/subspace"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rating$ "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Product"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("events"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Rating"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("track")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("map")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rating"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("pipe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("map")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("x")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("parseInt")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("x"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nrating$"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("pipe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("$latest")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("$average")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("subscribe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("rating")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"average rating of the last 5 events is "')]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" rating"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br"),a("span",{staticClass:"line-number"},[t._v("4")]),a("br"),a("span",{staticClass:"line-number"},[t._v("5")]),a("br"),a("span",{staticClass:"line-number"},[t._v("6")]),a("br"),a("span",{staticClass:"line-number"},[t._v("7")]),a("br")])]),a("h2",{attrs:{id:"tracking-balances"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#tracking-balances"}},[t._v("#")]),t._v(" Tracking balances")]),t._v(" "),a("p",[t._v("You can also track changes in both ETH and ERC20 token balances for each mined block or time interval depending on the "),a("code",[t._v("callInterval")]),t._v(" configured.")]),t._v(" "),a("p",[t._v("Tracking ETH balance in an address:")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" address "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0x0001020304050607080900010203040506070809"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\nsubspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("trackBalance")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("address"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("subscribe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("balance")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ETH balance is "')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" balance"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br"),a("span",{staticClass:"line-number"},[t._v("4")]),a("br"),a("span",{staticClass:"line-number"},[t._v("5")]),a("br")])]),a("p",[t._v("Tracking ETH balance in a Contract:")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("Contract"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("trackBalance")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("subscribe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("balance")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ETH balance is "')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" balance"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br")])]),a("p",[t._v("Tracking an ERC20 balance in a Contract:")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" tokenAddress "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0x744d70fdbe2ba4cf95131626614a1763df805b9e"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// SNT Address")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" myBalanceObservable$ "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Contract"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("trackBalance")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("tokenAddress"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br")])]),a("div",{staticClass:"custom-block warning"},[a("p",[t._v("Balances are returned as a string containing the value in "),a("em",[t._v("wei")]),t._v(".")])]),t._v(" "),a("h2",{attrs:{id:"getting-block-data-gas-prices-and-block-time"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#getting-block-data-gas-prices-and-block-time"}},[t._v("#")]),t._v(" Getting block data, gas prices and block time")]),t._v(" "),a("p",[t._v("Subspace also provides a way to always receive the latest block object:")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("trackBlock")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("subscribe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("block")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The latest block data: "')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" block"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br")])]),a("p",[t._v("If you don't need all the block information, but just the block number, you can use instead:")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("trackBlockNumber")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("subscribe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("blockNumber")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The latest block number: "')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" blockNumber"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br")])]),a("p",[t._v("You can also access the average block time. This takes in account only the last 10 blocks:")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("trackAverageBlocktime")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("subscribe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("blocktimeMS")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The average block time in milliseconds is: "')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" blocktimeMS"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br")])]),a("p",[t._v("Finally, if you want to obtain the most up to date median gas price:")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("trackGasPrice")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("subscribe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("gasPrice")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Gas price in wei"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" gasPrice"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br")])]),a("h2",{attrs:{id:"subscriptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#subscriptions"}},[t._v("#")]),t._v(" Subscriptions")]),t._v(" "),a("p",[t._v("Once you have an "),a("code",[t._v("Observable")]),t._v(", you may receive a stream of data by creating a subscription. Subscriptions are triggered each time an observable emits a new value. These subscription receive a callback that must have a parameter which represents the value received from the observable (a contract state variable, an event, or the balance of an address); and they return an object representing the subscription.")]),t._v(" "),a("p",[t._v("Subscriptions can be disposed by executing the method "),a("code",[t._v("unsubscribe()")]),t._v(" liberating the resource held by it:")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" myBalanceObservable$ "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("trackBalance")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("address"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" tokenAddress"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" subscription "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" myBalanceObservable$"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("subscribe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("value")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" \n console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"The balance is: "')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" value"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" \n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ...")]),t._v("\n\nsubscription"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("unsubscribe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br"),a("span",{staticClass:"line-number"},[t._v("4")]),a("br"),a("span",{staticClass:"line-number"},[t._v("5")]),a("br"),a("span",{staticClass:"line-number"},[t._v("6")]),a("br"),a("span",{staticClass:"line-number"},[t._v("7")]),a("br"),a("span",{staticClass:"line-number"},[t._v("8")]),a("br")])]),a("h4",{attrs:{id:"further-read-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#further-read-2"}},[t._v("#")]),t._v(" Further read")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://rxjs-dev.firebaseapp.com/guide/subscription",target:"_blank",rel:"noopener noreferrer"}},[t._v("RxJS Subscriptions"),a("OutboundLink")],1)])]),t._v(" "),a("h2",{attrs:{id:"cleanup"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cleanup"}},[t._v("#")]),t._v(" Cleanup")]),t._v(" "),a("p",[t._v("If "),a("strong",[t._v("Subspace")]),t._v(" is not needed anymore, you need can invoke "),a("code",[t._v("close()")]),t._v(" to dispose and perform the cleanup necessary to remove the internal subscriptions and interval timers created by "),a("strong",[t._v("Subspace")]),t._v(" during its normal execution, thus avoiding any potential memory leak.")]),t._v(" "),a("div",{staticClass:"language- line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("subspace.close();\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br")])]),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("What about subscriptions created with our observables?")]),t._v(" "),a("p",[a("code",[t._v("close()")]),t._v(" will dispose any web3 subscription created when using a Subspace tracking method, however any subscription to an observable must still be unsubscribed manually. The npm package "),a("code",[t._v("subsink")]),t._v(" can be used to clear all the observables' subscriptions at once.")])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/11.638336c9.js b/assets/js/11.638336c9.js deleted file mode 100644 index da80a17..0000000 --- a/assets/js/11.638336c9.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{214:function(t,e,o){"use strict";o.r(e);var r=o(28),s=Object(r.a)({},(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[o("h1",{attrs:{id:"integrations-with-other-frameworks"}},[o("a",{staticClass:"header-anchor",attrs:{href:"#integrations-with-other-frameworks"}},[t._v("#")]),t._v(" Integrations with other frameworks")]),t._v(" "),o("p",[o("strong",[t._v("Subspace")]),t._v(" does not force you to change the architecture of your dApps, making it easy to use on existing projects. In this section you can find some examples and tips on how to integrate "),o("strong",[t._v("Subspace")]),t._v(" with various frontend frameworks and libraries")])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/12.792fcfd2.js b/assets/js/12.792fcfd2.js deleted file mode 100644 index f393bbe..0000000 --- a/assets/js/12.792fcfd2.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{217:function(s,t,a){"use strict";a.r(t);var e=a(28),n=Object(e.a)({},(function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h1",{attrs:{id:"react"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#react"}},[s._v("#")]),s._v(" React")]),s._v(" "),a("p",[s._v("Subspace also provides a set of components that simplifies its usage within React projects through the "),a("code",[s._v("@embarklabs/subspace-react")]),s._v(" package.")]),s._v(" "),a("h3",{attrs:{id:"install"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#install"}},[s._v("#")]),s._v(" Install")]),s._v(" "),a("p",[s._v("You can install it through npm or yarn:")]),s._v(" "),a("div",{staticClass:"language- line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[s._v("npm install --save @embarklabs/subspace-react web3 rxjs # RxJS and Web3.js are needed peer-dependencies\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br")])]),a("h3",{attrs:{id:"usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[s._v("#")]),s._v(" Usage")]),s._v(" "),a("h4",{attrs:{id:"subspaceprovider"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#subspaceprovider"}},[s._v("#")]),s._v(" SubspaceProvider")]),s._v(" "),a("p",[s._v("To use most of the "),a("code",[s._v("subspace-react")]),s._v(" components, you need to wrap your app with the "),a("code",[s._v("")]),s._v(" component. This will make Subspace available to any nested components that accesses it via the "),a("code",[s._v("useSubspace")]),s._v(" hook or has been wrapped in the "),a("code",[s._v("withSubspace")]),s._v(" higher order component. Any React component might use Subspace so it makes sense to add the provider near the top level of your dApp. The "),a("code",[s._v("SubspaceProvider")]),s._v(" requires a web3 object")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// index.js")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" React "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'react'")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" ReactDOM "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'react-dom'")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" MyApp "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'./MyApp'")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" SubspaceProvider "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'@embarklabs/subspace-react'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" web3 "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("new")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[s._v("Web3")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"ws://localhost:8545"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" rootElement "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" document"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("getElementById")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'root'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\nReactDOM"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("render")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("SubspaceProvider web3"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("web3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("MyApp "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("SubspaceProvider"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n rootElement\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br"),a("span",{staticClass:"line-number"},[s._v("11")]),a("br"),a("span",{staticClass:"line-number"},[s._v("12")]),a("br"),a("span",{staticClass:"line-number"},[s._v("13")]),a("br"),a("span",{staticClass:"line-number"},[s._v("14")]),a("br"),a("span",{staticClass:"line-number"},[s._v("15")]),a("br")])]),a("h4",{attrs:{id:"usesubspace"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#usesubspace"}},[s._v("#")]),s._v(" useSubspace")]),s._v(" "),a("p",[s._v("Rather than relying on global variables or passing Subspace through props, The easiest way to access Subspace features is via the "),a("code",[s._v("useSubspace")]),s._v(" hook. Be sure that your entire dApp is wrapped with a "),a("code",[s._v("")]),s._v(" to have it available througout the component tree.")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// index.js")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" React "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'react'")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" useSubspace "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'@embarklabs/subspace-react'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[s._v("MyComponent")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" subspace "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("useSubspace")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// do something....")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// subspace.trackBalance(web3.eth.defaultAccount);")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("return")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("export")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("default")]),s._v(" MyComponent\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br"),a("span",{staticClass:"line-number"},[s._v("11")]),a("br"),a("span",{staticClass:"line-number"},[s._v("12")]),a("br"),a("span",{staticClass:"line-number"},[s._v("13")]),a("br"),a("span",{staticClass:"line-number"},[s._v("14")]),a("br")])]),a("h4",{attrs:{id:"withsubspace"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#withsubspace"}},[s._v("#")]),s._v(" withSubspace")]),s._v(" "),a("p",[s._v("This higher order component is provided as an alternative to the "),a("code",[s._v("useSubspace")]),s._v(" hook. This injects the "),a("code",[s._v("subspace")]),s._v(" property with an already initialized Subspace instance. Just like with the hook, your entire dApp needs to be wrapped with a "),a("code",[s._v("")]),s._v(".")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// index.js")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" React "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'react'")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" withSubspace "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'@embarklabs/subspace-react'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[s._v("MyComponent")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[s._v("props")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// do something....")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// props.subspace.trackBalance(web3.eth.defaultAccount);")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("return")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("export")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("default")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("withSubspace")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("MyComponent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br"),a("span",{staticClass:"line-number"},[s._v("11")]),a("br"),a("span",{staticClass:"line-number"},[s._v("12")]),a("br")])]),a("h4",{attrs:{id:"observe"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#observe"}},[s._v("#")]),s._v(" observe")]),s._v(" "),a("p",[s._v("Useful to make your component subscribe to any observable props it receives when the component is mounted and automatically unsubscribes when the component is unmounted. It can be used with any kind of observables.")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" observe "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'@embarklabs/subspace-react'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" ObserverComponent "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("observe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("WrappedComponent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br")])]),a("h5",{attrs:{id:"example-usage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-usage"}},[s._v("#")]),s._v(" Example usage:")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[s._v("MyComponent")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("eventData"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// Handle initial state when no data is available")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("if")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("!")]),s._v("eventData"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("return")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("p"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("No data"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("p"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n \n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("return")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("p"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("Value"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("eventData"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("someReturnValue"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("p"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" MyEnhancedComponent "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("observe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("MyComponent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[s._v("SomeOtherComponent")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" myObservable$ "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" MyContractInstance"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("events"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("MyEvent"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("track")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("fromBlock"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("return")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("MyEnhancedComponent myProp"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("myObservable$"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br"),a("span",{staticClass:"line-number"},[s._v("11")]),a("br"),a("span",{staticClass:"line-number"},[s._v("12")]),a("br"),a("span",{staticClass:"line-number"},[s._v("13")]),a("br"),a("span",{staticClass:"line-number"},[s._v("14")]),a("br"),a("span",{staticClass:"line-number"},[s._v("15")]),a("br"),a("span",{staticClass:"line-number"},[s._v("16")]),a("br"),a("span",{staticClass:"line-number"},[s._v("17")]),a("br")])]),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[s._v("Handling Contract Objects")]),s._v(" "),a("p",[s._v("The variable "),a("code",[s._v("MyContractInstance")]),s._v(" is a "),a("code",[s._v("web3.eth.Contract")]),s._v(" object pointing to a deployed contract address that has been enhanced with "),a("code",[s._v("subspace.contract()")]),s._v(". You can use a DApp framework like "),a("a",{attrs:{href:"https://embark.status.im/docs/contracts_javascript.html",target:"_blank",rel:"noopener noreferrer"}},[s._v("Embark"),a("OutboundLink")],1),s._v(" to easily import that contract instance: "),a("code",[s._v("import { MyContract } from './embarkArtifacts/contracts';")]),s._v(".")])]),s._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",[s._v("To learn more about how to use "),a("code",[s._v("subspace-react")]),s._v(", there are full working examples available in "),a("a",{attrs:{href:"https://github.com/embark-framework/subspace/tree/master/examples/",target:"_blank",rel:"noopener noreferrer"}},[s._v("Github"),a("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/13.a67d614a.js b/assets/js/13.a67d614a.js deleted file mode 100644 index 5fa80db..0000000 --- a/assets/js/13.a67d614a.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{215:function(s,t,a){"use strict";a.r(t);var n=a(28),e=Object(n.a)({},(function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h1",{attrs:{id:"reactive-graphql"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#reactive-graphql"}},[s._v("#")]),s._v(" reactive-graphql")]),s._v(" "),a("p",[s._v("Using "),a("code",[s._v("reactive-graphql")]),s._v(" you can execute GraphQL queries against "),a("strong",[s._v("Subspace")]),s._v(" observables after you create your own type definitions and resolvers.")]),s._v(" "),a("h3",{attrs:{id:"example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example"}},[s._v("#")]),s._v(" Example")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" Subspace "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("require")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'@embarklabs/subspace'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" MyContract "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("require")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'./MyContract'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" pluck "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("require")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'rxjs/operators'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" makeExecutableSchema "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("require")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"graphql-tools"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" gql "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("require")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"graphql-tag"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" graphql "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("require")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"reactive-graphql"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[s._v("run")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("async")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" subspace "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("new")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[s._v("Subspace")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("web3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("await")]),s._v(" subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("init")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" MyContractInstance "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// TODO: obtain a web3.eth.contract instance")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" typeDefs "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token template-string"}},[a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[s._v("`")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("\n type MyEvent {\n someValue: Int\n anotherValue: String\n }\n type Query {\n myEvents: MyEvent!\n }\n ")]),a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[s._v("`")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" resolvers "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n Query"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[s._v("myEvents")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("trackEvent")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("MyContractInstance"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'MyEvent'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" filter"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" fromBlock"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" schema "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("makeExecutableSchema")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" typeDefs"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" resolvers "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" query "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" gql"),a("span",{pre:!0,attrs:{class:"token template-string"}},[a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[s._v("`")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("\n query {\n myEvents {\n someValue\n anotherValue\n }\n }\n ")]),a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[s._v("`")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" stream "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("graphql")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("schema"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" query"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("pipe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("pluck")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'data'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'myEvents'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n stream"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("subscribe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[s._v("data")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n console"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("log")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("run")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br"),a("span",{staticClass:"line-number"},[s._v("11")]),a("br"),a("span",{staticClass:"line-number"},[s._v("12")]),a("br"),a("span",{staticClass:"line-number"},[s._v("13")]),a("br"),a("span",{staticClass:"line-number"},[s._v("14")]),a("br"),a("span",{staticClass:"line-number"},[s._v("15")]),a("br"),a("span",{staticClass:"line-number"},[s._v("16")]),a("br"),a("span",{staticClass:"line-number"},[s._v("17")]),a("br"),a("span",{staticClass:"line-number"},[s._v("18")]),a("br"),a("span",{staticClass:"line-number"},[s._v("19")]),a("br"),a("span",{staticClass:"line-number"},[s._v("20")]),a("br"),a("span",{staticClass:"line-number"},[s._v("21")]),a("br"),a("span",{staticClass:"line-number"},[s._v("22")]),a("br"),a("span",{staticClass:"line-number"},[s._v("23")]),a("br"),a("span",{staticClass:"line-number"},[s._v("24")]),a("br"),a("span",{staticClass:"line-number"},[s._v("25")]),a("br"),a("span",{staticClass:"line-number"},[s._v("26")]),a("br"),a("span",{staticClass:"line-number"},[s._v("27")]),a("br"),a("span",{staticClass:"line-number"},[s._v("28")]),a("br"),a("span",{staticClass:"line-number"},[s._v("29")]),a("br"),a("span",{staticClass:"line-number"},[s._v("30")]),a("br"),a("span",{staticClass:"line-number"},[s._v("31")]),a("br"),a("span",{staticClass:"line-number"},[s._v("32")]),a("br"),a("span",{staticClass:"line-number"},[s._v("33")]),a("br"),a("span",{staticClass:"line-number"},[s._v("34")]),a("br"),a("span",{staticClass:"line-number"},[s._v("35")]),a("br"),a("span",{staticClass:"line-number"},[s._v("36")]),a("br"),a("span",{staticClass:"line-number"},[s._v("37")]),a("br"),a("span",{staticClass:"line-number"},[s._v("38")]),a("br"),a("span",{staticClass:"line-number"},[s._v("39")]),a("br"),a("span",{staticClass:"line-number"},[s._v("40")]),a("br"),a("span",{staticClass:"line-number"},[s._v("41")]),a("br"),a("span",{staticClass:"line-number"},[s._v("42")]),a("br"),a("span",{staticClass:"line-number"},[s._v("43")]),a("br"),a("span",{staticClass:"line-number"},[s._v("44")]),a("br"),a("span",{staticClass:"line-number"},[s._v("45")]),a("br"),a("span",{staticClass:"line-number"},[s._v("46")]),a("br"),a("span",{staticClass:"line-number"},[s._v("47")]),a("br"),a("span",{staticClass:"line-number"},[s._v("48")]),a("br")])]),a("div",{staticClass:"custom-block tip"},[a("p",[s._v("This example is available in "),a("a",{attrs:{href:"https://github.com/embarklabs/subspace/tree/master/examples/reactive-graphql",target:"_blank",rel:"noopener noreferrer"}},[s._v("Github"),a("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/14.b783779c.js b/assets/js/14.b783779c.js deleted file mode 100644 index a2e6f29..0000000 --- a/assets/js/14.b783779c.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{216:function(t,e,n){"use strict";n.r(e);var s=n(28),o=Object(s.a)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[e("hr"),this._v(" "),e("code1")],1)}),[],!1,null,null,null);e.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/15.1d9ae469.js b/assets/js/15.1d9ae469.js deleted file mode 100644 index 262b2aa..0000000 --- a/assets/js/15.1d9ae469.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{218:function(t,s,a){"use strict";a.r(s);var e=a(28),n=Object(e.a)({},(function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"redux-observable"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#redux-observable"}},[t._v("#")]),t._v(" redux-observable")]),t._v(" "),a("p",[a("a",{attrs:{href:"https://redux-observable.js.org/",target:"_blank",rel:"noopener noreferrer"}},[t._v("redux-observables"),a("OutboundLink")],1),t._v(" can be used to manage side effects via "),a("code",[t._v("Epics")]),t._v(" (their core primitive to receive and create stream of actions). "),a("strong",[t._v("Subspace")]),t._v(" can be configured inside these epics.")]),t._v(" "),a("p",[t._v("It's recommended to compose these epics by using "),a("a",{attrs:{href:"https://www.learnrxjs.io/operators/transformation/mergemap.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("mergeMap"),a("OutboundLink")],1),t._v(" or "),a("a",{attrs:{href:"https://www.learnrxjs.io/operators/transformation/switchmap.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("switchMap"),a("OutboundLink")],1),t._v(" operators.")]),t._v(" "),a("p",[t._v("Here's an example on how to use "),a("strong",[t._v("Subspace")]),t._v(" to subscribe to an Event when the action "),a("code",[t._v("SOME_ACTION")]),t._v(" is dispatched, and then it will trigger "),a("code",[t._v("myAction")]),t._v(" when the observable emits a value.")]),t._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ...")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("myEpic")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("action$")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v("\n action$"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("pipe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("ofType")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"SOME_ACTION"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Execute when the action type is 'INIT'")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("switchMap")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("action")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v("\n subspace\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("trackEvent")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("MyContract"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"MyEventName"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" filter"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" fromBlock"),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("pipe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("map")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("myAction"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Trigger redux action: MY_ACTION with the eventData")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// ...")]),t._v("\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br"),a("span",{staticClass:"line-number"},[t._v("4")]),a("br"),a("span",{staticClass:"line-number"},[t._v("5")]),a("br"),a("span",{staticClass:"line-number"},[t._v("6")]),a("br"),a("span",{staticClass:"line-number"},[t._v("7")]),a("br"),a("span",{staticClass:"line-number"},[t._v("8")]),a("br"),a("span",{staticClass:"line-number"},[t._v("9")]),a("br"),a("span",{staticClass:"line-number"},[t._v("10")]),a("br"),a("span",{staticClass:"line-number"},[t._v("11")]),a("br"),a("span",{staticClass:"line-number"},[t._v("12")]),a("br"),a("span",{staticClass:"line-number"},[t._v("13")]),a("br"),a("span",{staticClass:"line-number"},[t._v("14")]),a("br"),a("span",{staticClass:"line-number"},[t._v("15")]),a("br")])]),a("div",{staticClass:"custom-block tip"},[a("p",[t._v("An example is available in "),a("a",{attrs:{href:"https://github.com/embarklabs/subspace/tree/master/examples/redux-observable",target:"_blank",rel:"noopener noreferrer"}},[t._v("Github"),a("OutboundLink")],1)])]),t._v(" "),a("h4",{attrs:{id:"further-read"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#further-read"}},[t._v("#")]),t._v(" Further read")]),t._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://redux-observable.js.org/docs/basics/Epics.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("Epics"),a("OutboundLink")],1)])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/16.d0bf4930.js b/assets/js/16.d0bf4930.js deleted file mode 100644 index a1e4b66..0000000 --- a/assets/js/16.d0bf4930.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{221:function(s,t,a){"use strict";a.r(t);var n=a(28),e=Object(n.a)({},(function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h1",{attrs:{id:"redux"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#redux"}},[s._v("#")]),s._v(" redux")]),s._v(" "),a("p",[a("strong",[s._v("Subspace")]),s._v(" can be used with "),a("a",{attrs:{href:"https://redux.js.org/",target:"_blank",rel:"noopener noreferrer"}},[s._v("redux"),a("OutboundLink")],1),s._v(". "),a("strong",[s._v("Subspace")]),s._v(" returns "),a("a",{attrs:{href:"https://rxjs-dev.firebaseapp.com/guide/observable",target:"_blank",rel:"noopener noreferrer"}},[a("code",[s._v("Observables")]),a("OutboundLink")],1),s._v(", which you can subscribe to, and if this subscription has access to the redux store, it will be able to dispatch actions when the observable emits an event.")]),s._v(" "),a("h3",{attrs:{id:"example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example"}},[s._v("#")]),s._v(" Example")]),s._v(" "),a("p",[s._v("Here's a simple example on how to setup "),a("strong",[s._v("Subspace")]),s._v(" to work with "),a("code",[s._v("redux")]),s._v(":")]),s._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",[s._v("This example is available in "),a("a",{attrs:{href:"https://github.com/embarklabs/subspace/tree/master/examples/redux",target:"_blank",rel:"noopener noreferrer"}},[s._v("Github"),a("OutboundLink")],1)])]),s._v(" "),a("h4",{attrs:{id:"index-js"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#index-js"}},[s._v("#")]),s._v(" index.js")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" store "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'./store'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" web3 "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'./web3'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" Subspace "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'@embarklabs/subspace'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" myAction "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'./actions'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[s._v("run")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("async")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" MyContractInstance "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// TODO: obtain a web3.eth.contract instance")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" subspace "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("new")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[s._v("Subspace")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("web3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("await")]),s._v(" subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("init")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n \n subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("trackEvent")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("MyContractInstance"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"MyEvent"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("filter"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" fromBlock"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("subscribe")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[s._v("eventData")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n store"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("dispatch")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("myAction")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("eventData"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("run")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br"),a("span",{staticClass:"line-number"},[s._v("11")]),a("br"),a("span",{staticClass:"line-number"},[s._v("12")]),a("br"),a("span",{staticClass:"line-number"},[s._v("13")]),a("br"),a("span",{staticClass:"line-number"},[s._v("14")]),a("br"),a("span",{staticClass:"line-number"},[s._v("15")]),a("br"),a("span",{staticClass:"line-number"},[s._v("16")]),a("br"),a("span",{staticClass:"line-number"},[s._v("17")]),a("br"),a("span",{staticClass:"line-number"},[s._v("18")]),a("br")])]),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[s._v("Handling Contract Objects")]),s._v(" "),a("p",[s._v("The variable "),a("code",[s._v("MyContractInstance")]),s._v(" is a "),a("code",[s._v("web3.eth.Contract")]),s._v(" object pointing to a deployed contract address. You can use a DApp framework like "),a("a",{attrs:{href:"https://embark.status.im/docs/contracts_javascript.html",target:"_blank",rel:"noopener noreferrer"}},[s._v("Embark"),a("OutboundLink")],1),s._v(" to easily import that contract instance: "),a("code",[s._v("import { MyContract } from './embarkArtifacts/contracts';")]),s._v(", or use web3.js directly (just like in the example "),a("a",{attrs:{href:"https://github.com/embarklabs/subspace/blob/master/examples/redux/src/MyContract.js#L36-L42",target:"_blank",rel:"noopener noreferrer"}},[s._v("source code"),a("OutboundLink")],1),s._v(")")])]),s._v(" "),a("h4",{attrs:{id:"store-js"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#store-js"}},[s._v("#")]),s._v(" store.js")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" createStore "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'redux'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("myReducer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'./reducer'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("export")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("default")]),s._v(" store "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("createStore")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("myReducer"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br")])]),a("h4",{attrs:{id:"reducer-js"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#reducer-js"}},[s._v("#")]),s._v(" reducer.js")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("MY_ACTION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"./constants"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" initialState "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" \n data"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("export")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[s._v("myReducer")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token parameter"}},[s._v("state "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" initialState"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" action")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("switch")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("action"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("type"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("case")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("MY_ACTION")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("return")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" data"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" action"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("eventData "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("default")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("return")]),s._v(" state"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br"),a("span",{staticClass:"line-number"},[s._v("11")]),a("br"),a("span",{staticClass:"line-number"},[s._v("12")]),a("br"),a("span",{staticClass:"line-number"},[s._v("13")]),a("br"),a("span",{staticClass:"line-number"},[s._v("14")]),a("br")])]),a("h4",{attrs:{id:"constants-js"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#constants-js"}},[s._v("#")]),s._v(" constants.js")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("export")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("MY_ACTION")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'MY_ACTION'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br")])]),a("h4",{attrs:{id:"actions-js"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#actions-js"}},[s._v("#")]),s._v(" actions.js")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("MY_ACTION")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'./constants.js'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("export")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[s._v("myAction")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token parameter"}},[s._v("eventData")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("type"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token constant"}},[s._v("MY_ACTION")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" eventData"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br")])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[s._v("Using React and Redux")]),s._v(" "),a("p",[s._v("A practical example can also be found in "),a("code",[s._v("examples/react-redux")]),s._v(".")])])])}),[],!1,null,null,null);t.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/17.c66feffd.js b/assets/js/17.c66feffd.js deleted file mode 100644 index 50c8df3..0000000 --- a/assets/js/17.c66feffd.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{219:function(e,t,a){"use strict";a.r(t);var r=a(28),s=Object(r.a)({},(function(){var e=this.$createElement,t=this._self._c||e;return t("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}},[t("h1",{attrs:{id:"creating-a-reactive-dhapp-with-react-and-subspace"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#creating-a-reactive-dhapp-with-react-and-subspace"}},[this._v("#")]),this._v(" Creating a reactive ÐApp with React and Subspace")]),this._v(" "),t("p",[this._v("See example DApp at "),t("a",{attrs:{href:"https://github.com/embark-framework/subspace/tree/master/examples/react-example1",target:"_blank",rel:"noopener noreferrer"}},[this._v("https://github.com/embark-framework/subspace/tree/master/examples/react-example1"),t("OutboundLink")],1)])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/18.ec597d92.js b/assets/js/18.ec597d92.js deleted file mode 100644 index 5456ee5..0000000 --- a/assets/js/18.ec597d92.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{220:function(s,t,a){"use strict";a.r(t);var n=a(28),r=Object(n.a)({},(function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h1",{attrs:{id:"vue"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#vue"}},[s._v("#")]),s._v(" Vue")]),s._v(" "),a("p",[s._v("Vue provides the official npm package "),a("code",[s._v("vue-rx")]),s._v(" that provides RxJS integration, which simplifies the use of Subspace with Vue.js")]),s._v(" "),a("h3",{attrs:{id:"example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example"}},[s._v("#")]),s._v(" Example")]),s._v(" "),a("div",{staticClass:"custom-block tip"},[a("p",[s._v("This example is available in "),a("a",{attrs:{href:"https://github.com/embark-framework/subspace/tree/master/examples/vue",target:"_blank",rel:"noopener noreferrer"}},[s._v("Github"),a("OutboundLink")],1)])]),s._v(" "),a("h4",{attrs:{id:"mycomponent-vue"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mycomponent-vue"}},[s._v("#")]),s._v(" MyComponent.vue")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("template"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("ul v"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("if")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"!!eventData$"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("li"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("b"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("someValue"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("b"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("eventData$"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("someValue"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("li"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("li"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("b"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("anotherValue"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("b"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("eventData$"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("anotherValue"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("li"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("ul"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("template"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("script"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("export")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("default")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n name"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'MyComponent'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n props"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n eventData"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" Object\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("subscriptions")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// provide Rx observables")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("return")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n eventData$"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("eventData\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("script"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br"),a("span",{staticClass:"line-number"},[s._v("11")]),a("br"),a("span",{staticClass:"line-number"},[s._v("12")]),a("br"),a("span",{staticClass:"line-number"},[s._v("13")]),a("br"),a("span",{staticClass:"line-number"},[s._v("14")]),a("br"),a("span",{staticClass:"line-number"},[s._v("15")]),a("br"),a("span",{staticClass:"line-number"},[s._v("16")]),a("br"),a("span",{staticClass:"line-number"},[s._v("17")]),a("br"),a("span",{staticClass:"line-number"},[s._v("18")]),a("br"),a("span",{staticClass:"line-number"},[s._v("19")]),a("br"),a("span",{staticClass:"line-number"},[s._v("20")]),a("br")])]),a("h4",{attrs:{id:"app-vue"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#app-vue"}},[s._v("#")]),s._v(" App.vue")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("template"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("div id"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"app"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("button v"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("on"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("click"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"createTrx"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("Create a Transaction"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("button"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("MyComponent v"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("bind"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v("event"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),s._v("data"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"myEventObservable$"')]),s._v(" v"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("-")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("if")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"!!myEventObservable$"')]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("div"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("template"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),s._v("script"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" MyComponent "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'./components/MyComponent.vue'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" Subspace "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"@embarklabs/subspace"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("export")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("default")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n name"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'app'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[s._v("data")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("return")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n myEventObservable$"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("null")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n MyContractInstance"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("null")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[s._v("created")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("async")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("MyContractInstance "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// TODO: obtain a web3.eth.contract instance")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" subspace "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("new")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[s._v("Subspace")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("web3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("await")]),s._v(" subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("init")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("myEventObservable$ "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("trackEvent")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("MyContractInstance"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"MyEvent"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("filter"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" fromBlock"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" \n methods"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[s._v("createTrx")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("function")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("this")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("MyContractInstance"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("methods\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("myFunction")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("send")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" web3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("eth"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),s._v("defaultAccount "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n components"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n MyComponent\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("<")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("/")]),s._v("script"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(">")]),s._v("\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br"),a("span",{staticClass:"line-number"},[s._v("11")]),a("br"),a("span",{staticClass:"line-number"},[s._v("12")]),a("br"),a("span",{staticClass:"line-number"},[s._v("13")]),a("br"),a("span",{staticClass:"line-number"},[s._v("14")]),a("br"),a("span",{staticClass:"line-number"},[s._v("15")]),a("br"),a("span",{staticClass:"line-number"},[s._v("16")]),a("br"),a("span",{staticClass:"line-number"},[s._v("17")]),a("br"),a("span",{staticClass:"line-number"},[s._v("18")]),a("br"),a("span",{staticClass:"line-number"},[s._v("19")]),a("br"),a("span",{staticClass:"line-number"},[s._v("20")]),a("br"),a("span",{staticClass:"line-number"},[s._v("21")]),a("br"),a("span",{staticClass:"line-number"},[s._v("22")]),a("br"),a("span",{staticClass:"line-number"},[s._v("23")]),a("br"),a("span",{staticClass:"line-number"},[s._v("24")]),a("br"),a("span",{staticClass:"line-number"},[s._v("25")]),a("br"),a("span",{staticClass:"line-number"},[s._v("26")]),a("br"),a("span",{staticClass:"line-number"},[s._v("27")]),a("br"),a("span",{staticClass:"line-number"},[s._v("28")]),a("br"),a("span",{staticClass:"line-number"},[s._v("29")]),a("br"),a("span",{staticClass:"line-number"},[s._v("30")]),a("br"),a("span",{staticClass:"line-number"},[s._v("31")]),a("br"),a("span",{staticClass:"line-number"},[s._v("32")]),a("br"),a("span",{staticClass:"line-number"},[s._v("33")]),a("br"),a("span",{staticClass:"line-number"},[s._v("34")]),a("br"),a("span",{staticClass:"line-number"},[s._v("35")]),a("br"),a("span",{staticClass:"line-number"},[s._v("36")]),a("br"),a("span",{staticClass:"line-number"},[s._v("37")]),a("br"),a("span",{staticClass:"line-number"},[s._v("38")]),a("br"),a("span",{staticClass:"line-number"},[s._v("39")]),a("br")])]),a("h4",{attrs:{id:"further-read"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#further-read"}},[s._v("#")]),s._v(" Further read")]),s._v(" "),a("ul",[a("li",[a("a",{attrs:{href:"https://www.npmjs.com/package/vue-rx",target:"_blank",rel:"noopener noreferrer"}},[s._v("vue-rx"),a("OutboundLink")],1)])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/19.a3968107.js b/assets/js/19.a3968107.js deleted file mode 100644 index d0837c7..0000000 --- a/assets/js/19.a3968107.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{141:function(n,w,o){}}]); \ No newline at end of file diff --git a/assets/js/2.af279185.js b/assets/js/2.af279185.js deleted file mode 100644 index faf8a53..0000000 --- a/assets/js/2.af279185.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{143:function(t,n,e){"use strict";var r=e(100),i=e(8),o=e(12),s=e(16),u=e(101),c=e(102);r("match",1,(function(t,n,e){return[function(n){var e=s(this),r=null==n?void 0:n[t];return void 0!==r?r.call(n,e):new RegExp(n)[t](String(e))},function(t){var r=e(n,t,this);if(r.done)return r.value;var s=i(t),a=String(this);if(!s.global)return c(s,a);var l=s.unicode;s.lastIndex=0;for(var f,h=[],g=0;null!==(f=c(s,a));){var p=String(f[0]);h[g]=p,""===p&&(s.lastIndex=u(a,o(s.lastIndex),l)),g++}return 0===g?null:h}]}))},145:function(t,n){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},146:function(t,n,e){},160:function(t,n,e){e(0)({target:"Array",stat:!0},{isArray:e(42)})},161:function(t,n,e){var r=e(16),i="["+e(145)+"]",o=RegExp("^"+i+i+"*"),s=RegExp(i+i+"*$"),u=function(t){return function(n){var e=String(r(n));return 1&t&&(e=e.replace(o,"")),2&t&&(e=e.replace(s,"")),e}};t.exports={start:u(1),end:u(2),trim:u(3)}},162:function(t,n,e){var r=e(188).Symbol;t.exports=r},165:function(t,n,e){"use strict";var r=e(0),i=e(166);r({target:"String",proto:!0,forced:e(167)("link")},{link:function(t){return i(this,"a","href",t)}})},166:function(t,n,e){var r=e(16),i=/"/g;t.exports=function(t,n,e,o){var s=String(r(t)),u="<"+n;return""!==e&&(u+=" "+e+'="'+String(o).replace(i,""")+'"'),u+">"+s+""}},167:function(t,n,e){var r=e(2);t.exports=function(t){return r((function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3}))}},168:function(t,n,e){"use strict";var r=e(0),i=e(43),o=e(10),s=e(30),u=[].join,c=i!=Object,a=s("join",",");r({target:"Array",proto:!0,forced:c||!a},{join:function(t){return u.call(o(this),void 0===t?",":t)}})},169:function(t,n,e){"use strict";var r=e(100),i=e(98),o=e(8),s=e(16),u=e(170),c=e(101),a=e(12),l=e(102),f=e(46),h=e(2),g=[].push,p=Math.min,d=!h((function(){return!RegExp(4294967295,"y")}));r("split",2,(function(t,n,e){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,e){var r=String(s(this)),o=void 0===e?4294967295:e>>>0;if(0===o)return[];if(void 0===t)return[r];if(!i(t))return n.call(r,t,o);for(var u,c,a,l=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),p=0,d=new RegExp(t.source,h+"g");(u=f.call(d,r))&&!((c=d.lastIndex)>p&&(l.push(r.slice(p,u.index)),u.length>1&&u.index=o));)d.lastIndex===u.index&&d.lastIndex++;return p===r.length?!a&&d.test("")||l.push(""):l.push(r.slice(p)),l.length>o?l.slice(0,o):l}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,e){var i=s(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,e):r.call(String(i),n,e)},function(t,i){var s=e(r,t,this,i,r!==n);if(s.done)return s.value;var f=o(t),h=String(this),g=u(f,RegExp),v=f.unicode,x=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(d?"y":"g"),y=new g(d?f:"^(?:"+f.source+")",x),b=void 0===i?4294967295:i>>>0;if(0===b)return[];if(0===h.length)return null===l(y,h)?[h]:[];for(var m=0,w=0,S=[];w>>0||(u.test(e)?16:10))}:s},174:function(t,n,e){"use strict";var r=e(0),i=e(161).trim;r({target:"String",proto:!0,forced:e(175)("trim")},{trim:function(){return i(this)}})},175:function(t,n,e){var r=e(2),i=e(145);t.exports=function(t){return r((function(){return!!i[t]()||"​…᠎"!="​…᠎"[t]()||i[t].name!==t}))}},176:function(t,n,e){"use strict";var r=e(146);e.n(r).a},178:function(t,n,e){"use strict";var r=e(0),i=e(2),o=e(42),s=e(4),u=e(14),c=e(12),a=e(64),l=e(104),f=e(45),h=e(1),g=e(105),p=h("isConcatSpreadable"),d=g>=51||!i((function(){var t=[];return t[p]=!1,t.concat()[0]!==t})),v=f("concat"),x=function(t){if(!s(t))return!1;var n=t[p];return void 0!==n?!!n:o(t)};r({target:"Array",proto:!0,forced:!d||!v},{concat:function(t){var n,e,r,i,o,s=u(this),f=l(s,0),h=0;for(n=-1,r=arguments.length;n9007199254740991)throw TypeError("Maximum allowed index exceeded");for(e=0;e=9007199254740991)throw TypeError("Maximum allowed index exceeded");a(f,h++,o)}return f.length=h,f}})},179:function(t,n,e){var r=e(6),i=e(3),o=e(62),s=e(109),u=e(7).f,c=e(44).f,a=e(98),l=e(99),f=e(107),h=e(13),g=e(2),p=e(18).set,d=e(110),v=e(1)("match"),x=i.RegExp,y=x.prototype,b=/a/g,m=/a/g,w=new x(b)!==b,S=f.UNSUPPORTED_Y;if(r&&o("RegExp",!w||S||g((function(){return m[v]=!1,x(b)!=b||x(m)==m||"/a/i"!=x(b,"i")})))){for(var k=function(t,n){var e,r=this instanceof k,i=a(t),o=void 0===n;if(!r&&i&&t.constructor===k&&o)return t;w?i&&!o&&(t=t.source):t instanceof k&&(o&&(n=l.call(t)),t=t.source),S&&(e=!!n&&n.indexOf("y")>-1)&&(n=n.replace(/y/g,""));var u=s(w?new x(t,n):x(t,n),r?this:y,k);return S&&e&&p(u,{sticky:e}),u},I=function(t){t in k||u(k,t,{configurable:!0,get:function(){return x[t]},set:function(n){x[t]=n}})},E=c(x),j=0;E.length>j;)I(E[j++]);y.constructor=k,k.prototype=y,h(i,"RegExp",k)}d("RegExp")},180:function(t,n,e){"use strict";var r=e(13),i=e(8),o=e(2),s=e(99),u=RegExp.prototype,c=u.toString,a=o((function(){return"/a/b"!=c.call({source:"a",flags:"b"})})),l="toString"!=c.name;(a||l)&&r(RegExp.prototype,"toString",(function(){var t=i(this),n=String(t.source),e=t.flags;return"/"+n+"/"+String(void 0===e&&t instanceof RegExp&&!("flags"in u)?s.call(t):e)}),{unsafe:!0})},186:function(t,n,e){var r=e(187),i=e(192),o=e(193);t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==r(t)}},187:function(t,n,e){var r=e(162),i=e(190),o=e(191),s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?i(t):o(t)}},188:function(t,n,e){var r=e(189),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},189:function(t,n){var e="object"==typeof global&&global&&global.Object===Object&&global;t.exports=e},190:function(t,n,e){var r=e(162),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,u=r?r.toStringTag:void 0;t.exports=function(t){var n=o.call(t,u),e=t[u];try{t[u]=void 0;var r=!0}catch(t){}var i=s.call(t);return r&&(n?t[u]=e:delete t[u]),i}},191:function(t,n){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},192:function(t,n){var e=Array.isArray;t.exports=e},193:function(t,n){t.exports=function(t){return null!=t&&"object"==typeof t}},194:function(t,n){t.exports=function(t){return null==t}},198:function(t,n,e){"use strict";var r=e(0),i=e(19).find,o=e(65),s=e(11),u=!0,c=s("find");"find"in[]&&Array(1).find((function(){u=!1})),r({target:"Array",proto:!0,forced:u||!c},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("find")},207:function(t,n,e){"use strict";e(17),e(106),e(103),e(160),e(29),e(108),e(143),e(174);var r={name:"SearchBox",data:function(){return{query:"",focused:!1,focusIndex:0,placeholder:void 0}},computed:{showSuggestions:function(){return this.focused&&this.suggestions&&this.suggestions.length},suggestions:function(){var t=this.query.trim().toLowerCase();if(t){for(var n=this.$site.pages,e=this.$site.themeConfig.searchMaxSuggestions||5,r=this.$localePath,i=function(n){return n&&n.title&&n.title.toLowerCase().indexOf(t)>-1},o=[],s=0;s=e);s++){var u=n[s];if(this.getPageLocalePath(u)===r&&this.isSearchable(u))if(i(u))o.push(u);else if(u.headers)for(var c=0;c=e);c++){var a=u.headers[c];i(a)&&o.push(Object.assign({},u,{path:u.path+"#"+a.slug,header:a}))}}return o}},alignRight:function(){return(this.$site.themeConfig.nav||[]).length+(this.$site.repo?1:0)<=2}},mounted:function(){this.placeholder=this.$site.themeConfig.searchPlaceholder||"",document.addEventListener("keydown",this.onHotkey)},beforeDestroy:function(){document.removeEventListener("keydown",this.onHotkey)},methods:{getPageLocalePath:function(t){for(var n in this.$site.locales||{})if("/"!==n&&0===t.path.indexOf(n))return n;return"/"},isSearchable:function(t){var n=null;return null===n||(n=Array.isArray(n)?n:new Array(n)).filter((function(n){return t.path.match(n)})).length>0},onHotkey:function(t){t.srcElement===document.body&&["s","/"].includes(t.key)&&(this.$refs.input.focus(),t.preventDefault())},onUp:function(){this.showSuggestions&&(this.focusIndex>0?this.focusIndex--:this.focusIndex=this.suggestions.length-1)},onDown:function(){this.showSuggestions&&(this.focusIndex "+t._s(n.header.title))]):t._e()])])})),0):t._e()])}),[],!1,null,null,null);n.a=o.exports}}]); \ No newline at end of file diff --git a/assets/js/3.072ab49d.js b/assets/js/3.072ab49d.js deleted file mode 100644 index c8acb48..0000000 --- a/assets/js/3.072ab49d.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{142:function(t,e,n){"use strict";n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"i",(function(){return s})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return c})),n.d(e,"h",(function(){return u})),n.d(e,"b",(function(){return h})),n.d(e,"e",(function(){return p})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return f})),n.d(e,"c",(function(){return v})),n.d(e,"j",(function(){return m}));n(17),n(66),n(103),n(160),n(168),n(40),n(29),n(143),n(41),n(169),n(67);var i=/#.*$/,a=/\.(md|html)$/,r=/\/$/,s=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(i,"").replace(a,"")}function l(t){return s.test(t)}function c(t){return/^mailto:/.test(t)}function u(t){return/^tel:/.test(t)}function h(t){if(l(t))return t;var e=t.match(i),n=e?e[0]:"",a=o(t);return r.test(a)?t:a+".html"+n}function p(t,e){var n=t.hash,a=function(t){var e=t.match(i);if(e)return e[0]}(e);return(!a||n===a)&&o(t.path)===o(e)}function d(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){var i=t.charAt(0);if("/"===i)return t;if("?"===i||"#"===i)return e+t;var a=e.split("/");n&&a[a.length-1]||a.pop();for(var r=t.replace(/^\//,"").split("/"),s=0;s3&&void 0!==arguments[3]?arguments[3]:1;if("string"==typeof e)return d(n,e,i);if(Array.isArray(e))return Object.assign(d(n,e[0],i),{title:e[1]});a>3&&console.error("[vuepress] detected a too deep nested sidebar group.");var r=e.children||[];return 0===r.length&&e.path?Object.assign(d(n,e.path,i),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,children:r.map((function(e){return t(e,n,i,a+1)})),collapsable:!1!==e.collapsable}}(t,a,c)})):[]}return[]}function v(t){var e;return(t=t.map((function(t){return Object.assign({},t)}))).forEach((function(t){2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)})),t.filter((function(t){return 2===t.level}))}function m(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},144:function(t,e,n){},147:function(t,e,n){},148:function(t,e,n){},149:function(t,e,n){},150:function(t,e,n){},151:function(t,e,n){},152:function(t,e,n){},153:function(t,e,n){},154:function(t,e,n){},155:function(t,e,n){},156:function(t,e,n){},157:function(t,e,n){},163:function(t,e,n){"use strict";n.r(e);n(97);var i=n(142),a={name:"SidebarGroup",props:["item","open","collapsable","depth"],components:{DropdownTransition:n(164).a},beforeCreate:function(){this.$options.components.SidebarLinks=n(163).default},methods:{isActive:i.e}},r=(n(197),n(28)),s=Object(r.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"sidebar-group",class:[{collapsable:t.collapsable,"is-sub-group":0!==t.depth},"depth-"+t.depth]},[t.item.path?n("router-link",{staticClass:"sidebar-heading clickable",class:{open:t.open,active:t.isActive(t.$route,t.item.path)},attrs:{to:t.item.path},nativeOn:{click:function(e){return t.$emit("toggle")}}},[n("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?n("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]):n("p",{staticClass:"sidebar-heading",class:{open:t.open},on:{click:function(e){return t.$emit("toggle")}}},[n("span",[t._v(t._s(t.item.title))]),t._v(" "),t.collapsable?n("span",{staticClass:"arrow",class:t.open?"down":"right"}):t._e()]),t._v(" "),n("DropdownTransition",[t.open||!t.collapsable?n("SidebarLinks",{staticClass:"sidebar-group-items",attrs:{items:t.item.children,sidebarDepth:t.item.sidebarDepth,depth:t.depth+1}}):t._e()],1)],1)}),[],!1,null,null,null).exports;n(198),n(40);function o(t,e,n,i){return t("router-link",{props:{to:e,activeClass:"",exactActiveClass:""},class:{active:i,"sidebar-link":!0}},n)}function l(t,e,n,a,r){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;return!e||s>r?null:t("ul",{class:"sidebar-sub-headers"},e.map((function(e){var c=Object(i.e)(a,n+"#"+e.slug);return t("li",{class:"sidebar-sub-header"},[o(t,n+"#"+e.slug,e.title,c),l(t,e.children,n,a,r,s+1)])})))}var c={functional:!0,props:["item","sidebarDepth"],render:function(t,e){var n=e.parent,a=n.$page,r=(n.$site,n.$route),s=n.$themeConfig,c=n.$themeLocaleConfig,u=e.props,h=u.item,p=u.sidebarDepth,d=Object(i.e)(r,h.path),f="auto"===h.type?d||h.children.some((function(t){return Object(i.e)(r,h.basePath+"#"+t.slug)})):d,v="external"===h.type?function(t,e,n){return t("a",{attrs:{href:e,target:"_blank",rel:"noopener noreferrer"},class:{"sidebar-link":!0}},[n,t("OutboundLink")])}(t,h.path,h.title||h.path):o(t,h.path,h.title||h.path,f),m=[a.frontmatter.sidebarDepth,p,c.sidebarDepth,s.sidebarDepth,1].find((function(t){return void 0!==t})),g=c.displayAllHeaders||s.displayAllHeaders;return"auto"===h.type?[v,l(t,h.children,h.basePath,r,m)]:(f||g)&&h.headers&&!i.d.test(h.path)?[v,l(t,Object(i.c)(h.headers),h.path,r,m)]:v}};n(199);function u(t,e){return"group"===e.type&&e.children.some((function(e){return"group"===e.type?u(t,e):"page"===e.type&&Object(i.e)(t,e.path)}))}var h={name:"SidebarLinks",components:{SidebarGroup:s,SidebarLink:Object(r.a)(c,void 0,void 0,!1,null,null,null).exports},props:["items","depth","sidebarDepth"],data:function(){return{openGroupIndex:0}},created:function(){this.refreshIndex()},watch:{$route:function(){this.refreshIndex()}},methods:{refreshIndex:function(){var t=function(t,e){for(var n=0;n-1&&(this.openGroupIndex=t)},toggleGroup:function(t){this.openGroupIndex=t===this.openGroupIndex?-1:t},isActive:function(t){return Object(i.e)(this.$route,t.regularPath)}}},p=Object(r.a)(h,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.items.length?n("ul",{staticClass:"sidebar-links"},t._l(t.items,(function(e,i){return n("li",{key:i},["group"===e.type?n("SidebarGroup",{attrs:{item:e,open:i===t.openGroupIndex,collapsable:e.collapsable||e.collapsible,depth:t.depth},on:{toggle:function(e){return t.toggleGroup(i)}}}):n("SidebarLink",{attrs:{sidebarDepth:t.sidebarDepth,item:e}})],1)})),0):t._e()}),[],!1,null,null,null);e.default=p.exports},164:function(t,e,n){"use strict";var i={name:"DropdownTransition",methods:{setHeight:function(t){t.style.height=t.scrollHeight+"px"},unsetHeight:function(t){t.style.height=""}}},a=(n(181),n(28)),r=Object(a.a)(i,(function(){var t=this.$createElement;return(this._self._c||t)("transition",{attrs:{name:"dropdown"},on:{enter:this.setHeight,"after-enter":this.unsetHeight,"before-leave":this.setHeight}},[this._t("default")],2)}),[],!1,null,null,null);e.a=r.exports},171:function(t,e,n){"use strict";var i=n(144);n.n(i).a},177:function(t,e,n){"use strict";var i=n(147);n.n(i).a},181:function(t,e,n){"use strict";var i=n(148);n.n(i).a},182:function(t,e,n){"use strict";var i=n(149);n.n(i).a},183:function(t,e,n){"use strict";var i=n(150);n.n(i).a},184:function(t,e,n){"use strict";var i=n(151);n.n(i).a},185:function(t,e,n){"use strict";var i=n(152);n.n(i).a},195:function(t,e,n){"use strict";var i=n(153);n.n(i).a},196:function(t,e,n){"use strict";var i=n(154);n.n(i).a},197:function(t,e,n){"use strict";var i=n(155);n.n(i).a},199:function(t,e,n){"use strict";var i=n(156);n.n(i).a},200:function(t,e,n){"use strict";var i=n(157);n.n(i).a},208:function(t,e,n){"use strict";n.r(e);n(97),n(61),n(165);var i=n(142),a={props:{item:{required:!0}},computed:{link:function(){return Object(i.b)(this.item.link)},exact:function(){var t=this;return this.$site.locales?Object.keys(this.$site.locales).some((function(e){return e===t.link})):"/"===this.link}},methods:{isExternal:i.f,isMailto:i.g,isTel:i.h}},r=n(28),s=Object(r.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.isExternal(t.link)?n("a",{staticClass:"nav-link external",attrs:{href:t.link,target:t.isMailto(t.link)||t.isTel(t.link)?null:"_blank",rel:t.isMailto(t.link)||t.isTel(t.link)?null:"noopener noreferrer"}},[t._v("\n "+t._s(t.item.text)+"\n "),n("OutboundLink")],1):n("router-link",{staticClass:"nav-link",attrs:{to:t.link,exact:t.exact}},[t._v(t._s(t.item.text))])}),[],!1,null,null,null).exports,o={components:{NavLink:s},computed:{data:function(){return this.$page.frontmatter},actionLink:function(){return{link:this.data.actionLink,text:this.data.actionText}}}},l=(n(171),Object(r.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("main",{staticClass:"home",attrs:{"aria-labelledby":"main-title"}},[n("header",{staticClass:"hero"},[t.data.heroImage?n("img",{attrs:{src:t.$withBase(t.data.heroImage),alt:t.data.heroAlt||"hero"}}):t._e(),t._v(" "),null!==t.data.heroText?n("h1",{attrs:{id:"main-title"}},[t._v(t._s(t.data.heroText||t.$title||"Hello"))]):t._e(),t._v(" "),n("p",{staticClass:"description"},[t._v("\n "+t._s(t.data.tagline||t.$description||"Welcome to your VuePress site")+"\n ")]),t._v(" "),t.data.actionText&&t.data.actionLink?n("p",{staticClass:"action"},[n("NavLink",{staticClass:"action-button",attrs:{item:t.actionLink}})],1):t._e()]),t._v(" "),t.data.features&&t.data.features.length?n("div",{staticClass:"features"},t._l(t.data.features,(function(e,i){return n("div",{key:i,staticClass:"feature"},[n("h2",[t._v(t._s(e.title))]),t._v(" "),n("p",[t._v(t._s(e.details))])])})),0):t._e(),t._v(" "),n("Content",{staticClass:"theme-default-content custom"}),t._v(" "),t.data.footer?n("div",{staticClass:"footer"},[t._v("\n "+t._s(t.data.footer)+"\n ")]):t._e()],1)}),[],!1,null,null,null).exports),c=(n(172),n(207)),u=(n(177),Object(r.a)({},(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"sidebar-button",on:{click:function(e){return t.$emit("toggle-sidebar")}}},[n("svg",{staticClass:"icon",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",viewBox:"0 0 448 512"}},[n("path",{attrs:{fill:"currentColor",d:"M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"}})])])}),[],!1,null,null,null).exports),h=(n(178),n(40),n(179),n(29),n(180),n(143),n(41),n(38)),p={components:{NavLink:s,DropdownTransition:n(164).a},data:function(){return{open:!1}},props:{item:{required:!0}},methods:{toggle:function(){this.open=!this.open}}},d=(n(182),{components:{NavLink:s,DropdownLink:Object(r.a)(p,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dropdown-wrapper",class:{open:t.open}},[n("a",{staticClass:"dropdown-title",on:{click:t.toggle}},[n("span",{staticClass:"title"},[t._v(t._s(t.item.text))]),t._v(" "),n("span",{staticClass:"arrow",class:t.open?"down":"right"})]),t._v(" "),n("DropdownTransition",[n("ul",{directives:[{name:"show",rawName:"v-show",value:t.open,expression:"open"}],staticClass:"nav-dropdown"},t._l(t.item.items,(function(e,i){return n("li",{key:e.link||i,staticClass:"dropdown-item"},["links"===e.type?n("h4",[t._v(t._s(e.text))]):t._e(),t._v(" "),"links"===e.type?n("ul",{staticClass:"dropdown-subitem-wrapper"},t._l(e.items,(function(t){return n("li",{key:t.link,staticClass:"dropdown-subitem"},[n("NavLink",{attrs:{item:t}})],1)})),0):n("NavLink",{attrs:{item:e}})],1)})),0)])],1)}),[],!1,null,null,null).exports},computed:{userNav:function(){return this.$themeLocaleConfig.nav||this.$site.themeConfig.nav||[]},nav:function(){var t=this,e=this.$site.locales;if(e&&Object.keys(e).length>1){var n=this.$page.path,i=this.$router.options.routes,a=this.$site.themeConfig.locales||{},r={text:this.$themeLocaleConfig.selectText||"Languages",items:Object.keys(e).map((function(r){var s,o=e[r],l=a[r]&&a[r].label||o.lang;return o.lang===t.$lang?s=n:(s=n.replace(t.$localeConfig.path,r),i.some((function(t){return t.path===s}))||(s=r)),{text:l,link:s}}))};return[].concat(Object(h.a)(this.userNav),[r])}return this.userNav},userLinks:function(){return(this.nav||[]).map((function(t){return Object.assign(Object(i.j)(t),{items:(t.items||[]).map(i.j)})}))},repoLink:function(){var t=this.$site.themeConfig.repo;if(t)return/^https?:/.test(t)?t:"https://github.com/".concat(t)},repoLabel:function(){if(this.repoLink){if(this.$site.themeConfig.repoLabel)return this.$site.themeConfig.repoLabel;for(var t=this.repoLink.match(/^https?:\/\/[^/]+/)[0],e=["GitHub","GitLab","Bitbucket"],n=0;nMath.abs(n)&&Math.abs(e)>40&&(e>0&&this.touchStart.x<=80?this.toggleSidebar(!0):this.toggleSidebar(!1))}}}),P=Object(r.a)(N,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"theme-container",class:t.pageClasses,on:{touchstart:t.onTouchStart,touchend:t.onTouchEnd}},[n("script",{attrs:{type:"text/javascript"}},[t._v("\n(function(f, a, t, h, o, m){\n a[h]=a[h]||function(){\n (a[h].q=a[h].q||[]).push(arguments)\n };\n o=f.createElement('script'),\n m=f.getElementsByTagName('script')[0];\n o.async=1; o.src=t; o.id='fathom-script';\n m.parentNode.insertBefore(o,m)\n})(document, window, '//fathom.status.im/tracker.js', 'fathom');\nfathom('set', 'siteId', 'DNONS');\nfathom('trackPageview');\n")]),t._v(" "),t.shouldShowNavbar?n("Navbar",{on:{"toggle-sidebar":t.toggleSidebar}}):t._e(),t._v(" "),n("div",{staticClass:"sidebar-mask",on:{click:function(e){return t.toggleSidebar(!1)}}}),t._v(" "),n("Sidebar",{attrs:{items:t.sidebarItems},on:{"toggle-sidebar":t.toggleSidebar}},[t._t("sidebar-top",null,{slot:"top"}),t._v(" "),t._t("sidebar-bottom",null,{slot:"bottom"})],2),t._v(" "),t.$page.frontmatter.home?n("Home"):n("Page",{attrs:{"sidebar-items":t.sidebarItems}},[t._t("page-top",null,{slot:"top"}),t._v(" "),t._t("page-bottom",null,{slot:"bottom"})],2)],1)}),[],!1,null,null,null);e.default=P.exports}}]); \ No newline at end of file diff --git a/assets/js/4.336e58fa.js b/assets/js/4.336e58fa.js deleted file mode 100644 index 13e4c31..0000000 --- a/assets/js/4.336e58fa.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{201:function(e,t,s){e.exports=s.p+"assets/img/d1.daa5485a.png"},202:function(e,t,s){e.exports=s.p+"assets/img/d2.de512122.png"},203:function(e,t,s){e.exports=s.p+"assets/img/d3.123a2e18.png"},204:function(e,t,s){e.exports=s.p+"assets/img/d4.81f850ef.png"},213:function(e,t,s){"use strict";s.r(t);var a=s(28),r=Object(a.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"how-it-works"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-it-works"}},[e._v("#")]),e._v(" How it works?")]),e._v(" "),a("h3",{attrs:{id:"setup"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#setup"}},[e._v("#")]),e._v(" Setup")]),e._v(" "),a("p",[a("img",{attrs:{src:s(201),alt:"First Usage - Setup"}})]),e._v(" "),a("ol",[a("li",[e._v("A ÐApp requests "),a("code",[e._v("Subspace")]),e._v(" to track an event, property, or balance.")]),e._v(" "),a("li",[a("code",[e._v("Subspace")]),e._v(" creates a observable for that event, and a web3 subscription to retrieve events from the chain")]),e._v(" "),a("li",[e._v("The ÐApp subscribes to the observable to receive events.")])]),e._v(" "),a("h3",{attrs:{id:"receiving-events"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#receiving-events"}},[e._v("#")]),e._v(" Receiving events")]),e._v(" "),a("p",[a("img",{attrs:{src:s(202),alt:"First Usage - Receiving events"}}),e._v("\nDepending on the filter parameters used to track the events, once an event is found, it is stored in "),a("code",[e._v("localStorage")]),e._v(" and it is also pushed to the observable which delivers it to the ÐApp subscription.")]),e._v(" "),a("h3",{attrs:{id:"tracking-already-known-events"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#tracking-already-known-events"}},[e._v("#")]),e._v(" Tracking already known events")]),e._v(" "),a("p",[e._v("After restarting the ÐApp, either by executing it again in case of a console application or refreshing the browser the behavior of "),a("code",[e._v("Subspace")]),e._v(" will change:\n"),a("img",{attrs:{src:s(203),alt:"Second Usage - Setup"}})]),e._v(" "),a("ol",[a("li",[e._v("The Dapp will request "),a("code",[e._v("Subspace")]),e._v(" to track an event it already knows, creating an observable and subscription for that event")]),e._v(" "),a("li",[e._v("It will retrieve events that were previously stored in localStorage and deliver them to the DApp subscription, avoiding having to query the chain for the old events again.")])]),e._v(" "),a("p",[a("img",{attrs:{src:s(204),alt:"Second Usage - Receiving events"}}),e._v("\nThe web3 subscription created previously will start from the last known block instead of beginning from scratch. New events will be delivered normally from this step")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/5.5969a423.js b/assets/js/5.5969a423.js deleted file mode 100644 index a714ad4..0000000 --- a/assets/js/5.5969a423.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{158:function(t,s,a){},205:function(t,s,a){"use strict";var n=a(158);a.n(n).a},210:function(t,s,a){"use strict";a.r(s);var n={},i=(a(205),a(28)),o=Object(i.a)(n,(function(){var t=this.$createElement;this._self._c;return this._m(0)}),[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{attrs:{id:"intro"}},[a("div",{staticClass:"code-container"},[a("div",{staticClass:"code-text"},[a("h3",[t._v("Event Tracking & Event Sourcing")]),t._v("\n You can track events and react to their values. With Subspace observables doing event sourcing is easy.\n ")]),t._v(" "),a("div",{staticClass:"code-content"},[a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{staticClass:"language-js"},[a("code",[a("span",{staticClass:"token keyword"},[t._v("import")]),t._v(" "),a("span",{staticClass:"token punctuation"},[t._v("{")]),t._v(" $average"),a("span",{staticClass:"token punctuation"},[t._v(",")]),t._v(" $latest "),a("span",{staticClass:"token punctuation"},[t._v("}")]),t._v(" "),a("span",{staticClass:"token keyword"},[t._v("from")]),t._v(" "),a("span",{staticClass:"token string"},[t._v('"@embarklabs/subspace"')]),a("span",{staticClass:"token punctuation"},[t._v(";")]),t._v("\n\n"),a("span",{staticClass:"token keyword"},[t._v("const")]),t._v(" rating$ "),a("span",{staticClass:"token operator"},[t._v("=")]),t._v(" Product"),a("span",{staticClass:"token punctuation"},[t._v(".")]),t._v("events"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("Rating")]),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("track")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("map")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token string"},[t._v('"rating"')]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(";")]),t._v("\n\nrating$"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("pipe")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token function"},[t._v("$latest")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token number"},[t._v("5")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(",")]),t._v(" "),a("span",{staticClass:"token function"},[t._v("$average")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("subscribe")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token parameter"},[t._v("rating")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),t._v(" "),a("span",{staticClass:"token operator"},[t._v("=>")]),t._v(" "),a("span",{staticClass:"token punctuation"},[t._v("{")]),t._v("\n console"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("log")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token string"},[t._v('"average rating of the last 5 events is "')]),t._v(" "),a("span",{staticClass:"token operator"},[t._v("+")]),t._v(" rating"),a("span",{staticClass:"token punctuation"},[t._v(")")]),t._v("\n"),a("span",{staticClass:"token punctuation"},[t._v("}")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(";")]),t._v("\n ")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br"),a("span",{staticClass:"line-number"},[t._v("4")]),a("br"),a("span",{staticClass:"line-number"},[t._v("5")]),a("br"),a("span",{staticClass:"line-number"},[t._v("6")]),a("br"),a("span",{staticClass:"line-number"},[t._v("7")]),a("br")])])])]),t._v(" "),a("div",{staticClass:"code-container"},[a("div",{staticClass:"code-text"},[a("h3",[t._v("Tracking State")]),t._v("\n You can track changes to a contract state variable, by specifying the view function and arguments to call and query the contract.\n ")]),t._v(" "),a("div",{staticClass:"code-content"},[a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{staticClass:"language-js"},[a("code",[a("span",{staticClass:"token keyword"},[t._v("const")]),t._v(" productTitle$ "),a("span",{staticClass:"token operator"},[t._v("=")]),t._v(" ProductList"),a("span",{staticClass:"token punctuation"},[t._v(".")]),t._v("methods"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("products")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token number"},[t._v("0")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("track")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("map")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token string"},[t._v('"title"')]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(";")]),t._v("\nproductTitle$"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("subscribe")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token parameter"},[t._v("title")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),t._v(" "),a("span",{staticClass:"token operator"},[t._v("=>")]),t._v(" console"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("log")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token string"},[t._v('"product title is "')]),t._v(" "),a("span",{staticClass:"token operator"},[t._v("+")]),t._v(" title"),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(";")]),t._v("\n ")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br")])])])]),t._v(" "),a("div",{staticClass:"code-container"},[a("div",{staticClass:"code-text"},[a("h3",[t._v("Tracking balances")]),t._v("\n You can also track changes in both ETH and ERC20 token balances\n ")]),t._v(" "),a("div",{staticClass:"code-content"},[a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{staticClass:"language-js"},[a("code",[a("span",{staticClass:"token keyword"},[t._v("const")]),t._v(" address "),a("span",{staticClass:"token operator"},[t._v("=")]),t._v(" "),a("span",{staticClass:"token string"},[t._v('"0x0001020304050607080900010203040506070809"')]),a("span",{staticClass:"token punctuation"},[t._v(";")]),t._v("\n\nsubspace"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("trackBalance")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),t._v("address"),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("subscribe")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token parameter"},[t._v("balance")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),t._v(" "),a("span",{staticClass:"token operator"},[t._v("=>")]),t._v(" "),a("span",{staticClass:"token punctuation"},[t._v("{")]),t._v("\n console"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("log")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token string"},[t._v('"ETH balance is "')]),a("span",{staticClass:"token punctuation"},[t._v(",")]),t._v(" balance"),a("span",{staticClass:"token punctuation"},[t._v(")")]),t._v("\n"),a("span",{staticClass:"token punctuation"},[t._v("}")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(";")]),t._v("\n\nsubspace"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("trackBalance")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),t._v("address, "),a("span",{staticClass:"token string"},[t._v('"0x744d70fdbe2ba4cf95131626614a1763df805b9e"')]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("subscribe")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token parameter"},[t._v("balance")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),t._v(" "),a("span",{staticClass:"token operator"},[t._v("=>")]),t._v(" "),a("span",{staticClass:"token punctuation"},[t._v("{")]),t._v("\n console"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("log")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token string"},[t._v('"SNT balance is "')]),a("span",{staticClass:"token punctuation"},[t._v(",")]),t._v(" balance"),a("span",{staticClass:"token punctuation"},[t._v(")")]),t._v("\n"),a("span",{staticClass:"token punctuation"},[t._v("}")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(";")]),t._v("\n\n")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br"),a("span",{staticClass:"line-number"},[t._v("4")]),a("br"),a("span",{staticClass:"line-number"},[t._v("5")]),a("br"),a("span",{staticClass:"line-number"},[t._v("6")]),a("br"),a("span",{staticClass:"line-number"},[t._v("7")]),a("br"),a("span",{staticClass:"line-number"},[t._v("8")]),a("br"),a("span",{staticClass:"line-number"},[t._v("9")]),a("br")])])])]),t._v(" "),a("div",{staticClass:"code-container"},[a("div",{staticClass:"code-text"},[a("h3",[t._v("React Integration")]),t._v("\n Subspace can make any react component compatible with observables so you easily reactive components\n ")]),t._v(" "),a("div",{staticClass:"code-content"},[a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{staticClass:"language-js"},[a("code",[a("span",{staticClass:"token keyword"},[t._v("import")]),t._v(" "),a("span",{staticClass:"token punctuation"},[t._v("{")]),t._v(" observe "),a("span",{staticClass:"token punctuation"},[t._v("}")]),t._v(" "),a("span",{staticClass:"token keyword"},[t._v("from")]),t._v(" "),a("span",{staticClass:"token string"},[t._v('"@embarklabs/subspace/react"')]),a("span",{staticClass:"token punctuation"},[t._v(";")]),t._v("\n\n"),a("span",{staticClass:"token keyword"},[t._v("const")]),t._v(" "),a("span",{staticClass:"token function-variable function"},[t._v("ProductComponent")]),t._v(" "),a("span",{staticClass:"token operator"},[t._v("=")]),t._v(" "),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token parameter"},[a("span",{staticClass:"token punctuation"},[t._v("{")]),t._v(" maxRating"),a("span",{staticClass:"token punctuation"},[t._v(",")]),t._v(" minRating"),a("span",{staticClass:"token punctuation"},[t._v(",")]),t._v(" averageRating "),a("span",{staticClass:"token punctuation"},[t._v("}")])]),a("span",{staticClass:"token punctuation"},[t._v(")")]),t._v(" "),a("span",{staticClass:"token operator"},[t._v("=>")]),t._v(" "),a("span",{staticClass:"token punctuation"},[t._v("{")]),t._v("\n "),a("span",{staticClass:"token keyword"},[t._v("return")]),t._v(" "),a("span",{staticClass:"token operator"},[t._v("<")]),t._v("ul"),a("span",{staticClass:"token operator"},[t._v(">")]),t._v("\n "),a("span",{staticClass:"token operator"},[t._v("<")]),t._v("li"),a("span",{staticClass:"token operator"},[t._v(">")]),a("span",{staticClass:"token operator"},[t._v("<")]),t._v("b"),a("span",{staticClass:"token operator"},[t._v(">")]),t._v("minimum rating"),a("span",{staticClass:"token punctuation"},[t._v(":")]),t._v(" "),a("span",{staticClass:"token operator"},[t._v("<")]),a("span",{staticClass:"token operator"},[t._v("/")]),t._v("b"),a("span",{staticClass:"token operator"},[t._v(">")]),t._v(" "),a("span",{staticClass:"token punctuation"},[t._v("{")]),t._v("minRating"),a("span",{staticClass:"token punctuation"},[t._v("}")]),a("span",{staticClass:"token operator"},[t._v("<")]),a("span",{staticClass:"token operator"},[t._v("/")]),t._v("li"),a("span",{staticClass:"token operator"},[t._v(">")]),t._v("\n "),a("span",{staticClass:"token operator"},[t._v("<")]),t._v("li"),a("span",{staticClass:"token operator"},[t._v(">")]),a("span",{staticClass:"token operator"},[t._v("<")]),t._v("b"),a("span",{staticClass:"token operator"},[t._v(">")]),t._v("maximum rating"),a("span",{staticClass:"token punctuation"},[t._v(":")]),t._v(" "),a("span",{staticClass:"token operator"},[t._v("<")]),a("span",{staticClass:"token operator"},[t._v("/")]),t._v("b"),a("span",{staticClass:"token operator"},[t._v(">")]),t._v(" "),a("span",{staticClass:"token punctuation"},[t._v("{")]),t._v("maxRating"),a("span",{staticClass:"token punctuation"},[t._v("}")]),a("span",{staticClass:"token operator"},[t._v("<")]),a("span",{staticClass:"token operator"},[t._v("/")]),t._v("li"),a("span",{staticClass:"token operator"},[t._v(">")]),t._v("\n "),a("span",{staticClass:"token operator"},[t._v("<")]),t._v("li"),a("span",{staticClass:"token operator"},[t._v(">")]),a("span",{staticClass:"token operator"},[t._v("<")]),t._v("b"),a("span",{staticClass:"token operator"},[t._v(">")]),t._v("average rating"),a("span",{staticClass:"token punctuation"},[t._v(":")]),t._v(" "),a("span",{staticClass:"token operator"},[t._v("<")]),a("span",{staticClass:"token operator"},[t._v("/")]),t._v("b"),a("span",{staticClass:"token operator"},[t._v(">")]),t._v(" "),a("span",{staticClass:"token punctuation"},[t._v("{")]),t._v("averageRating"),a("span",{staticClass:"token punctuation"},[t._v("}")]),a("span",{staticClass:"token operator"},[t._v("<")]),a("span",{staticClass:"token operator"},[t._v("/")]),t._v("li"),a("span",{staticClass:"token operator"},[t._v(">")]),t._v("\n "),a("span",{staticClass:"token operator"},[t._v("<")]),a("span",{staticClass:"token operator"},[t._v("/")]),t._v("ul"),a("span",{staticClass:"token operator"},[t._v(">")]),a("span",{staticClass:"token punctuation"},[t._v(";")]),t._v("\n"),a("span",{staticClass:"token punctuation"},[t._v("}")]),a("span",{staticClass:"token punctuation"},[t._v(";")]),t._v("\n\n"),a("span",{staticClass:"token keyword"},[t._v("const")]),t._v(" ReactiveProductComponent "),a("span",{staticClass:"token operator"},[t._v("=")]),t._v(" "),a("span",{staticClass:"token function"},[t._v("observe")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),t._v("ProductComponent"),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(";")]),t._v("\n"),a("span",{staticClass:"token keyword"},[t._v("const")]),t._v(" Product "),a("span",{staticClass:"token operator"},[t._v("=")]),t._v(" subspace"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("contract")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token punctuation"},[t._v("{")]),t._v("abi"),a("span",{staticClass:"token punctuation"},[t._v(",")]),t._v(" address"),a("span",{staticClass:"token punctuation"},[t._v("}")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(";")]),t._v("\n"),a("span",{staticClass:"token keyword"},[t._v("const")]),t._v(" rating$ "),a("span",{staticClass:"token operator"},[t._v("=")]),t._v(" Product"),a("span",{staticClass:"token punctuation"},[t._v(".")]),t._v("events"),a("span",{staticClass:"token punctuation"},[t._v(".")]),t._v("Rating"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("track")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("map")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token string"},[t._v('"rating"')]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("pipe")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token function"},[t._v("map")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token parameter"},[t._v("x")]),t._v(" "),a("span",{staticClass:"token operator"},[t._v("=>")]),t._v(" "),a("span",{staticClass:"token function"},[t._v("parseInt")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),t._v("x"),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(";")]),t._v("\n\nReactDOM"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("render")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),t._v("\n "),a("span",{staticClass:"token operator"},[t._v("<")]),t._v("ReactiveProductComponent\n maxRating"),a("span",{staticClass:"token operator"},[t._v("=")]),a("span",{staticClass:"token punctuation"},[t._v("{")]),t._v("rating$"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("pipe")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token function"},[t._v("$max")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v("}")]),t._v("\n minRating"),a("span",{staticClass:"token operator"},[t._v("=")]),a("span",{staticClass:"token punctuation"},[t._v("{")]),t._v("rating$"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("pipe")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token function"},[t._v("$min")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v("}")]),t._v("\n averageRating"),a("span",{staticClass:"token operator"},[t._v("=")]),a("span",{staticClass:"token punctuation"},[t._v("{")]),t._v("rating$"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("pipe")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token function"},[t._v("$average")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v("}")]),t._v("\n "),a("span",{staticClass:"token operator"},[t._v("/")]),a("span",{staticClass:"token operator"},[t._v(">")]),a("span",{staticClass:"token punctuation"},[t._v(",")]),t._v("\n document"),a("span",{staticClass:"token punctuation"},[t._v(".")]),a("span",{staticClass:"token function"},[t._v("getElementById")]),a("span",{staticClass:"token punctuation"},[t._v("(")]),a("span",{staticClass:"token string"},[t._v("'hello-example'")]),a("span",{staticClass:"token punctuation"},[t._v(")")]),t._v("\n"),a("span",{staticClass:"token punctuation"},[t._v(")")]),a("span",{staticClass:"token punctuation"},[t._v(";")]),t._v("\n ")])]),t._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[t._v("1")]),a("br"),a("span",{staticClass:"line-number"},[t._v("2")]),a("br"),a("span",{staticClass:"line-number"},[t._v("3")]),a("br"),a("span",{staticClass:"line-number"},[t._v("4")]),a("br"),a("span",{staticClass:"line-number"},[t._v("5")]),a("br"),a("span",{staticClass:"line-number"},[t._v("6")]),a("br"),a("span",{staticClass:"line-number"},[t._v("7")]),a("br"),a("span",{staticClass:"line-number"},[t._v("8")]),a("br"),a("span",{staticClass:"line-number"},[t._v("9")]),a("br"),a("span",{staticClass:"line-number"},[t._v("10")]),a("br"),a("span",{staticClass:"line-number"},[t._v("11")]),a("br"),a("span",{staticClass:"line-number"},[t._v("12")]),a("br"),a("span",{staticClass:"line-number"},[t._v("13")]),a("br"),a("span",{staticClass:"line-number"},[t._v("14")]),a("br"),a("span",{staticClass:"line-number"},[t._v("15")]),a("br"),a("span",{staticClass:"line-number"},[t._v("16")]),a("br"),a("span",{staticClass:"line-number"},[t._v("17")]),a("br"),a("span",{staticClass:"line-number"},[t._v("18")]),a("br"),a("span",{staticClass:"line-number"},[t._v("19")]),a("br"),a("span",{staticClass:"line-number"},[t._v("20")]),a("br"),a("span",{staticClass:"line-number"},[t._v("21")]),a("br"),a("span",{staticClass:"line-number"},[t._v("22")]),a("br"),a("span",{staticClass:"line-number"},[t._v("23")]),a("br")])])])])])}],!1,null,"07c470a6",null);s.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/6.169a8ab4.js b/assets/js/6.169a8ab4.js deleted file mode 100644 index 80fc6fe..0000000 --- a/assets/js/6.169a8ab4.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{159:function(t,e,n){},206:function(t,e,n){"use strict";var i=n(159);n.n(i).a},223:function(t,e,n){"use strict";n.r(e);var i={functional:!0,props:{type:{type:String,default:"tip"},text:String,vertical:{type:String,default:"top"}},render:function(t,e){var n=e.props,i=e.slots;return t("span",{class:["badge",n.type],style:{verticalAlign:n.vertical}},n.text||i().default)}},r=(n(206),n(28)),a=Object(r.a)(i,void 0,void 0,!1,null,"f531b196",null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/7.da8dc444.js b/assets/js/7.da8dc444.js deleted file mode 100644 index 3a85271..0000000 --- a/assets/js/7.da8dc444.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{209:function(t,e,s){"use strict";s.r(e);var o=["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."],n={methods:{getMsg:function(){return o[Math.floor(Math.random()*o.length)]}}},i=s(28),h=Object(i.a)(n,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"theme-container"},[e("div",{staticClass:"theme-default-content"},[e("h1",[this._v("404")]),this._v(" "),e("blockquote",[this._v(this._s(this.getMsg()))]),this._v(" "),e("router-link",{attrs:{to:"/"}},[this._v("Take me home.")])],1)])}),[],!1,null,null,null);e.default=h.exports}}]); \ No newline at end of file diff --git a/assets/js/8.7bad8100.js b/assets/js/8.7bad8100.js deleted file mode 100644 index d1ead90..0000000 --- a/assets/js/8.7bad8100.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{222:function(e,t,a){"use strict";a.r(t);var o=a(28),r=Object(o.a)({},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"api"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#api"}},[e._v("#")]),e._v(" API")]),e._v(" "),a("h2",{attrs:{id:"general"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#general"}},[e._v("#")]),e._v(" General")]),e._v(" "),a("h3",{attrs:{id:"new-subspace-web3-options"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#new-subspace-web3-options"}},[e._v("#")]),e._v(" "),a("code",[e._v("new Subspace(web3 [, options])")])]),e._v(" "),a("p",[e._v("Constructor.")]),e._v(" "),a("p",[a("strong",[e._v("Parameters")])]),e._v(" "),a("ol",[a("li",[a("code",[e._v("web3")]),e._v(" - "),a("code",[e._v("Object")]),e._v(": a "),a("code",[e._v("web3.js")]),e._v(" object.")]),e._v(" "),a("li",[a("code",[e._v("options")]),e._v(" - "),a("code",[e._v("Object")]),e._v(" (optional): Options used to initialize Subspace\n"),a("ul",[a("li",[a("code",[e._v("dbFilename")]),e._v(" - "),a("code",[e._v("String")]),e._v(" (optional): Name of the database where the information will be stored (default "),a("code",[e._v("'subspace.db'")]),e._v(")")])])])]),e._v(" "),a("ul",[a("li",[a("code",[e._v("callInterval")]),e._v(" - Interval of time in milliseconds to query a contract/address to determine changes in state or balance. It's only used with HttpProviders (default: "),a("code",[e._v("undefined")]),e._v(". Obtains data every block using the average block time as an interval).\n"),a("ul",[a("li",[a("code",[e._v("refreshLastNBlocks")]),e._v(" - Ignores last N blocks (from current block), stored in the local db and refresh them via a web3 subscription. Useful for possible reorgs (default: 12),")]),e._v(" "),a("li",[a("code",[e._v("disableSubscriptions")]),e._v(" - Subspace by default will attempt to use websocket subscriptions if the current provider supports them, otherwise it will use polling because it asumes the provider is an HttpProvider. This functionality can be disabled by passing true to this option. (default: undefined)")])])])]),e._v(" "),a("h3",{attrs:{id:"init"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#init"}},[e._v("#")]),e._v(" "),a("code",[e._v("init()")])]),e._v(" "),a("p",[e._v("Initializes "),a("strong",[e._v("Subspace")])]),e._v(" "),a("p",[a("strong",[e._v("Returns")]),e._v(" "),a("code",[e._v("Promise")]),e._v(" that once it's resolved, will mean that "),a("strong",[e._v("Subspace")]),e._v(" is available to use")]),e._v(" "),a("h3",{attrs:{id:"close"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#close"}},[e._v("#")]),e._v(" "),a("code",[e._v("close()")])]),e._v(" "),a("p",[e._v("Dispose and perform the cleanup necessary to remove the internal subscriptions and interval timers created by "),a("strong",[e._v("Subspace")]),e._v(" during its normal execution.")]),e._v(" "),a("h3",{attrs:{id:"contract-instance-abi-address"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#contract-instance-abi-address"}},[e._v("#")]),e._v(" "),a("code",[e._v("contract(instance|{abi,address})")])]),e._v(" "),a("p",[e._v("Adds a "),a("code",[e._v("track")]),e._v(" method to the web3 contract objects. You can obtain this functionality by passing a "),a("code",[e._v("web3.eth.Contract")]),e._v(" instance, or the "),a("code",[e._v("abi")]),e._v(" and "),a("code",[e._v("address")]),e._v(" of your contract")]),e._v(" "),a("p",[a("strong",[e._v("Returns")]),e._v(" "),a("code",[e._v("web3.eth.Contract")]),e._v(" object enhanced with "),a("code",[e._v(".track()")]),e._v(" functions for methods and events.")]),e._v(" "),a("h2",{attrs:{id:"contract-methods"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#contract-methods"}},[e._v("#")]),e._v(" Contract methods")]),e._v(" "),a("h3",{attrs:{id:"mycontract-events-myevent-track-options"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mycontract-events-myevent-track-options"}},[e._v("#")]),e._v(" "),a("code",[e._v("myContract.events.MyEvent.track([options])")])]),e._v(" "),a("p",[e._v("Track a contract event.")]),e._v(" "),a("p",[a("strong",[e._v("Parameters")])]),e._v(" "),a("ol",[a("li",[a("code",[e._v("options")]),e._v(" - "),a("code",[e._v("Object")]),e._v(" (optional): web3 filter options object to limit the number of events based on a block number range, or indexed filters\n"),a("ul",[a("li",[a("code",[e._v("filter")]),e._v(" - "),a("code",[e._v("Object")]),e._v(" (optional): Lets you filter events by indexed parameters, e.g. "),a("code",[e._v("{filter: {myNumber: [12,13]}}")]),e._v(" means all events where "),a("code",[e._v('"myNumber"')]),e._v(" is "),a("code",[e._v("12")]),e._v(" or "),a("code",[e._v("13")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("fromBlock")]),e._v(" - "),a("code",[e._v("Number")]),e._v(" (optional): The block number from which to get events on.")]),e._v(" "),a("li",[a("code",[e._v("toBlock")]),e._v(" - "),a("code",[e._v("Number")]),e._v(" (optional): The block number to get events up to (Defaults to "),a("code",[e._v('"latest"')]),e._v(")")]),e._v(" "),a("li",[a("code",[e._v("topics")]),e._v(" - "),a("code",[e._v("Array")]),e._v(" (optional): This allows you to manually set the topics for the event filter. If given the filter property and event signature, ("),a("code",[e._v("topic[0]")]),e._v(") will not be set automatically.")])])])]),e._v(" "),a("p",[a("strong",[e._v("Returns")]),e._v(" "),a("code",[e._v("RxJS Observable")]),e._v(" which will stream the event "),a("code",[e._v("returnValues")]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"mycontract-methods-mymethod-param1-track-calloptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mycontract-methods-mymethod-param1-track-calloptions"}},[e._v("#")]),e._v(" "),a("code",[e._v("myContract.methods.myMethod([param1[, ...]]).track([callOptions])")])]),e._v(" "),a("p",[e._v("Track a constant function / contract state variable on each block mined, or depending on the "),a("code",[e._v("callInterval")]),e._v(" option used during "),a("strong",[e._v("Subspace")]),e._v(" initialization.")]),e._v(" "),a("p",[a("strong",[e._v("Parameters")])]),e._v(" "),a("ol",[a("li",[a("code",[e._v("callOptions")]),e._v(" - "),a("code",[e._v("Object")]),e._v(" (optional): The options used for calling.\n"),a("ul",[a("li",[a("code",[e._v("from")]),e._v(" - "),a("code",[e._v("String")]),e._v(" (optional): The address the call “transaction” should be made from.")]),e._v(" "),a("li",[a("code",[e._v("gasPrice")]),e._v(" - "),a("code",[e._v("String")]),e._v(" (optional): The gas price in wei to use for this call “transaction”.")]),e._v(" "),a("li",[a("code",[e._v("gas")]),e._v(" - "),a("code",[e._v("Number")]),e._v(" (optional): The maximum gas provided for this call “transaction” (gas limit).")])])])]),e._v(" "),a("p",[a("strong",[e._v("Returns")]),e._v(" "),a("code",[e._v("RxJS Observable")]),e._v(" which will stream the function / variable values. Data type will depend on the contract function invoked.")]),e._v(" "),a("h3",{attrs:{id:"mycontract-trackbalance-address-tokenaddress"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#mycontract-trackbalance-address-tokenaddress"}},[e._v("#")]),e._v(" "),a("code",[e._v("myContract.trackBalance(address [, tokenAddress])")])]),e._v(" "),a("p",[e._v("Track a contract's balance changes for an address on each block mined, or depending on the "),a("code",[e._v("callInterval")]),e._v(" option used during "),a("strong",[e._v("Subspace")]),e._v(" initialization.")]),e._v(" "),a("p",[a("strong",[e._v("Parameters")])]),e._v(" "),a("ol",[a("li",[a("code",[e._v("address")]),e._v(" - "),a("code",[e._v("String")]),e._v(": The address to get the balance of.")]),e._v(" "),a("li",[a("code",[e._v("tokenAddress")]),e._v(" - "),a("code",[e._v("String")]),e._v(" (optional): If you want to track the balance for an ERC20 contract, here you can specify the token address. Otherwise, Only ETH balances will be returned.")])]),e._v(" "),a("p",[a("strong",[e._v("Returns")]),e._v(" "),a("code",[e._v("RxJS Observable")]),e._v(" which will stream a string containing the address balance.")]),e._v(" "),a("h2",{attrs:{id:"blocks-gas-price-and-block-time"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#blocks-gas-price-and-block-time"}},[e._v("#")]),e._v(" Blocks, gas price and block time")]),e._v(" "),a("h3",{attrs:{id:"trackblock"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#trackblock"}},[e._v("#")]),e._v(" "),a("code",[e._v("trackBlock()")])]),e._v(" "),a("p",[e._v("Receive the block information for any new block. It's the reactive equivalent to "),a("code",[e._v('web3.eth.getBlock("latest")')]),e._v(".")]),e._v(" "),a("p",[a("strong",[e._v("Returns")]),e._v(" "),a("code",[e._v("RxJS Observable")]),e._v(" which will stream a block object for the latest block received")]),e._v(" "),a("h3",{attrs:{id:"trackblocknumber"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#trackblocknumber"}},[e._v("#")]),e._v(" "),a("code",[e._v("trackBlockNumber()")])]),e._v(" "),a("p",[e._v("Returns the latest block number. It's the reactive equivalent to "),a("code",[e._v("web3.eth.getBlockNumber")]),e._v(".")]),e._v(" "),a("p",[a("strong",[e._v("Returns")]),e._v(" "),a("code",[e._v("RxJS Observable")]),e._v(" with the latest block number")]),e._v(" "),a("h3",{attrs:{id:"trackgasprice"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#trackgasprice"}},[e._v("#")]),e._v(" "),a("code",[e._v("trackGasPrice()")])]),e._v(" "),a("p",[e._v("Returns the current gas price oracle. It's the reactive equivalent to "),a("code",[e._v("web3.eth.getGasPrice")]),e._v(".")]),e._v(" "),a("p",[a("strong",[e._v("Returns")]),e._v(" "),a("code",[e._v("RxJS Observable")]),e._v(" with the average gas price in wei.")]),e._v(" "),a("h3",{attrs:{id:"trackaverageblocktime"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#trackaverageblocktime"}},[e._v("#")]),e._v(" "),a("code",[e._v("trackAverageBlocktime()")])]),e._v(" "),a("p",[e._v("Average block time of the last 10 blocks.")]),e._v(" "),a("p",[a("strong",[e._v("Returns")]),e._v(" "),a("code",[e._v("RxJS Observable")]),e._v(" with the moving average block time of the last 10 blocks. The time is returned in milliseconds:")]),e._v(" "),a("h2",{attrs:{id:"low-level-api-for-data-tracking"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#low-level-api-for-data-tracking"}},[e._v("#")]),e._v(" Low level API for data tracking")]),e._v(" "),a("p",[e._v("These are used in case you don't want to decorate your web3 contract objects, or if you want to track the balance for an specific address.")]),e._v(" "),a("h3",{attrs:{id:"trackevent-contractobject-eventname-options"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#trackevent-contractobject-eventname-options"}},[e._v("#")]),e._v(" "),a("code",[e._v("trackEvent(contractObject, eventName [, options])")])]),e._v(" "),a("p",[e._v("Track a contract event.")]),e._v(" "),a("p",[a("strong",[e._v("Parameters")])]),e._v(" "),a("ol",[a("li",[a("code",[e._v("contractObject")]),e._v(" - "),a("code",[e._v("web3.eth.Contract")]),e._v(": An already initialized contract object pointing to an address and containing a valid ABI.")]),e._v(" "),a("li",[a("code",[e._v("eventName")]),e._v(" - "),a("code",[e._v("String")]),e._v(": The name of the event to subscribe.")]),e._v(" "),a("li",[a("code",[e._v("options")]),e._v(" - "),a("code",[e._v("Object")]),e._v(" (optional): web3 filter options object to limit the number of events based on a block number range, or indexed filters\n"),a("ul",[a("li",[a("code",[e._v("filter")]),e._v(" - "),a("code",[e._v("Object")]),e._v(" (optional): Lets you filter events by indexed parameters, e.g. "),a("code",[e._v("{filter: {myNumber: [12,13]}}")]),e._v(" means all events where "),a("code",[e._v('"myNumber"')]),e._v(" is "),a("code",[e._v("12")]),e._v(" or "),a("code",[e._v("13")]),e._v(".")]),e._v(" "),a("li",[a("code",[e._v("fromBlock")]),e._v(" - "),a("code",[e._v("Number")]),e._v(" (optional): The block number from which to get events on.")]),e._v(" "),a("li",[a("code",[e._v("toBlock")]),e._v(" - "),a("code",[e._v("Number")]),e._v(" (optional): The block number to get events up to (Defaults to "),a("code",[e._v('"latest"')]),e._v(")")]),e._v(" "),a("li",[a("code",[e._v("topics")]),e._v(" - "),a("code",[e._v("Array")]),e._v(" (optional): This allows you to manually set the topics for the event filter. If given the filter property and event signature, ("),a("code",[e._v("topic[0]")]),e._v(") will not be set automatically.")])])])]),e._v(" "),a("p",[a("strong",[e._v("Returns")]),e._v(" "),a("code",[e._v("RxJS Observable")]),e._v(" which will stream the event "),a("code",[e._v("returnValues")]),e._v(".")]),e._v(" "),a("h3",{attrs:{id:"trackproperty-contractobject-functionname-functionargs-calloptions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#trackproperty-contractobject-functionname-functionargs-calloptions"}},[e._v("#")]),e._v(" "),a("code",[e._v("trackProperty(contractObject, functionName [, functionArgs] [, callOptions])")])]),e._v(" "),a("p",[e._v("Track a constant function / contract state variable on each block mined, or depending on the "),a("code",[e._v("callInterval")]),e._v(" option used during "),a("strong",[e._v("Subspace")]),e._v(" initialization.")]),e._v(" "),a("p",[a("strong",[e._v("Parameters")])]),e._v(" "),a("ol",[a("li",[a("code",[e._v("contractObject")]),e._v(" - "),a("code",[e._v("web3.eth.Contract")]),e._v(": An already initialized contract object pointing to an address and containing a valid ABI.")]),e._v(" "),a("li",[a("code",[e._v("functionName")]),e._v(" - "),a("code",[e._v("String")]),e._v(": Name of the function or variable whose values will be tracked.")]),e._v(" "),a("li",[a("code",[e._v("functionArgs")]),e._v(" - "),a("code",[e._v("Array")]),e._v(" (optional): Array of arguments that the tracked function receives")]),e._v(" "),a("li",[a("code",[e._v("callOptions")]),e._v(" - "),a("code",[e._v("Object")]),e._v(" (optional): The options used for calling.\n"),a("ul",[a("li",[a("code",[e._v("from")]),e._v(" - "),a("code",[e._v("String")]),e._v(" (optional): The address the call “transaction” should be made from.")]),e._v(" "),a("li",[a("code",[e._v("gasPrice")]),e._v(" - "),a("code",[e._v("String")]),e._v(" (optional): The gas price in wei to use for this call “transaction”.")]),e._v(" "),a("li",[a("code",[e._v("gas")]),e._v(" - "),a("code",[e._v("Number")]),e._v(" (optional): The maximum gas provided for this call “transaction” (gas limit).")])])])]),e._v(" "),a("p",[a("strong",[e._v("Returns")]),e._v(" "),a("code",[e._v("RxJS Observable")]),e._v(" which will stream the function / variable values. Data type will depend on the contract function invoked.")]),e._v(" "),a("h3",{attrs:{id:"trackbalance-address-tokenaddress"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#trackbalance-address-tokenaddress"}},[e._v("#")]),e._v(" "),a("code",[e._v("trackBalance(address [, tokenAddress])")])]),e._v(" "),a("p",[e._v("Track balance changes for an address on each block mined, or depending on the "),a("code",[e._v("callInterval")]),e._v(" option used during "),a("strong",[e._v("Subspace")]),e._v(" initialization.")]),e._v(" "),a("p",[a("strong",[e._v("Parameters")])]),e._v(" "),a("ol",[a("li",[a("code",[e._v("address")]),e._v(" - "),a("code",[e._v("String")]),e._v(": The address to get the balance of.")]),e._v(" "),a("li",[a("code",[e._v("tokenAddress")]),e._v(" - "),a("code",[e._v("String")]),e._v(" (optional): If you want to track the balance for an ERC20 contract, here you can specify the token address. Otherwise, Only ETH balances will be returned.")])]),e._v(" "),a("p",[a("strong",[e._v("Returns")]),e._v(" "),a("code",[e._v("RxJS Observable")]),e._v(" which will stream a string containing the address balance.")]),e._v(" "),a("h3",{attrs:{id:"tracklogs-options-abi"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#tracklogs-options-abi"}},[e._v("#")]),e._v(" "),a("code",[e._v("trackLogs(options [, abi])")])]),e._v(" "),a("p",[e._v("Tracks incoming logs, filtered by the given options.")]),e._v(" "),a("p",[a("strong",[e._v("Parameters")])]),e._v(" "),a("ol",[a("li",[a("code",[e._v("options")]),e._v(" - "),a("code",[e._v("Object")]),e._v(" (optional): web3 filter options object to limit the number of logs\n"),a("ul",[a("li",[a("code",[e._v("address")]),e._v(" - "),a("code",[e._v("String|Array")]),e._v(" (optional): An address or a list of addresses to only get logs from particular account(s).")]),e._v(" "),a("li",[a("code",[e._v("fromBlock")]),e._v(" - "),a("code",[e._v("Number")]),e._v(" (optional): The block number from which to get events on.")]),e._v(" "),a("li",[a("code",[e._v("topics")]),e._v(" - "),a("code",[e._v("Array")]),e._v(" (optional): An array of values which must each appear in the log entries. The order is important, if you want to leave topics out use null, e.g. [null, '0x00...']. You can also pass another array for each topic with options for that topic e.g. [null, ['option1', 'option2']].")])])]),e._v(" "),a("li",[a("code",[e._v("abi")]),e._v(" - "),a("code",[e._v("Array")]),e._v(" (optional): Array containing the ABI for the inputs of the logs received. It will automatically decode the logs using this ABI instead of returning the hexadecimal data.")])]),e._v(" "),a("p",[a("strong",[e._v("Returns")]),e._v(" "),a("code",[e._v("RxJS Observable")]),e._v(" which will stream the logs. If the inputs ABI is included in the call, the logs will be automatically decoded.")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/9.01449017.js b/assets/js/9.01449017.js deleted file mode 100644 index 459bf64..0000000 --- a/assets/js/9.01449017.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{211:function(s,t,a){"use strict";a.r(t);var n=a(28),e=Object(n.a)({},(function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h1",{attrs:{id:"apollo-client"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#apollo-client"}},[s._v("#")]),s._v(" apollo-client")]),s._v(" "),a("p",[s._v("To use "),a("strong",[s._v("Subspace")]),s._v(" with "),a("code",[s._v("apollo-client")]),s._v(", a "),a("code",[s._v("ReactiveSchemaLink")]),s._v(" from "),a("code",[s._v("apollo-link-reactive-schema")]),s._v(" must be used with a custom schema.")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("InMemoryCache"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"apollo-cache-inmemory"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" ApolloClient "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"apollo-client"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ReactiveSchemaLink"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"apollo-link-reactive-schema"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" schema "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("makeExecutableSchema")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("typeDefs"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" resolvers"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" client "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("new")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[s._v("ApolloClient")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n cache"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("new")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[s._v("InMemoryCache")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n link"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("new")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[s._v("ReactiveSchemaLink")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("schema"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n")])]),s._v(" "),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br")])]),a("h3",{attrs:{id:"example"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example"}},[s._v("#")]),s._v(" Example")]),s._v(" "),a("div",{staticClass:"language-js line-numbers-mode"},[a("div",{staticClass:"highlight-lines"},[a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("br"),a("div",{staticClass:"highlighted"},[s._v(" ")]),a("div",{staticClass:"highlighted"},[s._v(" ")])]),a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" ApolloClient "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"apollo-client"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" InMemoryCache "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"apollo-cache-inmemory"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("ReactiveSchemaLink"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"apollo-link-reactive-schema"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("import")]),s._v(" Subspace "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v('"@embarklabs/subspace"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// ...")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// Initialize Subspace")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" subspace "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("new")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[s._v("Subspace")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("web3"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("await")]),s._v(" subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("init")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" MyContractInstance "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("...")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[s._v("// TODO: obtain a web3.eth.Contract instance")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" typeDefs "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token template-string"}},[a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[s._v("`")]),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("\n type MyEvent {\n someValue: Int\n anotherValue: String\n }\n type Query {\n myEvents: MyEvent!\n }\n")]),a("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[s._v("`")])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" resolvers "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n Query"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token function-variable function"}},[s._v("myEvents")]),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=>")]),s._v(" subspace"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("trackEvent")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),s._v("MyContractInstance"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[s._v("'MyEvent'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("filter"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" fromBlock"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[s._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" schema "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[s._v("makeExecutableSchema")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v(" typeDefs"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v(" resolvers "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("const")]),s._v(" client "),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("new")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[s._v("ApolloClient")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("\n cache"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("new")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[s._v("InMemoryCache")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(",")]),s._v("\n link"),a("span",{pre:!0,attrs:{class:"token operator"}},[s._v(":")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[s._v("new")]),s._v(" "),a("span",{pre:!0,attrs:{class:"token class-name"}},[s._v("ReactiveSchemaLink")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("{")]),s._v("schema"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),s._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(")")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[s._v(";")]),s._v("\n")])]),a("div",{staticClass:"line-numbers-wrapper"},[a("span",{staticClass:"line-number"},[s._v("1")]),a("br"),a("span",{staticClass:"line-number"},[s._v("2")]),a("br"),a("span",{staticClass:"line-number"},[s._v("3")]),a("br"),a("span",{staticClass:"line-number"},[s._v("4")]),a("br"),a("span",{staticClass:"line-number"},[s._v("5")]),a("br"),a("span",{staticClass:"line-number"},[s._v("6")]),a("br"),a("span",{staticClass:"line-number"},[s._v("7")]),a("br"),a("span",{staticClass:"line-number"},[s._v("8")]),a("br"),a("span",{staticClass:"line-number"},[s._v("9")]),a("br"),a("span",{staticClass:"line-number"},[s._v("10")]),a("br"),a("span",{staticClass:"line-number"},[s._v("11")]),a("br"),a("span",{staticClass:"line-number"},[s._v("12")]),a("br"),a("span",{staticClass:"line-number"},[s._v("13")]),a("br"),a("span",{staticClass:"line-number"},[s._v("14")]),a("br"),a("span",{staticClass:"line-number"},[s._v("15")]),a("br"),a("span",{staticClass:"line-number"},[s._v("16")]),a("br"),a("span",{staticClass:"line-number"},[s._v("17")]),a("br"),a("span",{staticClass:"line-number"},[s._v("18")]),a("br"),a("span",{staticClass:"line-number"},[s._v("19")]),a("br"),a("span",{staticClass:"line-number"},[s._v("20")]),a("br"),a("span",{staticClass:"line-number"},[s._v("21")]),a("br"),a("span",{staticClass:"line-number"},[s._v("22")]),a("br"),a("span",{staticClass:"line-number"},[s._v("23")]),a("br"),a("span",{staticClass:"line-number"},[s._v("24")]),a("br"),a("span",{staticClass:"line-number"},[s._v("25")]),a("br"),a("span",{staticClass:"line-number"},[s._v("26")]),a("br"),a("span",{staticClass:"line-number"},[s._v("27")]),a("br"),a("span",{staticClass:"line-number"},[s._v("28")]),a("br"),a("span",{staticClass:"line-number"},[s._v("29")]),a("br"),a("span",{staticClass:"line-number"},[s._v("30")]),a("br"),a("span",{staticClass:"line-number"},[s._v("31")]),a("br"),a("span",{staticClass:"line-number"},[s._v("32")]),a("br"),a("span",{staticClass:"line-number"},[s._v("33")]),a("br"),a("span",{staticClass:"line-number"},[s._v("34")]),a("br"),a("span",{staticClass:"line-number"},[s._v("35")]),a("br")])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[s._v("Using react-apollo")]),s._v(" "),a("p",[s._v("A practical example can also be found in "),a("code",[s._v("examples/react-apollo")]),s._v(".")])])])}),[],!1,null,null,null);t.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/app.00a46c5f.js b/assets/js/app.00a46c5f.js deleted file mode 100644 index 1d2028f..0000000 --- a/assets/js/app.00a46c5f.js +++ /dev/null @@ -1,13 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(t){function e(e){for(var r,a,s=e[0],c=e[1],u=e[2],l=0,p=[];l0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(3),o=n(9),i=n(5),a=n(47),s=n(71),c=n(18),u=c.get,f=c.enforce,l=String(String).split("String");(t.exports=function(t,e,n,s){var c=!!s&&!!s.unsafe,u=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof e||i(n,"name")||o(n,"name",e),f(n).source=l.join("string"==typeof e?e:"")),t!==r?(c?!p&&t[e]&&(u=!0):delete t[e],u?t[e]=n:o(t,e,n)):u?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},function(t,e,n){var r=n(16);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(53),o=n(13),i=n(114);r||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";var r=n(0),o=n(19).filter,i=n(45),a=n(11),s=i("filter"),c=a("filter");r({target:"Array",proto:!0,forced:!s||!c},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r,o,i,a=n(112),s=n(3),c=n(4),u=n(9),f=n(5),l=n(32),p=n(24),d=s.WeakMap;if(a){var h=new d,v=h.get,y=h.has,m=h.set;r=function(t,e){return m.call(h,t,e),e},o=function(t){return v.call(h,t)||{}},i=function(t){return y.call(h,t)}}else{var g=l("state");p[g]=!0,r=function(t,e){return u(t,g,e),e},o=function(t){return f(t,g)?t[g]:{}},i=function(t){return f(t,g)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var r=n(51),o=n(43),i=n(14),a=n(12),s=n(104),c=[].push,u=function(t){var e=1==t,n=2==t,u=3==t,f=4==t,l=6==t,p=5==t||l;return function(d,h,v,y){for(var m,g,b=i(d),_=o(b),w=r(h,v,3),x=a(_.length),k=0,S=y||s,O=e?S(d,x):n?S(d,0):void 0;x>k;k++)if((p||k in _)&&(g=w(m=_[k],k,b),t))if(e)O[k]=g;else if(g)switch(t){case 3:return!0;case 5:return m;case 6:return k;case 2:c.call(O,m)}else if(f)return!1;return l?-1:u||f?f:O}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6)}},function(t,e,n){var r=n(6),o=n(68),i=n(21),a=n(10),s=n(31),c=n(5),u=n(69),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=s(e,!0),u)try{return f(t,e)}catch(t){}if(c(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=!1},function(t,e){t.exports={}},function(t,e,n){var r=n(75),o=n(3),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},function(t,e,n){var r,o=n(8),i=n(116),a=n(50),s=n(24),c=n(117),u=n(70),f=n(32),l=f("IE_PROTO"),p=function(){},d=function(t){return" + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/de/api.html b/de/api.html new file mode 100644 index 0000000..6df1b77 --- /dev/null +++ b/de/api.html @@ -0,0 +1,881 @@ + + + + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ Docs categories + + + +
+
+

API

General

new Subspace(web3 [, options])

Constructor.

+

Parameters

+
    +
  1. web3 - Object: a web3.js object.
  2. +
  3. options - Object (optional): Options used to initialize Subspace
      +
    • dbFilename - String (optional): Name of the database where the information will be stored (default 'subspace.db')
    • +
    • callInterval - Interval of time in milliseconds to query a contract/address to determine changes in state or balance. It’s only used with HttpProviders (default: undefined. Obtains data every block using the average block time as an interval).
    • +
    • refreshLastNBlocks - Ignores last N blocks (from current block), stored in the local db and refresh them via a web3 subscription. Useful for possible reorgs (default: 12),
    • +
    • disableSubscriptions - Subspace by default will attempt to use websocket subscriptions if the current provider supports them, otherwise it will use polling because it asumes the provider is an HttpProvider. This functionality can be disabled by passing true to this option. (default: undefined)
    • +
    +
  4. +
+

init()

Initializes Subspace

+

Returns
Promise that once it’s resolved, will mean that Subspace is available to use

+

close()

Dispose and perform the cleanup necessary to remove the internal subscriptions and interval timers created by Subspace during its normal execution.

+

contract(instance|{abi,address})

Adds a track method to the web3 contract objects. You can obtain this functionality by passing a web3.eth.Contract instance, or the abi and address of your contract

+

Returns
web3.eth.Contract object enhanced with .track() functions for methods and events.

+

Contract methods

myContract.events.MyEvent.track([options])

Track a contract event.

+

Parameters

+
    +
  1. options - Object (optional): web3 filter options object to limit the number of events based on a block number range, or indexed filters
      +
    • filter - Object (optional): Lets you filter events by indexed parameters, e.g. {filter: {myNumber: [12,13]}} means all events where "myNumber" is 12 or 13.
    • +
    • fromBlock - Number (optional): The block number from which to get events on.
    • +
    • toBlock - Number (optional): The block number to get events up to (Defaults to "latest")
    • +
    • topics - Array (optional): This allows you to manually set the topics for the event filter. If given the filter property and event signature, (topic[0]) will not be set automatically.
    • +
    +
  2. +
+

Returns
RxJS Observable which will stream the event returnValues.

+

myContract.methods.myMethod([param1[, ...]]).track([callOptions])

Track a constant function / contract state variable on each block mined, or depending on the callInterval option used during Subspace initialization.

+

Parameters

+
    +
  1. callOptions - Object (optional): The options used for calling.
      +
    • from - String (optional): The address the call “transaction” should be made from.
    • +
    • gasPrice - String (optional): The gas price in wei to use for this call “transaction”.
    • +
    • gas - Number (optional): The maximum gas provided for this call “transaction” (gas limit).
    • +
    +
  2. +
+

Returns
RxJS Observable which will stream the function / variable values. Data type will depend on the contract function invoked.

+

myContract.trackBalance(address [, tokenAddress])

Track a contract’s balance changes for an address on each block mined, or depending on the callInterval option used during Subspace initialization.

+

Parameters

+
    +
  1. address - String: The address to get the balance of.
  2. +
  3. tokenAddress - String (optional): If you want to track the balance for an ERC20 contract, here you can specify the token address. Otherwise, Only ETH balances will be returned.
  4. +
+

Returns
RxJS Observable which will stream a string containing the address balance.

+

Blocks, gas price and block time

trackBlock()

Receive the block information for any new block. It’s the reactive equivalent to web3.eth.getBlock("latest").

+

Returns
RxJS Observable which will stream a block object for the latest block received

+

trackBlockNumber()

Returns the latest block number. It’s the reactive equivalent to web3.eth.getBlockNumber.

+

Returns
RxJS Observable with the latest block number

+

trackGasPrice()

Returns the current gas price oracle. It’s the reactive equivalent to web3.eth.getGasPrice.

+

Returns
RxJS Observable with the average gas price in wei.

+

trackAverageBlocktime()

Average block time of the last 10 blocks.

+

Returns
RxJS Observable with the moving average block time of the last 10 blocks. The time is returned in milliseconds:

+

Low level API for data tracking

These are used in case you don’t want to decorate your web3 contract objects, or if you want to track the balance for an specific address.

+

trackEvent(contractObject, eventName [, options])

Track a contract event.

+

Parameters

+
    +
  1. contractObject - web3.eth.Contract: An already initialized contract object pointing to an address and containing a valid ABI.
  2. +
  3. eventName - String: The name of the event to subscribe.
  4. +
  5. options - Object (optional): web3 filter options object to limit the number of events based on a block number range, or indexed filters
      +
    • filter - Object (optional): Lets you filter events by indexed parameters, e.g. {filter: {myNumber: [12,13]}} means all events where "myNumber" is 12 or 13.
    • +
    • fromBlock - Number (optional): The block number from which to get events on.
    • +
    • toBlock - Number (optional): The block number to get events up to (Defaults to "latest")
    • +
    • topics - Array (optional): This allows you to manually set the topics for the event filter. If given the filter property and event signature, (topic[0]) will not be set automatically.
    • +
    +
  6. +
+

Returns
RxJS Observable which will stream the event returnValues.

+

trackProperty(contractObject, functionName [, functionArgs] [, callOptions])

Track a constant function / contract state variable on each block mined, or depending on the callInterval option used during Subspace initialization.

+

Parameters

+
    +
  1. contractObject - web3.eth.Contract: An already initialized contract object pointing to an address and containing a valid ABI.
  2. +
  3. functionName - String: Name of the function or variable whose values will be tracked.
  4. +
  5. functionArgs - Array (optional): Array of arguments that the tracked function receives
  6. +
  7. callOptions - Object (optional): The options used for calling.
      +
    • from - String (optional): The address the call “transaction” should be made from.
    • +
    • gasPrice - String (optional): The gas price in wei to use for this call “transaction”.
    • +
    • gas - Number (optional): The maximum gas provided for this call “transaction” (gas limit).
    • +
    +
  8. +
+

Returns
RxJS Observable which will stream the function / variable values. Data type will depend on the contract function invoked.

+

trackBalance(address [, tokenAddress])

Track balance changes for an address on each block mined, or depending on the callInterval option used during Subspace initialization.

+

Parameters

+
    +
  1. address - String: The address to get the balance of.
  2. +
  3. tokenAddress - String (optional): If you want to track the balance for an ERC20 contract, here you can specify the token address. Otherwise, Only ETH balances will be returned.
  4. +
+

Returns
RxJS Observable which will stream a string containing the address balance.

+

trackLogs(options [, abi])

Tracks incoming logs, filtered by the given options.

+

Parameters

+
    +
  1. options - Object (optional): web3 filter options object to limit the number of logs
      +
    • address - String|Array (optional): An address or a list of addresses to only get logs from particular account(s).
    • +
    • fromBlock - Number (optional): The block number from which to get events on.
    • +
    • topics - Array (optional): An array of values which must each appear in the log entries. The order is important, if you want to leave topics out use null, e.g. [null, ‘0x00…’]. You can also pass another array for each topic with options for that topic e.g. [null, [‘option1’, ‘option2’]].
    • +
    +
  2. +
  3. abi - Array (optional): Array containing the ABI for the inputs of the logs received. It will automatically decode the logs using this ABI instead of returning the hexadecimal data.
  4. +
+

Returns
RxJS Observable which will stream the logs. If the inputs ABI is included in the call, the logs will be automatically decoded.

+ +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/de/apollo-client.html b/de/apollo-client.html new file mode 100644 index 0000000..cc92d00 --- /dev/null +++ b/de/apollo-client.html @@ -0,0 +1,838 @@ + + + + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ Docs categories + + + +
+
+

apollo-client

To use Subspace with apollo-client, a ReactiveSchemaLink from apollo-link-reactive-schema must be used with a custom schema.

+ + +
import {InMemoryCache} from "apollo-cache-inmemory";
+import ApolloClient from "apollo-client";
+import {ReactiveSchemaLink} from "apollo-link-reactive-schema";
+
+const schema = makeExecutableSchema({typeDefs, resolvers});
+const client = new ApolloClient({
+  cache: new InMemoryCache(),
+  link: new ReactiveSchemaLink({schema)})
+});
+
+ + + +

Example

+ +
import { ApolloClient } from "apollo-client";
+import { InMemoryCache } from "apollo-cache-inmemory";
+import {ReactiveSchemaLink} from "apollo-link-reactive-schema";
+import Subspace from "@embarklabs/subspace";
+
+// ...
+
+// Initialize Subspace
+const subspace = new Subspace(web3);
+await subspace.init();
+
+const MyContractInstance = ...; // TODO: obtain a web3.eth.Contract instance
+
+const typeDefs = `
+  type MyEvent {
+    someValue: Int
+    anotherValue: String
+  }
+  type Query {
+    myEvents: MyEvent!
+  }
+`;
+
+const resolvers = {
+  Query: {
+    myEvents: () => subspace.trackEvent(MyContractInstance, 'MyEvent', {filter: {}, fromBlock: 1})
+  }
+};
+
+const schema = makeExecutableSchema({ typeDefs, resolvers });
+
+const client = new ApolloClient({
+  cache: new InMemoryCache(),
+  link: new ReactiveSchemaLink({schema)})
+});
+
+ + + +
+

Using Apollo with Subspace

+A practical example can also be found in examples/react-apollo. +
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/de/getting-started.html b/de/getting-started.html new file mode 100644 index 0000000..f104e82 --- /dev/null +++ b/de/getting-started.html @@ -0,0 +1,1019 @@ + + + + + Getting Started | SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ Docs categories + + + +
+
+

Getting Started

Installation

Subspace can be used in browser, node and native script environments. To get started install the package @embarklabs/subspace using npm or yarn by executing this command in your project directory:

+ + +
# Using npm
+npm install --save @embarklabs/subspace
+
+# Using yarn
+yarn add @embarklabs/subspace 
+
+ + + +

Importing the library

+ +
// ESM (might require babel / browserify)
+import Subspace from '@embarklabs/subspace';  
+
+// CommonJS
+const Subspace = require('@embarklabs/subspace'); 
+
+ + + +

Connecting to a web3 provider

To interact with the EVM, Subspace requires a valid Web3 object, connected to a provider

+ + +
const subspace = new Subspace(web3);
+await subspace.init();
+
+ + + +

In addition to the provider, Subspace also accepts an options object with settings that can change its behavior:

+
    +
  • dbFilename - Name of the database where the information will be stored (default 'subspace.db')
  • +
  • callInterval - Interval of time in milliseconds to query a contract/address to determine changes in state or balance. It’s only used with HttpProviders (default: undefined. Obtains data every block using the average block time as an interval).
  • +
  • refreshLastNBlocks - Ignores last N blocks (from current block), stored in the local db and refresh them via a web3 subscription. Useful for possible reorgs (default: 12),
  • +
  • disableSubscriptions - Subspace by default will attempt to use websocket subscriptions if the current provider supports them, otherwise it will use polling because it asumes the provider is an HttpProvider. This functionality can be disabled by passing true to this option. (default: undefined)
  • +
+

Enhancing your contract objects

Subspace provides a method to enhance your web3 Contract objects: subspace.contract(instance|{abi,address}). Calling this method will return a new contract object decorated with a .track() method for your contract view functions and events.

+ + +
const myRxContract = subspace.contract(myContractInstance);
+
+ + + +

You can also instantiate a contract directly by passing the contract ABI and its address:

+ + +
const myRXContract = subspace.contract({abi: ...., address: '0x1234...CDEF'})
+
+ + + +

Reacting to data

Once it’s initialized, you can use Subspace‘s methods to track the contract state, events and balances. These functions return RxJS Observables which you can subscribe to, and obtain and transform the observed data via operators.

+
+

What is an Observable?

+The Observable type can be used to model push-based data sources such as DOM events, timer intervals, and sockets. In addition, observables are: +- Compositional: Observables can be composed with higher-order combinators. +- Lazy: Observables do not start emitting data until an observer has subscribed. +
+ +

Further read

+

Tracking state

You can track changes to a contract state variable, by specifying the view function and arguments to call and query the contract.

+ + +
const stateObservable$ = Contract.methods.functionName(functionArgs).track();
+
+ + + +
+

Tracking the public variables of a contract

+State variables implicity create a view function when they're defined as public. The functionName would be the same as the variable name, and functionArgs will have a value when the type is a mapping or array (since these require an index value to query them). +
+ +

Example:

+ + +
const productTitle$ = ProductList.methods.products(0).track().map("title");
+productTitle$.subscribe((title) => console.log("product title is " + title));
+
+
+// Alternative using Subspace low level API
+const producTitle$ = subspace.trackProperty(ProductList, "products", [0], {from: web3.eth.defaultAccount});
+...
+
+ + + +

The subscription will be triggered whenever the title changes

+

Tracking events

You can track events and react to their returned values.

+ + +
const eventObservable$ = Contract.event.eventName.track();
+
+ + + +

Example:

+ + +
const rating$ = Product.events.Rating.track().map("rating")).pipe(map(x => parseInt(x)));
+rating$.subscribe((rating) => console.log("rating received: " + rating));
+
+
+// Alternative using Subspace low level API
+const rating$ = subspace.trackEvent(Product, "Rating", {fromBlock: 0});
+...
+
+ + + +

Event Sourcing

+

You can easily do event sourcing with subspace.

+

For e.g: if you needed to get the average rating of the last 5 events:

+ + +
import { $average, $latest } from "@embarklabs/subspace";
+
+const rating$ = Product.events.Rating.track().map("rating")).pipe(map(x => parseInt(x)));
+
+rating$.pipe($latest(5), $average()).subscribe((rating) => {
+  console.log("average rating of the last 5 events is " + rating)
+});
+
+ + + +

Tracking balances

You can also track changes in both ETH and ERC20 token balances for each mined block or time interval depending on the callInterval configured.

+

Tracking ETH balance in an address:

+ + +
const address = "0x0001020304050607080900010203040506070809";
+
+subspace.trackBalance(address).subscribe((balance) => {
+  console.log("ETH balance is ", balance)
+});
+
+ + + +

Tracking ETH balance in a Contract:

+ + +
Contract.trackBalance().subscribe((balance) => {
+  console.log("ETH balance is ", balance)
+});
+
+ + + +

Tracking an ERC20 balance in a Contract:

+ + +
const tokenAddress = "0x744d70fdbe2ba4cf95131626614a1763df805b9e"; // SNT Address
+
+const myBalanceObservable$ = Contract.trackBalance(tokenAddress);
+
+ + + +
+Balances are returned as a string containing the value in wei. +
+ + + +

Getting block data, gas prices and block time

Subspace also provides a way to always receive the latest block object:

+ + +
subspace.trackBlock().subscribe(block => {
+  console.log("The latest block data: ", block);
+});
+
+ + + +

If you don’t need all the block information, but just the block number, you can use instead:

+ + +
subspace.trackBlockNumber().subscribe(blockNumber => {
+  console.log("The latest block number: ", blockNumber);
+});
+
+ + + +

You can also access the average block time. This takes in account only the last 10 blocks:

+ + +
subspace.trackAverageBlocktime().subscribe(blocktimeMS => {
+  console.log("The average block time in milliseconds is: ", blocktimeMS);
+});
+
+ + + +

Finally, if you want to obtain the most up to date median gas price:

+ + +
subspace.trackGasPrice().subscribe(gasPrice => {
+  console.log("Gas price in wei", gasPrice);
+});
+
+ + + +

Subscriptions

Once you have an Observable, you may receive a stream of data by creating a subscription. Subscriptions are triggered each time an observable emits a new value. These subscription receive a callback that must have a parameter which represents the value received from the observable (a contract state variable, an event, or the balance of an address); and they return an object representing the subscription.

+

Subscriptions can be disposed by executing the method unsubscribe() liberating the resource held by it:

+ + +
const myBalanceObservable$ = subspace.trackBalance(address, tokenAddress);
+const subscription = myBalanceObservable$.subscribe(value => { 
+  console.log("The balance is: ", value); 
+});
+
+// ...
+
+subscription.unsubscribe();
+
+ + + +

Further read

+

Cleanup

If Subspace is not needed anymore, you need can invoke close() to dispose and perform the cleanup necessary to remove the internal subscriptions and interval timers created by Subspace during its normal execution, thus avoiding any potential memory leak.

+ + +
subspace.close();
+
+ +
+

What about subscriptions created with our observables?

+close() will dispose any web3 subscription created when using a Subspace tracking method, however any subscription to an observable must still be unsubscribed manually. The npm package subsink can be used to clear all the observables' subscriptions at once. +
+ + +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/de/how-it-works.html b/de/how-it-works.html new file mode 100644 index 0000000..a7b1962 --- /dev/null +++ b/de/how-it-works.html @@ -0,0 +1,791 @@ + + + + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ Docs categories + + + +
+
+

How it works?

Setup

First Usage - Setup

+
    +
  1. A ÐApp requests Subspace to track an event, property, or balance.
  2. +
  3. Subspace creates a observable for that event, and a web3 subscription to retrieve events from the chain
  4. +
  5. The ÐApp subscribes to the observable to receive events.
  6. +
+

Receiving events

First Usage - Receiving events
Depending on the filter parameters used to track the events, once an event is found, it is stored in localStorage and it is also pushed to the observable which delivers it to the ÐApp subscription.

+

Tracking already known events

After restarting the ÐApp, either by executing it again in case of a console application or refreshing the browser the behavior of Subspace will change:
Second Usage - Setup

+
    +
  1. The Dapp will request Subspace to track an event it already knows, creating an observable and subscription for that event
  2. +
  3. It will retrieve events that were previously stored in localStorage and deliver them to the DApp subscription, avoiding having to query the chain for the old events again.
  4. +
+

Second Usage - Receiving events
The web3 subscription created previously will start from the last known block instead of beginning from scratch. New events will be delivered normally from this step

+ +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/de/index.html b/de/index.html new file mode 100644 index 0000000..5857d6b --- /dev/null +++ b/de/index.html @@ -0,0 +1,778 @@ + + + + + Homepage | SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ Docs categories + + + +
+
+ +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/de/integrations-overview.html b/de/integrations-overview.html new file mode 100644 index 0000000..01f1a3d --- /dev/null +++ b/de/integrations-overview.html @@ -0,0 +1,779 @@ + + + + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ Docs categories + + + +
+
+

Integrations with other frameworks

Subspace does not force you to change the architecture of your dApps, making it easy to use on existing projects. In this section you can find some examples and tips on how to integrate Subspace with various frontend frameworks and libraries

+ +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/de/integrations.html b/de/integrations.html new file mode 100644 index 0000000..771736f --- /dev/null +++ b/de/integrations.html @@ -0,0 +1,778 @@ + + + + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ Docs categories + + + +
+
+ +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/de/react.html b/de/react.html new file mode 100644 index 0000000..070e4ac --- /dev/null +++ b/de/react.html @@ -0,0 +1,891 @@ + + + + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ Docs categories + + + +
+
+

React

Subspace also provides a set of components that simplifies its usage within React projects through the @embarklabs/subspace-react package.

+

Install

You can install it through npm or yarn:

+ + +
npm install --save @embarklabs/subspace-react web3 rxjs # RxJS and Web3.js are needed peer-dependencies
+
+ + + +

Usage

SubspaceProvider

To use most of the subspace-react components, you need to wrap your app with the <SubspaceProvider web3={web3} /> component. This will make Subspace available to any nested components that accesses it via the useSubspace hook or has been wrapped in the withSubspace higher order component. Any React component might use Subspace so it makes sense to add the provider near the top level of your dApp. The SubspaceProvider requires a web3 object

+ + +
// index.js
+import React from 'react'
+import ReactDOM from 'react-dom'
+import MyApp from './MyApp'
+import { SubspaceProvider } from '@embarklabs/subspace-react';
+
+const web3 = new Web3("ws://localhost:8545");
+
+const rootElement = document.getElementById('root')
+ReactDOM.render(
+  <SubspaceProvider web3={web3}>
+    <MyApp />
+  </SubspaceProvider>,
+  rootElement
+);
+
+ + + +

useSubspace

Rather than relying on global variables or passing Subspace through props, The easiest way to access Subspace features is via the useSubspace hook. Be sure that your entire dApp is wrapped with a <SubspaceProvider /> to have it available througout the component tree.

+ + +
// index.js
+import React from 'react'
+import { useSubspace } from '@embarklabs/subspace-react';
+
+const MyComponent = () => {
+  const subspace = useSubspace();
+
+  // do something....
+  // subspace.trackBalance(web3.eth.defaultAccount);
+
+  return ...;
+}
+
+export default MyComponent
+
+ + + +

withSubspace

This higher order component is provided as an alternative to the useSubspace hook. This injects the subspace property with an already initialized Subspace instance. Just like with the hook, your entire dApp needs to be wrapped with a <SubspaceProvider />.

+ + +
// index.js
+import React from 'react'
+import { withSubspace } from '@embarklabs/subspace-react';
+
+const MyComponent = (props) => {
+  // do something....
+  // props.subspace.trackBalance(web3.eth.defaultAccount);
+
+  return ...;
+}
+
+export default withSubspace(MyComponent);
+
+ + + +

observe

Useful to make your component subscribe to any observable props it receives when the component is mounted and automatically unsubscribes when the component is unmounted. It can be used with any kind of observables.

+ + +
import { observe } from '@embarklabs/subspace-react';
+
+const ObserverComponent = observe(WrappedComponent);
+
+ + + +
Example usage:
+ +
const MyComponent = ({eventData}) =>  {
+  // Handle initial state when no data is available
+  if (!eventData) {
+    return <p>No data</p>;
+  }
+  
+  return <p>Value: {eventData.someReturnValue}</p>
+};
+
+
+const MyEnhancedComponent = observe(MyComponent);
+
+
+const SomeOtherComponent = () => {
+  const myObservable$ = MyContractInstance.events.MyEvent.track({fromBlock: 1});
+  return <MyEnhancedComponent myProp={myObservable$} />;
+}
+
+ + + +
+

Handling Contract Objects

+The variable MyContractInstance is a web3.eth.Contract object pointing to a deployed contract address that has been enhanced with subspace.contract(). You can use a DApp framework like Embark to easily import that contract instance: import { MyContract } from './embarkArtifacts/contracts';. +
+ + +
+To learn more about how to use subspace-react, there are full working examples available in Github +
+ +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/de/reactive-graphql.html b/de/reactive-graphql.html new file mode 100644 index 0000000..6d8e5bc --- /dev/null +++ b/de/reactive-graphql.html @@ -0,0 +1,835 @@ + + + + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ Docs categories + + + +
+
+

reactive-graphql

Using reactive-graphql you can execute GraphQL queries against Subspace observables after you create your own type definitions and resolvers.

+

Example

+ +
const Subspace = require('@embarklabs/subspace');
+const MyContract = require('./MyContract');
+const { pluck } = require('rxjs/operators');
+const { makeExecutableSchema } = require("graphql-tools");
+const gql = require("graphql-tag");
+const { graphql } = require("reactive-graphql");
+
+const run = async () => {
+  const subspace = new Subspace(web3);
+  await subspace.init();
+
+  const MyContractInstance = ...; // TODO: obtain a web3.eth.contract instance
+
+  const typeDefs = `
+    type MyEvent {
+      someValue: Int
+      anotherValue: String
+    }
+    type Query {
+      myEvents: MyEvent!
+    }
+  `;
+
+  const resolvers = {
+    Query: {
+      myEvents: () => subspace.trackEvent(MyContractInstance, 'MyEvent', { filter: {}, fromBlock: 1 })
+    }
+  };
+
+  const schema = makeExecutableSchema({ typeDefs, resolvers });
+
+  const query = gql`
+    query {
+      myEvents {
+        someValue
+        anotherValue
+      }
+    }
+  `;
+
+  const stream = graphql(schema, query).pipe(pluck('data', 'myEvents'));
+  stream.subscribe(data => {
+    console.log(data);
+  })
+
+}
+
+run();
+
+ + + +
+This example is available in Github +
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/de/readme.html b/de/readme.html new file mode 100644 index 0000000..9c802e5 --- /dev/null +++ b/de/readme.html @@ -0,0 +1,780 @@ + + + + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ Docs categories + + + +
+
+
+ + +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/de/redux-observable.html b/de/redux-observable.html new file mode 100644 index 0000000..862e821 --- /dev/null +++ b/de/redux-observable.html @@ -0,0 +1,809 @@ + + + + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ Docs categories + + + +
+
+

redux-observable

redux-observables can be used to manage side effects via Epics (their core primitive to receive and create stream of actions). Subspace can be configured inside these epics.

+

It’s recommended to compose these epics by using mergeMap or switchMap operators.

+

Here’s an example on how to use Subspace to subscribe to an Event when the action SOME_ACTION is dispatched, and then it will trigger myAction when the observable emits a value.

+ + +
// ...
+
+const myEpic = action$ =>
+  action$.pipe(
+    ofType("SOME_ACTION"),  // Execute when the action type is 'INIT'
+    switchMap(action =>
+      subspace
+        .trackEvent(MyContract, "MyEventName", { filter: {}, fromBlock: 1})
+        .pipe(
+          map(myAction) // Trigger redux action: MY_ACTION with the eventData
+        )
+    )
+  );
+
+// ...
+
+ + + +
+An example is available in Github +
+ +

Further read

+ +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/de/redux.html b/de/redux.html new file mode 100644 index 0000000..cd06775 --- /dev/null +++ b/de/redux.html @@ -0,0 +1,860 @@ + + + + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ Docs categories + + + +
+
+

redux

Subspace can be used with redux. Subspace returns Observables, which you can subscribe to, and if this subscription has access to the redux store, it will be able to dispatch actions when the observable emits an event.

+

Example

Here’s a simple example on how to setup Subspace to work with redux:

+
+This example is available in Github +
+ +

index.js

+ +
import store from './store';
+import web3 from './web3';
+import Subspace from '@embarklabs/subspace';
+import { myAction } from './actions';
+
+const run = async () => {
+  const MyContractInstance = ...; // TODO: obtain a web3.eth.contract instance
+
+  const subspace = new Subspace(web3);
+  await subspace.init();
+    
+  subspace.trackEvent(MyContractInstance, "MyEvent", {filter: {}, fromBlock: 1 })
+             .subscribe(eventData => {
+               store.dispatch(myAction(eventData));
+             });
+}
+
+run();
+
+ +
+

Handling Contract Objects

+The variable MyContractInstance is a web3.eth.Contract object pointing to a deployed contract address. You can use a DApp framework like Embark to easily import that contract instance: import { MyContract } from './embarkArtifacts/contracts';, or use web3.js directly (just like in the example source code) +
+ +

store.js

+ +
import { createStore } from 'redux';
+import {myReducer} from './reducer';
+
+export default store = createStore(myReducer);
+
+ + + +

reducer.js

+ +
import { MY_ACTION } from "./constants";
+
+const initialState = { 
+  data: {}
+};
+
+export const myReducer = (state = initialState, action) => {
+  switch (action.type) {
+    case MY_ACTION:
+      return { data: action.eventData };
+    default:
+      return state;
+  }
+};
+
+ + + +

constants.js

+ +
export const MY_ACTION = 'MY_ACTION';
+
+ + + +

actions.js

+ +
import {MY_ACTION} from './constants.js';
+
+export const myAction = eventData => ({type: MY_ACTION, eventData});
+
+ + + +
+

Using React and Redux

+A practical example can also be found in examples/react-redux. +
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/de/tutorial.html b/de/tutorial.html new file mode 100644 index 0000000..4b19556 --- /dev/null +++ b/de/tutorial.html @@ -0,0 +1,779 @@ + + + + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ Docs categories + + + +
+
+

Creating a reactive ÐApp with React and Subspace

See example DApp at https://github.com/embark-framework/subspace/tree/master/examples/react-example1

+ +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/de/vue.html b/de/vue.html new file mode 100644 index 0000000..a14f7ee --- /dev/null +++ b/de/vue.html @@ -0,0 +1,858 @@ + + + + + SUBSPACE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ Docs categories + + + +
+
+

Vue

Vue provides the official npm package vue-rx that provides RxJS integration, which simplifies the use of Subspace with Vue.js

+

Example

+This example is available in Github +
+ + +

MyComponent.vue

+ +
<template>
+  <ul v-if="!!eventData$">
+    <li><b>someValue: </b> {{eventData$.someValue}}</li>
+    <li><b>anotherValue: </b> {{eventData$.anotherValue}}</li>
+  </ul>
+</template>
+
+<script>
+export default {
+  name: 'MyComponent',
+  props: {
+    eventData: Object
+  },
+  subscriptions() { // provide Rx observables
+    return {
+      eventData$: this.eventData
+    }
+  }
+}
+</script>
+
+ + + +

App.vue

+ +
<template>
+  <div id="app">
+    <button v-on:click="createTrx">Create a Transaction</button>
+    <MyComponent v-bind:event-data="myEventObservable$" v-if="!!myEventObservable$" />
+  </div>
+</template>
+
+<script>
+import MyComponent from './components/MyComponent.vue';
+import Subspace from "@embarklabs/subspace";
+
+export default {
+  name: 'app',
+  data: function(){
+    return {
+      myEventObservable$: null,
+      MyContractInstance: null
+    };
+  },
+  created: async function(){
+    this.MyContractInstance = ...; // TODO: obtain a web3.eth.contract instance
+
+    const subspace = new Subspace(web3);
+    await subspace.init();
+
+    this.myEventObservable$ = subspace.trackEvent(this.MyContractInstance, "MyEvent", {filter: {}, fromBlock: 1 });
+  }, 
+  methods: {
+    createTrx: function(){
+      this.MyContractInstance.methods
+        .myFunction()
+        .send({ from: web3.eth.defaultAccount });
+    }
+  },
+  components: {
+    MyComponent
+  }
+}
+</script>
+
+ + + +

Further read

+ +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fonts/LICENSE.txt b/fonts/LICENSE.txt new file mode 100644 index 0000000..75b5248 --- /dev/null +++ b/fonts/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/fonts/Roboto-Bold.ttf b/fonts/Roboto-Bold.ttf new file mode 100644 index 0000000000000000000000000000000000000000..d3f01ad245b628f386ac95786f53167038720eb2 GIT binary patch literal 170760 zcmbTf2V4|M^FQ3(GqXz)mW-mX3jzidl%(jH1DLa5R?HD|j%Uv4%sFS5)idXuMZ~Ot zIe^*IQ(*S}_6$q7=bq>H|Gap$HPh46T~%GF!|oAE2yw!PNc44U)vmL@hH(;M#ac*da7I&s5>=u3|i|0E=MI-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