@ckb-ccc/okx 0.0.14-alpha.0 → 0.0.14-alpha.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @ckb-ccc/okx
2
2
 
3
+ ## 0.0.14-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#48](https://github.com/ckb-ecofund/ccc/pull/48) [`4fb114b`](https://github.com/ckb-ecofund/ccc/commit/4fb114bc421c7250eed7388c16f1c026875153e6) Thanks [@Hanssen0](https://github.com/Hanssen0)! - feat(okx): make okx wallet happy
8
+
9
+ - Updated dependencies [[`5e942f8`](https://github.com/ckb-ecofund/ccc/commit/5e942f8f1ed678abdb7ab9716f5449f0714cea53), [`e5bd2ad`](https://github.com/ckb-ecofund/ccc/commit/e5bd2ad5de4b42a22c422ecfc42056750f69b88b), [`aae3e06`](https://github.com/ckb-ecofund/ccc/commit/aae3e0679fb940dd8c12ac9be12a4b53277a339d)]:
10
+ - @ckb-ccc/core@0.0.14-alpha.1
11
+ - @ckb-ccc/nip07@0.0.14-alpha.1
12
+ - @ckb-ccc/uni-sat@0.0.14-alpha.1
13
+
3
14
  ## 0.0.14-alpha.0
4
15
 
5
16
  ### Patch Changes
package/README.md CHANGED
@@ -15,6 +15,9 @@
15
15
  <img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/ckb-ecofund/ccc" />
16
16
  <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/ckb-ecofund/ccc/master" />
17
17
  <img alt="GitHub branch check runs" src="https://img.shields.io/github/check-runs/ckb-ecofund/ccc/master" />
18
+ <a href="https://live.ckbccc.com/"><img
19
+ alt="Playground" src="https://img.shields.io/website?url=https%3A%2F%2Flive.ckbccc.com%2F&label=Playground"
20
+ /></a>
18
21
  <a href="https://app.ckbccc.com/"><img
19
22
  alt="App" src="https://img.shields.io/website?url=https%3A%2F%2Fapp.ckbccc.com%2F&label=App"
20
23
  /></a>
@@ -33,15 +36,25 @@
33
36
  Fully enabling CKB's Turing completeness and cryptographic freedom power.
34
37
  </p>
35
38
 
36
- ## Preview
39
+ ## Playground
40
+
41
+ <p align="center">
42
+ <a href="https://live.ckbccc.com/">
43
+ <img src="https://raw.githubusercontent.com/ckb-ecofund/ccc/master/assets/preview.png" width="90%" />
44
+ </a>
45
+ </p>
46
+
47
+ This project is still under active development, and we are looking forward to your feedback. You can [experiment instantly in the playground](https://live.ckbccc.com/). If you are new to the CKB, we recommend checking [Nervos CKB Docs](https://docs.nervos.org/) for basic knowledge.
48
+
49
+ ## App
37
50
 
38
51
  <p align="center">
39
52
  <a href="https://app.ckbccc.com/">
40
- <img src="https://raw.githubusercontent.com/ckb-ecofund/ccc/master/assets/preview.png" width="30%" />
53
+ <img src="https://raw.githubusercontent.com/ckb-ecofund/ccc/master/assets/appPreview.png" width="50%" />
41
54
  </a>
42
55
  </p>
43
56
 
44
- This project is still under active development, and we are looking forward to your feedback. [Try its demo now here](https://app.ckbccc.com/). It showcases how to use CCC for some basic scenarios in CKB.
57
+ For non-developers, you can also [try CCC's app now here](https://app.ckbccc.com/). It showcases how to use CCC for some basic scenarios in CKB.
45
58
 
46
59
  <h3 align="center">
47
60
  Read more about CCC on <a href="https://docs.ckbccc.com">our website</a> or <a href="https://github.com/ckb-ecofund/ccc">GitHub Repo</a>.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/btc/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;GAGG;AACH,qBAAa,aAAc,SAAQ,GAAG,CAAC,SAAS;aAW5B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;IAC1D,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAXpC,OAAO,CAAC,OAAO,CAAgB;IAE/B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,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;IAoBzC;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAc9B,UAAU,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAe5C;;;OAGG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAqBrC;;;;OAIG;IACG,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;CAMvE"}
package/dist/btc/index.js CHANGED
@@ -71,7 +71,11 @@ export class BitcoinSigner extends ccc.SignerBtc {
71
71
  */
72
72
  async getBtcPublicKey() {
73
73
  if (this.provider.getPublicKey) {
74
- return ccc.hexFrom(await this.provider.getPublicKey());
74
+ const publicKey = await this.provider.getPublicKey();
75
+ if (publicKey === "") {
76
+ throw Error("The OKX Wallet returned wrong public key");
77
+ }
78
+ return ccc.hexFrom(publicKey);
75
79
  }
76
80
  if (this.provider.getSelectedAccount) {
77
81
  const account = await this.provider.getSelectedAccount();
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/btc/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;GAGG;AACH,qBAAa,aAAc,SAAQ,GAAG,CAAC,SAAS;aAW5B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;IAC1D,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAXpC,OAAO,CAAC,OAAO,CAAgB;IAE/B;;;;;OAKG;gBAED,MAAM,EAAE,GAAG,CAAC,MAAM,EACF,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,EACzC,iBAAiB,GAAE,GAAG,CAAC,iBAAiB,EAWxD;IAKH,IAAI,QAAQ,IAAI,eAAe,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AGG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAqBrC;;;;OAIG;IACG,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;CAMvE"}
@@ -74,7 +74,11 @@ class BitcoinSigner extends core_1.ccc.SignerBtc {
74
74
  */
75
75
  async getBtcPublicKey() {
76
76
  if (this.provider.getPublicKey) {
77
- return core_1.ccc.hexFrom(await this.provider.getPublicKey());
77
+ const publicKey = await this.provider.getPublicKey();
78
+ if (publicKey === "") {
79
+ throw Error("The OKX Wallet returned wrong public key");
80
+ }
81
+ return core_1.ccc.hexFrom(publicKey);
78
82
  }
79
83
  if (this.provider.getSelectedAccount) {
80
84
  const account = await this.provider.getSelectedAccount();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckb-ccc/okx",
3
- "version": "0.0.14-alpha.0",
3
+ "version": "0.0.14-alpha.1",
4
4
  "description": "CCC - CKBer's Codebase. Common Chains Connector's support for OKX",
5
5
  "author": "Hanssen0 <hanssen0@hanssen0.com>",
6
6
  "license": "MIT",
@@ -38,9 +38,9 @@
38
38
  "access": "public"
39
39
  },
40
40
  "dependencies": {
41
- "@ckb-ccc/core": "0.0.14-alpha.0",
42
- "@ckb-ccc/nip07": "0.0.14-alpha.0",
43
- "@ckb-ccc/uni-sat": "0.0.14-alpha.0"
41
+ "@ckb-ccc/core": "0.0.14-alpha.1",
42
+ "@ckb-ccc/uni-sat": "0.0.14-alpha.1",
43
+ "@ckb-ccc/nip07": "0.0.14-alpha.1"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "rimraf ./dist && rimraf ./dist.commonjs && tsc && tsc --project tsconfig.commonjs.json && copyfiles -u 2 misc/basedirs/**/* .",
package/src/btc/index.ts CHANGED
@@ -89,7 +89,11 @@ export class BitcoinSigner extends ccc.SignerBtc {
89
89
  */
90
90
  async getBtcPublicKey(): Promise<ccc.Hex> {
91
91
  if (this.provider.getPublicKey) {
92
- return ccc.hexFrom(await this.provider.getPublicKey());
92
+ const publicKey = await this.provider.getPublicKey();
93
+ if (publicKey === "") {
94
+ throw Error("The OKX Wallet returned wrong public key");
95
+ }
96
+ return ccc.hexFrom(publicKey);
93
97
  }
94
98
 
95
99
  if (this.provider.getSelectedAccount) {