tbc-lib-js
Advanced tools
Comparing version 1.0.7 to 1.0.8
{ | ||
"name": "tbc-lib-js", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "A library for tbc functionality", | ||
@@ -5,0 +5,0 @@ "author": "Austin <austinwang149@gmail.com>", |
@@ -157,3 +157,3 @@ tbc | ||
*/ | ||
const privateKeyA = tbc.PrivateKey.fromString('L1u2TmR7hMMMSV9Bx2Lyt3sujbboqEFqnKygnPRnQERhKB4qptuK'); | ||
const privateKeyA = tbc.PrivateKey.fromString(''); | ||
const publicKeyA = tbc.PublicKey.fromPrivateKey(privateKeyA); | ||
@@ -198,3 +198,3 @@ const addressA = tbc.Address.fromPrivateKey(privateKeyA).toString(); | ||
const transferTX = await Token.transfer(privateKeyA, addressB, 0.02); // Step 5.3: Create transfer transaction | ||
await Token.mergeFT(privateKeyA); // Step 5.3.1: If ft balance of address is enough but each fttxos balance is not enough, should execute mergeFT before transfer | ||
await Token.mergeFT(privateKeyA); // Step 5.3.1: If ft balance of address is enough but selected ftutxos balance is not enough, should execute mergeFT before transfer | ||
await Token.broadcastTXraw(transferTX); // Step 5.4: Broadcast transfer transaction | ||
@@ -210,6 +210,6 @@ | ||
``` | ||
Explanation: UTXO refers to the output of P2PKH, which provides fees for transactions. Fttxo refers to the output of storing ft contract code. | ||
Explanation: UTXO refers to the output of P2PKH, which provides fees for transactions. Ftutxo refers to the output of storing ft contract code. | ||
The FT SDK only provides basic UTXO retrieval, which means adding only one UTXO and FTTXO for transactions. To better build transactions, developers are advised to learn how to manage UTXO locally. If there is insufficient transaction fee or FT amount, please try checking the balance from the API. If the balance is sufficient, you can merge UTXO or FTTXO. | ||
`Note:When manually adding, ensure that the utxo input is after the fttxo input.` | ||
The FT SDK only provides basic UTXO retrieval, which means adding only one UTXO and up to five FTUTXO for transactions. To better build transactions, developers are advised to learn how to manage UTXO locally. If there is insufficient transaction fee or FT amount, please try checking the balance from the API. If the balance is sufficient, you can merge UTXO or FTUTXO. | ||
`Note:When manually adding, ensure that the utxo input is after the ftutxo input.` | ||
@@ -224,3 +224,3 @@ | ||
//测试链私钥 | ||
const privateKeyA = tbc.PrivateKey.fromString('L1u2TmR7hMMMSV9Bx2Lyt3sujbboqEFqnKygnPRnQERhKB4qptuK'); | ||
const privateKeyA = tbc.PrivateKey.fromString(''); | ||
const publicKeyA = tbc.PublicKey.fromPrivateKey(privateKeyA); | ||
@@ -227,0 +227,0 @@ const addressA = tbc.Address.fromPrivateKey(privateKeyA).toString(); |
Sorry, the diff of this file is too big to display
1087088