RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:9:30-18:00
你可能遇到了下面的问题
关闭右侧工具栏

技术支持

swtc-api
  • 作者:井通至尚科技有限
  • 发表时间:2019-04-23 09:57
  • 来源:https://github.com/swtcca
 
 

The SWTC API JavaScript Library


GitHub地址: https://github.com/swtcca/swtc-api
 

Offical Doc 官方

 

Compare with swtc-lib

  1. use rest api instead of web socket
  2. masked unsafe operations (never send out secret)
  3. work together with swtc-transaction for local sign
  4. promise based axios operation
  5. typescript friendly
    vsc
 

usages

vim

 

import

 

	
  1. const API = require("swtc-api")
  2. const Remote = API.Remote
  3. // or
  4. import { Remote } from "swtc-api"
 

transaction operations

 

	
  1. import DATA from "./config"
  2. import { Remote } from "swtc-api"
  3. const remote = new Remote({ server: DATA.server })
  4. const sleep = (time) => new Promise((res) => setTimeout(() => res(), time))
  5.  
  6. async function main() {
  7. let tx: any, result: any, sequence: number
  8. try {
  9. console.log(
  10. `// secure transactions working with swtc-api and swtc-transaction`
  11. )
  12. result = await remote.getAccountBalances(DATA.address, { currency: "SWT" })
  13. sequence = result.sequence
  14. console.log(result.balances)
  15. console.log(`// demo payment transactions`)
  16. tx = remote.buildPaymentTx({
  17. source: DATA.address,
  18. to: DATA.address2,
  19. amount: { value: 0.1, currency: "SWT", issuer: "" }
  20. })
  21. tx.setSequence(sequence)
  22. tx.setSecret(DATA.secret)
  23. tx.sign((error, blob) => {
  24. if (error) {
  25. throw error
  26. } else {
  27. console.log(`signed blob: ${blob}`)
  28. remote
  29. .postBlob({ blob })
  30. .then(console.log)
  31. .catch(console.log)
  32. }
  33. })
  34. await sleep(20000)
  35. result = await remote.getAccountBalances(DATA.address, { currency: "SWT" })
  36. console.log(result.balances)
  37. console.log(`\n// demo offer create transactions`)
  38. console.log(await remote.getAccountOrders(DATA.address))
  39. tx = remote.buildOfferCreateTx({
  40. type: "Sell",
  41. account: DATA.address,
  42. taker_gets: { value: 1, currency: "SWT", issuer: "" },
  43. taker_pays: { value: 0.6, currency: "CNY", issuer: DATA.issuer }
  44. })
  45. tx.setSecret(DATA.secret)
  46. tx.sign((error, blob) => {
  47. if (error) {
  48. throw error
  49. } else {
  50. console.log(`signed blob: ${blob}`)
  51. tx.submitApi()
  52. .then(console.log)
  53. .catch(console.log)
  54. }
  55. })
  56. await sleep(20000)
  57. result = await remote.getAccountOrders(DATA.address)
  58. let order: any = result.orders.sort((x, y) => y.sequence - x.sequence)[0]
  59. console.log(order)
  60. console.log(result.orders)
  61. console.log(`\n// demo offer cancel transactions`)
  62. tx = remote.buildOfferCancelTx({
  63. account: DATA.address,
  64. sequence: order.sequence
  65. })
  66. tx.setSecret(DATA.secret)
  67. tx.sign((error, blob) => {
  68. if (error) {
  69. throw error
  70. } else {
  71. console.log(`signed blob: ${blob}`)
  72. tx.submitApi()
  73. .then(console.log)
  74. .catch(console.log)
  75. }
  76. })
  77. await sleep(20000)
  78. result = await remote.getAccountOrders(DATA.address)
  79. console.log(result.orders)
  80. console.log(`\n// demo relation transactions`)
  81. console.log(
  82. await remote.getAccountBalances(DATA.address, { currency: "CNY" })
  83. )
  84. tx = remote.buildRelationTx({
  85. type: "freeze", // or authorize
  86. target: DATA.address2,
  87. account: DATA.address,
  88. limit: {
  89. value: Math.floor(Math.random() * 10),
  90. currency: "CNY",
  91. issuer: DATA.issuer
  92. }
  93. })
  94. // tx.setSequence(sequence)
  95. tx.setSecret(DATA.secret)
  96. tx.sign((error, blob) => {
  97. if (error) {
  98. throw error
  99. } else {
  100. console.log(`signed blob: ${blob}`)
  101. // remote.postBlob({blob}).then(console.log).catch(console.log)
  102. tx.submitApi()
  103. .then(console.log)
  104. .catch(console.log)
  105. }
  106. })
  107. await sleep(20000)
  108. console.log(
  109. await remote.getAccountBalances(DATA.address, { currency: "CNY" })
  110. )
  111. } catch (error) {
  112. console.log(error)
  113. }
  114. }
  115. main()
  • output
 

	
  1. > ts-node src/index.ts
  2.  
  3. // secure transactions working with swtc-api and swtc-transaction
  4. [ { value: '11039.64', currency: 'SWT', issuer: '', freezed: '15' } ]
  5. // demo payment transactions
  6. signed blob: 120000220000000024000000616140000000000186A06840000000000027107321029110C3744FB57BD1F4824F5B989AE75EB6402B4365B501F6EDCA9BE44A675E157447304502210098013A8A9C52E2E39CF1A13B3D733FD8A6EC857C108F209E99844E1DB668D549022029B8A9BD022B33B8FDD4C5A2A9C8A2793C414A5A7749CB7C159E4F254F37CCC981141359AA928F4D98FDB3D93E8B690C80D37DED11C38314054FADDC8595E2950FA43F673F65C2009F58C7F1
  7. { success: true,
  8. status_code: '0',
  9. engine_result: 'tesSUCCESS',
  10. engine_result_code: 0,
  11. engine_result_message:
  12. 'The transaction was applied. Only final in a validated ledger.',
  13. tx_blob:
  14. '120000220000000024000000616140000000000186A06840000000000027107321029110C3744FB57BD1F4824F5B989AE75EB6402B4365B501F6EDCA9BE44A675E157447304502210098013A8A9C52E2E39CF1A13B3D733FD8A6EC857C108F209E99844E1DB668D549022029B8A9BD022B33B8FDD4C5A2A9C8A2793C414A5A7749CB7C159E4F254F37CCC981141359AA928F4D98FDB3D93E8B690C80D37DED11C38314054FADDC8595E2950FA43F673F65C2009F58C7F1',
  15. tx_json:
  16. { Account: 'jpmKEm2sUevfpFjS7QHdT8Sx7ZGoEXTJAz',
  17. Amount: '100000',
  18. Destination: 'jVnqw7H46sjpgNFzYvYWS4TAp13NKQA1D',
  19. Fee: '10000',
  20. Flags: 0,
  21. Sequence: 97,
  22. SigningPubKey:
  23. '029110C3744FB57BD1F4824F5B989AE75EB6402B4365B501F6EDCA9BE44A675E15',
  24. TransactionType: 'Payment',
  25. TxnSignature:
  26. '304502210098013A8A9C52E2E39CF1A13B3D733FD8A6EC857C108F209E99844E1DB668D549022029B8A9BD022B33B8FDD4C5A2A9C8A2793C414A5A7749CB7C159E4F254F37CCC9',
  27. hash:
  28. '4456E2E4FD3924D13D0B7ACBD2CB348C93B6EE069ACD4C24CAAF3A0311DD88B0' } }
  29. [ { value: '11039.53', currency: 'SWT', issuer: '', freezed: '15' } ]
  30.  
  31. // demo offer create transactions
  32. { success: true, status_code: '0', marker: '', orders: [] }
  33. signed blob: 1200072200080000240000006264D45550F7DCA70000000000000000000000000000434E5900000000007478E561645059399B334448F7544F2EF308ED326540000000000F42406840000000000027107321029110C3744FB57BD1F4824F5B989AE75EB6402B4365B501F6EDCA9BE44A675E1574463044022012602C2C15E49CC5935E88C4065360427980E6EF3A471556934C86C278F2A14702207739717F316C65FF0A48F8D8CB01266C26668ED334420F151891873130634C7D81141359AA928F4D98FDB3D93E8B690C80D37DED11C3
  34. { success: true,
  35. status_code: '0',
  36. engine_result: 'tesSUCCESS',
  37. engine_result_code: 0,
  38. engine_result_message:
  39. 'The transaction was applied. Only final in a validated ledger.',
  40. tx_blob:
  41. '1200072200080000240000006264D45550F7DCA70000000000000000000000000000434E5900000000007478E561645059399B334448F7544F2EF308ED326540000000000F42406840000000000027107321029110C3744FB57BD1F4824F5B989AE75EB6402B4365B501F6EDCA9BE44A675E1574463044022012602C2C15E49CC5935E88C4065360427980E6EF3A471556934C86C278F2A14702207739717F316C65FF0A48F8D8CB01266C26668ED334420F151891873130634C7D81141359AA928F4D98FDB3D93E8B690C80D37DED11C3',
  42. tx_json:
  43. { Account: 'jpmKEm2sUevfpFjS7QHdT8Sx7ZGoEXTJAz',
  44. Fee: '10000',
  45. Flags: 524288,
  46. Sequence: 98,
  47. SigningPubKey:
  48. '029110C3744FB57BD1F4824F5B989AE75EB6402B4365B501F6EDCA9BE44A675E15',
  49. TakerGets: '1000000',
  50. TakerPays:
  51. { currency: 'CNY',
  52. issuer: 'jBciDE8Q3uJjf111VeiUNM775AMKHEbBLS',
  53. value: '0.6' },
  54. TransactionType: 'OfferCreate',
  55. TxnSignature:
  56. '3044022012602C2C15E49CC5935E88C4065360427980E6EF3A471556934C86C278F2A14702207739717F316C65FF0A48F8D8CB01266C26668ED334420F151891873130634C7D',
  57. hash:
  58. '61E2F30D475F451E77E1728112B9F0C813A1160186CA37C31DC8C58374315325' } }
  59. { type: 'sell',
  60. pair: 'SWT/CNY:jBciDE8Q3uJjf111VeiUNM775AMKHEbBLS',
  61. amount: '1.000000',
  62. price: '0.6',
  63. sequence: 98 }
  64. [ { type: 'sell',
  65. pair: 'SWT/CNY:jBciDE8Q3uJjf111VeiUNM775AMKHEbBLS',
  66. amount: '1.000000',
  67. price: '0.6',
  68. sequence: 98 } ]
  69.  
  70. // demo offer cancel transactions
  71. signed blob: 120008220000000024000000632019000000626840000000000027107321029110C3744FB57BD1F4824F5B989AE75EB6402B4365B501F6EDCA9BE44A675E15744730450221009F86EB30F803C627CCA238EDA88191852D6C72C751E395AFF4752D2C3CA9A6DF02203ADD4856D98BB494FD52EE5028CAA3E41B26E2DCC4EAB0D103BDC3BE54F3603381141359AA928F4D98FDB3D93E8B690C80D37DED11C3
  72. { success: true,
  73. status_code: '0',
  74. engine_result: 'tesSUCCESS',
  75. engine_result_code: 0,
  76. engine_result_message:
  77. 'The transaction was applied. Only final in a validated ledger.',
  78. tx_blob:
  79. '120008220000000024000000632019000000626840000000000027107321029110C3744FB57BD1F4824F5B989AE75EB6402B4365B501F6EDCA9BE44A675E15744730450221009F86EB30F803C627CCA238EDA88191852D6C72C751E395AFF4752D2C3CA9A6DF02203ADD4856D98BB494FD52EE5028CAA3E41B26E2DCC4EAB0D103BDC3BE54F3603381141359AA928F4D98FDB3D93E8B690C80D37DED11C3',
  80. tx_json:
  81. { Account: 'jpmKEm2sUevfpFjS7QHdT8Sx7ZGoEXTJAz',
  82. Fee: '10000',
  83. Flags: 0,
  84. OfferSequence: 98,
  85. Sequence: 99,
  86. SigningPubKey:
  87. '029110C3744FB57BD1F4824F5B989AE75EB6402B4365B501F6EDCA9BE44A675E15',
  88. TransactionType: 'OfferCancel',
  89. TxnSignature:
  90. '30450221009F86EB30F803C627CCA238EDA88191852D6C72C751E395AFF4752D2C3CA9A6DF02203ADD4856D98BB494FD52EE5028CAA3E41B26E2DCC4EAB0D103BDC3BE54F36033',
  91. hash:
  92. '9A07E602A75C99C6FABE59F48200622F5EEFDDDBF3E591A2DDBED807E848DE7E' } }
  93. []
  94.  
  95. // demo relation transactions
  96. { success: true,
  97. status_code: '0',
  98. balances:
  99. [ { value: '99.973',
  100. currency: 'CNY',
  101. issuer: 'jBciDE8Q3uJjf111VeiUNM775AMKHEbBLS',
  102. freezed: '1.000000' } ],
  103. sequence: 100 }
  104. signed blob: 12001522000000002400000064202300000003638000000000000000000000000000000000000000434E5900000000007478E561645059399B334448F7544F2EF308ED326840000000000027107321029110C3744FB57BD1F4824F5B989AE75EB6402B4365B501F6EDCA9BE44A675E1574473045022100E3E6458CA2EE060EE67A6CAA205E9007CC2C8313E9717D2A855C6D99DAAF1419022049F7D40D9B9194E7313F9C4C72105058EDD5AD3D9481AF2E1E3F7222634D023381141359AA928F4D98FDB3D93E8B690C80D37DED11C38714054FADDC8595E2950FA43F673F65C2009F58C7F1
  105. { success: true,
  106. status_code: '0',
  107. engine_result: 'tesSUCCESS',
  108. engine_result_code: 0,
  109. engine_result_message:
  110. 'The transaction was applied. Only final in a validated ledger.',
  111. tx_blob:
  112. '12001522000000002400000064202300000003638000000000000000000000000000000000000000434E5900000000007478E561645059399B334448F7544F2EF308ED326840000000000027107321029110C3744FB57BD1F4824F5B989AE75EB6402B4365B501F6EDCA9BE44A675E1574473045022100E3E6458CA2EE060EE67A6CAA205E9007CC2C8313E9717D2A855C6D99DAAF1419022049F7D40D9B9194E7313F9C4C72105058EDD5AD3D9481AF2E1E3F7222634D023381141359AA928F4D98FDB3D93E8B690C80D37DED11C38714054FADDC8595E2950FA43F673F65C2009F58C7F1',
  113. tx_json:
  114. { Account: 'jpmKEm2sUevfpFjS7QHdT8Sx7ZGoEXTJAz',
  115. Fee: '10000',
  116. Flags: 0,
  117. LimitAmount:
  118. { currency: 'CNY',
  119. issuer: 'jBciDE8Q3uJjf111VeiUNM775AMKHEbBLS',
  120. value: '0' },
  121. RelationType: 3,
  122. Sequence: 100,
  123. SigningPubKey:
  124. '029110C3744FB57BD1F4824F5B989AE75EB6402B4365B501F6EDCA9BE44A675E15',
  125. Target: 'jVnqw7H46sjpgNFzYvYWS4TAp13NKQA1D',
  126. TransactionType: 'RelationSet',
  127. TxnSignature:
  128. '3045022100E3E6458CA2EE060EE67A6CAA205E9007CC2C8313E9717D2A855C6D99DAAF1419022049F7D40D9B9194E7313F9C4C72105058EDD5AD3D9481AF2E1E3F7222634D0233',
  129. hash:
  130. '536ACC8E28607869BED026A6A76DF1A259352686BF0A03BE2665730E2FE17C67' } }
  131. { success: true,
  132. status_code: '0',
  133. balances:
  134. [ { value: '99.973',
  135. currency: 'CNY',
  136. issuer: 'jBciDE8Q3uJjf111VeiUNM775AMKHEbBLS',
  137. freezed: '0.000000' } ],
  138. sequence: 101 }
 

