{"id":25703428,"url":"https://github.com/dashpay/explore-dash-sync","last_synced_at":"2026-05-15T00:41:34.616Z","repository":{"id":43839602,"uuid":"418889208","full_name":"dashpay/explore-dash-sync","owner":"dashpay","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-08T03:47:22.000Z","size":989,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-08-09T05:14:51.131Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dashpay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-19T11:11:50.000Z","updated_at":"2024-07-09T15:38:09.000Z","dependencies_parsed_at":"2024-07-09T19:43:26.156Z","dependency_job_id":"40d547e2-c0df-4a24-964f-1d575c48b1be","html_url":"https://github.com/dashpay/explore-dash-sync","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fexplore-dash-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fexplore-dash-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fexplore-dash-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpay%2Fexplore-dash-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dashpay","download_url":"https://codeload.github.com/dashpay/explore-dash-sync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240610857,"owners_count":19828881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-25T05:29:35.147Z","updated_at":"2026-05-15T00:41:34.608Z","avatar_url":"https://github.com/dashpay.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Explore Dash Sync\n\n## Build\n\n### Recommended environments\n\nUbuntu 20.04.3 LTS or higher\n  * Windows Subsystem for Linux\nIntelliJ IDEA Community 2020.3 or higher\n\n### Init\n\n```\ngit clone https://github.com/dashpay/explore-dash-sync.git\ncd explore-dash-sync\n```\n\n### Standalone app\n\n#### Build\n\nGenerate executable [fat JAR](https://github.com/johnrengelman/shadow) `./build/deploy/explore-dash-sync-app.jar`) which\ncan be launched locally\n\n```\n./gradlew buildApp\n```\n\n#### Run\n\n```\njava -jar ./build/deploy/explore-dash-sync-app.jar\n```\n\nThis command will generate `explore.dat` file in the current directory Supported arguments:\n\n- `-upload` - upload data to GC Storage\n- `-dev` - load data from dev servers\n- `-quiet` - quiet mode: no notifications are pushed to Slack\n\n### Google Cloud Function\n\n#### Build\n\nGenerate [fat JAR](https://github.com/johnrengelman/shadow) `./build/deploy/explore-dash-sync-fun.jar` which can be\ndeployed to Google Cloud Platform ([BackgroundFunction](https://cloud.google.com/functions/docs/writing/background))\n\n```\n./gradlew buildFun\n```\n\n#### Deploy function to Google Cloud Platform\n\nBase on [Deploying Cloud Functions](https://cloud.google.com/functions/docs/deploying)\n\n```\n# create pubsub topic\ngcloud pubsub topics create explore-dash-sync-trigger-4\n\n# deploy the function\ngcloud functions deploy explore-dash-sync-4 \\\n --runtime=java17 \\\n --entry-point=org.dash.mobile.explore.sync.Function \\\n --source=build/deploy \\\n --trigger-topic explore-dash-sync-trigger-4 \\\n --allow-unauthenticated --memory=1024MB --timeout=300s\n``` \n\nCan be deployed manually\nfrom https://console.cloud.google.com/functions/list?authuser=0\u0026project=dash-wallet-firebase `CREATE FUNCTION`\n\n#### Trigger function\n\nFunction can be triggered by publishing `explore-dash-sync-trigger-4` PubSub topic\n\n```\ngcloud pubsub topics publish explore-dash-sync-trigger-4\n```\n\nOr for the testnet mode:\n\n```\ngcloud pubsub topics publish explore-dash-sync-trigger-4 --attribute=\"mode=testnet\"\n```\n\n### Generating Protocol Buffer messages (`javalite`)\n\n- src: `./src/main/proto/`\n- dst: `./src/main/java/`\n\n```\n./gradlew generateProto\n```\n\n# Google API credentials (credentials.json) not found.\n\nGoogle Cloud Console -\u003e (dash-explore-sync) -\u003e Credentials -\u003e Download OAuth client\nhttps://console.cloud.google.com/apis/credentials?project=dash-explore-sync\n\nsave file as src/main/resources/credentials.json\n\n# Editing the database\nSuppose new columns need to be added to the explore database.\n1. Use an SQLite DB Browser to edit the `merchant` or `atm` tables in `src/main/resources/explore-empty.db`\n2. Add new columns as necessary\n3. Add code in `MerchantData` or `AtmData` to support those new columns\n4. Depending on the data source, code must be added the `convert` methods\n5. Within `src/main/resources/explore-empty.db` edit the `room_master_table` table value for `identity_hash` must be updated to match that of the schema generated by Room in Dash Wallet\n    ```json\n    {\n      \"formatVersion\": 1,\n      \"database\": {\n      \"version\": 2,\n      \"identityHash\": \"34049b02193e63ef6d5042b150f355e6\",\n      \"entities\": [\n       \n      ]\n    }\n    ```\n   ![](doc/identity-hash.png)\n6. Within `src/main/resources/explore-empty.db`, the User Version must be increased and match the version of `ExploreDatabase`\n    ```kotlin\n    @Database(entities = [\n        Merchant::class,\n        MerchantFTS::class,\n        Atm::class,\n        AtmFTS::class\n    ], version = 2, exportSchema = true)\n    @TypeConverters(RoomConverters::class)\n    abstract class ExploreDatabase : RoomDatabase() {\n    ```\n    ![](doc/user-version.png)\n\nExample of adding new columns to `MerchantData`:\n```kotlin\ndata class MerchantData(\n    // ...\n    var minCardPurchase: Double? = 0.0,\n    var maxCardPurchase: Double? = 0.0,\n    \n    // add new column variables here...\n) {\n    companion object {\n        // Add a ? for each new column in this INSERT_STATEMENT constant  \n        const val INSERT_STATEMENT = \"INSERT INTO merchant values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\"\n        \n        // ...\n        const val MIN_CARD_PURCHASE_COL = 26\n        const val MAX_CARD_PURCHASE_COL = 27\n\n        // add new column number constance here...\n    }\n\n    override fun transferInto(statement: PreparedStatement): PreparedStatement {\n        return statement.apply {\n            // ...\n            setDouble(MIN_CARD_PURCHASE_COL, minCardPurchase ?: 0.0)\n            setDouble(MAX_CARD_PURCHASE_COL, maxCardPurchase ?: 0.0)\n\n            // add new statements here to set the values of the new columns\n        }\n    }\n}\n```\n\n# Database Versions\n\n1. DCG Merchants and ATM's for DashPay (android) \u003c 11.1.2 and Dash Wallet (iOS) \u003c 8.3\n2. Beta version for DashSpend  for DashPay (android) = 11.2.1-2\n3. Production for DashSpend (CTX) for DashPay (android) \u003e= 11.2.2 and Dash Wallet (iOS) \u003e= 8.4 \n4. Production for DashSpend (CTX + PiggyCards)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashpay%2Fexplore-dash-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdashpay%2Fexplore-dash-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashpay%2Fexplore-dash-sync/lists"}