Skip to content

Instantly share code, notes, and snippets.

@ramontayag
ramontayag / Attachment
Created December 7, 2017 10:19
Attachment
{
nonce: "1488805458327055805",
transaction: {
sender_info: {
address: "678 Mission St",
city: "San Francisco",
country: "US",
first_name: "Aldi",
last_name: "Dobbs",
email: "aldi@dobbs.com",
@ramontayag
ramontayag / keybase.md
Created November 10, 2017 06:00
keybase.md

Keybase proof

I hereby claim:

  • I am ramontayag on github.
  • I am ramontayag (https://keybase.io/ramontayag) on keybase.
  • I have a public key ASA5gMYNcwlVLDUhf0lYaFevh4GzKIvprytB5_vyRVlDDgo

To claim this, I am signing this object:

@ramontayag
ramontayag / 0-notes.md
Last active May 19, 2017 05:50
Stellar TOML for forwarders
  • operational_days: 0 - Sunday, 7 - Saturday
  • operational_hours: business hours (during business days) in UTC
  • what about currencies (since some of these can accept more than one currency?)
@ramontayag
ramontayag / stellar-for-forwarders.md
Last active September 21, 2017 06:45
Stellar for Forwarders (to banks and remittance centers)

We want the federation server to enable remittances to two types of institutions: banks and remittance centers (cash pick-up). Stellar provides a standard way of doing this for banks, but not for cash pick-up centers or institutions that forward the money to some other institution.

The following are similar to federation and compliance with some differences that enable further status updates.

Federation

In the Philippines, we cannot rely on a way to determine if a bank account is correct, if it's open, or if it can be deposited to electronically. Therefore, we have to do reasonable checks (some banks have a fixed bank account number limit) on the federation request:

  • Bank deposits: /federation?type=forward&forward_type=bank_account&swift=BOPBPHMM&acct=2382376 for banks, or
  • Cash pickups: `/fed

JSON shown in here shows what the attachment in the update payload the receiving FI posts to the sending FI about a specific transaction. The fields of the JSON may have these keys:

  • transaction_id: Stellar transaction ID that triggered this. This is how the sending FI knows what transaction the receiving FI is referring to.
  • tx_status
    • describes the status of the transaction
    • possible values:
      • awaiting_payment: waiting for Stellar payment
      • processing: attempting to deposit
      • delay: encountered issues but may be resolved manually, please stand by
  • error: could not deposit
{
"info_status": "ok",
"tx_status": "ok",
"dest_info": "{\"name\": \"Bogart Doe\"}",
"updates_url": "https://receiver.com/remittance_by_nonce/1488805458327055805"
}
{
"sender":"aldi*bankA.com",
"need_info":true,
"tx":"AAABJnsibm9uY2UiOiIxNDg4ODA1NDU4MzI3MDU1ODA1IiwidHJhbnNhY3Rpb24iOnsic2VuZGVyX2luZm8iOnsiYWRkcmVzcyI6IjY3OCBNaXNzaW9uIFN0IiwiY2l0eSI6IlNhbiBGcmFuY2lzY28iLCJjb3VudHJ5IjoiVVMiLCJmaXJzdF9uYW1lIjoiQWxkaSIsImxhc3RfbmFtZSI6IkRvYmJzIn0sInJvdXRlIjoiMSIsIm5vdGUiOiIiLCJleHRyYSI6IiIsInVwZGF0ZV9jYWxsYmFja191cmwiOiJodHRwczovL3NlbmRlci5jb20vdHhuX3VwZGF0ZXMvMTQ4ODgwNTQ1ODMyNzA1NTgwNSJ9LCJvcGVyYXRpb25zIjpudWxsfQAA",
"attachment":"{\"nonce\":\"1488805458327055805\",\"transaction\":{\"sender_info\":{\"address\":\"678 Mission St\",\"city\":\"San Francisco\",\"country\":\"US\",\"first_name\":\"Aldi\",\"last_name\":\"Dobbs\"},\"route\":\"1\",\"note\":\"\",\"extra\":\"\",\"update_callback_url\":\"https://sender.com/txn_updates/1488805458327055805\"},\"operations\":null}"
}
postgres=# \d+ operations
Table "public.operations"
Column | Type | Modifiers | Storage | Stats target | Description
-----------------+-----------------------------+---------------------------------------------------------+----------+--------------+-------------
id | integer | not null default nextval('operations_id_seq'::regclass) | plain | |
external_id | character varying | not null | extended | |
ledger_sequence | integer | not null | plain | |
body | jsonb | not null default '"{}"'::jsonb | extended | |
created_at | timestamp without time zone | not null
GEM
remote: https://rubygems.org/
specs:
actioncable (5.0.0.1)
actionpack (= 5.0.0.1)
nio4r (~> 1.2)
websocket-driver (~> 0.6.1)
actionmailer (5.0.0.1)
actionpack (= 5.0.0.1)
actionview (= 5.0.0.1)
@ramontayag
ramontayag / mono-ph-comments.md
Last active November 22, 2016 01:34
Mono.ph comments

Ok great. First, I’m not a leather expert, so I may say some inaccurate things here.

  1. I don’t know if it’s full grain, but it looks like it’s top grain.
  2. It smelled more like storage/cabinet than leather when I got it. Had to air it overnight with a fan to get a little of the leather smell.
  3. It would be nice to give a guide to caring for the bag, or at least a link to a site. You may optionally sell leather care goods.
  4. The fabric inside seems like it’s not durable (I’ve gotten several of the same comments from others). It may be durable, but it feels like it will tear easily. My wife has a small Nine West leather bag and the fabric inside is dark brown and looks like canvas. That looks and feels nice. I can send a photo if you want.
  5. It’s not as heavy as I thought be would be. Great.
  6. The craftsmanship to me looks good.
  7. Hard to beat the price you offer.