@reown/appkit-adapter-bitcoin 1.8.14-rc.0 → 1.8.14-signet-fix.0
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/esm/src/adapter.js +39 -27
- package/dist/esm/src/adapter.js.map +1 -1
- package/dist/esm/src/connectors/OKXConnector.js +86 -54
- package/dist/esm/src/connectors/OKXConnector.js.map +1 -1
- package/dist/esm/src/connectors/UnisatConnector/index.js +5 -0
- package/dist/esm/src/connectors/UnisatConnector/index.js.map +1 -1
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/src/connectors/OKXConnector.d.ts +24 -10
- package/package.json +6 -6
|
@@ -1,23 +1,38 @@
|
|
|
1
|
-
import { type CaipNetwork } from '@reown/appkit-common';
|
|
1
|
+
import { type CaipNetwork, type CaipNetworkId } from '@reown/appkit-common';
|
|
2
2
|
import { type RequestArguments } from '@reown/appkit-controllers';
|
|
3
3
|
import type { BitcoinConnector } from '@reown/appkit-utils/bitcoin';
|
|
4
4
|
import { ProviderEventEmitter } from '../utils/ProviderEventEmitter.js';
|
|
5
|
+
declare global {
|
|
6
|
+
interface Window {
|
|
7
|
+
okxwallet: {
|
|
8
|
+
bitcoin: OKXConnector.Wallet;
|
|
9
|
+
bitcoinTestnet: OKXConnector.Wallet;
|
|
10
|
+
bitcoinSignet: OKXConnector.Wallet;
|
|
11
|
+
cardano: {
|
|
12
|
+
icon: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
5
17
|
export declare class OKXConnector extends ProviderEventEmitter implements BitcoinConnector {
|
|
6
18
|
readonly id = "OKX";
|
|
7
19
|
readonly name = "OKX Wallet";
|
|
8
20
|
readonly chain = "bip122";
|
|
9
21
|
readonly type = "ANNOUNCED";
|
|
10
22
|
readonly explorerId: string | undefined;
|
|
11
|
-
readonly imageUrl: string;
|
|
12
23
|
readonly requestedCaipNetworkId?: CaipNetwork['caipNetworkId'];
|
|
24
|
+
readonly imageUrl: string;
|
|
13
25
|
readonly provider: this;
|
|
14
|
-
private wallet;
|
|
15
26
|
private readonly requestedChains;
|
|
16
|
-
constructor({
|
|
27
|
+
constructor({ requestedChains, requestedCaipNetworkId }: OKXConnector.ConstructorParams);
|
|
17
28
|
get chains(): CaipNetwork[];
|
|
18
|
-
connect(
|
|
29
|
+
connect(params?: {
|
|
30
|
+
caipNetworkId?: CaipNetworkId;
|
|
31
|
+
}): Promise<string>;
|
|
19
32
|
disconnect(): Promise<void>;
|
|
20
|
-
getAccountAddresses(
|
|
33
|
+
getAccountAddresses(params?: {
|
|
34
|
+
caipNetworkId?: CaipNetwork['caipNetworkId'];
|
|
35
|
+
}): Promise<BitcoinConnector.AccountAddress[]>;
|
|
21
36
|
signMessage(params: BitcoinConnector.SignMessageParams): Promise<string>;
|
|
22
37
|
sendTransfer(params: BitcoinConnector.SendTransferParams): Promise<string>;
|
|
23
38
|
signPSBT(params: BitcoinConnector.SignPSBTParams): Promise<BitcoinConnector.SignPSBTResponse>;
|
|
@@ -25,17 +40,16 @@ export declare class OKXConnector extends ProviderEventEmitter implements Bitcoi
|
|
|
25
40
|
request<T>(_args: RequestArguments): Promise<T>;
|
|
26
41
|
private bindEvents;
|
|
27
42
|
private unbindEvents;
|
|
28
|
-
|
|
43
|
+
private getWallet;
|
|
29
44
|
getPublicKey(): Promise<string>;
|
|
30
45
|
}
|
|
31
46
|
export declare namespace OKXConnector {
|
|
32
47
|
type ConstructorParams = {
|
|
33
|
-
wallet: Wallet;
|
|
34
48
|
requestedChains: CaipNetwork[];
|
|
35
|
-
imageUrl: string;
|
|
36
49
|
requestedCaipNetworkId?: CaipNetwork['caipNetworkId'];
|
|
37
50
|
};
|
|
38
51
|
type Wallet = {
|
|
52
|
+
selectedAccount: BitcoinConnector.AccountAddress;
|
|
39
53
|
connect(): Promise<{
|
|
40
54
|
address: string;
|
|
41
55
|
publicKey: string;
|
|
@@ -67,7 +81,7 @@ export declare namespace OKXConnector {
|
|
|
67
81
|
removeAllListeners(): void;
|
|
68
82
|
getPublicKey(): Promise<string>;
|
|
69
83
|
};
|
|
70
|
-
type GetWalletParams = Omit<ConstructorParams, '
|
|
84
|
+
type GetWalletParams = Omit<ConstructorParams, 'requestedChains'>;
|
|
71
85
|
type SignPSBTParams = {
|
|
72
86
|
toSignInputs: Omit<BitcoinConnector.SignPSBTParams['signInputs'][number], 'useTweakedSigner'>[];
|
|
73
87
|
autoFinalized?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reown/appkit-adapter-bitcoin",
|
|
3
|
-
"version": "1.8.14-
|
|
3
|
+
"version": "1.8.14-signet-fix.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/esm/exports/index.js",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"@walletconnect/universal-provider": "2.23.0",
|
|
25
25
|
"bitcoinjs-lib": "6.1.7",
|
|
26
26
|
"sats-connect": "3.5.0",
|
|
27
|
-
"@reown/appkit": "1.8.14-
|
|
28
|
-
"@reown/appkit-common": "1.8.14-
|
|
29
|
-
"@reown/appkit-controllers": "1.8.14-
|
|
30
|
-
"@reown/appkit-utils": "1.8.14-
|
|
31
|
-
"@reown/appkit-polyfills": "1.8.14-
|
|
27
|
+
"@reown/appkit": "1.8.14-signet-fix.0",
|
|
28
|
+
"@reown/appkit-common": "1.8.14-signet-fix.0",
|
|
29
|
+
"@reown/appkit-controllers": "1.8.14-signet-fix.0",
|
|
30
|
+
"@reown/appkit-utils": "1.8.14-signet-fix.0",
|
|
31
|
+
"@reown/appkit-polyfills": "1.8.14-signet-fix.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@leather.io/rpc": "2.20.13",
|