turing-wallet-provider 1.5.5 → 1.5.6

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
@@ -267,10 +267,11 @@ interface Input {
267
267
  | "tbc20" // 普通 FT 转账解锁
268
268
  | "tbc20_contract" // 普通 FT 在合约/swap 场景下的解锁
269
269
  | "tbc20_coin" // 稳定币转账解锁(FT.getFTunlock + isCoin)
270
+ | "tbc20_coin_contract" // 稳定币在合约/swap 场景下的解锁(FT.getFTunlockSwap + isCoin)
270
271
  | "other"; // 脚本签名类型
271
272
  unfinishedScriptSig?: string; // "other" 类型的自定义脚本模板(hex 格式),签名部分用 097369676e6174757265 替代
272
- ftVersion?: 1 | 2; // "tbc20_contract" 类型的 FT 版本
273
- contractTxId?: string; // "tbc20_contract" 类型的合约交易 ID
273
+ ftVersion?: 1 | 2 | 3; // "tbc20_contract" / "tbc20_coin_contract" 类型的 FT 版本
274
+ contractTxId?: string; // "tbc20_contract" / "tbc20_coin_contract" 类型的合约交易 ID
274
275
  }
275
276
 
276
277
  interface Output {
@@ -398,10 +399,11 @@ const { txraws } = await Turing.signAssociatedTransaction({
398
399
  稳定币是一种特殊的 FT,转移时的解锁脚本与普通 FT 不同,所以提供了专用的 `scriptSigType`:
399
400
 
400
401
  - `"tbc20_coin"`:稳定币普通转账解锁
402
+ - `"tbc20_coin_contract"`:稳定币在合约/swap 场景下的解锁(需额外提供 `contractTxId` 和 `ftVersion`)
401
403
 
402
404
  #### 子交易 (`inputs` / `outputs`)
403
405
 
404
- 只要把对应输入的 `scriptSigType` 标成 `"tbc20_coin"` 即可,**其它字段与普通 FT 写法完全一致**,无需关心 sequence / nLockTime。
406
+ 只要把对应输入的 `scriptSigType` 标成 `"tbc20_coin"`(合约场景用 `"tbc20_coin_contract"` 并补充 `contractTxId` / `ftVersion`)即可,**其它字段与普通 FT 写法完全一致**,无需关心 sequence / nLockTime。
405
407
 
406
408
  #### 源交易 (`sourceTxraw`)
407
409
 
@@ -127,9 +127,9 @@ export type Input = {
127
127
  script?: string;
128
128
  satoshis?: number;
129
129
  outputIndex: number;
130
- scriptSigType: "p2pkh" | "tbc20" | "tbc20_contract" | "tbc20_coin" | "other";
130
+ scriptSigType: "p2pkh" | "tbc20" | "tbc20_contract" | "tbc20_coin" | "tbc20_coin_contract" | "other";
131
131
  unfinishedScriptSig?: string;
132
- ftVersion?: 1 | 2;
132
+ ftVersion?: 1 | 2 | 3;
133
133
  contractTxId?: string;
134
134
  };
135
135
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turing-wallet-provider",
3
- "version": "1.5.5",
3
+ "version": "1.5.6",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [