Commit Graph

5412 Commits

Author SHA1 Message Date
mDuo13
d99b264cff [FEATURE] REST API Tool: query p arams for Get Acct Balances 2014-10-03 09:41:06 -07:00
mDuo13
e6f753aa72 [TASK] REST API Tool - remove redundant test accts warning 2014-10-02 16:08:45 -07:00
mDuo13
b909e200fa [DOC] minor clarification on PreviousTxnID 2014-10-01 14:52:07 -07:00
mDuo13
10fa680688 [DOC] tx_format - alphabetized and clarified AccountTxnID, added Creating Accounts section. 2014-10-01 00:13:41 -07:00
mDuo13
b689061d89 [DOC] tx_format revisions as per pull request #72 2014-09-30 16:37:02 -07:00
Rome Reginelli
8303508670 Merge pull request #71 from mDuo13/gh-pages
Updates to tx_format
2014-09-29 16:27:42 -07:00
mDuo13
c7c7f30845 [DOC] tx_format revisions & related rippled submit/sign tweaks 2014-09-29 16:23:14 -07:00
Rome Reginelli
96164d68e2 Merge pull request #9 from ripple/master
Catching up to master
2014-09-29 11:11:28 -07:00
Rome Reginelli
3abd182ea8 Merge pull request #70 from sublimator/master
merging so credit is given where credit is due; I'll update/edit as necessary
2014-09-29 11:08:11 -07:00
Nicholas Dudfield
a4a9b734f8 Update SetRegularKey section
Change Internal Type to Account

An account is a 160 bit hash of a public key in compressed form (pub |
sha256 | ripemd160). The RegularKey field has the same json
representation as the Account fields, which are likewise hashes.
2014-09-26 18:53:53 +07:00
Nicholas Dudfield
39f4a1cb08 Update Paths section
SendMax implies source balance when no direct trustline to Destination
Paths MUST be set when cross-currency/cross-issue payments are made
Empty Paths may not be serialized (ripple-lib doesn't serialize them,
rippled errors)

Crash script for empty Paths:

```shell

export ALICE='rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn'
export BOB='rPMh7Pi9ct699iZUTWaytJUoHcJ7cgyziK'
export ROOT='rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh'

function close_ledger()
{
    ./build/rippled ledger_accept
}

function submit()
{
    ./build/rippled submit $1 "$2"
}

function json-rpc()
{
    curl -X POST -v http://127.0.0.1:5005 -d "$(cat <<RPC
    {
        "method" : "$1",
        "params"  : [$2]
    }
RPC
)" | python -c 'import sys,json; print
json.dumps(json.loads(sys.stdin.read()), indent=2)'
}

submit masterpassphrase "$(cat <<TXN
    {
        "TransactionType" : "Payment",
        "Account" : "$ROOT",
        "Destination" : "$BOB",
        "Amount" : "1000000000"
    }
TXN
)"

close_ledger

submit bob "$(cat <<TXN
    {
        "TransactionType" : "TrustSet",
        "Account" : "$BOB",
        "LimitAmount" : {"value" : "500", "currency" : "USD", "issuer" :
        "$ROOT"}
    }
TXN
)"

submit masterpassphrase "$(cat <<TXN
    {
        "Account" : "$ROOT"
       ,"TransactionType" : "Payment",
        "Destination" : "$BOB"
       ,"Amount" : {"value" : "1", "currency" : "USD", "issuer" :
       "$ROOT"}
       , "Paths" : []
    }
TXN
)"

    # {
    #    "result" : {

    #       "error" : "internal",
    #       "error_code" : 59,
    #       "error_message" : "Exception occurred during transaction",

    #       "request" : {
    #          "command" : "submit",
    #          "secret" : "masterpassphrase",
    #          "tx_json" : {
    #             "Account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
    #             "Amount" : {
    #                "currency" : "USD",
    #                "issuer" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
    #                "value" : "500"
    #             },
    #             "Destination" : "rPMh7Pi9ct699iZUTWaytJUoHcJ7cgyziK",
    #             "Paths" : [],
    #             "TransactionType" : "Payment"
    #          }
    #       },
    #       "status" : "error"
    #    }
    # }

```
2014-09-26 18:47:00 +07:00
Nicholas Dudfield
7582184ea5 Update Memos section:
Include `Internal Type` in the table
List the `MemoData` and `MemoFormat` fields (TODO: descriptions)
Add example json, as the format is "weird"
Show that the fields are variable length, and the json for this type is
a hex string
Make it clear that the 1 kbyte limit applies to the field as serialized

