From f5f3f14d87f941f0b845581aa4bfc4fea0e9b822 Mon Sep 17 00:00:00 2001 From: Ruben Arturo Abarca Navarro <70239531+ruge0326@users.noreply.github.com> Date: Mon, 13 May 2024 14:17:26 -0600 Subject: [PATCH 01/12] chore: add alby support to send bulk --- .gitignore | 1 + .npmrc | 4 - package.json | 4 +- src/app/psbt.ts | 196 ++++++++++++++++++++++++++++++++++++++++++++---- tsconfig.json | 1 - 5 files changed, 185 insertions(+), 21 deletions(-) delete mode 100644 .npmrc diff --git a/.gitignore b/.gitignore index b78de87..2145ccf 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ test.html .vscode/ .env +.npmrc \ No newline at end of file diff --git a/.npmrc b/.npmrc deleted file mode 100644 index c9bf32d..0000000 --- a/.npmrc +++ /dev/null @@ -1,4 +0,0 @@ -engine-strict=true -package-lock=true -save-exact=true -//registry.npmjs.org/:_authToken=${NPM_TOKEN} diff --git a/package.json b/package.json index 78c9cc4..b7736e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nosft-core", - "version": "2.5.0", + "version": "2.5.5", "private": false, "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -12,7 +12,7 @@ "description": "Tools for making a Nosft client.", "repository": { "type": "git", - "url": "https://github.com/deezy-inc/nosft-core" + "url": "git+https://github.com/deezy-inc/nosft-core.git" }, "scripts": { "build": "tsup src/index.ts --format esm,cjs --dts-resolve", diff --git a/src/app/psbt.ts b/src/app/psbt.ts index 5a26abd..45a6b2a 100644 --- a/src/app/psbt.ts +++ b/src/app/psbt.ts @@ -14,6 +14,12 @@ import { Crypto } from './crypto'; import { Address } from './address'; import { NETWORK, NETWORK_NAME, BOOST_UTXO_VALUE } from '../config/constants'; import { isMetamaskProvider } from './wallet'; +import { Utxo } from './utxo'; + +type Metadata = { + inputs: { index: number; type: 'Ordinal' | 'Cardinal' }[]; + outputs: { type: 'Ordinal' | 'Change' | 'Cardinal' }[]; +}; bitcoin.initEccLib(ecc); @@ -28,11 +34,11 @@ function isHexadecimal(str) { const getPsbt = (psbtContent) => { const psbt = isHexadecimal(psbtContent) ? bitcoin.Psbt.fromHex(psbtContent, { - network: NETWORK, - }) + network: NETWORK, + }) : bitcoin.Psbt.fromBase64(psbtContent, { - network: NETWORK, - }); + network: NETWORK, + }); return psbt; }; @@ -45,6 +51,7 @@ const getPsbtBase64 = (psbtContent) => { const Psbt = function (config) { const addressModule = Address(config); const cryptoModule = Crypto(config); + const utxoModule = Utxo(config); const psbtModule = { getPsbt, @@ -154,8 +161,8 @@ const Psbt = function (config) { signPsbtForBoostByXverse: async ({ psbt, address }) => { const signPsbtOptions: SignTransactionOptions = { - onFinish: () => {}, - onCancel: () => {}, + onFinish: () => { }, + onCancel: () => { }, payload: { network: { type: NETWORK_NAME, @@ -253,8 +260,8 @@ const Psbt = function (config) { }); const signPsbtOptions: SignTransactionOptions = { - onFinish: () => {}, - onCancel: () => {}, + onFinish: () => { }, + onCancel: () => { }, payload: { network: { type: NETWORK_NAME, @@ -331,6 +338,167 @@ const Psbt = function (config) { return psbtModule.broadcastPsbt(psbt); }, + signMultipleUtxosPsbtForSend: async ({ + address, pubKey, selectedUtxos, + ownedUtxos, destinationBtcAddress, sendFeeRate + }) => { + const utxosWithInscription = selectedUtxos.filter(utxo => utxo.inscriptionId); + const utxosWithoutInscription = selectedUtxos.filter(utxo => !utxo.inscriptionId); + if (utxosWithInscription.length === 0 && utxosWithoutInscription.length === 0) { + throw new Error('At least one ordinal or utxo is required.'); + } + const provider = SessionStorage.get(SessionsStorageKeys.DOMAIN); + if (provider !== 'alby') { + throw new Error('Signing not supported.'); + } + + const cardinalUtxos = ownedUtxos.filter(utxo => !selectedUtxos.some(ownedUtxo => ownedUtxo.txid === utxo.txid)) + .filter((x) => x.status.confirmed) + .filter((x) => x.value > 10000) + .filter(utxo => !utxo.inscriptionId) + .sort((a, b) => b.value - a.value); + + const selectedAmountWithoutInscription = utxosWithoutInscription.reduce((acc, utxo) => acc + utxo.value, 0); + let cardinalAmount = selectedAmountWithoutInscription; + let calculatedFee = 0; + + const inputs = [...utxosWithInscription, ...utxosWithoutInscription]; + let isCardinalAdded = false; + + do { + let shouldAddChangeOutput = utxosWithInscription.length > 0 || isCardinalAdded; + calculatedFee = cryptoModule.calculateFee({ + vins: inputs.length, + vouts: utxosWithInscription.length + 1, // 1 for destination output amount + recommendedFeeRate: sendFeeRate, + includeChangeOutput: shouldAddChangeOutput ? 1 : 0, + }); + + if (cardinalAmount < calculatedFee) { + const utxo = cardinalUtxos.shift(); + if (!utxo) { + throw new Error(`Please add more cardinal funds to your wallet.`); + } + inputs.push(utxo); + cardinalAmount += utxo.value; + isCardinalAdded = true; + } + } while (cardinalAmount < calculatedFee); + + const inputAddressInfo = await addressModule.getAddressInfo(pubKey); + const psbt = new bitcoin.Psbt({ network: config.NETWORK }); + + for (const utxo of inputs) { + const inputParams = psbtModule.getInputParams({ utxo, inputAddressInfo }); + psbt.addInput(inputParams); + } + + const ordinals = inputs.filter(utxo => utxo.inscriptionId); + const nonOrdinals = inputs.filter(utxo => !utxo.inscriptionId); + const spendableAmount = nonOrdinals.reduce((acc, utxo) => acc + utxo.value, 0); + + const metadata: Metadata = { + inputs: inputs.map((utxo, index) => ({ + index, + type: utxo.inscriptionId ? 'Ordinal' : 'Cardinal', + })), + outputs: [], + }; + + // Add ordinal outputs + ordinals.forEach(utxo => { + psbt.addOutput({ + address: destinationBtcAddress, + value: utxo.value, + }); + metadata.outputs.push({ type: 'Ordinal' }); + }); + + let changeAmount = 0; + + // Calculate and add change output if needed + if (isCardinalAdded) { + changeAmount = cardinalAmount - calculatedFee; + psbt.addOutput({ + address, + value: changeAmount, + }); + metadata.outputs.push({ type: 'Change' }); + } + + // Calculate and add destination output + const destinationOutputValue = spendableAmount - changeAmount - calculatedFee; + if (destinationOutputValue > 0) { + psbt.addOutput({ + address: destinationBtcAddress, + value: destinationOutputValue, + }); + metadata.outputs.push({ type: 'Cardinal' }); + } + + const witnessScripts = []; + const witnessValues = []; + + psbt.data.inputs.forEach((input, i) => { + if (!input.finalScriptWitness && !input.witnessUtxo) { + // @ts-ignore + const tx = bitcoin.Transaction.fromBuffer(psbt.data.inputs[i].nonWitnessUtxo); + const output = tx.outs[psbt.txInputs[i].index]; + psbt.updateInput(i, { + witnessUtxo: output, + }); + // @ts-ignore + witnessScripts.push(output.script); + // @ts-ignore + witnessValues.push(output.value); + } else { + // @ts-ignore + witnessScripts.push(psbt.data.inputs[i].witnessUtxo.script); + // @ts-ignore + witnessValues.push(psbt.data.inputs[i].witnessUtxo.value); + } + }); + + const psbtOutputs = psbt.data.inputs.map((_, index) => { + // @ts-ignore + const sigHash = psbt.__CACHE.__TX.hashForWitnessV1( + index, + witnessScripts, + witnessValues, + bitcoin.Transaction.SIGHASH_DEFAULT + ); + + return { + index, + sigHash: sigHash.toString('hex') + }; + }); + + await Promise.all(psbtOutputs.map(async output => { + const signature = await window.nostr.signSchnorr(output.sigHash); + psbt.updateInput(output.index, { + tapKeySig: serializeTaprootSignature(Buffer.from(signature, 'hex')), + }); + return signature; + })); + + const final_signed_psbt = psbt.finalizeAllInputs(); + const final_fee = final_signed_psbt.getFee(); + const final_tx = final_signed_psbt.extractTransaction(); + const final_vbytes = final_tx.virtualSize(); + const final_fee_rate = (final_fee / final_vbytes).toFixed(1); + const final_signed_hex_psbt = final_signed_psbt.toHex(); + console.log('final_signed_hex_psbt', final_signed_hex_psbt); + + return { + final_fee_rate, + final_fee, + final_signed_hex_psbt, + final_signed_psbt, + metadata + }; + }, + createAndSignPsbtForBoost: async ({ pubKey, utxo, destinationBtcAddress, sighashType }) => { const inputAddressInfo = await addressModule.getAddressInfo(pubKey); const psbt = psbtModule.createPsbt({ @@ -372,8 +540,8 @@ const Psbt = function (config) { signPsbtListingXverse: async ({ psbt, address }) => { const signPsbtOptions: SignTransactionOptions = { - onFinish: () => {}, - onCancel: () => {}, + onFinish: () => { }, + onCancel: () => { }, payload: { network: { type: NETWORK_NAME, @@ -578,8 +746,8 @@ const Psbt = function (config) { } const signPsbtOptions: SignTransactionOptions = { - onFinish: () => {}, - onCancel: () => {}, + onFinish: () => { }, + onCancel: () => { }, payload: { network: { type: NETWORK_NAME, @@ -677,8 +845,8 @@ const Psbt = function (config) { } const signPsbtOptions: SignTransactionOptions = { - onFinish: () => {}, - onCancel: () => {}, + onFinish: () => { }, + onCancel: () => { }, payload: { network: { type: NETWORK_NAME, diff --git a/tsconfig.json b/tsconfig.json index 9dc7b9b..5440006 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,6 @@ { "compilerOptions": { "target": "esnext", - "module": "esnext", "outDir": "./dist", "declaration": true, "rootDir": "./src", From 312f54fa1ea42ce168b1193d67bfc30152657e95 Mon Sep 17 00:00:00 2001 From: topether21 Date: Thu, 16 May 2024 11:46:17 -0600 Subject: [PATCH 02/12] chore: clean up --- src/app/psbt.ts | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/src/app/psbt.ts b/src/app/psbt.ts index 45a6b2a..79ac085 100644 --- a/src/app/psbt.ts +++ b/src/app/psbt.ts @@ -338,7 +338,7 @@ const Psbt = function (config) { return psbtModule.broadcastPsbt(psbt); }, - signMultipleUtxosPsbtForSend: async ({ + preparePsbtForMultipleSend: async ({ address, pubKey, selectedUtxos, ownedUtxos, destinationBtcAddress, sendFeeRate }) => { @@ -435,6 +435,20 @@ const Psbt = function (config) { }); metadata.outputs.push({ type: 'Cardinal' }); } + debugger; + return { + unsignedPsbtHex: psbt.toHex(), + metadata + }; + }, + + signPsbtForMultipleSend: async (unsignedPsbtHex) => { + const provider = SessionStorage.get(SessionsStorageKeys.DOMAIN); + if (provider !== 'alby') { + throw new Error('Signing not supported.'); + } + + const psbt = bitcoin.Psbt.fromHex(unsignedPsbtHex, { network: NETWORK }); const witnessScripts = []; const witnessValues = []; @@ -482,20 +496,19 @@ const Psbt = function (config) { return signature; })); - const final_signed_psbt = psbt.finalizeAllInputs(); - const final_fee = final_signed_psbt.getFee(); - const final_tx = final_signed_psbt.extractTransaction(); - const final_vbytes = final_tx.virtualSize(); - const final_fee_rate = (final_fee / final_vbytes).toFixed(1); - const final_signed_hex_psbt = final_signed_psbt.toHex(); - console.log('final_signed_hex_psbt', final_signed_hex_psbt); + const finalSignedPsbt = psbt.finalizeAllInputs(); + const finalFee = finalSignedPsbt.getFee(); + const finalTx = finalSignedPsbt.extractTransaction(); + const finalVBytes = finalTx.virtualSize(); + const finalFeeRate = (finalFee / finalVBytes).toFixed(1); + const finalSignedHexPsbt = finalSignedPsbt.toHex(); + console.log('final_signed_hex_psbt', finalSignedHexPsbt); return { - final_fee_rate, - final_fee, - final_signed_hex_psbt, - final_signed_psbt, - metadata + finalFeeRate, + finalFee, + finalSignedHexPsbt, + finalSignedPsbt, }; }, From 48921202b587bc66e7b362a30645eb6bf605776c Mon Sep 17 00:00:00 2001 From: topether21 Date: Thu, 16 May 2024 11:46:20 -0600 Subject: [PATCH 03/12] 2.5.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b7736e8..f71edea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nosft-core", - "version": "2.5.5", + "version": "2.5.6", "private": false, "main": "./dist/index.js", "module": "./dist/index.mjs", From c28dd4d0a4c5701f48a9d190c9e37941453bb834 Mon Sep 17 00:00:00 2001 From: topether21 Date: Thu, 16 May 2024 14:25:21 -0600 Subject: [PATCH 04/12] fees: debug fees --- src/app/crypto.ts | 12 ++++++------ src/app/psbt.ts | 41 ++++++++++++++++++++++------------------- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/src/app/crypto.ts b/src/app/crypto.ts index 04822a5..7330f09 100644 --- a/src/app/crypto.ts +++ b/src/app/crypto.ts @@ -43,7 +43,7 @@ const Crypto = function (config) { const txSize = baseTxSize + vins * inSize + vouts * outSize + includeChangeOutput * outSize; const fee = Math.round(txSize * recommendedFeeRate); - + debugger; return fee; }, @@ -95,11 +95,11 @@ const Crypto = function (config) { d?.get ? d : { - enumerable: true, - get: function () { - return e[k]; - }, - } + enumerable: true, + get: function () { + return e[k]; + }, + } ); } }); diff --git a/src/app/psbt.ts b/src/app/psbt.ts index 79ac085..ca43d23 100644 --- a/src/app/psbt.ts +++ b/src/app/psbt.ts @@ -359,31 +359,35 @@ const Psbt = function (config) { .sort((a, b) => b.value - a.value); const selectedAmountWithoutInscription = utxosWithoutInscription.reduce((acc, utxo) => acc + utxo.value, 0); + const inputs = [...utxosWithInscription, ...utxosWithoutInscription]; + let cardinalAmount = selectedAmountWithoutInscription; let calculatedFee = 0; - - const inputs = [...utxosWithInscription, ...utxosWithoutInscription]; let isCardinalAdded = false; - do { - let shouldAddChangeOutput = utxosWithInscription.length > 0 || isCardinalAdded; + // Initial fee calculation + calculatedFee = cryptoModule.calculateFee({ + vins: inputs.length, + vouts: utxosWithInscription.length + 1, // 1 for destination output amount + recommendedFeeRate: sendFeeRate, + includeChangeOutput: 0, + }); + + while (cardinalAmount < calculatedFee) { + const utxo = cardinalUtxos.shift(); + if (!utxo) { + throw new Error(`Please add more cardinal funds to your wallet.`); + } + inputs.push(utxo); + cardinalAmount += utxo.value; + isCardinalAdded = true; calculatedFee = cryptoModule.calculateFee({ vins: inputs.length, vouts: utxosWithInscription.length + 1, // 1 for destination output amount recommendedFeeRate: sendFeeRate, - includeChangeOutput: shouldAddChangeOutput ? 1 : 0, + includeChangeOutput: 1, }); - - if (cardinalAmount < calculatedFee) { - const utxo = cardinalUtxos.shift(); - if (!utxo) { - throw new Error(`Please add more cardinal funds to your wallet.`); - } - inputs.push(utxo); - cardinalAmount += utxo.value; - isCardinalAdded = true; - } - } while (cardinalAmount < calculatedFee); + } const inputAddressInfo = await addressModule.getAddressInfo(pubKey); const psbt = new bitcoin.Psbt({ network: config.NETWORK }); @@ -427,11 +431,10 @@ const Psbt = function (config) { } // Calculate and add destination output - const destinationOutputValue = spendableAmount - changeAmount - calculatedFee; - if (destinationOutputValue > 0) { + if (selectedAmountWithoutInscription > 0) { psbt.addOutput({ address: destinationBtcAddress, - value: destinationOutputValue, + value: selectedAmountWithoutInscription, }); metadata.outputs.push({ type: 'Cardinal' }); } From 5d327170a054e93e2f5c251599fb02f791b8c953 Mon Sep 17 00:00:00 2001 From: topether21 Date: Thu, 16 May 2024 16:54:33 -0600 Subject: [PATCH 05/12] chore: remove bug about fees --- src/app/crypto.ts | 1 - src/app/psbt.ts | 56 +++++++++++++++++++++++------------------------ 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/src/app/crypto.ts b/src/app/crypto.ts index 7330f09..c8e5d01 100644 --- a/src/app/crypto.ts +++ b/src/app/crypto.ts @@ -43,7 +43,6 @@ const Crypto = function (config) { const txSize = baseTxSize + vins * inSize + vouts * outSize + includeChangeOutput * outSize; const fee = Math.round(txSize * recommendedFeeRate); - debugger; return fee; }, diff --git a/src/app/psbt.ts b/src/app/psbt.ts index ca43d23..3dba74d 100644 --- a/src/app/psbt.ts +++ b/src/app/psbt.ts @@ -358,35 +358,34 @@ const Psbt = function (config) { .filter(utxo => !utxo.inscriptionId) .sort((a, b) => b.value - a.value); - const selectedAmountWithoutInscription = utxosWithoutInscription.reduce((acc, utxo) => acc + utxo.value, 0); + const selectedCardinalAmount = utxosWithoutInscription.reduce((acc, utxo) => acc + utxo.value, 0); const inputs = [...utxosWithInscription, ...utxosWithoutInscription]; - let cardinalAmount = selectedAmountWithoutInscription; + let totalCardinalAmount = selectedCardinalAmount; let calculatedFee = 0; let isCardinalAdded = false; - // Initial fee calculation - calculatedFee = cryptoModule.calculateFee({ - vins: inputs.length, - vouts: utxosWithInscription.length + 1, // 1 for destination output amount - recommendedFeeRate: sendFeeRate, - includeChangeOutput: 0, - }); + while (cardinalUtxos.length > 0 || calculatedFee === 0) { + calculatedFee = cryptoModule.calculateFee({ + vins: inputs.length, + vouts: utxosWithInscription.length + (selectedCardinalAmount > 0 ? 1 : 0) + (isCardinalAdded ? 1 : 0), // # of ordinals + 1 cardinal amount + 1 change + recommendedFeeRate: sendFeeRate, + includeChangeOutput: 0, + }); + + if (totalCardinalAmount >= calculatedFee) break; - while (cardinalAmount < calculatedFee) { const utxo = cardinalUtxos.shift(); if (!utxo) { throw new Error(`Please add more cardinal funds to your wallet.`); } inputs.push(utxo); - cardinalAmount += utxo.value; + totalCardinalAmount += utxo.value; isCardinalAdded = true; - calculatedFee = cryptoModule.calculateFee({ - vins: inputs.length, - vouts: utxosWithInscription.length + 1, // 1 for destination output amount - recommendedFeeRate: sendFeeRate, - includeChangeOutput: 1, - }); + } + + if (totalCardinalAmount < calculatedFee) { + throw new Error(`Please add more cardinal funds to your wallet.`); } const inputAddressInfo = await addressModule.getAddressInfo(pubKey); @@ -398,8 +397,6 @@ const Psbt = function (config) { } const ordinals = inputs.filter(utxo => utxo.inscriptionId); - const nonOrdinals = inputs.filter(utxo => !utxo.inscriptionId); - const spendableAmount = nonOrdinals.reduce((acc, utxo) => acc + utxo.value, 0); const metadata: Metadata = { inputs: inputs.map((utxo, index) => ({ @@ -420,25 +417,29 @@ const Psbt = function (config) { let changeAmount = 0; - // Calculate and add change output if needed + // Add change output if we added cardinal funds if (isCardinalAdded) { - changeAmount = cardinalAmount - calculatedFee; + changeAmount = totalCardinalAmount - selectedCardinalAmount - calculatedFee; psbt.addOutput({ address, value: changeAmount, }); metadata.outputs.push({ type: 'Change' }); - } - - // Calculate and add destination output - if (selectedAmountWithoutInscription > 0) { + if (selectedCardinalAmount > 0) { + psbt.addOutput({ + address: destinationBtcAddress, + value: selectedCardinalAmount, + }); + metadata.outputs.push({ type: 'Cardinal' }); + } + } else { psbt.addOutput({ address: destinationBtcAddress, - value: selectedAmountWithoutInscription, + value: selectedCardinalAmount - calculatedFee, }); metadata.outputs.push({ type: 'Cardinal' }); } - debugger; + return { unsignedPsbtHex: psbt.toHex(), metadata @@ -505,7 +506,6 @@ const Psbt = function (config) { const finalVBytes = finalTx.virtualSize(); const finalFeeRate = (finalFee / finalVBytes).toFixed(1); const finalSignedHexPsbt = finalSignedPsbt.toHex(); - console.log('final_signed_hex_psbt', finalSignedHexPsbt); return { finalFeeRate, From 7f39b32d3952d17cd5453603d8205b66478a1af5 Mon Sep 17 00:00:00 2001 From: topether21 Date: Thu, 16 May 2024 17:00:59 -0600 Subject: [PATCH 06/12] 2.5.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f71edea..07f01b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nosft-core", - "version": "2.5.6", + "version": "2.5.7", "private": false, "main": "./dist/index.js", "module": "./dist/index.mjs", From 28cb203dd86a15522799d398aad882cc5cfd0a37 Mon Sep 17 00:00:00 2001 From: topether21 Date: Thu, 16 May 2024 19:35:41 -0600 Subject: [PATCH 07/12] chore: add dev comments --- src/app/psbt.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/psbt.ts b/src/app/psbt.ts index 3dba74d..94f3383 100644 --- a/src/app/psbt.ts +++ b/src/app/psbt.ts @@ -337,7 +337,10 @@ const Psbt = function (config) { // Send it! return psbtModule.broadcastPsbt(psbt); }, - + // preparePsbtForMultipleSend allows safe bulk UTXO transfers, with appropriate fees. + // 1. Any input UTXOs with an inscription will be created as a distinct output UTXO of the same size, and appear before any non-inscription UTXOs in the resultant PSBT + // 2. Any input UTXOs without an inscription will have their amounts consolidated into a single output UTXO + // 3. A check is run to ensure that enough cardinal funds are available to perform the transfer. If step 2 does not contain enough cardinal funds, cardinal funds will be appended to the PSBT, and another change output will be created preparePsbtForMultipleSend: async ({ address, pubKey, selectedUtxos, ownedUtxos, destinationBtcAddress, sendFeeRate @@ -352,6 +355,7 @@ const Psbt = function (config) { throw new Error('Signing not supported.'); } + // only used if selectedCardinalAmount is not large enough to cover fees const cardinalUtxos = ownedUtxos.filter(utxo => !selectedUtxos.some(ownedUtxo => ownedUtxo.txid === utxo.txid)) .filter((x) => x.status.confirmed) .filter((x) => x.value > 10000) From 463167e472cf631ef7047b47583a002c100d7d24 Mon Sep 17 00:00:00 2001 From: topether21 Date: Thu, 16 May 2024 19:35:54 -0600 Subject: [PATCH 08/12] 2.5.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 07f01b1..bf1f871 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nosft-core", - "version": "2.5.7", + "version": "2.5.8", "private": false, "main": "./dist/index.js", "module": "./dist/index.mjs", From 7ae29c8f422544ecf8f6624db92f12d85ca402c1 Mon Sep 17 00:00:00 2001 From: topether21 Date: Thu, 16 May 2024 19:59:28 -0600 Subject: [PATCH 09/12] chore: add utxo to metadata --- src/app/psbt.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/psbt.ts b/src/app/psbt.ts index 94f3383..af57ccf 100644 --- a/src/app/psbt.ts +++ b/src/app/psbt.ts @@ -406,6 +406,7 @@ const Psbt = function (config) { inputs: inputs.map((utxo, index) => ({ index, type: utxo.inscriptionId ? 'Ordinal' : 'Cardinal', + value: utxo.value, })), outputs: [], }; From 02ce8dadf48514c31d5ce6b668ebac3de7780e10 Mon Sep 17 00:00:00 2001 From: topether21 Date: Thu, 16 May 2024 19:59:32 -0600 Subject: [PATCH 10/12] 2.5.9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bf1f871..80cf8dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nosft-core", - "version": "2.5.8", + "version": "2.5.9", "private": false, "main": "./dist/index.js", "module": "./dist/index.mjs", From b00f284d48f04b6ea5b70d08e9ff105126fabc8e Mon Sep 17 00:00:00 2001 From: topether21 Date: Thu, 16 May 2024 20:28:27 -0600 Subject: [PATCH 11/12] 2.5.10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 80cf8dc..23231b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nosft-core", - "version": "2.5.9", + "version": "2.5.10", "private": false, "main": "./dist/index.js", "module": "./dist/index.mjs", From 6d61788bddc84a9073d4190f3c38ee5fc4fbf423 Mon Sep 17 00:00:00 2001 From: topether21 Date: Thu, 16 May 2024 20:41:20 -0600 Subject: [PATCH 12/12] 2.5.11 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 23231b4..602c3a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nosft-core", - "version": "2.5.10", + "version": "2.5.11", "private": false, "main": "./dist/index.js", "module": "./dist/index.mjs",