Currently Anypay is the only real seller of goods on the platform in the form of gift cards. If we wanted other people to be able to sell goods on the platform we could all them to publish product listings from their paymail account. That way they would be able to sell anything they wanted and anyone could list anything on the site. Because the listing is on-chain it incentivizes truthfullness and reputation because postings can never be removed. Therefore it is likely only legal goods and services will ever be sold. From a user standpoint it because super easy to shop and buy because all they have to do is swipe their bitcoin wallet to pay. Merchants get instant certainty, instant payouts, a clear record of purchases that can never be corrupted. Merchants own their data therefore can never be de-platformed from their own data. In this way Anypay can remove itself as the provider of services and become the provider of a platform which grows in value as more and more people make purchases. No one can be banned
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Generates a normally distributed random number with an absolute value. | |
* @returns A positive random number following a standard normal distribution. | |
*/ | |
function boxMullerRandomPositive(): number { | |
let u = 0, v = 0; | |
while (u === 0) u = Math.random(); | |
while (v === 0) v = Math.random(); | |
return Math.abs(Math.sqrt(-2.0 * Math.log(u)) * Math.cos(2.0 * Math.PI * v)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as fs from 'fs'; | |
import * as https from 'https'; | |
import * as base64 from 'base64-js'; | |
import { ArgumentParser } from 'argparse'; | |
interface CLIArgs { | |
dataUri: boolean; | |
output?: string; | |
txId: string; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PersonalInterest extends SmartContract { | |
@prop | |
owner: PubKey; | |
@prop | |
name: ByteString: | |
@prop(true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { BoostPowJob } from 'boostpow' | |
export async function main() { | |
const job = BoostPowJob.fromObject({ | |
content: '7c6ea266f959b03e779114ac0cc05c13f4a7d44745920a765192d82ecb6d31ee', | |
diff: 0.0001, | |
additionalData: Buffer.from(JSON.stringify({ paymail: '[email protected]' }), 'utf8').toString('hex') | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { stream } from 'onchain.sv' | |
const bStream = stream({ | |
app: 'pow.co', | |
type: 'message', | |
attributes: { | |
channel: 'powco-development' | |
} | |
}) | |
.on('B', ({txid, txhex, txo}) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This file defines the IssueNFT class, which is a Jig that represents a github issue. | |
* Each issue should be able to have awards associated with it, either satoshis or RUN tokens or both. | |
* | |
* When an issue is generated a new HD wallet is generated and assigned to that issue in the database | |
* The wallet will be derived from a global HD wallet hierarchy. Each issue then may control an instance | |
* of stag wallet, which gives it the ability to receive and send tokens, and to execute actions on chain. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { wrapRelayx } from 'stag-relayx' | |
async function issueTokens() { | |
const stag = wrapRelayx(window.relayx) | |
const { txid, txhex } = await stag.run.ft.issue({ | |
symbol: 'DEV', | |
name: 'My Personal Developer Token', |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as jeton from 'jeton-lib'; | |
const PrivateKey = jeton.PrivateKey | |
const PublicKey = jeton.PublicKey | |
const Signature = jeton.Signature | |
const OutputScript = jeton.escrow.OutputScript | |
const Transaction = jeton.Transaction | |
var utxo1 = new Transaction.UnspentOutput({ | |
txid: | |
'ab9596efa523e50f2bee749f6ae4cc40cf5bfe6fbf1556e75a4cb994e5700ebd', |
NewerOlder