function calls

 

	
  1. import DATA from "./config"
  2. import { Remote } from "swtc-api"
  3. const remote = new Remote({ server: DATA.server })
  4.  
  5. async function main() {
  6. try {
  7. console.log(`// query balances and demo param`)
  8. let result: any = await remote.getAccountBalances(DATA.address)
  9. result.balances.forEach((balance) =>
  10. console.log(`${balance.value.padEnd(16)}${balance.currency}`)
  11. )
  12. result = await remote.getAccountBalances(DATA.address, { currency: "CNY" })
  13. console.log(result)
  14.  
  15. console.log(`\n// query transactions and demo paging`)
  16. for (let page = 1; page < 4; page++) {
  17. console.log(`page # ${page}`)
  18. result = await remote.getAccountTransactions(DATA.address, {
  19. results_per_page: 2,
  20. page
  21. })
  22. if ("marker" in result) {
  23. console.log(result.marker)
  24. }
  25. result.transactions.forEach((tx) => console.log(tx.hash))
  26. }
  27. console.log(result)
  28. console.log(`\n// query payments history`)
  29. result = await remote.getAccountPayments(DATA.address, {
  30. results_per_page: 4
  31. })
  32. console.log(result)
  33. console.log(`\n// query active orders`)
  34. result = await remote.getAccountOrders(DATA.address, {
  35. results_per_page: 10
  36. })
  37. console.log(result)
  38. console.log(`\n// query ledger`)
  39. result = await remote.getLedger()
  40. const ledger_index = result.ledger_index
  41. const ledger_hash = result.ledger_hash
  42. console.log(result)
  43. result = await remote.getLedger(ledger_index)
  44. result = await remote.getLedger(parseInt(ledger_index))
  45. result = await remote.getLedger(ledger_hash)
  46. console.log(result)
  47. console.log(`\n// query orderbook`)
  48. result = await remote.getOrderBooks("SWT", `CNY+${DATA.issuer}`, {
  49. results_per_page: 4
  50. })
  51. result = await remote.getOrderBooksBids("SWT", `CNY+${DATA.issuer}`, {
  52. results_per_page: 4
  53. })
  54. result = await remote.getOrderBooksAsks("SWT", `CNY+${DATA.issuer}`, {
  55. results_per_page: 2
  56. })
  57. console.log(result)
  58. console.log(`\n// submit locally signed transactions`)
  59. result = await remote.postBlob({
  60. blob:
  61. "120000220000000024000002326140000000000186A0684000000000002710732102197F1426BCA2F59B6B910F0391E55888B4FE80AF962478493104A33274B1B03A74473045022100F0175B4AFF5B1E348FC46A8C0021FF22B16CF87113C0B6E042174374416B071102203CB8A47A82576B69DB50051DF943C87872BB8F065A2D12B01ACA03890FAC8E548114AF09183A11AA70DA06E115E03B0E5478232740B58314DA976A4DE4827163F062B09050832D8D78025D5A"
  62. })
  63. console.log(result)
  64. } catch (error) {
  65. console.log(error)
  66. }
  67. }
  68. main()
 

