turing-wallet-provider 1.3.6 → 1.3.8
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 +1 -8
- package/dist/types/providerTypes.d.ts +1 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,13 +47,6 @@ const wallet = useTuringWallet();
|
|
|
47
47
|
const { tbcAddress } = await wallet.getAddress(); //tbcAddress为string类型
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
## getBalance
|
|
51
|
-
|
|
52
|
-
```ts
|
|
53
|
-
const wallet = useTuringWallet();
|
|
54
|
-
const { tbc } = await wallet.getBalance(); //tbc为number类型,单位为tbc
|
|
55
|
-
```
|
|
56
|
-
|
|
57
50
|
## getInfo
|
|
58
51
|
|
|
59
52
|
```ts
|
|
@@ -168,7 +161,7 @@ for (let i = 0; i < utxosB.length; i++) {
|
|
|
168
161
|
});
|
|
169
162
|
txs.push(tx1);
|
|
170
163
|
}
|
|
171
|
-
broadcastTXsraw(txs.map((tx) => ({
|
|
164
|
+
broadcastTXsraw(txs.map((tx) => ({ txraw: tx.uncheckedSerialize() })));
|
|
172
165
|
```
|
|
173
166
|
|
|
174
167
|
## sendTransaction
|
|
@@ -6,10 +6,6 @@ export type Address = {
|
|
|
6
6
|
tbcAddress: string;
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
export type Balance = {
|
|
10
|
-
tbc: number;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
9
|
export type Info = {
|
|
14
10
|
name: string;
|
|
15
11
|
platform: string;
|
|
@@ -70,7 +66,7 @@ export type SignTransaction = {
|
|
|
70
66
|
};
|
|
71
67
|
|
|
72
68
|
export type SignTransactionResponse = {
|
|
73
|
-
|
|
69
|
+
sigs?: string[][];
|
|
74
70
|
error?: string;
|
|
75
71
|
};
|
|
76
72
|
|
|
@@ -112,7 +108,6 @@ export type TuringProviderType = {
|
|
|
112
108
|
isConnected: () => Promise<boolean>;
|
|
113
109
|
getPubKey: () => Promise<PubKey | undefined>;
|
|
114
110
|
getAddress: () => Promise<Address | undefined>;
|
|
115
|
-
getBalance: () => Promise<Balance | undefined>;
|
|
116
111
|
getInfo: () => Promise<Info | undefined>;
|
|
117
112
|
sendTransaction: (
|
|
118
113
|
params: SendTransaction[]
|