Skip to content

Instantly share code, notes, and snippets.

View Smephite's full-sized avatar
👾

Kai Berszin Smephite

👾
View GitHub Profile
@Smephite
Smephite / SCVals.md
Last active May 5, 2023 03:39
A Simple Guide to Soroban Types

A Simple Guide to Soroban Types

Note: The following content is a written version of the [XDR spec][xdr-spec]

As of [js-soroban-client v0.1.3][js-client] and [soroban-cli v0.2.1][soroban-tools] it's still really funny to work with custom types required for soroban so I will explain to the best of my knowledge how to build a custom Soroban Type in JSON format (but you should probably ask @tdep...)

Note: many of these types actually have helper functions and can be entered

@Smephite
Smephite / quest9.md
Last active March 9, 2023 02:28
Writeup of Stellar puzzle challenge

Puzzle #9 'The clueless Multisig'

This is a writeup and example implementation for puzzle #9 by https://nebolsin.keybase.pub/puzzles/

Our clue was given in form of the pubkey GBW7N7EXR5MV4A34N7LEQGSKZMFEJGW4SQWHUPXGDX2JCGNJH2RXKHUL

When looking up the accounts state we find an threshold setting of 2/3/4, 2 active signers (and one to clawback). The master key has been removed.

The account also posseses an data entry containing

More puzzles: https://erayd.keybase.pub/puzzles.html. Have fun!

@Smephite
Smephite / claim_shitasset.py
Last active February 12, 2022 05:59
Use this script to claim all sellable tokens offered to you by claimable balances. Now uses ^6.0.0b
from stellar_sdk import Server, Keypair, TransactionBuilder, Network
import stellar_sdk
from stellar_sdk.asset import Asset
from stellar_sdk.operation.create_claimable_balance import ClaimPredicate
from stellar_sdk.operation.path_payment_strict_send import PathPaymentStrictSend
from stellar_sdk.signer import Signer
import datetime, decimal
print(f"Using stellar SDK v{stellar_sdk.__version__}")
<?php
header('Content-Type: text/json');
$user = $_SERVER['PHP_AUTH_USER'];
$ds = ldap_connect("ldap://10.1.1.32") or die(json_encode(["error" => "500"]));
$data = array();
if ($ds) {
$r = ldap_bind($ds);
$sr = ldap_search($ds, "ou=benutzer,ou=suso,ou=schulen,o=ml3", "uid=$user");

Keybase proof

I hereby claim:

  • I am smephite on github.
  • I am smephite (https://keybase.io/smephite) on keybase.
  • I have a public key whose fingerprint is ACA4 E9CC C245 5F30 5ACC DFFB CFAE CB64 D507 8DC0

To claim this, I am signing this object: