turing-wallet-provider 1.2.7 → 1.2.9

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 CHANGED
@@ -54,6 +54,14 @@ const wallet = useTuringsWallet();
54
54
  const { tbc } = await wallet.getBalance(); //tbc为number类型,单位为tbc
55
55
  ```
56
56
 
57
+ ## getInfo
58
+
59
+ ```tsx
60
+ const wallet = useTuringsWallet();
61
+ const {name,platform,version} = await wallet.getInfo();
62
+ {Turing,android,1.0.0}示例的返回值
63
+ ```
64
+
57
65
  ## getPaymentUtxos
58
66
 
59
67
  ```tsx
@@ -165,6 +173,9 @@ interface RequestParam = {
165
173
  ft_amount?: number;
166
174
  merge_times?:number; //可选字段 不提供默认为10
167
175
  with_lock? boolean;
176
+ lpCostAddress?: string;//设置添加流动性扣款地址
177
+ lpCostAmount?: number;//设置添加流动性扣款TBC数量
178
+ pubKeyLock?: string[];
168
179
  poolNFT_version?: number; // 1或2 不提供默认为2
169
180
  serviceFeeRate?: number; // 0-100 poolNFT_version为2有效 不提供默认为25
170
181
  serverProvider_tag?:string; //poolNFT_version为2时为必需字段 poolNFT_version为1无效
@@ -269,6 +280,9 @@ const params = [{
269
280
  serverProvider_tag?:"",
270
281
  serviceFeeRate?:25, // poolNFT_version为2时此参数有效,默认为25
271
282
  with_lock?:false //默认值为false,为true则创建带哈希锁的poolNFT
283
+ pubKeyLock?:["pubkey1","pubkey2"];
284
+ lpCostAddress?:"";//设置添加流动性扣款地址
285
+ lpCostTBC?:5;//设置添加流动性扣款TBC数量
272
286
  lpPlan?:1 //默认值为1
273
287
  domain?: "",
274
288
  }];
@@ -10,6 +10,12 @@ export type Balance = {
10
10
  tbc: number;
11
11
  };
12
12
 
13
+ export type Info = {
14
+ name: string;
15
+ platform: string;
16
+ version: string;
17
+ }
18
+
13
19
  export type SignedMessage = {
14
20
  address: string;
15
21
  pubKey: string;
@@ -47,6 +53,9 @@ export type SendTransaction = {
47
53
  ft_amount?: number;
48
54
  merge_times?: number;
49
55
  with_lock?: boolean;
56
+ lpCostAddress?: string;
57
+ lpCostAmount?: number;
58
+ pubKeyLock?: string[];
50
59
  poolNFT_version?: number;
51
60
  serviceFeeRate?: number;
52
61
  serviceProvider_flag?: string;
@@ -94,6 +103,7 @@ export type TuringProviderType = {
94
103
  getPubKey: () => Promise<PubKey | undefined>;
95
104
  getAddress: () => Promise<Address | undefined>;
96
105
  getBalance: () => Promise<Balance | undefined>;
106
+ getInfo: () => Promise<Info | undefined>;
97
107
  sendTransaction: (
98
108
  params: SendTransaction[]
99
109
  ) => Promise<SendTransactionResponse | undefined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turing-wallet-provider",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [