Skip to content

Instantly share code, notes, and snippets.

@diegovdev
Forked from stevenzeiler/gatewayd_requirements.md
Last active August 29, 2015 14:26
Show Gist options
  • Select an option

  • Save diegovdev/529f4f0fbafaf8284055 to your computer and use it in GitHub Desktop.

Select an option

Save diegovdev/529f4f0fbafaf8284055 to your computer and use it in GitHub Desktop.

GENERAL REQUIREMENTS

  • sends payments to Ripple REST upon writing to a SQL table
  • verifies payments using Ripple
  • standard error messages for HTTP calls
  • record external_transaction_id of deposit for n ripple transactions
  • ripple_transaction_id of ripple_transaction for n withdrawals
  • query to return n outgoing ripple transactions given a deposit
  • query to return n withdrawals given incoming ripple transaction
  • set flag to prevent trust lines to hot wallet
  • set trust lines from hot wallet to cold wallet

CALLBACKS

  • POST callback when a withdrawal is marked as queued
  • POST callback upon notification of outbound ripple transaction

OUTBOUND RIPPLE TRANSACTIONS

  • successes should be marked as sent
  • tem failures should be marked as failed
  • tel failures should be marked as failed
  • tef failures should be marked as failed
  • tej failures should be marked as failed
  • ter failures should be retried

INBOUND RIPPLE TRANSACTIONS

  • tec failures should be marked as failed
  • tes success should marked as succeeded

NOTIFICATIONS

  • poll ripple rest for outbound payment notitifications of tes transactions
  • tec failures should be marked as failed
  • tec failures should should record the transaction hash
  • tes success should be marked as incoming
  • tes success should record the transaction hash

DEPOSITS STATE MODEL

  • queued
  • processed

WITHDRAWALS STATE MODEL

  • queued
  • notified
  • processed

RIPPLE TRANSACTIONS OUTGOING STATE MODEL

  • outgoing
  • sent
  • failed
  • succeeded

RIPPLE TRANSACTIONS INCOMING STATE MODEL

  • incoming
  • failed
  • succeeded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment