@ckb-ccc/connector 0.0.11-alpha.3 → 0.0.12-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/dist/advancedBarrel.d.ts +0 -1
- package/dist/advancedBarrel.d.ts.map +1 -1
- package/dist/advancedBarrel.js +0 -1
- package/dist/connector/index.d.ts +1 -1
- package/dist/connector/index.d.ts.map +1 -1
- package/dist/connector/index.js +1 -1
- package/dist/scenes/connected.d.ts.map +1 -1
- package/dist/scenes/connected.js +5 -1
- package/dist/scenes/selecting/connecting.d.ts +1 -2
- package/dist/scenes/selecting/connecting.d.ts.map +1 -1
- package/dist/scenes/selecting/index.d.ts +2 -2
- package/dist/scenes/selecting/index.d.ts.map +1 -1
- package/dist/scenes/selecting/signers.d.ts +1 -2
- package/dist/scenes/selecting/signers.d.ts.map +1 -1
- package/dist/scenes/selecting/wallets.d.ts +1 -2
- package/dist/scenes/selecting/wallets.d.ts.map +1 -1
- package/dist/signers/index.d.ts +5 -13
- package/dist/signers/index.d.ts.map +1 -1
- package/dist/signers/index.js +9 -96
- package/package.json +3 -3
- package/src/advancedBarrel.ts +0 -1
- package/src/connector/index.ts +1 -1
- package/src/scenes/connected.ts +7 -1
- package/src/scenes/selecting/connecting.ts +2 -3
- package/src/scenes/selecting/index.ts +3 -4
- package/src/scenes/selecting/signers.ts +2 -3
- package/src/scenes/selecting/wallets.ts +3 -4
- package/src/signers/index.ts +16 -173
- package/dist/assets/joy-id.svg.d.ts +0 -2
- package/dist/assets/joy-id.svg.d.ts.map +0 -1
- package/dist/assets/joy-id.svg.js +0 -2
- package/dist/assets/metamask.svg.d.ts +0 -2
- package/dist/assets/metamask.svg.d.ts.map +0 -1
- package/dist/assets/metamask.svg.js +0 -2
- package/dist/assets/okx.svg.d.ts +0 -2
- package/dist/assets/okx.svg.d.ts.map +0 -1
- package/dist/assets/okx.svg.js +0 -2
- package/dist/assets/uni-sat.svg.d.ts +0 -2
- package/dist/assets/uni-sat.svg.d.ts.map +0 -1
- package/dist/assets/uni-sat.svg.js +0 -2
- package/dist/assets/utxo-global.svg.d.ts +0 -2
- package/dist/assets/utxo-global.svg.d.ts.map +0 -1
- package/dist/assets/utxo-global.svg.js +0 -21
- package/dist/types/index.d.ts +0 -10
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -1
- package/src/assets/joy-id.svg.ts +0 -5
- package/src/assets/metamask.svg.ts +0 -5
- package/src/assets/okx.svg.ts +0 -5
- package/src/assets/uni-sat.svg.ts +0 -5
- package/src/assets/utxo-global.svg.ts +0 -22
- package/src/types/index.ts +0 -11
package/dist/advancedBarrel.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advancedBarrel.d.ts","sourceRoot":"","sources":["../src/advancedBarrel.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,UAAU,CAAC
|
|
1
|
+
{"version":3,"file":"advancedBarrel.d.ts","sourceRoot":"","sources":["../src/advancedBarrel.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,UAAU,CAAC"}
|
package/dist/advancedBarrel.js
CHANGED
|
@@ -18,7 +18,7 @@ export declare class WebComponentConnector extends LitElement {
|
|
|
18
18
|
private saveConnection;
|
|
19
19
|
connectedCallback(): void;
|
|
20
20
|
willUpdate(changedProperties: PropertyValues): void;
|
|
21
|
-
refreshSigner():
|
|
21
|
+
refreshSigner(): void;
|
|
22
22
|
updateSigner(wallet: ccc.Wallet | undefined, signerInfo: ccc.SignerInfo | undefined): Promise<void>;
|
|
23
23
|
private readonly mainRef;
|
|
24
24
|
private readonly bodyRef;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connector/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAa,MAAM,KAAK,CAAC;AAM5D,qBACa,qBAAsB,SAAQ,UAAU;IAE5C,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,iBAAiB,CAAC,EAAE,GAAG,CAAC,iBAAiB,EAAE,CAAC;IAE5C,YAAY,CAAC,EAAE,CACpB,UAAU,EAAE,GAAG,CAAC,UAAU,EAC1B,MAAM,EAAE,GAAG,CAAC,MAAM,KACf,OAAO,CAAC,OAAO,CAAC,CAAC;IAGf,MAAM,EAAE,GAAG,CAAC,MAAM,CAAiC;IACnD,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM;IAInC,OAAO,CAAC,iBAAiB,CAA+B;IAGxD,OAAO,CAAC,UAAU,CAAC,CAAS;IAE5B,OAAO,CAAC,UAAU,CAAC,CAAS;IAErB,MAAM,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC;IAEpB,MAAM,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC;IAE/B,OAAO,CAAC,wBAAwB,CAAC,CAAa;IAEvC,UAAU;IAQjB,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,cAAc;IAUtB,iBAAiB,IAAI,IAAI;IAKzB,UAAU,CAAC,iBAAiB,EAAE,cAAc,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connector/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAa,MAAM,KAAK,CAAC;AAM5D,qBACa,qBAAsB,SAAQ,UAAU;IAE5C,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,iBAAiB,CAAC,EAAE,GAAG,CAAC,iBAAiB,EAAE,CAAC;IAE5C,YAAY,CAAC,EAAE,CACpB,UAAU,EAAE,GAAG,CAAC,UAAU,EAC1B,MAAM,EAAE,GAAG,CAAC,MAAM,KACf,OAAO,CAAC,OAAO,CAAC,CAAC;IAGf,MAAM,EAAE,GAAG,CAAC,MAAM,CAAiC;IACnD,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM;IAInC,OAAO,CAAC,iBAAiB,CAA+B;IAGxD,OAAO,CAAC,UAAU,CAAC,CAAS;IAE5B,OAAO,CAAC,UAAU,CAAC,CAAS;IAErB,MAAM,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC;IAEpB,MAAM,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC;IAE/B,OAAO,CAAC,wBAAwB,CAAC,CAAa;IAEvC,UAAU;IAQjB,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,cAAc;IAUtB,iBAAiB,IAAI,IAAI;IAKzB,UAAU,CAAC,iBAAiB,EAAE,cAAc,GAAG,IAAI;IAoBnD,aAAa;IAQP,YAAY,CAChB,MAAM,EAAE,GAAG,CAAC,MAAM,GAAG,SAAS,EAC9B,UAAU,EAAE,GAAG,CAAC,UAAU,GAAG,SAAS;IAsBxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoC;IAC5D,OAAO,CAAC,QAAQ,CAAC,OAAO,CACV;IAEd,MAAM;IAuCN,OAAO;IASP,MAAM,CAAC,MAAM,0BAyBX;CACH"}
|
package/dist/connector/index.js
CHANGED
|
@@ -56,7 +56,7 @@ let WebComponentConnector = class WebComponentConnector extends LitElement {
|
|
|
56
56
|
}
|
|
57
57
|
this.dispatchEvent(new Event("willUpdate"));
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
refreshSigner() {
|
|
60
60
|
const wallet = this.signersController.wallets.find(({ name }) => name === this.walletName);
|
|
61
61
|
const signer = wallet?.signers.find(({ name }) => name === this.signerName);
|
|
62
62
|
this.updateSigner(wallet, signer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connected.d.ts","sourceRoot":"","sources":["../../src/scenes/connected.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAa,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAM5D,wBAAgB,YAAY,CAC1B,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,CAAC,SAAI,EACL,CAAC,SAAI,GACJ,MAAM,GAAG,SAAS,CAKpB;AAED,qBACa,cAAe,SAAQ,UAAU;IAErC,MAAM,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC;IAEpB,MAAM,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC;IAG3B,OAAO,CAAC,kBAAkB,CAAC,CAAS;IAEpC,OAAO,CAAC,eAAe,CAAC,CAAS;IAEjC,OAAO,CAAC,OAAO,CAAC,CAAU;IAE1B,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"connected.d.ts","sourceRoot":"","sources":["../../src/scenes/connected.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAa,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAM5D,wBAAgB,YAAY,CAC1B,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,CAAC,SAAI,EACL,CAAC,SAAI,GACJ,MAAM,GAAG,SAAS,CAKpB;AAED,qBACa,cAAe,SAAQ,UAAU;IAErC,MAAM,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC;IAEpB,MAAM,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC;IAG3B,OAAO,CAAC,kBAAkB,CAAC,CAAS;IAEpC,OAAO,CAAC,eAAe,CAAC,CAAS;IAEjC,OAAO,CAAC,OAAO,CAAC,CAAU;IAE1B,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAgBzD,MAAM;IAkEN,MAAM,CAAC,MAAM,0BAmGX;IAEF,OAAO;CAGR"}
|
package/dist/scenes/connected.js
CHANGED
|
@@ -18,7 +18,11 @@ export function formatString(str, l = 9, r = 6) {
|
|
|
18
18
|
}
|
|
19
19
|
let ConnectedScene = class ConnectedScene extends LitElement {
|
|
20
20
|
willUpdate(changedProperties) {
|
|
21
|
-
if (
|
|
21
|
+
if ((!this.recommendedAddress ||
|
|
22
|
+
!this.internalAddress ||
|
|
23
|
+
!this.balance ||
|
|
24
|
+
changedProperties.has("signer")) &&
|
|
25
|
+
this.signer) {
|
|
22
26
|
this.signer
|
|
23
27
|
.getRecommendedAddress()
|
|
24
28
|
.then((v) => (this.recommendedAddress = v));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { ccc } from "@ckb-ccc/ccc";
|
|
2
|
-
|
|
3
|
-
export declare function generateConnectingScene(wallet: WalletWithSigners, signer: ccc.SignerInfo, error: string | undefined, onSignerSelected: (wallet: WalletWithSigners, signer: ccc.SignerInfo) => unknown): (string | import("lit").TemplateResult<1>)[];
|
|
2
|
+
export declare function generateConnectingScene(wallet: ccc.WalletWithSigners, signer: ccc.SignerInfo, error: string | undefined, onSignerSelected: (wallet: ccc.WalletWithSigners, signer: ccc.SignerInfo) => unknown): (string | import("lit").TemplateResult<1>)[];
|
|
4
3
|
//# sourceMappingURL=connecting.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connecting.d.ts","sourceRoot":"","sources":["../../../src/scenes/selecting/connecting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"connecting.d.ts","sourceRoot":"","sources":["../../../src/scenes/selecting/connecting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAInC,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,GAAG,CAAC,iBAAiB,EAC7B,MAAM,EAAE,GAAG,CAAC,UAAU,EACtB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,gBAAgB,EAAE,CAChB,MAAM,EAAE,GAAG,CAAC,iBAAiB,EAC7B,MAAM,EAAE,GAAG,CAAC,UAAU,KACnB,OAAO,gDA2Bb"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { ccc } from "@ckb-ccc/ccc";
|
|
1
2
|
import { LitElement } from "lit";
|
|
2
|
-
import { WalletWithSigners } from "../../types";
|
|
3
3
|
export declare class ConnectedEvent extends Event {
|
|
4
4
|
readonly walletName: string;
|
|
5
5
|
readonly signerName: string;
|
|
6
6
|
constructor(walletName: string, signerName: string);
|
|
7
7
|
}
|
|
8
8
|
export declare class SelectingScene extends LitElement {
|
|
9
|
-
wallets?: WalletWithSigners[];
|
|
9
|
+
wallets?: ccc.WalletWithSigners[];
|
|
10
10
|
private selectedWallet?;
|
|
11
11
|
private selectedSigner?;
|
|
12
12
|
private connectingError?;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scenes/selecting/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/scenes/selecting/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAM5C,qBAAa,cAAe,SAAQ,KAAK;aAErB,UAAU,EAAE,MAAM;aAClB,UAAU,EAAE,MAAM;gBADlB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM;CAIrC;AAED,qBACa,cAAe,SAAQ,UAAU;IAErC,OAAO,CAAC,EAAE,GAAG,CAAC,iBAAiB,EAAE,CAAC;IAGzC,OAAO,CAAC,cAAc,CAAC,CAAwB;IAE/C,OAAO,CAAC,cAAc,CAAC,CAAiB;IAExC,OAAO,CAAC,eAAe,CAAC,CAAS;IAEjC,MAAM;IA+CC,OAAO;IAMd,OAAO,CAAC,qBAAqB,CAqC3B;IAEF,MAAM,CAAC,MAAM,0BAsDX;IAEF,OAAO;CAGR"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ccc } from "@ckb-ccc/ccc";
|
|
2
|
-
import { WalletWithSigners } from "../../types";
|
|
3
2
|
export declare function signerTypeToIcon(type: ccc.SignerType): string;
|
|
4
|
-
export declare function generateSignersScene(wallet: WalletWithSigners, onSignerSelected: (wallet: WalletWithSigners, signer: ccc.SignerInfo) => unknown): (string | import("lit").TemplateResult<1>)[];
|
|
3
|
+
export declare function generateSignersScene(wallet: ccc.WalletWithSigners, onSignerSelected: (wallet: ccc.WalletWithSigners, signer: ccc.SignerInfo) => unknown): (string | import("lit").TemplateResult<1>)[];
|
|
5
4
|
//# sourceMappingURL=signers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signers.d.ts","sourceRoot":"","sources":["../../../src/scenes/selecting/signers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"signers.d.ts","sourceRoot":"","sources":["../../../src/scenes/selecting/signers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAKnC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,GAAG,CAAC,UAAU,GAAG,MAAM,CAO7D;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,GAAG,CAAC,iBAAiB,EAC7B,gBAAgB,EAAE,CAChB,MAAM,EAAE,GAAG,CAAC,iBAAiB,EAC7B,MAAM,EAAE,GAAG,CAAC,UAAU,KACnB,OAAO,gDA4Bb"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { ccc } from "@ckb-ccc/ccc";
|
|
2
|
-
|
|
3
|
-
export declare function generateWalletsScene(wallets: WalletWithSigners[], onWalletSelected: (wallet: WalletWithSigners) => unknown, onSignerSelected: (wallet: WalletWithSigners, signer: ccc.SignerInfo) => unknown): unknown[];
|
|
2
|
+
export declare function generateWalletsScene(wallets: ccc.WalletWithSigners[], onWalletSelected: (wallet: ccc.WalletWithSigners) => unknown, onSignerSelected: (wallet: ccc.WalletWithSigners, signer: ccc.SignerInfo) => unknown): unknown[];
|
|
4
3
|
//# sourceMappingURL=wallets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../../../src/scenes/selecting/wallets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../../../src/scenes/selecting/wallets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAInC,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,GAAG,CAAC,iBAAiB,EAAE,EAChC,gBAAgB,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,iBAAiB,KAAK,OAAO,EAC5D,gBAAgB,EAAE,CAChB,MAAM,EAAE,GAAG,CAAC,iBAAiB,EAC7B,MAAM,EAAE,GAAG,CAAC,UAAU,KACnB,OAAO,aAwBb"}
|
package/dist/signers/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ccc } from "@ckb-ccc/ccc";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare class SignersController implements ReactiveController {
|
|
2
|
+
import { ReactiveControllerHost } from "lit";
|
|
3
|
+
export declare class SignersController {
|
|
5
4
|
private readonly host;
|
|
6
|
-
wallets: WalletWithSigners[];
|
|
7
|
-
private
|
|
5
|
+
wallets: ccc.WalletWithSigners[];
|
|
6
|
+
private readonly controller;
|
|
8
7
|
constructor(host: ReactiveControllerHost & {
|
|
9
8
|
client: ccc.Client;
|
|
10
9
|
signerFilter?: (signerInfo: ccc.SignerInfo, wallet: ccc.Wallet) => Promise<boolean>;
|
|
@@ -13,15 +12,8 @@ export declare class SignersController implements ReactiveController {
|
|
|
13
12
|
icon?: string;
|
|
14
13
|
refreshSigner: () => void;
|
|
15
14
|
});
|
|
16
|
-
getConfig(): {
|
|
17
|
-
client: ccc.Client;
|
|
18
|
-
name: string;
|
|
19
|
-
icon: string;
|
|
20
|
-
preferredNetworks: ccc.NetworkPreference[];
|
|
21
|
-
};
|
|
22
|
-
update(): void;
|
|
23
15
|
refresh(): void;
|
|
24
|
-
|
|
16
|
+
update(): void;
|
|
25
17
|
hostConnected(): void;
|
|
26
18
|
hostDisconnected(): void;
|
|
27
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/signers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/signers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,KAAK,CAAC;AAE7C,qBAAa,iBAAiB;IAM1B,OAAO,CAAC,QAAQ,CAAC,IAAI;IALhB,OAAO,EAAE,GAAG,CAAC,iBAAiB,EAAE,CAAM;IAE7C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA+B;gBAGvC,IAAI,EAAE,sBAAsB,GAAG;QAC9C,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,CACb,UAAU,EAAE,GAAG,CAAC,UAAU,EAC1B,MAAM,EAAE,GAAG,CAAC,MAAM,KACf,OAAO,CAAC,OAAO,CAAC,CAAC;QACtB,iBAAiB,CAAC,EAAE,GAAG,CAAC,iBAAiB,EAAE,CAAC;QAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,aAAa,EAAE,MAAM,IAAI,CAAC;KAC3B;IAKH,OAAO;IAWP,MAAM;IAKN,aAAa,IAAI,IAAI;IAMrB,gBAAgB,IAAI,IAAI;CAGzB"}
|
package/dist/signers/index.js
CHANGED
|
@@ -1,114 +1,27 @@
|
|
|
1
1
|
import { ccc } from "@ckb-ccc/ccc";
|
|
2
|
-
import { NOSTR_SVG } from "../assets/chains/nostr.svg";
|
|
3
|
-
import { JOY_ID_SVG } from "../assets/joy-id.svg";
|
|
4
|
-
import { METAMASK_SVG } from "../assets/metamask.svg";
|
|
5
|
-
import { OKX_SVG } from "../assets/okx.svg";
|
|
6
|
-
import { UNI_SAT_SVG } from "../assets/uni-sat.svg";
|
|
7
|
-
import { UTXO_GLOBAL_SVG } from "../assets/utxo-global.svg";
|
|
8
2
|
export class SignersController {
|
|
9
3
|
constructor(host) {
|
|
10
4
|
this.host = host;
|
|
11
5
|
this.wallets = [];
|
|
12
|
-
this.
|
|
6
|
+
this.controller = new ccc.SignersController();
|
|
13
7
|
host.addController(this);
|
|
14
8
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
document.querySelector('link[rel="icon"]')
|
|
21
|
-
?.href ??
|
|
22
|
-
"https://fav.farm/%E2%9D%93";
|
|
23
|
-
const preferredNetworks = [
|
|
24
|
-
...(this.host.preferredNetworks ?? []),
|
|
25
|
-
{
|
|
26
|
-
addressPrefix: "ckb",
|
|
27
|
-
signerType: ccc.SignerType.BTC,
|
|
28
|
-
network: "btc",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
addressPrefix: "ckt",
|
|
32
|
-
signerType: ccc.SignerType.BTC,
|
|
33
|
-
network: "btcTestnet",
|
|
34
|
-
},
|
|
35
|
-
];
|
|
36
|
-
return {
|
|
37
|
-
client: this.host.client,
|
|
38
|
-
name,
|
|
39
|
-
icon,
|
|
40
|
-
preferredNetworks,
|
|
41
|
-
};
|
|
9
|
+
refresh() {
|
|
10
|
+
this.controller.refresh(this.host.client, (wallets) => {
|
|
11
|
+
this.wallets = [...wallets];
|
|
12
|
+
this.update();
|
|
13
|
+
}, this.host);
|
|
42
14
|
}
|
|
43
15
|
update() {
|
|
44
16
|
this.host.refreshSigner();
|
|
45
17
|
this.host.requestUpdate();
|
|
46
18
|
}
|
|
47
|
-
refresh() {
|
|
48
|
-
this.resetListeners.forEach((listener) => listener());
|
|
49
|
-
this.resetListeners = [];
|
|
50
|
-
this.wallets = [];
|
|
51
|
-
const { client, name, icon, preferredNetworks } = this.getConfig();
|
|
52
|
-
ccc.UtxoGlobal.getUtxoGlobalSigners(client).forEach(({ signer, name }) => {
|
|
53
|
-
this.addSigner("UTXO Global Wallet", name, UTXO_GLOBAL_SVG, signer);
|
|
54
|
-
});
|
|
55
|
-
ccc.JoyId.getJoyIdSigners(client, name, icon, preferredNetworks).forEach(({ signer, name }) => {
|
|
56
|
-
this.addSigner("JoyID Passkey", name, JOY_ID_SVG, signer);
|
|
57
|
-
});
|
|
58
|
-
const uniSatSigner = ccc.UniSat.getUniSatSigner(client, preferredNetworks);
|
|
59
|
-
if (uniSatSigner) {
|
|
60
|
-
this.addSigner("UniSat", "BTC", UNI_SAT_SVG, uniSatSigner);
|
|
61
|
-
}
|
|
62
|
-
ccc.Okx.getOKXBitcoinSigner(client, preferredNetworks).forEach((signer) => {
|
|
63
|
-
this.addSigner("OKX Wallet", signer.type, OKX_SVG, signer);
|
|
64
|
-
});
|
|
65
|
-
const nip07Signer = ccc.Nip07.getNip07Signer(client);
|
|
66
|
-
if (nip07Signer) {
|
|
67
|
-
this.addSigner("Nostr", "Nostr", NOSTR_SVG, nip07Signer);
|
|
68
|
-
}
|
|
69
|
-
const eip6963Manager = new ccc.Eip6963.SignerFactory(client);
|
|
70
|
-
this.resetListeners.push(eip6963Manager.subscribeSigners((signer) => {
|
|
71
|
-
this.addSigner(`${signer.detail.info.name}`, "EVM", signer.detail.info.icon, signer);
|
|
72
|
-
this.update();
|
|
73
|
-
}));
|
|
74
|
-
// === Dummy signers ===
|
|
75
|
-
this.addSigner("MetaMask", "EVM", METAMASK_SVG, new ccc.SignerOpenLink(client, ccc.SignerType.EVM, `https://metamask.app.link/dapp/${window.location.href}`));
|
|
76
|
-
[ccc.SignerType.EVM, ccc.SignerType.BTC].forEach((type) => {
|
|
77
|
-
this.addSigner("OKX Wallet", type, OKX_SVG, new ccc.SignerOpenLink(client, type, "https://www.okx.com/download?deeplink=" +
|
|
78
|
-
encodeURIComponent("okx://wallet/dapp/url?dappUrl=" +
|
|
79
|
-
encodeURIComponent(window.location.href))));
|
|
80
|
-
});
|
|
81
|
-
this.addSigner("UniSat", ccc.SignerType.BTC, UNI_SAT_SVG, new ccc.SignerOpenLink(client, ccc.SignerType.BTC, "https://unisat.io/download"));
|
|
82
|
-
[ccc.SignerType.CKB, ccc.SignerType.BTC].forEach((type) => {
|
|
83
|
-
this.addSigner("UTXO Global Wallet", type, UTXO_GLOBAL_SVG, new ccc.SignerOpenLink(client, type, "https://chromewebstore.google.com/detail/lnamkkidoonpeknminiadpgjiofpdmle"));
|
|
84
|
-
});
|
|
85
|
-
// ===
|
|
86
|
-
}
|
|
87
|
-
async addSigner(walletName, signerName, icon, signer) {
|
|
88
|
-
const signerInfo = { name: signerName, signer };
|
|
89
|
-
const signerFilter = this.host.signerFilter;
|
|
90
|
-
if (signerFilter &&
|
|
91
|
-
!(await signerFilter(signerInfo, { name: walletName, icon }))) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
const wallet = this.wallets.find((w) => w.name === walletName);
|
|
95
|
-
if (!wallet) {
|
|
96
|
-
this.wallets.push({
|
|
97
|
-
name: walletName,
|
|
98
|
-
icon,
|
|
99
|
-
signers: [signerInfo],
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
const signers = [...wallet.signers, signerInfo].filter(({ signer }) => !(signer instanceof ccc.SignerDummy));
|
|
104
|
-
wallet.signers = signers.length !== 0 ? signers : [signerInfo];
|
|
105
|
-
}
|
|
106
|
-
this.update();
|
|
107
|
-
}
|
|
108
19
|
hostConnected() {
|
|
109
20
|
this.refresh();
|
|
110
21
|
// Wait for plugins to be loaded
|
|
111
22
|
setTimeout(() => this.refresh(), 500);
|
|
112
23
|
}
|
|
113
|
-
hostDisconnected() {
|
|
24
|
+
hostDisconnected() {
|
|
25
|
+
this.controller.disconnect();
|
|
26
|
+
}
|
|
114
27
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckb-ccc/connector",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12-alpha.1",
|
|
4
4
|
"description": "CCC - CKBer's Codebase. Common Chains Connector UI",
|
|
5
5
|
"author": "Hanssen0 <hanssen0@hanssen0.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@ckb-ccc/ccc": "0.0.
|
|
41
|
+
"@ckb-ccc/ccc": "0.0.12-alpha.1",
|
|
42
42
|
"lit": "^3.1.3"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "22b1e1e4c7e56c8a6e9f699f54193cbec7d30a8b"
|
|
45
45
|
}
|
package/src/advancedBarrel.ts
CHANGED
package/src/connector/index.ts
CHANGED
|
@@ -93,7 +93,7 @@ export class WebComponentConnector extends LitElement {
|
|
|
93
93
|
this.dispatchEvent(new Event("willUpdate"));
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
refreshSigner() {
|
|
97
97
|
const wallet = this.signersController.wallets.find(
|
|
98
98
|
({ name }) => name === this.walletName,
|
|
99
99
|
);
|
package/src/scenes/connected.ts
CHANGED
|
@@ -31,7 +31,13 @@ export class ConnectedScene extends LitElement {
|
|
|
31
31
|
private balance?: ccc.Num;
|
|
32
32
|
|
|
33
33
|
willUpdate(changedProperties: PropertyValues<this>): void {
|
|
34
|
-
if (
|
|
34
|
+
if (
|
|
35
|
+
(!this.recommendedAddress ||
|
|
36
|
+
!this.internalAddress ||
|
|
37
|
+
!this.balance ||
|
|
38
|
+
changedProperties.has("signer")) &&
|
|
39
|
+
this.signer
|
|
40
|
+
) {
|
|
35
41
|
this.signer
|
|
36
42
|
.getRecommendedAddress()
|
|
37
43
|
.then((v) => (this.recommendedAddress = v));
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { ccc } from "@ckb-ccc/ccc";
|
|
2
2
|
import { html } from "lit";
|
|
3
3
|
import { RETRY_SVG } from "../../assets/retry.svg";
|
|
4
|
-
import { WalletWithSigners } from "../../types";
|
|
5
4
|
|
|
6
5
|
export function generateConnectingScene(
|
|
7
|
-
wallet: WalletWithSigners,
|
|
6
|
+
wallet: ccc.WalletWithSigners,
|
|
8
7
|
signer: ccc.SignerInfo,
|
|
9
8
|
error: string | undefined,
|
|
10
9
|
onSignerSelected: (
|
|
11
|
-
wallet: WalletWithSigners,
|
|
10
|
+
wallet: ccc.WalletWithSigners,
|
|
12
11
|
signer: ccc.SignerInfo,
|
|
13
12
|
) => unknown,
|
|
14
13
|
) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ccc } from "@ckb-ccc/ccc";
|
|
2
2
|
import { css, html, LitElement } from "lit";
|
|
3
3
|
import { customElement, property, state } from "lit/decorators.js";
|
|
4
|
-
import { WalletWithSigners } from "../../types";
|
|
5
4
|
import { generateConnectingScene } from "./connecting";
|
|
6
5
|
import { generateSignersScene } from "./signers";
|
|
7
6
|
import { generateWalletsScene } from "./wallets";
|
|
@@ -18,10 +17,10 @@ export class ConnectedEvent extends Event {
|
|
|
18
17
|
@customElement("ccc-selecting-scene")
|
|
19
18
|
export class SelectingScene extends LitElement {
|
|
20
19
|
@property()
|
|
21
|
-
public wallets?: WalletWithSigners[];
|
|
20
|
+
public wallets?: ccc.WalletWithSigners[];
|
|
22
21
|
|
|
23
22
|
@state()
|
|
24
|
-
private selectedWallet?: WalletWithSigners;
|
|
23
|
+
private selectedWallet?: ccc.WalletWithSigners;
|
|
25
24
|
@state()
|
|
26
25
|
private selectedSigner?: ccc.SignerInfo;
|
|
27
26
|
@state()
|
|
@@ -81,7 +80,7 @@ export class SelectingScene extends LitElement {
|
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
private signerSelectedHandler = (
|
|
84
|
-
wallet: WalletWithSigners,
|
|
83
|
+
wallet: ccc.WalletWithSigners,
|
|
85
84
|
signerInfo: ccc.SignerInfo,
|
|
86
85
|
) => {
|
|
87
86
|
this.connectingError = undefined;
|
|
@@ -2,7 +2,6 @@ import { ccc } from "@ckb-ccc/ccc";
|
|
|
2
2
|
import { html } from "lit";
|
|
3
3
|
import { repeat } from "lit/directives/repeat.js";
|
|
4
4
|
import { BTC_SVG, CKB_SVG, ETH_SVG, NOSTR_SVG } from "../../assets/chains";
|
|
5
|
-
import { WalletWithSigners } from "../../types";
|
|
6
5
|
|
|
7
6
|
export function signerTypeToIcon(type: ccc.SignerType): string {
|
|
8
7
|
return {
|
|
@@ -14,9 +13,9 @@ export function signerTypeToIcon(type: ccc.SignerType): string {
|
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
export function generateSignersScene(
|
|
17
|
-
wallet: WalletWithSigners,
|
|
16
|
+
wallet: ccc.WalletWithSigners,
|
|
18
17
|
onSignerSelected: (
|
|
19
|
-
wallet: WalletWithSigners,
|
|
18
|
+
wallet: ccc.WalletWithSigners,
|
|
20
19
|
signer: ccc.SignerInfo,
|
|
21
20
|
) => unknown,
|
|
22
21
|
) {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { ccc } from "@ckb-ccc/ccc";
|
|
2
2
|
import { html } from "lit";
|
|
3
3
|
import { repeat } from "lit/directives/repeat.js";
|
|
4
|
-
import { WalletWithSigners } from "../../types";
|
|
5
4
|
|
|
6
5
|
export function generateWalletsScene(
|
|
7
|
-
wallets: WalletWithSigners[],
|
|
8
|
-
onWalletSelected: (wallet: WalletWithSigners) => unknown,
|
|
6
|
+
wallets: ccc.WalletWithSigners[],
|
|
7
|
+
onWalletSelected: (wallet: ccc.WalletWithSigners) => unknown,
|
|
9
8
|
onSignerSelected: (
|
|
10
|
-
wallet: WalletWithSigners,
|
|
9
|
+
wallet: ccc.WalletWithSigners,
|
|
11
10
|
signer: ccc.SignerInfo,
|
|
12
11
|
) => unknown,
|
|
13
12
|
) {
|
package/src/signers/index.ts
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { ccc } from "@ckb-ccc/ccc";
|
|
2
|
-
import {
|
|
3
|
-
import { NOSTR_SVG } from "../assets/chains/nostr.svg";
|
|
4
|
-
import { JOY_ID_SVG } from "../assets/joy-id.svg";
|
|
5
|
-
import { METAMASK_SVG } from "../assets/metamask.svg";
|
|
6
|
-
import { OKX_SVG } from "../assets/okx.svg";
|
|
7
|
-
import { UNI_SAT_SVG } from "../assets/uni-sat.svg";
|
|
8
|
-
import { UTXO_GLOBAL_SVG } from "../assets/utxo-global.svg";
|
|
9
|
-
import { WalletWithSigners } from "../types";
|
|
2
|
+
import { ReactiveControllerHost } from "lit";
|
|
10
3
|
|
|
11
|
-
export class SignersController
|
|
12
|
-
public wallets: WalletWithSigners[] = [];
|
|
4
|
+
export class SignersController {
|
|
5
|
+
public wallets: ccc.WalletWithSigners[] = [];
|
|
13
6
|
|
|
14
|
-
private
|
|
7
|
+
private readonly controller = new ccc.SignersController();
|
|
15
8
|
|
|
16
9
|
constructor(
|
|
17
10
|
private readonly host: ReactiveControllerHost & {
|
|
@@ -29,36 +22,15 @@ export class SignersController implements ReactiveController {
|
|
|
29
22
|
host.addController(this);
|
|
30
23
|
}
|
|
31
24
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
this.host.
|
|
35
|
-
(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
this.host.icon ??
|
|
39
|
-
(document.querySelector('link[rel="icon"]') as HTMLLinkElement | null)
|
|
40
|
-
?.href ??
|
|
41
|
-
"https://fav.farm/%E2%9D%93";
|
|
42
|
-
const preferredNetworks = [
|
|
43
|
-
...(this.host.preferredNetworks ?? []),
|
|
44
|
-
{
|
|
45
|
-
addressPrefix: "ckb",
|
|
46
|
-
signerType: ccc.SignerType.BTC,
|
|
47
|
-
network: "btc",
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
addressPrefix: "ckt",
|
|
51
|
-
signerType: ccc.SignerType.BTC,
|
|
52
|
-
network: "btcTestnet",
|
|
25
|
+
refresh() {
|
|
26
|
+
this.controller.refresh(
|
|
27
|
+
this.host.client,
|
|
28
|
+
(wallets) => {
|
|
29
|
+
this.wallets = [...wallets];
|
|
30
|
+
this.update();
|
|
53
31
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return {
|
|
57
|
-
client: this.host.client,
|
|
58
|
-
name,
|
|
59
|
-
icon,
|
|
60
|
-
preferredNetworks,
|
|
61
|
-
};
|
|
32
|
+
this.host,
|
|
33
|
+
);
|
|
62
34
|
}
|
|
63
35
|
|
|
64
36
|
update() {
|
|
@@ -66,142 +38,13 @@ export class SignersController implements ReactiveController {
|
|
|
66
38
|
this.host.requestUpdate();
|
|
67
39
|
}
|
|
68
40
|
|
|
69
|
-
refresh() {
|
|
70
|
-
this.resetListeners.forEach((listener) => listener());
|
|
71
|
-
this.resetListeners = [];
|
|
72
|
-
|
|
73
|
-
this.wallets = [];
|
|
74
|
-
|
|
75
|
-
const { client, name, icon, preferredNetworks } = this.getConfig();
|
|
76
|
-
|
|
77
|
-
ccc.UtxoGlobal.getUtxoGlobalSigners(client).forEach(({ signer, name }) => {
|
|
78
|
-
this.addSigner("UTXO Global Wallet", name, UTXO_GLOBAL_SVG, signer);
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
ccc.JoyId.getJoyIdSigners(client, name, icon, preferredNetworks).forEach(
|
|
82
|
-
({ signer, name }) => {
|
|
83
|
-
this.addSigner("JoyID Passkey", name, JOY_ID_SVG, signer);
|
|
84
|
-
},
|
|
85
|
-
);
|
|
86
|
-
|
|
87
|
-
const uniSatSigner = ccc.UniSat.getUniSatSigner(client, preferredNetworks);
|
|
88
|
-
if (uniSatSigner) {
|
|
89
|
-
this.addSigner("UniSat", "BTC", UNI_SAT_SVG, uniSatSigner);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
ccc.Okx.getOKXBitcoinSigner(client, preferredNetworks).forEach((signer) => {
|
|
93
|
-
this.addSigner("OKX Wallet", signer.type, OKX_SVG, signer);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
const nip07Signer = ccc.Nip07.getNip07Signer(client);
|
|
97
|
-
if (nip07Signer) {
|
|
98
|
-
this.addSigner("Nostr", "Nostr", NOSTR_SVG, nip07Signer);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const eip6963Manager = new ccc.Eip6963.SignerFactory(client);
|
|
102
|
-
this.resetListeners.push(
|
|
103
|
-
eip6963Manager.subscribeSigners((signer) => {
|
|
104
|
-
this.addSigner(
|
|
105
|
-
`${signer.detail.info.name}`,
|
|
106
|
-
"EVM",
|
|
107
|
-
signer.detail.info.icon,
|
|
108
|
-
signer,
|
|
109
|
-
);
|
|
110
|
-
this.update();
|
|
111
|
-
}),
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
// === Dummy signers ===
|
|
115
|
-
this.addSigner(
|
|
116
|
-
"MetaMask",
|
|
117
|
-
"EVM",
|
|
118
|
-
METAMASK_SVG,
|
|
119
|
-
new ccc.SignerOpenLink(
|
|
120
|
-
client,
|
|
121
|
-
ccc.SignerType.EVM,
|
|
122
|
-
`https://metamask.app.link/dapp/${window.location.href}`,
|
|
123
|
-
),
|
|
124
|
-
);
|
|
125
|
-
[ccc.SignerType.EVM, ccc.SignerType.BTC].forEach((type) => {
|
|
126
|
-
this.addSigner(
|
|
127
|
-
"OKX Wallet",
|
|
128
|
-
type,
|
|
129
|
-
OKX_SVG,
|
|
130
|
-
new ccc.SignerOpenLink(
|
|
131
|
-
client,
|
|
132
|
-
type,
|
|
133
|
-
"https://www.okx.com/download?deeplink=" +
|
|
134
|
-
encodeURIComponent(
|
|
135
|
-
"okx://wallet/dapp/url?dappUrl=" +
|
|
136
|
-
encodeURIComponent(window.location.href),
|
|
137
|
-
),
|
|
138
|
-
),
|
|
139
|
-
);
|
|
140
|
-
});
|
|
141
|
-
this.addSigner(
|
|
142
|
-
"UniSat",
|
|
143
|
-
ccc.SignerType.BTC,
|
|
144
|
-
UNI_SAT_SVG,
|
|
145
|
-
new ccc.SignerOpenLink(
|
|
146
|
-
client,
|
|
147
|
-
ccc.SignerType.BTC,
|
|
148
|
-
"https://unisat.io/download",
|
|
149
|
-
),
|
|
150
|
-
);
|
|
151
|
-
|
|
152
|
-
[ccc.SignerType.CKB, ccc.SignerType.BTC].forEach((type) => {
|
|
153
|
-
this.addSigner(
|
|
154
|
-
"UTXO Global Wallet",
|
|
155
|
-
type,
|
|
156
|
-
UTXO_GLOBAL_SVG,
|
|
157
|
-
new ccc.SignerOpenLink(
|
|
158
|
-
client,
|
|
159
|
-
type,
|
|
160
|
-
"https://chromewebstore.google.com/detail/lnamkkidoonpeknminiadpgjiofpdmle",
|
|
161
|
-
),
|
|
162
|
-
);
|
|
163
|
-
});
|
|
164
|
-
// ===
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
private async addSigner(
|
|
168
|
-
walletName: string,
|
|
169
|
-
signerName: string,
|
|
170
|
-
icon: string,
|
|
171
|
-
signer: ccc.Signer,
|
|
172
|
-
) {
|
|
173
|
-
const signerInfo = { name: signerName, signer };
|
|
174
|
-
|
|
175
|
-
const signerFilter = this.host.signerFilter;
|
|
176
|
-
if (
|
|
177
|
-
signerFilter &&
|
|
178
|
-
!(await signerFilter(signerInfo, { name: walletName, icon }))
|
|
179
|
-
) {
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
const wallet = this.wallets.find((w) => w.name === walletName);
|
|
184
|
-
|
|
185
|
-
if (!wallet) {
|
|
186
|
-
this.wallets.push({
|
|
187
|
-
name: walletName,
|
|
188
|
-
icon,
|
|
189
|
-
signers: [signerInfo],
|
|
190
|
-
});
|
|
191
|
-
} else {
|
|
192
|
-
const signers = [...wallet.signers, signerInfo].filter(
|
|
193
|
-
({ signer }) => !(signer instanceof ccc.SignerDummy),
|
|
194
|
-
);
|
|
195
|
-
wallet.signers = signers.length !== 0 ? signers : [signerInfo];
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
this.update();
|
|
199
|
-
}
|
|
200
|
-
|
|
201
41
|
hostConnected(): void {
|
|
202
42
|
this.refresh();
|
|
203
43
|
// Wait for plugins to be loaded
|
|
204
44
|
setTimeout(() => this.refresh(), 500);
|
|
205
45
|
}
|
|
206
|
-
|
|
46
|
+
|
|
47
|
+
hostDisconnected(): void {
|
|
48
|
+
this.controller.disconnect();
|
|
49
|
+
}
|
|
207
50
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"joy-id.svg.d.ts","sourceRoot":"","sources":["../../src/assets/joy-id.svg.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,QAEtB,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { encodeSvgToImgSrc } from "./utils";
|
|
2
|
-
export const JOY_ID_SVG = encodeSvgToImgSrc('<svg xmlns="http://www.w3.org/2000/svg" width="420" height="420" viewBox="0 0 420 420" fill="none"><circle cx="210" cy="210" r="210" fill="#333333"/><path d="M271.127 204.419C279.096 204.419 285.555 197.959 285.555 189.991C285.555 182.022 279.096 175.562 271.127 175.562C263.159 175.562 256.699 182.022 256.699 189.991C256.699 197.959 263.159 204.419 271.127 204.419Z" fill="#8CDD00"/><path d="M173.995 175.562C166.773 175.562 160.91 181.425 160.91 188.648C160.91 195.87 166.773 201.733 173.995 201.733C181.218 201.733 187.081 195.87 187.081 188.648C187.064 181.425 181.218 175.562 173.995 175.562Z" fill="#8CDD00"/><path d="M213.43 164.836L198.969 233.586C197.626 240.006 191.878 244.657 185.327 244.657C181.086 244.657 177.139 242.757 174.47 239.465C172.39 236.894 171.342 233.734 171.391 230.491L145.27 237.238C146.383 244.084 149.2 250.618 153.687 256.203C161.434 265.816 172.963 271.335 185.311 271.335C204.407 271.335 221.111 257.775 225.041 239.089L240.665 164.852H213.43V164.836Z" fill="#C1C1C1"/><path d="M335.83 115.983C327.068 105.19 314.065 99 300.161 99H267.981L262.363 125.662H300.161C305.991 125.662 311.445 128.249 315.113 132.786C318.782 137.306 320.207 143.185 319.011 148.884L313.394 175.562H340.645L345.116 154.387C347.965 140.778 344.592 126.775 335.83 115.983Z" fill="#8CDD00"/><path d="M295.216 261.999C291.285 280.669 274.597 294.212 255.518 294.212H226.875L221.258 320.874H255.518C287.126 320.874 314.803 298.421 321.304 267.485L326.021 245.049H298.77L295.216 261.999Z" fill="#8CDD00"/><path d="M98.8061 152.39L93.9258 175.58H121.177L124.894 157.892C128.825 139.223 145.513 125.679 164.592 125.679H192.04L197.657 99.0176H164.592C132.985 99.0012 105.308 121.454 98.8061 152.39Z" fill="#8CDD00"/><path d="M104.998 287.072C101.33 282.552 99.9049 276.673 101.1 270.974L106.079 247.342L77.2555 254.777L74.9956 265.487C72.1296 279.097 75.5196 293.099 84.2813 303.891C93.0429 314.684 106.046 320.874 119.95 320.874H150.935L156.553 294.212H119.95C114.12 294.196 108.666 291.608 104.998 287.072Z" fill="#8CDD00"/></svg>');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metamask.svg.d.ts","sourceRoot":"","sources":["../../src/assets/metamask.svg.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,QAExB,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { encodeSvgToImgSrc } from "./utils";
|
|
2
|
-
export const METAMASK_SVG = encodeSvgToImgSrc(`<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" id="Layer_1" x="0" y="0" version="1.1" viewBox="0 0 318.6 318.6"><style>.st1,.st6{fill:#e4761b;stroke:#e4761b;stroke-linecap:round;stroke-linejoin:round}.st6{fill:#f6851b;stroke:#f6851b}</style><path fill="#e2761b" stroke="#e2761b" stroke-linecap="round" stroke-linejoin="round" d="m274.1 35.5-99.5 73.9L193 65.8z"/><path d="m44.4 35.5 98.7 74.6-17.5-44.3zm193.9 171.3-26.5 40.6 56.7 15.6 16.3-55.3zm-204.4.9L50.1 263l56.7-15.6-26.5-40.6z" class="st1"/><path d="m103.6 138.2-15.8 23.9 56.3 2.5-2-60.5zm111.3 0-39-34.8-1.3 61.2 56.2-2.5zM106.8 247.4l33.8-16.5-29.2-22.8zm71.1-16.5 33.9 16.5-4.7-39.3z" class="st1"/><path fill="#d7c1b3" stroke="#d7c1b3" stroke-linecap="round" stroke-linejoin="round" d="m211.8 247.4-33.9-16.5 2.7 22.1-.3 9.3zm-105 0 31.5 14.9-.2-9.3 2.5-22.1z"/><path fill="#233447" stroke="#233447" stroke-linecap="round" stroke-linejoin="round" d="m138.8 193.5-28.2-8.3 19.9-9.1zm40.9 0 8.3-17.4 20 9.1z"/><path fill="#cd6116" stroke="#cd6116" stroke-linecap="round" stroke-linejoin="round" d="m106.8 247.4 4.8-40.6-31.3.9zM207 206.8l4.8 40.6 26.5-39.7zm23.8-44.7-56.2 2.5 5.2 28.9 8.3-17.4 20 9.1zm-120.2 23.1 20-9.1 8.2 17.4 5.3-28.9-56.3-2.5z"/><path fill="#e4751f" stroke="#e4751f" stroke-linecap="round" stroke-linejoin="round" d="m87.8 162.1 23.6 46-.8-22.9zm120.3 23.1-1 22.9 23.7-46zm-64-20.6-5.3 28.9 6.6 34.1 1.5-44.9zm30.5 0-2.7 18 1.2 45 6.7-34.1z"/><path d="m179.8 193.5-6.7 34.1 4.8 3.3 29.2-22.8 1-22.9zm-69.2-8.3.8 22.9 29.2 22.8 4.8-3.3-6.6-34.1z" class="st6"/><path fill="#c0ad9e" stroke="#c0ad9e" stroke-linecap="round" stroke-linejoin="round" d="m180.3 262.3.3-9.3-2.5-2.2h-37.7l-2.3 2.2.2 9.3-31.5-14.9 11 9 22.3 15.5h38.3l22.4-15.5 11-9z"/><path fill="#161616" stroke="#161616" stroke-linecap="round" stroke-linejoin="round" d="m177.9 230.9-4.8-3.3h-27.7l-4.8 3.3-2.5 22.1 2.3-2.2h37.7l2.5 2.2z"/><path fill="#763d16" stroke="#763d16" stroke-linecap="round" stroke-linejoin="round" d="m278.3 114.2 8.5-40.8-12.7-37.9-96.2 71.4 37 31.3 52.3 15.3 11.6-13.5-5-3.6 8-7.3-6.2-4.8 8-6.1zM31.8 73.4l8.5 40.8-5.4 4 8 6.1-6.1 4.8 8 7.3-5 3.6 11.5 13.5 52.3-15.3 37-31.3-96.2-71.4z"/><path d="m267.2 153.5-52.3-15.3 15.9 23.9-23.7 46 31.2-.4h46.5zm-163.6-15.3-52.3 15.3-17.4 54.2h46.4l31.1.4-23.6-46zm71 26.4 3.3-57.7 15.2-41.1h-67.5l15 41.1 3.5 57.7 1.2 18.2.1 44.8h27.7l.2-44.8z" class="st6"/><script xmlns=""/></svg>`);
|
package/dist/assets/okx.svg.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"okx.svg.d.ts","sourceRoot":"","sources":["../../src/assets/okx.svg.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,QAEnB,CAAC"}
|
package/dist/assets/okx.svg.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { encodeSvgToImgSrc } from "./utils";
|
|
2
|
-
export const OKX_SVG = encodeSvgToImgSrc('<svg width="1000" height="1000" viewBox="0 0 1000 1000" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="1000" height="1000" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M393.949 218.518H231.049C224.129 218.518 218.519 224.128 218.519 231.048V393.948C218.519 400.869 224.129 406.479 231.049 406.479H393.949C400.87 406.479 406.48 400.869 406.48 393.948V231.048C406.48 224.128 400.87 218.518 393.949 218.518ZM581.992 406.479H419.092C412.172 406.479 406.561 412.09 406.561 419.01V581.91C406.561 588.831 412.172 594.441 419.092 594.441H581.992C588.913 594.441 594.523 588.831 594.523 581.91V419.01C594.523 412.09 588.913 406.479 581.992 406.479ZM606.974 218.518H769.874C776.794 218.518 782.405 224.128 782.405 231.048V393.948C782.405 400.869 776.794 406.479 769.874 406.479H606.974C600.053 406.479 594.443 400.869 594.443 393.948V231.048C594.443 224.128 600.053 218.518 606.974 218.518ZM393.95 594.442H231.049C224.129 594.442 218.519 600.052 218.519 606.973V769.873C218.519 776.793 224.129 782.404 231.049 782.404H393.95C400.87 782.404 406.48 776.793 406.48 769.873V606.973C406.48 600.052 400.87 594.442 393.95 594.442ZM606.974 594.442H769.874C776.794 594.442 782.405 600.052 782.405 606.973V769.873C782.405 776.793 776.794 782.404 769.874 782.404H606.974C600.053 782.404 594.443 776.793 594.443 769.873V606.973C594.443 600.052 600.053 594.442 606.974 594.442Z" fill="white"/></svg>');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uni-sat.svg.d.ts","sourceRoot":"","sources":["../../src/assets/uni-sat.svg.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,QAEvB,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { encodeSvgToImgSrc } from "./utils";
|
|
2
|
-
export const UNI_SAT_SVG = encodeSvgToImgSrc('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 115.77 147.7" xmlns:v="https://vecta.io/nano"><defs><linearGradient id="A" x1="106.985" y1="30.78" x2="13.053" y2="72.524" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#201c1b"/><stop offset=".36" stop-color="#77390d"/><stop offset=".67" stop-color="#ea8101"/><stop offset="1" stop-color="#f4b852"/></linearGradient><linearGradient id="B" x1="11.381" y1="118.167" x2="120.232" y2="85.771" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#1f1d1c"/><stop offset=".37" stop-color="#77390d"/><stop offset=".67" stop-color="#ea8101"/><stop offset="1" stop-color="#f4fb52"/></linearGradient><radialGradient id="C" cx="53.01" cy="45.84" fx="53.01" fy="45.84" r="11.13" gradientTransform="translate(0 0)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f4b852"/><stop offset=".33" stop-color="#ea8101"/><stop offset=".64" stop-color="#77390d"/><stop offset="1" stop-color="#211c1d"/></radialGradient></defs><path d="M81.66 13.29l30.31 30.02c2.58 2.55 3.85 5.13 3.81 7.73s-1.15 4.97-3.32 7.12c-2.27 2.25-4.72 3.39-7.34 3.44-2.62.04-5.22-1.22-7.8-3.77l-31-30.7c-3.52-3.49-6.92-5.96-10.19-7.41s-6.71-1.68-10.31-.68c-3.61.99-7.48 3.54-11.63 7.64-5.72 5.67-8.45 10.99-8.17 15.96s3.12 10.13 8.51 15.46l31.25 30.96c2.61 2.58 3.89 5.16 3.85 7.72-.04 2.57-1.16 4.94-3.37 7.13-2.2 2.18-4.63 3.32-7.27 3.41s-5.27-1.16-7.87-3.74L20.81 73.56c-4.93-4.88-8.49-9.5-10.68-13.86s-3.01-9.29-2.44-14.79c.51-4.71 2.02-9.27 4.54-13.69 2.51-4.42 6.11-8.94 10.78-13.57 5.56-5.51 10.87-9.73 15.93-12.67C43.99 2.04 48.88.41 53.6.07c4.73-.34 9.39.6 14 2.82s9.29 5.68 14.05 10.4z" fill="url(#A)"/><path d="M34.11 134.42L3.81 104.4C1.23 101.84-.04 99.27 0 96.67s1.15-4.97 3.32-7.12c2.27-2.25 4.72-3.39 7.34-3.44 2.62-.04 5.22 1.21 7.8 3.77l30.99 30.7c3.53 3.49 6.92 5.96 10.19 7.41s6.71 1.67 10.32.68 7.48-3.54 11.63-7.65c5.72-5.67 8.45-10.99 8.17-15.96s-3.12-10.13-8.51-15.47L64.6 73.24c-2.61-2.58-3.89-5.16-3.85-7.72.04-2.57 1.16-4.94 3.37-7.13 2.2-2.18 4.63-3.32 7.27-3.41s5.27 1.16 7.87 3.74l15.7 15.41c4.93 4.88 8.49 9.5 10.68 13.86s3.01 9.29 2.44 14.79c-.51 4.71-2.02 9.27-4.54 13.69-2.51 4.42-6.11 8.94-10.78 13.57-5.56 5.51-10.87 9.73-15.93 12.67s-9.95 4.58-14.68 4.92-9.39-.6-14-2.82-9.29-5.68-14.05-10.4z" fill="url(#B)"/><circle cx="53.01" cy="45.83" r="11.13" fill="url(#C)"/></svg>');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utxo-global.svg.d.ts","sourceRoot":"","sources":["../../src/assets/utxo-global.svg.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,QAmB1B,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { encodeSvgToImgSrc } from "./utils";
|
|
2
|
-
export const UTXO_GLOBAL_SVG = encodeSvgToImgSrc(`
|
|
3
|
-
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
-
<rect width="512" height="512" rx="256" fill="black"/>
|
|
5
|
-
<g clip-path="url(#clip0_3306_46207)">
|
|
6
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M303.998 281.91C303.998 290.558 311.018 297.568 319.677 297.568H379.781C381.224 297.568 382.394 298.736 382.394 300.178V359.734V360.2H382.401C382.648 368.632 389.57 375.392 398.074 375.392C406.577 375.392 413.499 368.632 413.746 360.2H413.753V359.734V297.568V276.691C413.753 270.926 409.073 266.252 403.3 266.252H382.394H319.677C311.018 266.252 303.998 273.262 303.998 281.91Z" fill="white"/>
|
|
7
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M382.394 391.05C382.394 382.402 375.375 375.392 366.715 375.392H306.612C305.168 375.392 303.998 374.223 303.998 372.782V313.226V312.76H303.992C303.745 304.328 296.822 297.568 288.319 297.568C279.816 297.568 272.894 304.328 272.647 312.76H272.64V313.226V375.392V396.269C272.64 402.034 277.32 406.708 283.093 406.708H303.998H366.715C375.375 406.708 382.394 399.697 382.394 391.05Z" fill="white"/>
|
|
8
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M102.456 401.977C108.579 408.092 118.507 408.092 124.63 401.977L167.13 359.535C168.15 358.516 169.805 358.516 170.825 359.535L212.995 401.647L213.325 401.977L213.33 401.972C219.475 407.76 229.156 407.652 235.168 401.647C241.181 395.643 241.289 385.975 235.494 379.838L235.499 379.833L235.168 379.503L191.151 335.546L176.369 320.783C172.287 316.707 165.668 316.707 161.586 320.783L146.804 335.546L102.456 379.833C96.333 385.948 96.333 395.862 102.456 401.977Z" fill="#FF7201"/>
|
|
9
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M102.291 269.894C108.414 263.779 118.342 263.779 124.465 269.894L166.965 312.336C167.985 313.355 169.64 313.355 170.66 312.336L212.83 270.224L213.16 269.894L213.165 269.899C219.31 264.111 228.991 264.219 235.003 270.224C241.016 276.228 241.125 285.896 235.329 292.033L235.334 292.038L235.003 292.367L190.986 336.325L176.204 351.088C172.122 355.164 165.503 355.164 161.421 351.088L146.639 336.325L102.291 292.038C96.1681 285.923 96.1681 276.009 102.291 269.894Z" fill="#FF7201"/>
|
|
10
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M273.839 120.74C273.839 129.388 280.859 136.398 289.518 136.398H327.223C328.666 136.398 329.836 137.567 329.836 139.008L329.829 230.412V230.878H329.836C330.083 239.31 337.005 246.07 345.508 246.07C354.011 246.07 360.934 239.31 361.181 230.878H361.188V230.412L361.194 136.398V115.521C361.194 109.756 356.514 105.082 350.742 105.082H329.836H289.518C280.859 105.082 273.839 112.093 273.839 120.74Z" fill="#FF7201"/>
|
|
11
|
-
<path d="M395.035 105.082C403.694 105.082 410.714 112.093 410.714 120.74C410.714 129.388 403.694 136.398 395.035 136.398C386.376 136.398 379.356 129.388 379.356 120.74C379.356 112.093 386.376 105.082 395.035 105.082Z" fill="#FF7201"/>
|
|
12
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M239.114 120.646L239.114 120.658L239.114 120.67L239.112 199.095V199.562H239.106C238.859 207.994 231.936 214.754 223.433 214.754C214.93 214.754 208.008 207.994 207.761 199.562H207.754V199.101L207.754 199.096L207.754 199.091L207.756 120.658L207.756 120.184H207.763C208.014 111.756 214.934 105 223.435 105C231.935 105 238.856 111.756 239.107 120.184H239.114V120.646Z" fill="white"/>
|
|
13
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M207.755 230.412C207.755 221.764 200.735 214.754 192.075 214.754H131.972C130.528 214.754 129.358 213.586 129.358 212.144V121.272V120.806H129.352C129.105 112.374 122.182 105.614 113.679 105.614C105.176 105.614 98.2539 112.374 98.0069 120.806H98.0001V121.272V214.754V235.632C98.0001 241.397 102.68 246.07 108.453 246.07H129.358H192.075C200.735 246.07 207.755 239.06 207.755 230.412Z" fill="white"/>
|
|
14
|
-
</g>
|
|
15
|
-
<defs>
|
|
16
|
-
<clipPath id="clip0_3306_46207">
|
|
17
|
-
<rect width="316" height="302" fill="white" transform="translate(98 105)"/>
|
|
18
|
-
</clipPath>
|
|
19
|
-
</defs>
|
|
20
|
-
</svg>
|
|
21
|
-
`);
|
package/dist/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,MAAM,MAAM,iBAAiB,GAAG,GAAG,CAAC,MAAM,GAAG;IAC3C,OAAO,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC;CAC3B,CAAC;AAEF,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
package/dist/types/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/src/assets/joy-id.svg.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { encodeSvgToImgSrc } from "./utils";
|
|
2
|
-
|
|
3
|
-
export const JOY_ID_SVG = encodeSvgToImgSrc(
|
|
4
|
-
'<svg xmlns="http://www.w3.org/2000/svg" width="420" height="420" viewBox="0 0 420 420" fill="none"><circle cx="210" cy="210" r="210" fill="#333333"/><path d="M271.127 204.419C279.096 204.419 285.555 197.959 285.555 189.991C285.555 182.022 279.096 175.562 271.127 175.562C263.159 175.562 256.699 182.022 256.699 189.991C256.699 197.959 263.159 204.419 271.127 204.419Z" fill="#8CDD00"/><path d="M173.995 175.562C166.773 175.562 160.91 181.425 160.91 188.648C160.91 195.87 166.773 201.733 173.995 201.733C181.218 201.733 187.081 195.87 187.081 188.648C187.064 181.425 181.218 175.562 173.995 175.562Z" fill="#8CDD00"/><path d="M213.43 164.836L198.969 233.586C197.626 240.006 191.878 244.657 185.327 244.657C181.086 244.657 177.139 242.757 174.47 239.465C172.39 236.894 171.342 233.734 171.391 230.491L145.27 237.238C146.383 244.084 149.2 250.618 153.687 256.203C161.434 265.816 172.963 271.335 185.311 271.335C204.407 271.335 221.111 257.775 225.041 239.089L240.665 164.852H213.43V164.836Z" fill="#C1C1C1"/><path d="M335.83 115.983C327.068 105.19 314.065 99 300.161 99H267.981L262.363 125.662H300.161C305.991 125.662 311.445 128.249 315.113 132.786C318.782 137.306 320.207 143.185 319.011 148.884L313.394 175.562H340.645L345.116 154.387C347.965 140.778 344.592 126.775 335.83 115.983Z" fill="#8CDD00"/><path d="M295.216 261.999C291.285 280.669 274.597 294.212 255.518 294.212H226.875L221.258 320.874H255.518C287.126 320.874 314.803 298.421 321.304 267.485L326.021 245.049H298.77L295.216 261.999Z" fill="#8CDD00"/><path d="M98.8061 152.39L93.9258 175.58H121.177L124.894 157.892C128.825 139.223 145.513 125.679 164.592 125.679H192.04L197.657 99.0176H164.592C132.985 99.0012 105.308 121.454 98.8061 152.39Z" fill="#8CDD00"/><path d="M104.998 287.072C101.33 282.552 99.9049 276.673 101.1 270.974L106.079 247.342L77.2555 254.777L74.9956 265.487C72.1296 279.097 75.5196 293.099 84.2813 303.891C93.0429 314.684 106.046 320.874 119.95 320.874H150.935L156.553 294.212H119.95C114.12 294.196 108.666 291.608 104.998 287.072Z" fill="#8CDD00"/></svg>',
|
|
5
|
-
);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { encodeSvgToImgSrc } from "./utils";
|
|
2
|
-
|
|
3
|
-
export const METAMASK_SVG = encodeSvgToImgSrc(
|
|
4
|
-
`<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" id="Layer_1" x="0" y="0" version="1.1" viewBox="0 0 318.6 318.6"><style>.st1,.st6{fill:#e4761b;stroke:#e4761b;stroke-linecap:round;stroke-linejoin:round}.st6{fill:#f6851b;stroke:#f6851b}</style><path fill="#e2761b" stroke="#e2761b" stroke-linecap="round" stroke-linejoin="round" d="m274.1 35.5-99.5 73.9L193 65.8z"/><path d="m44.4 35.5 98.7 74.6-17.5-44.3zm193.9 171.3-26.5 40.6 56.7 15.6 16.3-55.3zm-204.4.9L50.1 263l56.7-15.6-26.5-40.6z" class="st1"/><path d="m103.6 138.2-15.8 23.9 56.3 2.5-2-60.5zm111.3 0-39-34.8-1.3 61.2 56.2-2.5zM106.8 247.4l33.8-16.5-29.2-22.8zm71.1-16.5 33.9 16.5-4.7-39.3z" class="st1"/><path fill="#d7c1b3" stroke="#d7c1b3" stroke-linecap="round" stroke-linejoin="round" d="m211.8 247.4-33.9-16.5 2.7 22.1-.3 9.3zm-105 0 31.5 14.9-.2-9.3 2.5-22.1z"/><path fill="#233447" stroke="#233447" stroke-linecap="round" stroke-linejoin="round" d="m138.8 193.5-28.2-8.3 19.9-9.1zm40.9 0 8.3-17.4 20 9.1z"/><path fill="#cd6116" stroke="#cd6116" stroke-linecap="round" stroke-linejoin="round" d="m106.8 247.4 4.8-40.6-31.3.9zM207 206.8l4.8 40.6 26.5-39.7zm23.8-44.7-56.2 2.5 5.2 28.9 8.3-17.4 20 9.1zm-120.2 23.1 20-9.1 8.2 17.4 5.3-28.9-56.3-2.5z"/><path fill="#e4751f" stroke="#e4751f" stroke-linecap="round" stroke-linejoin="round" d="m87.8 162.1 23.6 46-.8-22.9zm120.3 23.1-1 22.9 23.7-46zm-64-20.6-5.3 28.9 6.6 34.1 1.5-44.9zm30.5 0-2.7 18 1.2 45 6.7-34.1z"/><path d="m179.8 193.5-6.7 34.1 4.8 3.3 29.2-22.8 1-22.9zm-69.2-8.3.8 22.9 29.2 22.8 4.8-3.3-6.6-34.1z" class="st6"/><path fill="#c0ad9e" stroke="#c0ad9e" stroke-linecap="round" stroke-linejoin="round" d="m180.3 262.3.3-9.3-2.5-2.2h-37.7l-2.3 2.2.2 9.3-31.5-14.9 11 9 22.3 15.5h38.3l22.4-15.5 11-9z"/><path fill="#161616" stroke="#161616" stroke-linecap="round" stroke-linejoin="round" d="m177.9 230.9-4.8-3.3h-27.7l-4.8 3.3-2.5 22.1 2.3-2.2h37.7l2.5 2.2z"/><path fill="#763d16" stroke="#763d16" stroke-linecap="round" stroke-linejoin="round" d="m278.3 114.2 8.5-40.8-12.7-37.9-96.2 71.4 37 31.3 52.3 15.3 11.6-13.5-5-3.6 8-7.3-6.2-4.8 8-6.1zM31.8 73.4l8.5 40.8-5.4 4 8 6.1-6.1 4.8 8 7.3-5 3.6 11.5 13.5 52.3-15.3 37-31.3-96.2-71.4z"/><path d="m267.2 153.5-52.3-15.3 15.9 23.9-23.7 46 31.2-.4h46.5zm-163.6-15.3-52.3 15.3-17.4 54.2h46.4l31.1.4-23.6-46zm71 26.4 3.3-57.7 15.2-41.1h-67.5l15 41.1 3.5 57.7 1.2 18.2.1 44.8h27.7l.2-44.8z" class="st6"/><script xmlns=""/></svg>`,
|
|
5
|
-
);
|
package/src/assets/okx.svg.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { encodeSvgToImgSrc } from "./utils";
|
|
2
|
-
|
|
3
|
-
export const OKX_SVG = encodeSvgToImgSrc(
|
|
4
|
-
'<svg width="1000" height="1000" viewBox="0 0 1000 1000" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="1000" height="1000" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M393.949 218.518H231.049C224.129 218.518 218.519 224.128 218.519 231.048V393.948C218.519 400.869 224.129 406.479 231.049 406.479H393.949C400.87 406.479 406.48 400.869 406.48 393.948V231.048C406.48 224.128 400.87 218.518 393.949 218.518ZM581.992 406.479H419.092C412.172 406.479 406.561 412.09 406.561 419.01V581.91C406.561 588.831 412.172 594.441 419.092 594.441H581.992C588.913 594.441 594.523 588.831 594.523 581.91V419.01C594.523 412.09 588.913 406.479 581.992 406.479ZM606.974 218.518H769.874C776.794 218.518 782.405 224.128 782.405 231.048V393.948C782.405 400.869 776.794 406.479 769.874 406.479H606.974C600.053 406.479 594.443 400.869 594.443 393.948V231.048C594.443 224.128 600.053 218.518 606.974 218.518ZM393.95 594.442H231.049C224.129 594.442 218.519 600.052 218.519 606.973V769.873C218.519 776.793 224.129 782.404 231.049 782.404H393.95C400.87 782.404 406.48 776.793 406.48 769.873V606.973C406.48 600.052 400.87 594.442 393.95 594.442ZM606.974 594.442H769.874C776.794 594.442 782.405 600.052 782.405 606.973V769.873C782.405 776.793 776.794 782.404 769.874 782.404H606.974C600.053 782.404 594.443 776.793 594.443 769.873V606.973C594.443 600.052 600.053 594.442 606.974 594.442Z" fill="white"/></svg>',
|
|
5
|
-
);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { encodeSvgToImgSrc } from "./utils";
|
|
2
|
-
|
|
3
|
-
export const UNI_SAT_SVG = encodeSvgToImgSrc(
|
|
4
|
-
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 115.77 147.7" xmlns:v="https://vecta.io/nano"><defs><linearGradient id="A" x1="106.985" y1="30.78" x2="13.053" y2="72.524" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#201c1b"/><stop offset=".36" stop-color="#77390d"/><stop offset=".67" stop-color="#ea8101"/><stop offset="1" stop-color="#f4b852"/></linearGradient><linearGradient id="B" x1="11.381" y1="118.167" x2="120.232" y2="85.771" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#1f1d1c"/><stop offset=".37" stop-color="#77390d"/><stop offset=".67" stop-color="#ea8101"/><stop offset="1" stop-color="#f4fb52"/></linearGradient><radialGradient id="C" cx="53.01" cy="45.84" fx="53.01" fy="45.84" r="11.13" gradientTransform="translate(0 0)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f4b852"/><stop offset=".33" stop-color="#ea8101"/><stop offset=".64" stop-color="#77390d"/><stop offset="1" stop-color="#211c1d"/></radialGradient></defs><path d="M81.66 13.29l30.31 30.02c2.58 2.55 3.85 5.13 3.81 7.73s-1.15 4.97-3.32 7.12c-2.27 2.25-4.72 3.39-7.34 3.44-2.62.04-5.22-1.22-7.8-3.77l-31-30.7c-3.52-3.49-6.92-5.96-10.19-7.41s-6.71-1.68-10.31-.68c-3.61.99-7.48 3.54-11.63 7.64-5.72 5.67-8.45 10.99-8.17 15.96s3.12 10.13 8.51 15.46l31.25 30.96c2.61 2.58 3.89 5.16 3.85 7.72-.04 2.57-1.16 4.94-3.37 7.13-2.2 2.18-4.63 3.32-7.27 3.41s-5.27-1.16-7.87-3.74L20.81 73.56c-4.93-4.88-8.49-9.5-10.68-13.86s-3.01-9.29-2.44-14.79c.51-4.71 2.02-9.27 4.54-13.69 2.51-4.42 6.11-8.94 10.78-13.57 5.56-5.51 10.87-9.73 15.93-12.67C43.99 2.04 48.88.41 53.6.07c4.73-.34 9.39.6 14 2.82s9.29 5.68 14.05 10.4z" fill="url(#A)"/><path d="M34.11 134.42L3.81 104.4C1.23 101.84-.04 99.27 0 96.67s1.15-4.97 3.32-7.12c2.27-2.25 4.72-3.39 7.34-3.44 2.62-.04 5.22 1.21 7.8 3.77l30.99 30.7c3.53 3.49 6.92 5.96 10.19 7.41s6.71 1.67 10.32.68 7.48-3.54 11.63-7.65c5.72-5.67 8.45-10.99 8.17-15.96s-3.12-10.13-8.51-15.47L64.6 73.24c-2.61-2.58-3.89-5.16-3.85-7.72.04-2.57 1.16-4.94 3.37-7.13 2.2-2.18 4.63-3.32 7.27-3.41s5.27 1.16 7.87 3.74l15.7 15.41c4.93 4.88 8.49 9.5 10.68 13.86s3.01 9.29 2.44 14.79c-.51 4.71-2.02 9.27-4.54 13.69-2.51 4.42-6.11 8.94-10.78 13.57-5.56 5.51-10.87 9.73-15.93 12.67s-9.95 4.58-14.68 4.92-9.39-.6-14-2.82-9.29-5.68-14.05-10.4z" fill="url(#B)"/><circle cx="53.01" cy="45.83" r="11.13" fill="url(#C)"/></svg>',
|
|
5
|
-
);
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { encodeSvgToImgSrc } from "./utils";
|
|
2
|
-
|
|
3
|
-
export const UTXO_GLOBAL_SVG = encodeSvgToImgSrc(`
|
|
4
|
-
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
-
<rect width="512" height="512" rx="256" fill="black"/>
|
|
6
|
-
<g clip-path="url(#clip0_3306_46207)">
|
|
7
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M303.998 281.91C303.998 290.558 311.018 297.568 319.677 297.568H379.781C381.224 297.568 382.394 298.736 382.394 300.178V359.734V360.2H382.401C382.648 368.632 389.57 375.392 398.074 375.392C406.577 375.392 413.499 368.632 413.746 360.2H413.753V359.734V297.568V276.691C413.753 270.926 409.073 266.252 403.3 266.252H382.394H319.677C311.018 266.252 303.998 273.262 303.998 281.91Z" fill="white"/>
|
|
8
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M382.394 391.05C382.394 382.402 375.375 375.392 366.715 375.392H306.612C305.168 375.392 303.998 374.223 303.998 372.782V313.226V312.76H303.992C303.745 304.328 296.822 297.568 288.319 297.568C279.816 297.568 272.894 304.328 272.647 312.76H272.64V313.226V375.392V396.269C272.64 402.034 277.32 406.708 283.093 406.708H303.998H366.715C375.375 406.708 382.394 399.697 382.394 391.05Z" fill="white"/>
|
|
9
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M102.456 401.977C108.579 408.092 118.507 408.092 124.63 401.977L167.13 359.535C168.15 358.516 169.805 358.516 170.825 359.535L212.995 401.647L213.325 401.977L213.33 401.972C219.475 407.76 229.156 407.652 235.168 401.647C241.181 395.643 241.289 385.975 235.494 379.838L235.499 379.833L235.168 379.503L191.151 335.546L176.369 320.783C172.287 316.707 165.668 316.707 161.586 320.783L146.804 335.546L102.456 379.833C96.333 385.948 96.333 395.862 102.456 401.977Z" fill="#FF7201"/>
|
|
10
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M102.291 269.894C108.414 263.779 118.342 263.779 124.465 269.894L166.965 312.336C167.985 313.355 169.64 313.355 170.66 312.336L212.83 270.224L213.16 269.894L213.165 269.899C219.31 264.111 228.991 264.219 235.003 270.224C241.016 276.228 241.125 285.896 235.329 292.033L235.334 292.038L235.003 292.367L190.986 336.325L176.204 351.088C172.122 355.164 165.503 355.164 161.421 351.088L146.639 336.325L102.291 292.038C96.1681 285.923 96.1681 276.009 102.291 269.894Z" fill="#FF7201"/>
|
|
11
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M273.839 120.74C273.839 129.388 280.859 136.398 289.518 136.398H327.223C328.666 136.398 329.836 137.567 329.836 139.008L329.829 230.412V230.878H329.836C330.083 239.31 337.005 246.07 345.508 246.07C354.011 246.07 360.934 239.31 361.181 230.878H361.188V230.412L361.194 136.398V115.521C361.194 109.756 356.514 105.082 350.742 105.082H329.836H289.518C280.859 105.082 273.839 112.093 273.839 120.74Z" fill="#FF7201"/>
|
|
12
|
-
<path d="M395.035 105.082C403.694 105.082 410.714 112.093 410.714 120.74C410.714 129.388 403.694 136.398 395.035 136.398C386.376 136.398 379.356 129.388 379.356 120.74C379.356 112.093 386.376 105.082 395.035 105.082Z" fill="#FF7201"/>
|
|
13
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M239.114 120.646L239.114 120.658L239.114 120.67L239.112 199.095V199.562H239.106C238.859 207.994 231.936 214.754 223.433 214.754C214.93 214.754 208.008 207.994 207.761 199.562H207.754V199.101L207.754 199.096L207.754 199.091L207.756 120.658L207.756 120.184H207.763C208.014 111.756 214.934 105 223.435 105C231.935 105 238.856 111.756 239.107 120.184H239.114V120.646Z" fill="white"/>
|
|
14
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M207.755 230.412C207.755 221.764 200.735 214.754 192.075 214.754H131.972C130.528 214.754 129.358 213.586 129.358 212.144V121.272V120.806H129.352C129.105 112.374 122.182 105.614 113.679 105.614C105.176 105.614 98.2539 112.374 98.0069 120.806H98.0001V121.272V214.754V235.632C98.0001 241.397 102.68 246.07 108.453 246.07H129.358H192.075C200.735 246.07 207.755 239.06 207.755 230.412Z" fill="white"/>
|
|
15
|
-
</g>
|
|
16
|
-
<defs>
|
|
17
|
-
<clipPath id="clip0_3306_46207">
|
|
18
|
-
<rect width="316" height="302" fill="white" transform="translate(98 105)"/>
|
|
19
|
-
</clipPath>
|
|
20
|
-
</defs>
|
|
21
|
-
</svg>
|
|
22
|
-
`);
|