This file contains 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
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>; |
This file contains 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
#!/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) |