output

 

	
  1. > ts-node src/index.ts
  2.  
  3. // query balances and demo param
  4. 11039.64 SWT
  5. 99.973 CNY
  6. { success: true,
  7. status_code: '0',
  8. balances:
  9. [ { value: '99.973',
  10. currency: 'CNY',
  11. issuer: 'jBciDE8Q3uJjf111VeiUNM775AMKHEbBLS',
  12. freezed: '1.000000' } ],
  13. sequence: 97 }
  14.  
  15. // query transactions and demo paging
  16. page # 1
  17. { ledger: 3012038, seq: 0 }
  18. CA751123EF90EEE23E5BF36DB1ABB13221D6C906A188DF0F555C24DD684DB12C
  19. 9167A532DC192C611A65C8E547C26BF641CA9064EA41BDDDB9A8443F577146FA
  20. page # 2
  21. { ledger: 3012034, seq: 0 }
  22. 86272B747430330ECD175F6701266EBDD7C50E3FFD19C7D45FCD170BE90625F5
  23. 4CD5B2B8A4D57EEA673E30280BDF8ED6B8DFCE8FF7C52B8CB69672C6AC5EDA66
  24. page # 3
  25. { ledger: 3011884, seq: 0 }
  26. ECB86F6887B14EDF5C9EEC247280BDE0E901BF59CF56CD007579A4F7E2AFF1FA
  27. A32E97613AF5F54E84DC7BD457AE7FF37F8F1FC7B642B5457D3DE8B3665F9B66
  28. { success: true,
  29. status_code: '0',
  30. marker: { ledger: 3011884, seq: 0 },
  31. transactions:
  32. [ { date: 1555889170,
  33. hash:
  34. 'ECB86F6887B14EDF5C9EEC247280BDE0E901BF59CF56CD007579A4F7E2AFF1FA',
  35. type: 'sent',
  36. fee: '0.01',
  37. result: 'tesSUCCESS',
  38. memos: [],
  39. counterparty: 'jVnqw7H46sjpgNFzYvYWS4TAp13NKQA1D',
  40. amount: [Object],
  41. effects: [] },
  42. { date: 1555887700,
  43. hash:
  44. 'A32E97613AF5F54E84DC7BD457AE7FF37F8F1FC7B642B5457D3DE8B3665F9B66',
  45. type: 'relationset',
  46. fee: '0.01',
  47. result: 'tesSUCCESS',
  48. memos: [],
  49. counterparty: 'jVnqw7H46sjpgNFzYvYWS4TAp13NKQA1D',
  50. relationtype: 'freeze',
  51. isactive: true,
  52. amount: [Object],
  53. effects: [] } ] }
  54.  
  55. // query payments history
  56. { success: true,
  57. status_code: '0',
  58. marker: { ledger: 3012034, seq: 0 },
  59. payments:
  60. [ { date: 1555942830,
  61. hash:
  62. 'CA751123EF90EEE23E5BF36DB1ABB13221D6C906A188DF0F555C24DD684DB12C',
  63. type: 'sent',
  64. fee: '0.01',
  65. result: 'tesSUCCESS',
  66. memos: [],
  67. counterparty: 'jVnqw7H46sjpgNFzYvYWS4TAp13NKQA1D',
  68. amount: [Object],
  69. effects: [] } ] }
  70.  
  71. // query active orders
  72. { success: true, status_code: '0', marker: '', orders: [] }
  73.  
  74. // query ledger
  75. { success: true,
  76. status_code: '0',
  77. ledger_hash:
  78. '6D69CF241F487130690DF71588AA8E30EBEC0DAB4FA0224A5940D6278F4906C9',
  79. ledger_index: 3017885 }
  80. { success: true,
  81. status_code: '0',
  82. accepted: true,
  83. account_hash:
  84. '4994071C2F6DF493F46056F3DEC4A2AF32E43D8C36CD3B33D76B2EE355573810',
  85. close_time: 609262880,
  86. close_time_human: '2019-Apr-22 15:41:20',
  87. close_time_resolution: 10,
  88. closed: true,
  89. hash:
  90. '6D69CF241F487130690DF71588AA8E30EBEC0DAB4FA0224A5940D6278F4906C9',
  91. ledger_hash:
  92. '6D69CF241F487130690DF71588AA8E30EBEC0DAB4FA0224A5940D6278F4906C9',
  93. ledger_index: '3017885',
  94. parent_hash:
  95. 'D354D0B2F3B29AD5DAD239ECAF5986E272A636E55BE9721F34873CC26D1406F2',
  96. seqNum: '3017885',
  97. totalCoins: '600000000000000000',
  98. total_coins: '600000000000000000',
  99. transaction_hash:
  100. '0000000000000000000000000000000000000000000000000000000000000000',
  101. transactions: [] }
  102.  
  103. // query orderbook
  104. { success: true,
  105. status_code: '0',
  106. pair: 'SWT/CNY+jBciDE8Q3uJjf111VeiUNM775AMKHEbBLS',
  107. asks:
  108. [ { price: 0.007,
  109. order_maker: 'jH6L8EzkgwMKWRmLVC4oLchqft4oNqUUj',
  110. sequence: 4,
  111. passive: false,
  112. sell: true,
  113. funded: 3 },
  114. { price: 0.3,
  115. order_maker: 'jH6L8EzkgwMKWRmLVC4oLchqft4oNqUUj',
  116. sequence: 1,
  117. passive: false,
  118. sell: true,
  119. funded: 5 } ] }
  120.  
  121. // submit locally signed transactions
  122. { success: true,
  123. status_code: '0',
  124. engine_result: 'terNO_ACCOUNT',
  125. engine_result_code: -96,
  126. engine_result_message: 'The source account does not exist.',
  127. tx_blob:
  128. '120000220000000024000002326140000000000186A0684000000000002710732102197F1426BCA2F59B6B910F0391E55888B4FE80AF962478493104A33274B1B03A74473045022100F0175B4AFF5B1E348FC46A8C0021FF22B16CF87113C0B6E042174374416B071102203CB8A47A82576B69DB50051DF943C87872BB8F065A2D12B01ACA03890FAC8E548114AF09183A11AA70DA06E115E03B0E5478232740B58314DA976A4DE4827163F062B09050832D8D78025D5A',
  129. tx_json:
  130. { Account: 'jGxW97eCqxfAWvmqSgNkwc2apCejiM89bG',
  131. Amount: '100000',
  132. Destination: 'jLvo6LSKNEYJ4KDwDuM8LU5fuSsQkE4HVW',
  133. Fee: '10000',
  134. Flags: 0,
  135. Sequence: 562,
  136. SigningPubKey:
  137. '02197F1426BCA2F59B6B910F0391E55888B4FE80AF962478493104A33274B1B03A',
  138. TransactionType: 'Payment',
  139. TxnSignature:
  140. '3045022100F0175B4AFF5B1E348FC46A8C0021FF22B16CF87113C0B6E042174374416B071102203CB8A47A82576B69DB50051DF943C87872BB8F065A2D12B01ACA03890FAC8E54',
  141. hash:
  142. '48D94F52CD0D9FD60634DEB5886D27149551235BD6CDA1C752F817C3290C327B' } }