#scrypt
anonymous2.8y
https://whatsonchain.com/tx/d6f3c16bb1984efb6affcbcbd5f0369822180fc728bc1ae8ff452896c1cf478f
anonymous2.8y
Here is the download link for today's recording of the sCrypt Technical Wednesday Meeting, July 5, 2023: https://api-vo.jitsi.net/jaas-recordings/eu-west-2/vpaas-magic-cookie-30f799d005ea4007aaa7afbf1a14cdcf/vwcxowkhsouktymt
anonymous2.8y
https://whatsonchain.com/tx/d6f3c16bb1984efb6affcbcbd5f0369822180fc728bc1ae8ff452896c1cf478f
anonymous2.8y
https://github.com/pow-co/pow.co/tree/scrypt-cli
anonymous2.8y
https://whatsonchain.com/tx/d6f3c16bb1984efb6affcbcbd5f0369822180fc728bc1ae8ff452896c1cf478f
anonymous2.8y
https://whatsonchain.com/tx/d6f3c16bb1984efb6affcbcbd5f0369822180fc728bc1ae8ff452896c1cf478f
anonymous2.8y
https://whatsonchain.com/tx/d6f3c16bb1984efb6affcbcbd5f0369822180fc728bc1ae8ff452896c1cf478f
anonymous2.8y
https://github.com/pow-co/pow.co/tree/scrypt-cli
anonymous2.8y
https://whatsonchain.com/tx/d6f3c16bb1984efb6affcbcbd5f0369822180fc728bc1ae8ff452896c1cf478f
anonymous2.8y
can a contract have more than 1 public method?
anonymous2.8y
answer is yes :D
anonymous2.8y
Here is the download link for today's recording of the sCrypt Monday Meeting, July 10, 2023 at 18:30 UTC: https://api-vo.jitsi.net/jaas-recordings/eu-west-2/vpaas-magic-cookie-30f799d005ea4007aaa7afbf1a14cdcf/bjsgeszzvrdjdttf
anonymous2.8y
Here is the download link for today's recording of the sCrypt Wednesday Meeting, July 12, 2023 at 18:30 UTC: https://api-vo.jitsi.net/jaas-recordings/eu-west-2/vpaas-magic-cookie-30f799d005ea4007aaa7afbf1a14cdcf/wdprdfuwwdwlulaa
anonymous2.8y
https://github.com/GuiDeMa/BitcoinLogicController
anonymous2.8y
https://github.com/pow-co/pow.co/tree/scrypt-cli/src/contracts
anonymous2.8y
Here is the download link for today's recording of the sCrypt Monday Meeting, July 17, 2023 at 18:30 UTC: https://api-vo.jitsi.net/jaas-recordings/eu-central-1/vpaas-magic-cookie-30f799d005ea4007aaa7afbf1a14cdcf/ogledkmrzyybwvce
anonymous2.8y
https://github.com/pow-co/pow.co/blob/timelock/src/contracts/timeLock.ts
anonymous2.8y
https://gist.github.com/xhliu/13d517aef0dc4f49f1e8f2b5a6c630e3#file-pgp-ts
anonymous2.8y
https://github.com/pow-co/pow.co/blob/timelock/src/contracts/eventTicket.ts
anonymous2.8y
i suppose the output check will fail and you won’t be able to recover the sats locked into the contract?
anonymous2.8y
I just watched yesterday’s meeting, love the timelock contract! But what happens if I add more sats to the contract after it’s deployed?
anonymous2.8y
Today at 18:30 in https://pow.co/meet/scrypt I will be walking through code updates in the api to support generic scrypt contracts. The git branch is here: https://github.com/pow-co/boostpow-api/tree/generic-scrypt That branch is also currently deployed to https://scrypt.pow.co/api for initial fun testing.
anonymous2.8y
Yes that's correct, you can't add more sats to the contract. It's simply a locking script that can only be unlocked after a certain time.
anonymous2.8y
However you can deploy another one with the same time matureTime and more satoshis
anonymous2.8y
Here is the link to today's recording: https://api-vo.jitsi.net/jaas-recordings/eu-central-1/vpaas-magic-cookie-30f799d005ea4007aaa7afbf1a14cdcf/zxmiewuvifxcoacn
anonymous2.8y
https://github.com/pow-co/boostpow-api/blob/generic-scrypt/src/models/smart_contract_instance.js
anonymous2.8y
https://github.com/pow-co/pow.co/blob/timelock/src/contracts/timeLock.ts
anonymous2.8y
https://github.com/pow-co/pow.co/blob/timelock/artifacts/src/contracts/calendarEvent.json
anonymous2.8y
https://github.com/pow-co/pow.co/blob/timelock/artifacts/src/contracts/calendarEvent.json
anonymous2.8y
Fun and cool. Thanks for hosting!
anonymous2.8y
https://github.com/pow-co/pow.co/blob/timelock/artifacts/src/contracts/calendarEvent.json
anonymous2.8y
https://github.com/pow-co/pow.co/blob/timelock/artifacts/src/contracts/calendarEvent.json
anonymous2.8y
https://github.com/pow-co/pow.co/blob/timelock/artifacts/src/contracts/calendarEvent.json
anonymous2.8y
https://github.com/pow-co/pow.co/blob/timelock/artifacts/src/contracts/calendarEvent.json
anonymous2.8y
https://api-vo.jitsi.net/jaas-recordings/eu-central-1/vpaas-magic-cookie-30f799d005ea4007aaa7afbf1a14cdcf/azsmjnkiqovdqiwc
anonymous2.8y
Here is the download link for today's recording of the sCrypt Monday Meeting, July 31, 2023 at 18:30 UTC: https://api-vo.jitsi.net/jaas-recordings/eu-west-2/vpaas-magic-cookie-30f799d005ea4007aaa7afbf1a14cdcf/mcyaoqhlzrlvukus
anonymous2.8y
https://github.com/owenkellogg/latest-scrypt/blob/master/deploy_sellable.ts
anonymous2.7y
https://api-vo.jitsi.net/jaas-recordings/us-west-2/vpaas-magic-cookie-30f799d005ea4007aaa7afbf1a14cdcf/mowujzhwpuclvsnu
anonymous2.7y
A New Recording Was Started At https://pow.co/meet/scrypt
anonymous2.7y
Hey guys!
anonymous2.7y
https://api-vo.jitsi.net/jaas-recordings/eu-central-1/vpaas-magic-cookie-30f799d005ea4007aaa7afbf1a14cdcf/yxuhnfhidnipdnrn
anonymous2.7y
https://pow.co/scrypt/erc721
anonymous2.7y
A New Recording Was Uploaded: https://objectstorage.eu-frankfurt-1.oraclecloud.com/p/EZa1JoouqfsCRSIquXgIWywM1lzvpZw1g7Jg3LTIlVH3_8rOy3KwWOfbT20OXb_u/n/fr4eeztjonbe/b/vpaas-recordings-prod-8x8-eu-frankfurt-1/o/vpaas-magic-cookie-30f799d005ea4007aaa7afbf1a14cdcf/yxuhnfhidnipdnrn/scrypt_2023-08-21-18-30-39.mp4
anonymous2.7y
The Recording In This Meeting Room Has Ended
anonymous2.7y
where can i find the latest devIssue smart contract (with the `comment` method? Can't find it @ https://github.com/pow-co/smart-contracts
anonymous2.7y
``` @method() public addComment(comment: ByteString, commenter: PubKey, sig: Sig) { assert( this.checkSig(sig, commenter), `checkSig failed, pubkey: ${commenter}`, ); let outputs: ByteString = this.buildStateOutput(this.ctx.utxo.value); if (this.changeAmount > 0n) { outputs += this.buildChangeOutput(); } assert(this.ctx.hashOutputs === hash256(outputs), 'state not preserved'); } ``` ``` await args.issue.connect(args.signer) const { tx } = await args.issue.methods.addComment( toByteString(args.comment, true), PubKey(signingPubkey.toString()), (sigResponses: any) => findSig(sigResponses, signingPubkey), ); ```
anonymous2.7y
Or more verbosely to understand what is going on behind the scenes you can explicitly bind a method call builder: ``` export async function addComment(args: { issue: Issue, comment: string, signer: Signer }): Promise<[Issue, bsv.Transaction]> { console.log('addComment', args.issue, args.comment, args.signer) const signingPubkey = await args.signer.getDefaultPubKey(); args.issue.bindTxBuilder('addComment', ( current: Issue, options: MethodCallOptions<Issue>, ): Promise<ContractTransaction> => { const nextInstance = current.next(); const tx = new bsv.Transaction(); tx.addInput(current.buildContractInput(options.fromUTXO)).addOutput( new bsv.Transaction.Output({ script: nextInstance.lockingScript, satoshis: current.balance, }), ); tx.change(signingPubkey.toAddress()); return Promise.resolve({ tx, atInputIndex: 0, nexts: [ { instance: nextInstance, balance: current.balance, atOutputIndex: 0, }, ], }); }); await args.issue.connect(args.signer) const { tx } = await args.issue.methods.addComment( toByteString(args.comment, true), PubKey(signingPubkey.toString()), (sigResponses: any) => findSig(sigResponses, signingPubkey), ); const newIssue = Issue.fromTx(tx, 0); return [newIssue, tx]; } ```
anonymous2.7y
Thanks, exactly what I needed 🙏
anonymous2.7y
PubKey is not an xpub
anonymous2.7y
In order to authenticate with socials there needs to be an "oracle"
anonymous2.7y
Here is my proposal for an onchain profile smart contract: https://github.com/GuiDeMa/smart-contracts/blob/profile/src/contracts/profile.ts
anonymous2.7y
Otherwise you can allow users to self-report their social media account but there will be no oauth verification unless they authenticate with some oauth app (powco app?) and then that app updates their smart contract.
anonymous2.7y
Any profile contract should have a generic @prop settings: HashedMap<ByteString, ByteString> so that we can add and remove settings without having to know all the keys up front.
anonymous2.7y
`settings` would replace `socials` and `links` ?
anonymous2.7y
my answer to the oracle problem : https://pow.co/a4cf1453ab7515796264844a5b53f315fbbaca12680317c4ec53ba1a4245e35f
anonymous2.7y
The contract should have a generic @prop settings: HashedMap<ByteString, ByteString> so that we don't have to know all of the possible keys, making the contract forwards compatible without the need to release a new version.
anonymous2.7y
Perhaps it's fine that people could falsely claim a social media account as their own? Or should there be some third party oracle verification?
anonymous2.7y
Also I think it's good practice to use the PubKey prop "owner" (rather than xpub) so that we can easily index contracts that you own.
anonymous2.7y
definitely, adding now.
anonymous2.7y
what if my setting is a boolean? is there a generic scrypt type? The doc mentions `SupportedParamType` but it is not working
anonymous2.7y
No
anonymous2.7y
ok, `HashedMap<ByteString, ByteString>` it is, then
anonymous2.7y
You can use "true", "false", "1", "0" otherwise you would have to create a separate @prop booleanSettings: HashedMap<ByteString, boolean>
anonymous2.7y
emojis needed!
anonymous2.7y
And / or reactions
anonymous2.7y
:+1:
anonymous2.7y
:thumbsup:
anonymous2.7y
what would be the best way to embed location information in the onchain profile contract? Latitude/ Longitude ? ZIP Code ? Country / City ?
anonymous2.7y
im leaning towards Lat / Long
anonymous2.7y
lat, lng for sure that's part of the iCal standard
anonymous2.7y
A New Recording Was Started At https://pow.co/meet/scrypt
anonymous2.7y
A New Recording Was Uploaded: https://objectstorage.uk-london-1.oraclecloud.com/p/ew4rkrGWQC0z7DUgtRkRtx2PrezrM7yfVnJX341fIdhUZsGAxQNJDZekRASTgPSo/n/fr4eeztjonbe/b/vpaas-recordings-prod-8x8-uk-london-1/o/vpaas-magic-cookie-30f799d005ea4007aaa7afbf1a14cdcf/bbbjsiepgzhrqvnt/scrypt_2023-08-28-18-30-03.mp4
anonymous2.7y
Looks like scrypt implemented my idea to auto-bind custom method tx builders! (from discord) xiaohui_bitcoin — Today at 20:48 buildTxForX is now bound to method X, as calling tx builder. U no longer have to explicitly bind it using bindTxBuilder https://docs.scrypt.io/how-to-deploy-and-call-a-contract/how-to-customize-a-contract-tx#customize-1
anonymous2.7y
The Recording In This Meeting Room Has Ended
anonymous2.7y
Thanks @gwen.ives :D
anonymous2.7y
Also it occured to me that I have not implemented any transfer, list, buy, burn method for this profile contract. I kinda recall that these methods should be a standard for every contracts. Maybe we could extend the SmarContract class to have these methods by default?
anonymous2.7y
I am rethinking the onchain profile contract using only one settings HashedMap. Comes a question: by looking at the `meetings` contract I see some methods to perform a lookup on HashedSets (specifically `isAttending`, `isInvited`, `isOrganizer`). What is the purpose of those methods? Should I implement the same kind of methods for the settings HashedMap?
anonymous2.7y
well done!
anonymous2.7y
I'm not surprised you must be the 1st engineer outside scrypt to have doven so deep in Bitcoin Smart Contracts 🦚
anonymous2.7y
Those methods isAttending, isInvited, isOrganizer are not on-chain methods they are just typescript methods attached to that class for convenience of the client.
anonymous2.7y
Of all of those methods I think "burn" would be the most important to implement, that way you can recover your sats.
anonymous2.7y
Meaning if you want to bring your web2 identity on Bitcoin you gotta do it in a web2 way
anonymous2.7y
Ok yesterday our discussion made me think more about social profile auth. If data cannot be 100% verified onchain (needs an oracle) then it should not be onchain.
anonymous2.7y
A New Recording Was Uploaded: https://objectstorage.us-ashburn-1.oraclecloud.com/p/M3Mt_vEY6zCH9OtF_xvjXmZ6dnMLP6juZFJ-cloB0T4b-c8DQ7KQaiudbk_YZP6Y/n/fr4eeztjonbe/b/vpaas-recordings-prod-8x8-us-ashburn-1/o/vpaas-magic-cookie-30f799d005ea4007aaa7afbf1a14cdcf/wyjexqnpxacszwzv/scrypt_2023-08-30-18-39-08.mp4
anonymous2.7y
https://chat.openai.com/c/56f8e552-6d08-4d14-8eba-25bde6ff460c
anonymous2.7y
The Recording In This Meeting Room Has Ended
anonymous2.7y
https://pow.co/api/v1/boost/rankings/meetings
anonymous2.7y
A New Recording Was Started At https://pow.co/meet/scrypt
anonymous2.7y
¡Buenos días! ¡Qué agradable sorpresa escuchar este encuentro en español! Estoy feliz de haber podido entender la mayor parte después de tantos años sin practicar.
anonymous2.7y
Shower thought of today: as people find value in ordinals' "first is first" principle, I think people could find value in being the nth person to mint a particular contract (I have the onchain profile in mind specifically but this applies to other contracts I'm sure). The question is: can a contract track the total number of its instances being minted and what's its index?
anonymous2.7y
``` type OwnerMap = HashedMap<bigint, PubKey> // tokenIndex, OwnerPubKey type PriceMap = HashedMap<bigint, bigint> // tokenIndex, tokenPrice // more code @method() public buy(tokenId: bigint, buyer: PubKey, buyerSig: Sig) { // if token price = 0, item is not for sale assert(this.prices.get(tokenId) > 0, 'Item is not listed for sale') // require the buyer to provide a signature before buying assert(this.checkSig(buyerSig, buyer), 'minter signature check failed') const seller = this.owners.get(tokenId) const price = this.prices.get(tokenId) // assign ownership to buyer this.owners.set(tokenId, buyer) // unlist bought token this.prices.set(tokenId, 0n) // ensure seller receives the asking price let outputs: ByteString = this.buildStateOutput(this.ctx.utxo.value) outputs += Utils.buildPublicKeyHashOutput(hash160(seller), price) if (this.changeAmount > 0n) { outputs += this.buildChangeOutput() } // validate hashOutputs assert( this.ctx.hashOutputs == hash256(outputs), 'hashOutputs check failed' ) } // more code ``` it appears I cannot `get` the value of a HashedMap within the public method. Any workaround?
anonymous2.7y
With the default scrypt provider rate this single segment cost 218909 sats: https://whatsonchain.com/tx/4edc47eddacdd51783ba048ae603d5f18e393ae031ba9d0b0d45cf5e4a5c281d
anonymous2.7y
Let's unfold the process that just took place to upload that entire 492mb file to the blockchain in a series of 130 transactions: - deploy Video contract: c18e5a9ef12a4cc613ae6bcafa070ff22c949c965cae3b7919145f648f2e731b - video stream opened: 58983c9704e68ef8e2ef511c55068802e52ea877c925d11d07a95168401cbdba - first 10sec video segment: 3908358f7db7470ba080baf837b4fff72e0203334e6cac4c5dd6610b5ccbeb9d - 127th video segment added: 3bff4c2d491752a4c46fe4354e8ed63005a7572509a384f531e72eae6bb6d518 - video stream closed: d718b0b59e065707fdf5b6e40ffe5d6b860dbd4fb402766878d8a31aa7ebee2e Given this final txid d718b0b59e065707fdf5b6e40ffe5d6b860dbd4fb402766878d8a31aa7ebee2e the video inscription contract is complete and supported video players may stream the video from the blockchain.
anonymous2.7y
A recent 21 minute video from the powco channel was split into 127 segments each of size approximately 3.8 megabytes, destined to be inscribed into bitcoin transaction _inputs_.
anonymous2.7y
Each new video segment transaction spends the output from the previous segment's inscription in an unbroken chain of signed inscriptions one after the other until the video is complete.
anonymous2.7y
For those considering inscribing 24 hour live streams there are 8640 ten second segments to inscribe each day, with the cost of each segment determined by the audio and video encoding quality. Those on a lower budget may elect to compress their video files during encoding for inscription, and therefore will pay correspondingly fewer satoshis per segment.
anonymous2.7y
A relatively low-resolution audio feed can be inscribed 24/7 with a rather low per-day cost.
anonymous2.7y
# sCrypt Monday Meeting Here is the download link for today’s recording of the POWCO Daily Meeting, Monday, September 4, 2023 at 18:30 UTC: https://api-vo.jitsi.net/jaas-recordings/eu-west-2/vpaas-magic-cookie-30f799d005ea4007aaa7afbf1a14cdcf/csgymagkhrjetryn
anonymous2.7y
# sCrypt Monday Meeting Here is the download link for today’s recording of the POWCO Daily Meeting, Monday, September 4, 2023 at 18:30 UTC: https://api-vo.jitsi.net/jaas-recordings/eu-west-2/vpaas-magic-cookie-30f799d005ea4007aaa7afbf1a14cdcf/csgymagkhrjetryn
anonymous2.7y
is it possible to download an hls video/audio into .mp4/.mp3 ? sometimes people would want that. Maybe put a pricing on the download?