@tezos-x/octez.connect-sdk 5.0.0-beta.5 → 5.0.0-beta.7

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,92 +1,23 @@
1
- # Octez Connect SDK
2
-
3
- [![npm](https://img.shields.io/npm/v/@tezos-x/octez.connect-sdk.svg?colorB=brightgreen)](https://www.npmjs.com/package/@tezos-x/octez.connect-sdk)
4
- [![documentation](https://img.shields.io/badge/documentation-online-brightgreen.svg)](https://octez-connect.tezos.com)
5
- [![GitHub Action](https://github.com/trilitech/octez.connect/workflows/Build%2C%20Test%20and%20Analyze/badge.svg)](https://github.com/trilitech/octez.connect/actions?query=workflow%3A%22Build%2C+Test+and+Analyze%22+branch%3Amain)
6
- [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
7
-
8
- > Connect Wallets with dApps on Tezos
9
-
10
- [Octez Connect](https://octez-connect.tezos.com) is the implementation of the wallet interaction standard [tzip-10](https://gitlab.com/tzip/tzip/blob/master/proposals/tzip-10/tzip-10.md) which describes the connection of a dApp with a wallet.
11
-
12
- ## Intro
1
+ # `@tezos-x/octez.connect-sdk`
13
2
 
14
3
  The `octez.connect-sdk` simplifies and abstracts the communication between dApps and wallets over different transport layers.
15
4
 
16
- Developers that plan to develop complex smart contract interactions can use [Octez.js](https://github.com/trilitech/octez.js) with the `BeaconWallet`, which uses this SDK under the hood, but provides helpful methods to interact with contracts.
17
-
18
- Besides this Typescript SDK, we also provide SDKs for native iOS and Android Wallets:
19
-
20
- - [Beacon Android SDK (Kotlin)](https://github.com/trilitech/octez.connect-android-sdk)
21
- - [Beacon iOS SDK (Swift)](https://github.com/trilitech/octez.connect-ios-sdk)
22
-
23
- ## Documentation
24
-
25
- The documentation can be found [here](https://octez-connect.tezos.com/), technical documentation can be found [here](https://typedocs.octez-connect.tezos.com/).
26
-
27
- ## Installation
28
-
29
- ```
30
- npm i --save @tezos-x/octez.connect-sdk
31
- ```
32
-
33
- ## Example DApp integration
5
+ This is a primary package in the Trilitech-maintained octez.connect SDK line and may be installed directly.
34
6
 
35
- ```ts
36
- const client = new DAppClient({ name: 'My Sample DApp' })
7
+ ## Install
37
8
 
38
- client
39
- .requestPermissions() // Send a permission request and automatically show UI to the user to select his favorite wallet
40
- .then((permissions) => {
41
- // Account that has been shared by the wallet
42
- console.log('got permissions', permissions)
43
- })
44
- .catch((error) => console.log(error))
9
+ ```sh
10
+ npm install @tezos-x/octez.connect-sdk
45
11
  ```
12
+ ## Package provenance
46
13
 
47
- For a more complete example, take a look at the `example-dapp.html` file.
14
+ This package is published from the Trilitech-maintained octez.connect repository:
15
+ [trilitech/octez.connect](https://github.com/trilitech/octez.connect)
48
16
 
49
- ## Example Wallet integration
17
+ - Original Beacon lineage: [airgap-it/beacon-sdk](https://github.com/airgap-it/beacon-sdk)
18
+ - External maintenance line Trilitech may selectively import from: [ecadlabs/beacon-sdk-taquito-patches](https://github.com/ecadlabs/beacon-sdk-taquito-patches)
50
19
 
51
- ```ts
52
- const client = new WalletClient({ name: 'My Wallet' })
53
- await client.init() // Establish P2P connection
54
-
55
- client
56
- .connect(async (message) => {
57
- // Example: Handle PermissionRequest. A wallet should handle all request types
58
- if (message.type === BeaconMessageType.PermissionRequest) {
59
- // Show a UI to the user where he can confirm sharing an account with the DApp
60
-
61
- const response: PermissionResponseInput = {
62
- type: BeaconMessageType.PermissionResponse,
63
- network: message.network, // Use the same network that the user requested
64
- scopes: [PermissionScope.OPERATION_REQUEST], // Ignore the scopes that have been requested and instead give only operation permissions
65
- id: message.id,
66
- publicKey: 'tezos public key'
67
- }
68
-
69
- // Send response back to DApp
70
- await client.respond(response)
71
- }
72
- })
73
- .catch((error) => console.error('connect error', error))
74
- ```
75
-
76
- For a more complete example, take a look at the `example-wallet.html` file.
77
-
78
- ## Adding a wallet to octez.connect
79
-
80
- Wallets are managed in the [beacon-wallet-list](https://github.com/airgap-it/beacon-wallet-list) repository. Please create a PR there to add your wallet.
81
-
82
- For iOS wallets, the wallet needs to define a custom url scheme to support the same-device functionality.
83
-
84
- ## Development
85
-
86
- ```
87
- $ npm i
88
- $ npm run build
89
- $ npm run test
90
- ```
20
+ ## Notes
91
21
 
92
- Once the SDK is built, you can open the `example-dapp.html` file in your browser and try out the basic functionality. To support browser extensions as well, the file should be viewed over a webserver. You can easily start one with `python -m SimpleHTTPServer 8000` and then open the file with `http://localhost:8000/example-dapp.html`.
22
+ - Trilitech publishes these packages under the `@tezos-x/octez.connect-*` scope
23
+ - Release notes, package policy, and the current package list live in the repository README
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8EAA2D;AAC3D,0EAAuD;AACvD,8DAA2C;AAC3C,8DAA2C;AAC3C,0EAAuD;AACvD,+EAA4D;AAC5D,iFAA8D;AAC9D,+DAA4C;AAC5C,4CAA4C;AAC5C,+DAA4C;AAC5C,gEAA6C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8EAA2D;AAC3D,0EAAuD;AACvD,8DAA2C;AAC3C,8DAA2C;AAC3C,0EAAuD;AACvD,+EAA4D;AAC5D,iFAA8D;AAC9D,+DAA4C;AAC5C,4CAA4C;AAC5C,+DAA4C;AAC5C,gEAA6C","sourcesContent":["export * from '@tezos-x/octez.connect-blockchain-substrate'\nexport * from '@tezos-x/octez.connect-blockchain-tezos'\nexport * from '@tezos-x/octez.connect-core'\nexport * from '@tezos-x/octez.connect-dapp'\nexport * from '@tezos-x/octez.connect-transport-matrix'\nexport * from '@tezos-x/octez.connect-transport-postmessage'\nexport * from '@tezos-x/octez.connect-transport-walletconnect'\nexport * from '@tezos-x/octez.connect-types'\n// export * from '@tezos-x/octez.connect-ui'\nexport * from '@tezos-x/octez.connect-utils'\nexport * from '@tezos-x/octez.connect-wallet'\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,6CAA6C,CAAA;AAC3D,cAAc,yCAAyC,CAAA;AACvD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yCAAyC,CAAA;AACvD,cAAc,8CAA8C,CAAA;AAC5D,cAAc,gDAAgD,CAAA;AAC9D,cAAc,8BAA8B,CAAA;AAC5C,4CAA4C;AAC5C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,+BAA+B,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,6CAA6C,CAAA;AAC3D,cAAc,yCAAyC,CAAA;AACvD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yCAAyC,CAAA;AACvD,cAAc,8CAA8C,CAAA;AAC5D,cAAc,gDAAgD,CAAA;AAC9D,cAAc,8BAA8B,CAAA;AAC5C,4CAA4C;AAC5C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,+BAA+B,CAAA","sourcesContent":["export * from '@tezos-x/octez.connect-blockchain-substrate'\nexport * from '@tezos-x/octez.connect-blockchain-tezos'\nexport * from '@tezos-x/octez.connect-core'\nexport * from '@tezos-x/octez.connect-dapp'\nexport * from '@tezos-x/octez.connect-transport-matrix'\nexport * from '@tezos-x/octez.connect-transport-postmessage'\nexport * from '@tezos-x/octez.connect-transport-walletconnect'\nexport * from '@tezos-x/octez.connect-types'\n// export * from '@tezos-x/octez.connect-ui'\nexport * from '@tezos-x/octez.connect-utils'\nexport * from '@tezos-x/octez.connect-wallet'\n"]}