psffpp 1.1.5 → 1.1.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.
Files changed (2) hide show
  1. package/index.js +6 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -153,6 +153,12 @@ class PSFFPP {
153
153
  // const WRITE_PRICE = 0.08335233 // Cost in PSF tokens to pin 1MB
154
154
  const PSF_TOKEN_ID = '38e97c5d7d3585a2cbf3f9580c82ca33985f9cb0845d4dcce220cb709f9538b0'
155
155
 
156
+ // Get info and libraries from the wallet.
157
+ const addr = this.wallet.walletInfo.address
158
+ targetAddr = addr
159
+ const bchjs = this.wallet.bchjs
160
+ const wif = this.wallet.walletInfo.privateKey
161
+
156
162
  // Calculate the write cost
157
163
  const dataCost = writePrice * fileSizeInMegabytes
158
164
  const minCost = writePrice
@@ -163,12 +169,6 @@ class PSFFPP {
163
169
  const pobTxid = await this.wallet.burnTokens(actualCost, PSF_TOKEN_ID)
164
170
  // console.log(`Proof-of-burn TX: ${pobTxid}`)
165
171
 
166
- // Get info and libraries from the wallet.
167
- const addr = this.wallet.walletInfo.address
168
- targetAddr = addr
169
- const bchjs = this.wallet.bchjs
170
- const wif = this.wallet.walletInfo.privateKey
171
-
172
172
  // Get a UTXO to spend to generate the pin claim TX.
173
173
  let utxos = await this.wallet.getUtxos()
174
174
  utxos = utxos.bchUtxos
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "psffpp",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "PS010 PSF File Pinning Protocol",
5
5
  "main": "index.js",
6
6
  "type": "module",