For further reference:
https://gist.github.com/justmoon/9462822
https://wiki.ripple.com/Example_API_Transactions

TODO:
Check the semantics and/or usage guidelines behind MemoData/MemoType/MemoFormat
2014-09-26 18:15:42 +07:00
Nicholas Dudfield
4e6adb1f34 Clean trailing whitespace 2014-09-26 18:10:46 +07:00
Nicholas Dudfield
71932be386 PreviousTxnID -> AccountTxnID
PreviousTxnID (deprecated) mandates the PreviousTxnID field,
 present in the transaction to match that in the AccountRoot of
the initiating Account. Note that this field is update on EVERY
transaction affecting the account (eg. 1 drop inbound payments)

See: https://wiki.ripple.com/Transaction_Metadata#Threading

Relevant source from Transactor.cpp:211

    // Deprecated: Do not use
    if (mTxn.isFieldPresent (sfPreviousTxnID) &&
            (mTxnAccount->getFieldH256 (sfPreviousTxnID) !=
    mTxn.getFieldH256 (sfPreviousTxnID)))
        return tefWRONG_PRIOR;

    if (mTxn.isFieldPresent (sfAccountTxnID) &&
            (mTxnAccount->getFieldH256 (sfAccountTxnID) !=
            mTxn.getFieldH256 (sfAccountTxnID)))
        return tefWRONG_PRIOR;
