chore: rebranding to @plugnet

This commit is contained in:
ian.he
2019-04-26 16:43:32 +12:00
parent 1f4e7638d5
commit 6b6b7fe145
68 changed files with 143 additions and 177 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# Simple Connect
The following example shows how to instantiate a Polkadot API object and use it to connect to a node using ApiRx.
The following example shows how to instantiate a Plugnet API object and use it to connect to a node using ApiRx.
<<< @/docs/examples/rx/01_simple_connect/index.js
+2 -2
View File
@@ -1,7 +1,7 @@
// Required imports
const { zip } = require('rxjs');
const { ApiRx } = require('@polkadot/api');
const { WsProvider } = require('@polkadot/rpc-provider');
const { ApiRx } = require('@plugnet/api');
const { WsProvider } = require('@plugnet/rpc-provider');
function main () {
// Initialise the provider to connect to the local node
@@ -11,7 +11,7 @@
},
"dependencies": {
"@polkadot/api": "^0.53.1"
"@plugnet/api": "^0.76.102"
},
"devDependencies": {
"rimraf": "^2.6.2"
@@ -1,5 +1,5 @@
// Import the API
const { ApiRx } = require('@polkadot/api');
const { ApiRx } = require('@plugnet/api');
const { switchMap } = require('rxjs/operators');
async function main () {
@@ -10,7 +10,7 @@
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "^0.53.1"
"@plugnet/api": "^0.76.102"
},
"devDependencies": {
"rimraf": "^2.6.2"
@@ -1,5 +1,5 @@
# Listen to balance changes
This example shows how to instantiate a Polkadot API object and use it to connect to a node and retrieve balance updates.
This example shows how to instantiate a Plugnet API object and use it to connect to a node and retrieve balance updates.
<<< @/docs/examples/rx/03_listent_to_balance_change/index.js
@@ -1,5 +1,5 @@
// Import the API and operators from RxJs
const { ApiRx } = require('@polkadot/api');
const { ApiRx } = require('@plugnet/api');
const { pairwise, startWith } = require('rxjs/operators');
// Known account we want to use (available on dev chain, with funds)
@@ -10,7 +10,7 @@
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "^0.53.1"
"@plugnet/api": "^0.76.102"
},
"devDependencies": {
"rimraf": "^2.6.2"
+1 -1
View File
@@ -1,5 +1,5 @@
// Import the API
const { ApiRx } = require('@polkadot/api');
const { ApiRx } = require('@plugnet/api');
const { switchMap } = require('rxjs/operators');
async function main () {
+1 -1
View File
@@ -10,7 +10,7 @@
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "^0.53.1"
"@plugnet/api": "^0.76.102"
},
"devDependencies": {
"rimraf": "^2.6.2"
+1 -1
View File
@@ -1,5 +1,5 @@
// Import the API
const { ApiRx } = require('@polkadot/api');
const { ApiRx } = require('@plugnet/api');
// Import dependencies from RxJs
const { combineLatest, of } = require('rxjs');
const { first, switchMap } = require('rxjs/operators');
@@ -10,7 +10,7 @@
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "^0.53.1"
"@plugnet/api": "^0.76.102"
},
"devDependencies": {
"rimraf": "^2.6.2"
+2 -2
View File
@@ -1,6 +1,6 @@
// Import the API, Keyring and some utility functions
const { ApiRx } = require('@polkadot/api');
const { Keyring } = require('@polkadot/keyring');
const { ApiRx } = require('@plugnet/api');
const { Keyring } = require('@plugnet/keyring');
const BOB = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty';
@@ -10,7 +10,7 @@
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "^0.53.1"
"@plugnet/api": "^0.76.102"
},
"devDependencies": {
"rimraf": "^2.6.2"
+1 -1
View File
@@ -1,6 +1,6 @@
// Import the API and selected RxJs operators
const { switchMap } = require('rxjs/operators');
const { ApiRx } = require('@polkadot/api');
const { ApiRx } = require('@plugnet/api');
async function main () {
// Create our API with a default connection to the local node
@@ -10,7 +10,7 @@
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "^0.53.1"
"@plugnet/api": "^0.76.102"
},
"devDependencies": {
"rimraf": "^2.6.2"
+3 -3
View File
@@ -1,11 +1,11 @@
// Import the API and some utility functions
const { ApiRx } = require('@polkadot/api');
const { ApiRx } = require('@plugnet/api');
// import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve & Ferdie)
const testKeyring = require('@polkadot/keyring/testing');
const testKeyring = require('@plugnet/keyring/testing');
// utility function for random values
const { randomAsU8a } = require('@polkadot/util-crypto');
const { randomAsU8a } = require('@plugnet/util-crypto');
// some constants we are using in this sample
const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
@@ -10,7 +10,7 @@
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "^0.53.1"
"@plugnet/api": "^0.76.102"
},
"devDependencies": {
"rimraf": "^2.6.2"
+2 -2
View File
@@ -1,7 +1,7 @@
// Import the API & Provider and some utility functions
const { ApiRx, WsPovider } = require('@polkadot/api');
const { ApiRx, WsPovider } = require('@plugnet/api');
// import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve & Ferdie)
const testKeyring = require('@polkadot/keyring/testing');
const testKeyring = require('@plugnet/keyring/testing');
const fs = require('fs');
async function main () {
@@ -10,7 +10,7 @@
"start": "node index.js"
},
"dependencies": {
"@polkadot/api": "^0.53.1"
"@plugnet/api": "^0.76.102"
},
"devDependencies": {
"rimraf": "^2.6.2"