TP-Lab / tp-wallet-sdk

TP钱包协议文档
21 stars 7 forks source link

needs examples #1

Closed xemuj closed 5 years ago

xemuj commented 5 years ago

Excelent tool works well with auth, but needs examples with others actions or contracts

Developmc commented 5 years ago

May i know what actions do you need ?

Take "others actions" for example:

  1. For eos.io transfer , the actions is: [{ "account": "eosio.token", "authorization": [{ "actor": "testtesttptp", "permission": "active" }], "data": { "quantity": "1.0000 EOS", "memo": "", "from": "testtesttptp", "to": "clement22222" }, "name": "transfer" }]

  2. if you want to try "delegate cpu or net", the action is : [ { "account": "eosio", "name": "delegatebw", "authorization": [ { "actor": "clement33333", "permission": "active" } ], "data": { "from": "clement33333", "receiver": "clement33333", "stake_cpu_quantity": "0.0001 EOS", "stake_net_quantity": "0.0000 EOS", "transfer": 0 } }]

    If you don’t know how to build action data, have a convenient way : Query transaction on blockchain browser (such as EOSPark: https://eospark.com/), check the "RAW DATA".

屏幕快照 2019-09-05 下午4 34 27

xemuj commented 5 years ago

thanks for this reply

{
    "protocol"      : "TokenPocket",
    "version"       : "v1.0",
    "dappName"      : "LYNX",
    "dappIcon"      : "https://avatars3.githubusercontent.com/u/28061108?s=400&u=121d6f7e7f930ee3f744357d48002645a1198b33&v=4",
    "action"        : "pushTransaction",
    "actionId"      : "",
    "blockchain"    : "eos",
    "actions"       : [{ "account": "eosio.token", "authorization": [{ "actor": "ovallesergio", "permission": "active" }], "data": { "quantity": "0.0001 EOS", "memo": "", "from": "ovallesergio", "to": "mariobaracus" }, "name": "transfer" }],
    "memo"          : ""
}