@tezos-x/octez.connect-blockchain-substrate 0.9.0 → 5.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # `@tezos-x/octez.connect-blockchain-substrate`
2
2
 
3
- This package is part of the `@tezos-x/octez.connect-sdk` project. [Read more](https://github.com/trilitech/octez.connect-sdk)
3
+ This package is part of the `@tezos-x/octez.connect-sdk` project. [Read more](https://github.com/trilitech/octez.connect)
4
4
 
5
5
  ## Introduction
6
6
 
@@ -9,8 +9,8 @@ This package adds support for `substrate` based blockchains. It can be used in c
9
9
  ## Usage
10
10
 
11
11
  ```
12
- import { DAppClient } from '@airga/octez.connect-dapp'
13
- import { SubstrateBlockchain } from '@airga/octez.connect-blockchain-substrate'
12
+ import { DAppClient } from '@tezos-x/octez.connect-dapp'
13
+ import { SubstrateBlockchain } from '@tezos-x/octez.connect-blockchain-substrate'
14
14
 
15
15
  const client = new DAppClient({
16
16
  name: 'Example DApp',
@@ -19,3 +19,5 @@ const client = new DAppClient({
19
19
  const substrateBlockchain = new SubstrateBlockchain()
20
20
  client.addBlockchain(substrateBlockchain)
21
21
  ```
22
+
23
+ Check our documentation for more information. [Documentation](https://octez-connect.tezos.com)
@@ -1,4 +1,4 @@
1
- import { Blockchain, BlockchainMessage, ResponseInput, ExtensionApp, DesktopApp, WebApp, App } from '@tezos-x/octez.connect-types';
1
+ import { Blockchain, BlockchainMessage, ResponseInput, ExtensionApp, DesktopApp, WebApp, App, Network, PermissionScope } from '@tezos-x/octez.connect-types';
2
2
  import { SubstratePermissionResponse } from './types/messages/permission-response';
3
3
  export declare class SubstrateBlockchain implements Blockchain {
4
4
  readonly identifier: string;
@@ -14,5 +14,7 @@ export declare class SubstrateBlockchain implements Blockchain {
14
14
  accountId: string;
15
15
  address: string;
16
16
  publicKey: string;
17
+ network?: Network;
18
+ scopes: PermissionScope[];
17
19
  }[]>;
18
20
  }
@@ -8,9 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.SubstrateBlockchain = void 0;
13
- const wallet_lists_1 = require("./ui/alert/wallet-lists");
16
+ const substrate_json_1 = __importDefault(require("@tezos-x/octez.connect-ui/data/substrate.json"));
17
+ const octez_connect_utils_1 = require("@tezos-x/octez.connect-utils");
18
+ const { desktopList, extensionList, iOSList, webList } = (0, octez_connect_utils_1.loadWalletLists)(substrate_json_1.default);
14
19
  class SubstrateBlockchain {
15
20
  constructor() {
16
21
  this.identifier = 'substrate';
@@ -34,10 +39,10 @@ class SubstrateBlockchain {
34
39
  getWalletLists() {
35
40
  return __awaiter(this, void 0, void 0, function* () {
36
41
  return {
37
- extensionList: wallet_lists_1.extensionList,
38
- desktopList: wallet_lists_1.desktopList,
39
- webList: wallet_lists_1.webList,
40
- iOSList: wallet_lists_1.iOSList
42
+ extensionList: extensionList,
43
+ desktopList: desktopList,
44
+ webList: webList,
45
+ iOSList: iOSList
41
46
  };
42
47
  });
43
48
  }
@@ -46,7 +51,9 @@ class SubstrateBlockchain {
46
51
  return permissionResponse.blockchainData.accounts.map((account) => ({
47
52
  accountId: account.accountId,
48
53
  address: account.address,
49
- publicKey: account.publicKey
54
+ publicKey: account.publicKey,
55
+ network: account.network,
56
+ scopes: permissionResponse.blockchainData.scopes
50
57
  }));
51
58
  });
52
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"blockchain.js","sourceRoot":"","sources":["../../src/blockchain.ts"],"names":[],"mappings":";;;;;;;;;;;;AAUA,0DAAsF;AAEtF,MAAa,mBAAmB;IAAhC;QACkB,eAAU,GAAW,WAAW,CAAA;IAsClD,CAAC;IApCO,eAA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gBACL,aAAa,EAAE,aAAa;gBAC5B,WAAW,EAAE,WAAW;gBACxB,OAAO,EAAE,OAAO;gBAChB,OAAO,EAAE,OAAO;aACjB,CAAA;QACH,CAAC;KAAA;IAEK,qCAAqC,CACzC,kBAA+C;;YAQ/C,OAAO,kBAAkB,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;gBAClE,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,OAAO,EAAE,OAAO,CAAC,OAAc;gBAC/B,MAAM,EAAE,kBAAkB,CAAC,cAAc,CAAC,MAAa;aACxD,CAAC,CAAC,CAAA;QACL,CAAC;KAAA;CACF;AA/CD,kDA+CC"}
@@ -1,4 +1,4 @@
1
- import { Blockchain, BlockchainMessage, ResponseInput, ExtensionApp, DesktopApp, WebApp, App } from '@tezos-x/octez.connect-types';
1
+ import { Blockchain, BlockchainMessage, ResponseInput, ExtensionApp, DesktopApp, WebApp, App, Network, PermissionScope } from '@tezos-x/octez.connect-types';
2
2
  import { SubstratePermissionResponse } from './types/messages/permission-response';
3
3
  export declare class SubstrateBlockchain implements Blockchain {
4
4
  readonly identifier: string;
@@ -14,5 +14,7 @@ export declare class SubstrateBlockchain implements Blockchain {
14
14
  accountId: string;
15
15
  address: string;
16
16
  publicKey: string;
17
+ network?: Network;
18
+ scopes: PermissionScope[];
17
19
  }[]>;
18
20
  }
@@ -1,4 +1,6 @@
1
- import { extensionList, desktopList, webList, iOSList } from './ui/alert/wallet-lists';
1
+ import bundledSubstrateRegistry from '@tezos-x/octez.connect-ui/data/substrate.json';
2
+ import { loadWalletLists } from '@tezos-x/octez.connect-utils';
3
+ const { desktopList, extensionList, iOSList, webList } = loadWalletLists(bundledSubstrateRegistry);
2
4
  export class SubstrateBlockchain {
3
5
  identifier = 'substrate';
4
6
  async validateRequest(input) {
@@ -25,7 +27,9 @@ export class SubstrateBlockchain {
25
27
  return permissionResponse.blockchainData.accounts.map((account) => ({
26
28
  accountId: account.accountId,
27
29
  address: account.address,
28
- publicKey: account.publicKey
30
+ publicKey: account.publicKey,
31
+ network: account.network,
32
+ scopes: permissionResponse.blockchainData.scopes
29
33
  }));
30
34
  }
31
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"blockchain.js","sourceRoot":"","sources":["../../src/blockchain.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEtF,MAAM,OAAO,mBAAmB;IACd,UAAU,GAAW,WAAW,CAAA;IAEhD,KAAK,CAAC,eAAe,CAAC,KAAwB;QAC5C,mBAAmB;QACnB,IAAI,KAAK,EAAE,CAAC;YACV,OAAM;QACR,CAAC;IACH,CAAC;IACD,KAAK,CAAC,cAAc,CAAC,KAAoB;QACvC,mBAAmB;QACnB,IAAI,KAAK,EAAE,CAAC;YACV,OAAM;QACR,CAAC;IACH,CAAC;IAED,KAAK,CAAC,cAAc;QAMlB,OAAO;YACL,aAAa,EAAE,aAAa;YAC5B,WAAW,EAAE,WAAW;YACxB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,OAAO;SACjB,CAAA;IACH,CAAC;IAED,KAAK,CAAC,qCAAqC,CACzC,kBAA+C;QAE/C,OAAO,kBAAkB,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAClE,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAC,CAAC,CAAA;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"blockchain.js","sourceRoot":"","sources":["../../src/blockchain.ts"],"names":[],"mappings":"AAYA,OAAO,wBAAwB,MAAM,+CAA+C,CAAA;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAE9D,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,eAAe,CAAC,wBAAwB,CAAC,CAAA;AAElG,MAAM,OAAO,mBAAmB;IACd,UAAU,GAAW,WAAW,CAAA;IAEhD,KAAK,CAAC,eAAe,CAAC,KAAwB;QAC5C,mBAAmB;QACnB,IAAI,KAAK,EAAE,CAAC;YACV,OAAM;QACR,CAAC;IACH,CAAC;IACD,KAAK,CAAC,cAAc,CAAC,KAAoB;QACvC,mBAAmB;QACnB,IAAI,KAAK,EAAE,CAAC;YACV,OAAM;QACR,CAAC;IACH,CAAC;IAED,KAAK,CAAC,cAAc;QAMlB,OAAO;YACL,aAAa,EAAE,aAAa;YAC5B,WAAW,EAAE,WAAW;YACxB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,OAAO;SACjB,CAAA;IACH,CAAC;IAED,KAAK,CAAC,qCAAqC,CACzC,kBAA+C;QAQ/C,OAAO,kBAAkB,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAClE,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,OAAO,EAAE,OAAO,CAAC,OAAc;YAC/B,MAAM,EAAE,kBAAkB,CAAC,cAAc,CAAC,MAAa;SACxD,CAAC,CAAC,CAAA;IACL,CAAC;CACF"}
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@tezos-x/octez.connect-blockchain-substrate",
3
- "version": "0.9.0",
3
+ "version": "5.0.0-beta.3",
4
4
  "description": "This package adds support for `substrate` based blockchains. It can be used in combination with the `@tezos-x/octez.connect-dapp` or `@tezos-x/octez.connect-wallet` packages.",
5
- "author": "Andreas Gassmann <a.gassmann@papers.ch>",
5
+ "author": "Blockchain Infra <blockchain.infra@trili.tech>",
6
+ "homepage": "https://octez-connect.tezos.com",
6
7
  "license": "ISC",
7
8
  "main": "dist/cjs/index.js",
8
9
  "module": "dist/esm/index.js",
@@ -23,17 +24,17 @@
23
24
  },
24
25
  "repository": {
25
26
  "type": "git",
26
- "url": "git+https://github.com/trilitech/octez.connect-sdk.git"
27
+ "url": "git+https://github.com/trilitech/octez.connect.git"
27
28
  },
28
29
  "scripts": {
29
30
  "tsc": "tsc -p tsconfig.json && tsc -p tsconfig-cjs.json"
30
31
  },
31
32
  "bugs": {
32
- "url": "https://github.com/trilitech/octez.connect-sdk/issues"
33
+ "url": "https://github.com/trilitech/octez.connect/issues"
33
34
  },
34
35
  "dependencies": {
35
- "@tezos-x/octez.connect-types": "0.9.0",
36
- "@tezos-x/octez.connect-ui": "0.9.0"
36
+ "@tezos-x/octez.connect-types": "5.0.0-beta.3",
37
+ "@tezos-x/octez.connect-ui": "5.0.0-beta.3"
37
38
  },
38
- "gitHead": "730911e2d7fd40331a8486a7eaac8fc2b247082e"
39
+ "gitHead": "60389c8701eb770539451d129c497f16c8668652"
39
40
  }