Skip to content

Instantly share code, notes, and snippets.

View shelbyd's full-sized avatar

Shelby Doolittle shelbyd

View GitHub Profile
impl Api {
fn list_chains() -> Vec<Chain>;
fn list_tokens(chain: Option<Id<Chain>>) -> Vec<Token>;
fn connect_to_chain(spec: ChainSpec, uri: Uri) -> Result<Chain>;
fn get_entity(chain: Id<Chain>, entity: EntityId) -> Option<Entity>;
fn watch_blocks(chain: Id<Chain>) -> Stream<Block>;
fn get_balance(chain: Id<Chain>, address: Address, token: Option<Token>) -> Balance;
fn create_transfer(chain: Id<Chain>, from: Address, to: Address, amount: Balance) -> Extrinsic<Unsigned>;
#!/usr/bin/env ruby
require "httparty"
BEARER_TOKEN = ENV["TWITTER_BEARER_TOKEN"]
abort "No TWITTER_BEARER_TOKEN in env" if BEARER_TOKEN.nil?
abort "Provide 2 usernames" if ARGV.size != 2
def get_user_by_username(username)