Instantly share code, notes, and snippets.

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 {
View coil.html
<button id="stopDonation">Stop Donation</button>
<script src="https://polyfill.webmonetization.org/polyfill.js"></script>
<script src="https://cdn.coil.com/donate.js"></script>
<script>
var btn = document.getElementById('stopDonation')
btn.style.display = 'none'
var Coil = window.WebMonetizationScripts.donate({
paymentPointer: '$twitter.xrptipbot.com/WietseWind'
})
View check-max-ledger-sync-state.sql
SELECT
COUNT(1) as TxCount,
MIN(LedgerIndex) as MinLedger,
MAX(LedgerIndex) as MaxLedger,
COUNT(DISTINCT LedgerIndex) as LedgersWithTxCount
FROM
xrpledgerdata.fullhistory.transactions
View App.vue
<template>
<div>
Hi, this is {{ appName }}
<hr />
<div v-if="!validatorData.reports">
Loading...
</div>
<div v-else>