BLOCK 973624
A sovereign social network
powered by Bitcoin
Every post signed. Every block a heartbeat.
Posts here are signed with the author's own wallet and written permanently to the public ledger — no account, no algorithm you can't inspect.
pow.co 1,523 posts
ClearWho is Xi? That winnie the pooh guy?
Thank you, I have done so
Keanu Reeves voice "Whoa…"
Boostpow-js update
Please upload the latest boostpow-js as a Release Candidate version for a major version upgrade.
I have made an update to boostpow-js because due to npm/yarn and javascript require/import tree weirdness, the copy of bsv v1 that had been included in the package was causing trouble for future packages. It is breaking as unfortunatly this inbuilt copy was exported, and a couple of packages that depend on boostpow-js used it, rather then the module.
It is worth re-iterating this wasnt a custom version of BSV-v1 it was literally the same as the BSV-v1 from npm repo, just copied in, no types added no additions or deletitions.
Unfortunatly, this copied-in bsv is preventing us from fixing bugs in the API as when attempting to load a transaction script, it is unable to realise a script object made by an outside copy of bsv, is an instance of a script object, this has been tested and replicated on multiple different enviroments.
Nukes are fake. They were a fabrication by the power elite to create a major war free stalemate. It also helps keep the power to create large amounts of electricity, cheaply and easily, in the hands of nation states by making us fear nuclear power.
It’s quite likely that leaders like Putin, Trump, Biden, Xi etc still think they have the power to destroy all of God’s realm with a single button, because all of the men who knew nukes are fake are dead.
Big bombs are real, but poisoning or destroying the entire world for tens of thousands of years with nuclear fallout is fake. Hiroshima and Nagasaki are thriving cities today.
Galen Windsor was the nuclear engineer who oversaw the creation of most of the nuclear material in the world. He had a talk called “Nuclear Scare Scam” where he talks about them being fake. (Attached below)
Sweet victory at the end! It makes me want to update the react component to the lastest version with multi tags.
Does anyone have a link to Monday's (July 17th) Scrypt meeting? I missed the download. Thank you!
@powco/smart-contracts
Quick access to all known smart contracts on powco at your fingertips
https://www.npmjs.com/package/@powco/smart-contracts
npm install --save @powco/smart-contracts
Each contract added to ./src/contracts/ is compiled and its artifact.json pre-loaded
so you can use the contract class immediately right out of the box
import { TimeLockP2PKH } from '@powco/smart-contracts'
import { DevIssue } from '@powco/smart-contracts'
import { PersonalInterest } from '@powco/smart-contracts'
import { EventTicket } from '@powco/smart-contracts'
The goal is to accumulate source code for all known useful scrypt smart contracts,
and eventually allow for loading smart contract code classes directly from the
blockchain.
Adding Your Contracts
Simply write your contract in the same format as the others in src/contracts, which
conform to the convention laid out by the scrypt-cli project generator.
Usage in Development
If you are developing a new contract and want to test support in your app before
publishing a pull request to this repo, you can import the code into your project like
this:
- First build the code
npm install && npm run build
- Then in your typescript project
import { MySmartContract } from '/local/path/to/@powco/smart-contracts'
Remember to run npm run build after any change to your contract in development
Build
npm run build
Testing Locally
npm run test
Run Bitcoin Testnet Tests
npm run testnet
Buyable / Sellable Scrypt Objects
A simple pattern to “mixin” to any stateful smart object you want to be sellable
If a smart contract has an owner property and can be "ownable", what makes it "sellable"?
Any contract that adds an owner property may also add a price property that indicates that the object becomes "sellable". It must then implement a buy() method which assigns the owner to the new owner’s address only if the price is paid. It will also need a setPrice(signature: Signature) method allowing the owner to set the price. Perhaps setting the price to 0 would disallow sales, or perhaps there is another prop called buyable and a method called setBuyable(buyable: boolean) which would allow the user to list it for sale any time.
import {
method,
prop,
SmartContract,
hash256,
hash160,
assert,
ByteString,
SigHash,
PubKey,
PubKeyHash,
Sig
} from 'scrypt-ts'
export class Sellable extends SmartContract {
@prop(true)
pubKeyHash: PubKeyHash
@prop(true)
price: bigint
@prop(true)
buyable: boolean
constructor(pubKeyHash: PubKeyHash) {
super(...arguments)
this.pubKeyHash = pubKeyHash
this.matureTime = matureTime
}
// callable only by the seller
@method()
public setPrice(price: bigint, signature: Sig, pubkey: PubKey) {
assert(hash160(pubkey) === this.pubKeyHash)
assert(this.checkSig(signature, pubkey), `checkSig failed, pubKeyHash: ${this.pubKeyHash}`)
const stateOutput = this.buildStateOutput(amount)
assert(this.ctx.hashOutputs == hash256(stateOutput), "Output hashes don't match")
this.price = price;
}
// callable only by the seller
@method()
public setBuyable(buyable: boolean, signature: Sig, pubkey: PubKey) {
assert(hash160(pubkey) === this.pubKeyHash)
assert(this.checkSig(signature, pubkey), `checkSig failed, pubKeyHash: ${this.pubKeyHash}`)
// Could this somehow be exacted into a re-usable library like so:??
// import assertState from 'scrypt-assert-state'
// assertState(this)
assert(this.ctx.hashOutputs == hash256(this.buildStateOutput(this.ctx.utxo.value)), "Output hashes don't match")
this.buyable = buyable;
}
// callable only by the buyer
@method()
public buy(pubKeyHash: PubKeyHash) {
assert(this.buyable)
// Ensure exact payment of the price to the current owner's address
const paymentOutput = Utils.buildPublicKeyHashOutput(this.pubKeyHash, this.price)
assert(hash256(paymentOutput) == this.ctx.hashOutputs, 'invalid output for payment to seller')
// Ensure the smart object's state remains entirely intact during the sale
const stateOutput = this.buildStateOutput(this.ctx.utxo.value)
assert(this.ctx.hashOutputs == hash256(stateOutput), "Output hashes don't match")
// "transfer" ownership by assigning a new owner
this.pubKeyHash = pubKeyHash
}
}
Buyable / Sellable Scrypt Objects
A simple pattern to "mixin" to any stateful smart object you want to be sellable
If a smart contract has an owner property and can be "ownable", what makes it "sellable"?
Any contract that adds an owner property may also add a price property that indicates that the object becomes "sellable". It must then implement a buy() method which assigns the owner to the new owner's address only if the price is paid. It will also need a setPrice(signature: Signature) method allowing the owner to set the price. Perhaps setting the price to 0 would disallow sales, or perhaps there is another prop called buyable and a method called setBuyable(buyable: boolean) which would allow the user to list it for sale any time.
import {
method,
prop,
SmartContract,
hash256,
hash160,
assert,
ByteString,
SigHash,
PubKey,
PubKeyHash,
Sig
} from 'scrypt-ts'
export class Sellable extends SmartContract {
@prop(true)
pubKeyHash: PubKeyHash
@prop(true)
price: bigint
@prop(true)
buyable: boolean
constructor(pubKeyHash: PubKeyHash) {
super(...arguments)
this.pubKeyHash = pubKeyHash
this.matureTime = matureTime
}
@method()
public setBuyable(buyable: boolean, sig: Signature) {
this.buyable = buyable;
}
@method()
public setPrice(price: bigint, sig: Signature) {
this.price = price;
}
@method()
public buy(pubKeyHash: PubKeyHash) {
assert(this.buyable)
// Ensure exact payment of the price to the current owner's address
const paymoutOutput = Utils.buildPublicKeyHashOutput(this.pubKeyHash, this.price)
assert(hash256(paymoutOutput) == this.ctx.hashOutputs, 'invalid output for payment to seller')
// Ensure the smart object's state remains entirely intact during the sale
const stateOutput = this.buildStateOutput(amount)
assert(this.ctx.hashOutputs == hash256(stateOutput), "Output hashes don't match")
// "transfer" ownership by assigning a new owner
this.pubKeyHash = pubKeyHash
}
}
What if the content card showed how many sats were paid, next to difficulty to give one a feel for the cost of boosting?
Real world sats / difficulty
I will be pushing updates and testing live at https://scrypt.pow.co/api
Pull Requests will get a lot more attention after they are boosted.
Idea: Account Setting For Public Minimum Difficulty
That way people can see how much difficulty is required to get your attention.