2014-09-26 17:58:37 +07:00
Nicholas Dudfield
d79b84ed43 Fix some typos / grammatical errors 2014-09-26 17:51:41 +07:00
Rome Reginelli
1aebd976ea Merge pull request #69 from ripple/gh-pages
Staging to Master for 9/25 push
v2014-09-25
2014-09-25 18:00:07 -07:00
Rome Reginelli
2430809517 Merge pull request #68 from mDuo13/gh-pages
REST API tool improvements
2014-09-25 17:59:10 -07:00
mDuo13
daf5bca353 [FEATURE] REST API Tool breaks out editable components of URL only, move method to a button instead of a dropdown 2014-09-25 17:55:01 -07:00
mDuo13
bd99c824c7 [DOC] REST revisions - intro material and formatting 2014-09-24 18:18:44 -07:00
mDuo13
e0f404ecd7 [FIX] websocket - replaced a missing 2014-09-24 15:38:02 -07:00
Rome Reginelli
202e42b08d Merge pull request #67 from ripple/gh-pages
Preparing for 9/24 patch push
v2014-09-24
2014-09-24 15:32:38 -07:00
Rome Reginelli
f01f9f529e Merge pull request #66 from mDuo13/gh-pages
[FIX] rippled APIs - update transaction format link in sign command
2014-09-24 13:53:20 -07:00
mDuo13
c834cd8c16 [FIX] rippled APIs - update transaction format link in sign command 2014-09-24 13:50:43 -07:00
Rome Reginelli
2f040e0c28 Merge pull request #65 from mDuo13/gh-pages
[FIX] REST tool handle DEV-44 in all cases
2014-09-24 13:43:52 -07:00
mDuo13
937cb2e2bf [FIX] remove outdated comment 2014-09-24 13:36:14 -07:00
mDuo13
37a23d499b [FIX] actually fix DEV-44 in all cases 2014-09-24 13:34:52 -07:00
Rome Reginelli
0388898396 Merge pull request #8 from mDuo13/rest_apitool
[FIX] REST tool - correctly wipe req body on command select per DEV-44
2014-09-24 13:30:54 -07:00
mDuo13
060c5ad755 [FIX] REST tool - correctly wipe req body on command select as per DEV-44 2014-09-24 13:29:17 -07:00
Rome Reginelli
8be084b979 Merge pull request #64 from ripple/gh-pages
REST API tool - remove redundant :443 from URL
v2014-09-23-2
2014-09-23 15:32:33 -07:00
mDuo13
8ae50b6597 [MERGE] Merge branch 'gh-pages' of https://github.com/ripple/ripple-dev-portal into gh-pages 2014-09-23 15:30:54 -07:00
mDuo13
c7986b3e45 [FIX] Rest API Tool - remove redundant :443 2014-09-23 15:30:38 -07:00
Rome Reginelli
a2a660fa32 Merge pull request #63 from ripple/gh-pages
Dev Portal from Staging to Master for 9/23 push
v2014-09-23
2014-09-23 14:52:29 -07:00
Rome Reginelli
05a5440f4f Merge pull request #62 from mDuo13/gh-pages
[FIX] REST API Tool mixpanel tracking name
2014-09-23 13:36:22 -07:00
mDuo13
f3e518b25b [FIX] REST API Tool mixpanel tracking name 2014-09-23 13:35:33 -07:00
Rome Reginelli
746b072803 Merge pull request #61 from mDuo13/gh-pages
[FIX] REST API tool fills in a new client_resource_id each pageload
2014-09-23 13:32:52 -07:00
mDuo13
c67a310fc0 [FIX] REST API tool fills in a new client_resource_id each pageload 2014-09-23 13:31:45 -07:00
Rome Reginelli
affd896fe3 Merge pull request #60 from mDuo13/gh-pages
API tool fixes
2014-09-23 12:57:58 -07:00
mDuo13
3786fa21e0 [TASK] both API tools: add a throbber to indicate request-in-progress 2014-09-23 12:55:20 -07:00
mDuo13
fb47986f3b [FIX] REST api tool: POST methods work now 2014-09-23 12:33:06 -07:00
Rome Reginelli
50af081193 Merge pull request #59 from mDuo13/gh-pages
residual updates for tx_format and rest-api-tool
2014-09-19 17:31:52 -07:00
mDuo13
2f27bab67b [DOC] rest - linked to API tool; also fixed some inconsistencies 2014-09-19 17:30:00 -07:00
mDuo13
73a551702f [DOC] rippled-apis: updated links to transaction format; fixed a dead link to ripple REST 2014-09-19 17:08:29 -07:00
mDuo13
feb3074e8f [DOC] tx_format: added source code links to explain canonical order 2014-09-19 17:02:27 -07:00
Rome Reginelli
f48045856a Merge pull request #58 from ripple/Rest-updates
[DOC] fixes in submit payment documentation
2014-09-19 16:59:41 -07:00
n0rmz
64fdde5d4b [DOC] fixes in submit payment documentation 2014-09-19 16:53:36 -07:00
mDuo13
a6f06c399e [MERGE] tx_format, rest tool 2014-09-19 15:57:11 -07:00
mDuo13
fcabac30da [TASK] tx_format - ready for deploy; adding TX and consensus to footers 2014-09-19 15:47:30 -07:00
mDuo13
aab362a00a Merge branch 'mDuo13-rest_apitool' into gh-pages 2014-09-19 15:23:59 -07:00
mDuo13
9588aa68aa Merge branch 'rest_apitool' of https://github.com/mDuo13/ripple-dev-portal into mDuo13-rest_apitool 2014-09-19 15:23:44 -07:00
mDuo13
f4c222b006 [TASK] split API tool in all headers 2014-09-19 15:21:21 -07:00