@ckb-ccc/okx 0.0.4-alpha.0 → 0.0.4-alpha.11

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 ADDED
@@ -0,0 +1,37 @@
1
+ <h1 align="center" style="font-size: 48px;">
2
+ CCC's support for OKX
3
+ </h1>
4
+
5
+ <p align="center">
6
+ <a href="https://www.npmjs.com/package/@ckb-ccc/okx"><img
7
+ alt="NPM Version" src="https://img.shields.io/npm/v/%40ckb-ccc%2okx"
8
+ /></a>
9
+ <img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/ckb-ecofund/ccc" />
10
+ <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/ckb-ecofund/ccc/master" />
11
+ <img alt="GitHub deployments" src="https://img.shields.io/github/deployments/ckb-ecofund/ccc/production" />
12
+ <a href="https://ckbccc-demo.vercel.app/"><img
13
+ alt="Demo" src="https://img.shields.io/website?url=https%3A%2F%2Fckbccc-demo.vercel.app%2F&label=Demo"
14
+ /></a>
15
+ </p>
16
+
17
+ <p align="center">
18
+ "Common Chains Connector" is where CCC begins.
19
+ <br />
20
+ CCC helps you to interoperate wallets from different chain ecosystems with CKB,
21
+ <br />
22
+ fully enabling CKB's cryptographic freedom power.
23
+ </p>
24
+
25
+ ## Preview
26
+
27
+ <p align="center">
28
+ <a href="https://ckbccc-demo.vercel.app/">
29
+ <img src="https://raw.githubusercontent.com/ckb-ecofund/ccc/master/assets/preview.png" width="30%" />
30
+ </a>
31
+ </p>
32
+
33
+ This project is still under active development, and we are looking forward to your feedback. [Try its demo now here](https://ckbccc-demo.vercel.app/).
34
+
35
+ <h3 align="center">
36
+ Read more about CCC on its <a href="https://github.com/ckb-ecofund/ccc">GitHub Repo</a>.
37
+ </h3>
package/dist/signer.d.ts CHANGED
@@ -4,5 +4,6 @@ import { BitcoinProvider } from "./advanced";
4
4
  export declare class BitcoinSigner extends UniSat.Signer {
5
5
  readonly provider: BitcoinProvider;
6
6
  constructor(client: ccc.Client, provider: BitcoinProvider);
7
+ replaceClient(client: ccc.Client): Promise<BitcoinSigner>;
7
8
  }
8
9
  //# sourceMappingURL=signer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../src/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,qBAAa,aAAc,SAAQ,MAAM,CAAC,MAAM;aAG5B,QAAQ,EAAE,eAAe;gBADzC,MAAM,EAAE,GAAG,CAAC,MAAM,EACF,QAAQ,EAAE,eAAe;CAI5C"}
1
+ {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../src/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,qBAAa,aAAc,SAAQ,MAAM,CAAC,MAAM;aAG5B,QAAQ,EAAE,eAAe;gBADzC,MAAM,EAAE,GAAG,CAAC,MAAM,EACF,QAAQ,EAAE,eAAe;IAKrC,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAGhE"}
package/dist/signer.js CHANGED
@@ -4,4 +4,7 @@ export class BitcoinSigner extends UniSat.Signer {
4
4
  super(client, provider);
5
5
  this.provider = provider;
6
6
  }
7
+ async replaceClient(client) {
8
+ return new BitcoinSigner(client, this.provider);
9
+ }
7
10
  }
@@ -1,3 +1,4 @@
1
1
  import { ccc } from "@ckb-ccc/core";
2
- export declare function getOKXBitcoinSigner(client: ccc.Client): ccc.Signer | undefined;
2
+ import { BitcoinSigner } from "./signer";
3
+ export declare function getOKXBitcoinSigner(client: ccc.Client): BitcoinSigner | undefined;
3
4
  //# sourceMappingURL=signersFactory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signersFactory.d.ts","sourceRoot":"","sources":["../src/signersFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAIpC,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,GAAG,CAAC,MAAM,GACjB,GAAG,CAAC,MAAM,GAAG,SAAS,CAQxB"}
1
+ {"version":3,"file":"signersFactory.d.ts","sourceRoot":"","sources":["../src/signersFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,GAAG,CAAC,MAAM,GACjB,aAAa,GAAG,SAAS,CAQ3B"}
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@ckb-ccc/okx",
3
- "version": "0.0.4-alpha.0",
3
+ "version": "0.0.4-alpha.11",
4
4
  "description": "Common Chains Connector's support for OKX",
5
5
  "author": "Hanssen0 <hanssen0@hanssen0.com>",
6
6
  "license": "MIT",
7
7
  "private": false,
8
- "homepage": "https://github.com/Hanssen0/ccc",
8
+ "homepage": "https://github.com/ckb-ecofund/ccc",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git://github.com/Hanssen0/ccc.git"
11
+ "url": "git://github.com/ckb-ecofund/ccc.git"
12
12
  },
13
13
  "main": "dist/index.js",
14
14
  "exports": {
@@ -35,8 +35,8 @@
35
35
  "access": "public"
36
36
  },
37
37
  "dependencies": {
38
- "@ckb-ccc/core": "0.0.4-alpha.0",
39
- "@ckb-ccc/uni-sat": "0.0.4-alpha.0"
38
+ "@ckb-ccc/core": "0.0.4-alpha.11",
39
+ "@ckb-ccc/uni-sat": "0.0.4-alpha.11"
40
40
  },
41
- "gitHead": "e49045ed4b2778c92d6f49b79c17125245141a21"
41
+ "gitHead": "db0297c0753349e2650d2845f42f546316078d5d"
42
42
  }
package/src/signer.ts CHANGED
@@ -9,4 +9,8 @@ export class BitcoinSigner extends UniSat.Signer {
9
9
  ) {
10
10
  super(client, provider);
11
11
  }
12
+
13
+ async replaceClient(client: ccc.Client): Promise<BitcoinSigner> {
14
+ return new BitcoinSigner(client, this.provider);
15
+ }
12
16
  }
@@ -4,7 +4,7 @@ import { BitcoinSigner } from "./signer";
4
4
 
5
5
  export function getOKXBitcoinSigner(
6
6
  client: ccc.Client,
7
- ): ccc.Signer | undefined {
7
+ ): BitcoinSigner | undefined {
8
8
  const windowRef = window as { okxwallet?: { bitcoin: BitcoinProvider } };
9
9
 
10
10
  if (typeof windowRef.okxwallet === "undefined") {