Instantly share code, notes, and snippets.

Wietse Wind WietseWind

View GitHub Profile
View child.js
let parentId
process.on('message', (msg) => {
if (typeof msg.parentId !== 'undefined') parentId = msg.parentId
console.log(`[CHILD_${parentId}] » Message from parent`, msg)
})
let counter = 0
let interval = setInterval(() => {
View iou-payments.md

DEX

Send EUR to XRP (the other way around) to another account with sell offer)

DEX

{
	"TransactionType": "TrustSet",
	"Account": "rpePPeRpC89vpCY3CDzhzMCs78nPoNnAKm",
	"Fee": "12",
View coil.js
<script src="https://polyfill.webmonetization.org/polyfill.js"></script>
<script src="https://cdn.coil.com/donate.js"></script>
<script>
window.WebMonetizationScripts.donate({
paymentPointer: '$twitter.xrptipbot.com/WietseWind'
})
</script>
View XRPL-IOU.md

IOU

OPTIONAL:

  • TickSize
  • No Freeze
  • No XRP
  1. Set issuer account flag 8, DefaultRipple (so people can send to each other) - When people set trustlines incoming to the issuer) NoRipple may be set, but the issuer needs to ripple TO other users.
View activating_tx.sql
SELECT
Account,
LedgerIndex,
TransactionIndex,
`hash`,
TransactionType,
AmountXRP
FROM xrpledgerdata.fullhistory.transactions
WHERE
TransactionResult = 'tesSUCCESS'
View tx.js
const RippledWsClient = require('rippled-ws-client')
new RippledWsClient('wss://s1.ripple.com').then(Connection => {
console.log('<< Connected >>')
Connection.send({
command: 'submit',
tx_blob: 'AABBCCDDEEFF00112233445566778899...'
}).then(r => {
console.log('Done!', r)
View uuidv4.js
function uuidv4() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
})
}
View finish.js
const RippledWsClient = require('rippled-ws-client')
const RippledWsClientSign = require('rippled-ws-client-sign')
const SeedOrKeypair = 'sXXXXXXXXXXXXXXXXXXXX' // Secret for the Account
const Transaction = {
Account: 'rXXXXXXXXX',
Owner: 'rXXXXXXXXX',
TransactionType: 'EscrowFinish',
Fee: 12,
View Sample.vue
<template>
<div>
<div class="scroller">
<span class="message">{{ message }}&nbsp;</span> <!-- Forced space to reserve height -->
<span class="cursor" v-html="cursor"></span>
</div>
<h4>Messages</h4>
<ul>
<li v-for="m in messages" v-bind:key="m">{{ m }} <button @click="removeMessage(m)" v-if="messages.length > 1">&times;</button></li>
View HelloWorld.vue
<!--
Modify the <script> ... contents with:
(import Component Var Name from ./filename without .vue)
-->
import MyComponent from './MyComponent'
<!-- ... and the beginning of your Vue object: -->
export default {