turing-wallet-provider 1.4.3 → 1.4.5

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.
Files changed (2) hide show
  1. package/README.md +18 -18
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -168,16 +168,16 @@ broadcastTXsraw(txs.map((tx) => ({ txraw: tx.uncheckedSerialize() })));
168
168
 
169
169
  ```ts
170
170
  //使用示例
171
- interface intput {
171
+ interface Input {
172
172
  txId?: string;
173
173
  script?: string;
174
174
  satoshis?: number;
175
175
  outputIndex: number;
176
- unfinished_script_sig: string;
177
- sig_position: number;
176
+ unfinishedScriptSig: string;
177
+ sigPosition: number;
178
178
  }
179
179
 
180
- interface output {
180
+ interface Output {
181
181
  script: string;
182
182
  satoshis: number;
183
183
  }
@@ -185,44 +185,44 @@ interface output {
185
185
  interface SignAssociatedTransactionRequestData {
186
186
  mode: 'sequential' | 'fromSource';//sequential:连续父子交易,fromSource:使用源头交易的所有输出 默认为sequential
187
187
  sourceTxraw: string;
188
- sourceUtxos: intput[];
189
- inputs: intput[][];
190
- outputs: output[][];
188
+ sourceUtxos: Input[];
189
+ inputs: Input[][];
190
+ outputs: Output[][];
191
191
  autoChange: boolean;//默认为true true则子交易最后一个输出由钱包设置为找零输出
192
192
  }
193
193
 
194
194
  //p2pkh示例参数
195
- const sourceUtxos: intput[] = [
195
+ const sourceUtxos: Input[] = [
196
196
  {
197
197
  txId: "",
198
198
  outputIndex: 0,
199
199
  satoshis: 1000000000,
200
200
  script: tbc.Script.buildPublicKeyHashOut(address).toString(),
201
- unfinished_script_sig: `${publicKey}`,
202
- sig_position: 0
201
+ unfinishedScriptSig: `${publicKey}`,
202
+ sigPosition: 0
203
203
  }
204
204
  ]
205
205
 
206
- const inputs: intput[][] = [
206
+ const inputs: Input[][] = [
207
207
  [
208
- { outputIndex: 0, unfinished_script_sig: `${publicKey}`, sig_position: 0 },
209
- { outputIndex: 1, unfinished_script_sig: `${publicKey}`, sig_position: 0 },
208
+ { outputIndex: 0, unfinishedScriptSig: `${publicKey}`, sigPosition: 0 },
209
+ { outputIndex: 1, unfinishedScriptSig: `${publicKey}`, sigPosition: 0 },
210
210
  {
211
211
  txId: "",
212
212
  outputIndex: 1,
213
213
  satoshis: 1000000000,
214
214
  script: tbc.Script.buildPublicKeyHashOut(address).toString(),
215
- unfinished_script_sig: `${publicKey}`,
216
- sig_position: 0
215
+ unfinishedScriptSig: `${publicKey}`,
216
+ sigPosition: 0
217
217
  }//和父子交易无关的输入
218
218
  ],
219
219
  [
220
- { outputIndex: 0, unfinished_script_sig: `${publicKey}`, sig_position: 0 },
221
- { outputIndex: 1, unfinished_script_sig: `${publicKey}`, sig_position: 0 }
220
+ { outputIndex: 0, unfinishedScriptSig: `${publicKey}`, sigPosition: 0 },
221
+ { outputIndex: 1, unfinishedScriptSig: `${publicKey}`, sigPosition: 0 }
222
222
  ]
223
223
  ];
224
224
 
225
- const outputs: output[][] = [
225
+ const outputs: Output[][] = [
226
226
  [{ script: tbc.Script.buildPublicKeyHashOut(address).toString(), satoshis: 50000000 }, { script: tbc.Script.buildPublicKeyHashOut(address).toString(), satoshis: 50000000 }]
227
227
 
228
228
  , [{ script: tbc.Script.buildPublicKeyHashOut(address).toString(), satoshis: 5000000 }, { script: tbc.Script.buildPublicKeyHashOut(address).toString(), satoshis: 5000000 }]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turing-wallet-provider",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [