Skip to main content

Code Samples for the Rosetta API Configuration File

Overview

This document contains the code samples for the How to Write a Configuration File for rosetta-cli Testing document.

Code Samples

construction

Sample

{
"construction":{
"offline_url":"http://localhost:8080",
"max_offline_connections":4,
"force_retry":false,
"stale_depth":3,
"broadcast_limit":5,
"ignore_broadcast_failures":false,
"clear_broadcasts":true,
"broadcast_behind_tip":false,
"block_broadcast_limit":false,
"rebroadcast_all":true,
"constructor_dsl_file":"crypto_token.ros",
"status_port":2079,
"results_output_file":"/directory/construction_test_results",
"quiet":false,
"initial_balance_fetch_disabled":false,
"end_conditions":{
"create_account":10,
"transfer":20
}
}
}

end_conditions (construction)

Sample

{
"end_conditions":{
"create_account":10,
"transfer":20
}
}

prefunded_accounts

Sample

{
"prefunded_accounts":[
{
"privkey":"E9873D79C6D87DC0FB6A5778633389_SAMPLE_PRIVATE_KEY_DO_NOT_IMPORT_F4453213303DA61F20BD67FC233AA33262",
"account_identifier":{
"address":"14qViLJfdGaP4EeHnDyJbEGQysnCpwk3gd",
"sub_account":{
"address":"3MzYSqyo8GBMsY8u8F2WEuoVXYuq6hnKzyj",
"metadata":{}
},
"metadata":{}
},
"curve_type":"secp256k1",
"currency":{
"symbol":"BTC",
"decimals":12,
"metadata":{
"Issuer":"Satoshi"
}
}
}
]
}

data

Sample

{
"data":{
"active_reconciliation_concurrency":16,
"inactive_reconciliation_concurrency":4,
"inactive_reconciliation_frequency":250,
"log_block":false,
"log_transactions":false,
"log_balance_changes":false,
"log_reconciliations":false,
"ignore_reconciliation_error":false,
"exempt_accounts":"",
"bootstrap_balances":"",
"historical_balance_disabled":false,
"interesting_accounts":"",
"reconciliation_disabled":false,
"reconciliation_drain_disabled":"",
"inactive_discrepancy_search_disabled":false,
"balance_tracking_disabled":false,
"coin_tracking_disabled":false,
"start_index":"",
"status_port":"",
"results_output_file":"",
"pruning_disabled":"",
"pruning_frequency":"",
"initial_balance_fetch_disabled":false,
"reconciler_active_backlog":"",
"end_conditions":{
"reconciliation_coverage":{
"coverage":0.95,
"from_tip":true,
"tip":true
}
}
}
}

end_conditions (data)

Sample

{
"end_conditions":{
"index":"",
"tip":"",
"duration":"",
"reconciliation_coverage":{
"coverage":0.95,
"from_tip":true,
"tip":true
}
}
}

reconciliation_coverage

Sample

{
"reconciliation_coverage":{
"coverage":0.95,
"from_tip":true,
"tip":true,
"account_count":50
}
}

Was this helpful?