Skip to content

Instantly share code, notes, and snippets.

{
"sender":"aldi*bankA.com",
"need_info":false,
"tx":"AAABJnsibm9...",
"attachment":"{\"nonce\":\"1488805458327055805\",\"transaction\":{\"sender_info\":{\"address\":\"678 Mission St\",\"city\":\"San Francisco\",\"country\":\"US\",\"first_name\":\"Aldi\",\"last_name\":\"Dobbs\"},\"recipient_info\":{\"address\":\"4 Juan St\",\"city\":\"Manila\",\"country\":\"PH\",\"first_name\":\"Jhun\",\"last_name\":\"Dobbs\"},\"route\":\"unique-tx-code\",\"note\":\"\",\"extra\":\"\"},\"operations\":null}"
}
!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://d3js.org/d3.v4.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
<div id="chart"></div>
@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 / 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
@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?)

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