{"id":26534809,"url":"https://github.com/davidbolet/jpascalcoin","last_synced_at":"2025-03-21T20:20:22.944Z","repository":{"id":26422985,"uuid":"108843546","full_name":"davidbolet/JPascalCoin","owner":"davidbolet","description":"Java library for PascalCoin criptocurrency ","archived":false,"fork":false,"pushed_at":"2022-05-20T20:47:46.000Z","size":778,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-06-30T14:04:57.780Z","etag":null,"topics":["cryptocurrency","encryption","java","java-library","pascalcoin","wallet"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidbolet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-30T11:49:06.000Z","updated_at":"2022-03-28T10:42:32.000Z","dependencies_parsed_at":"2022-09-19T17:01:29.232Z","dependency_job_id":null,"html_url":"https://github.com/davidbolet/JPascalCoin","commit_stats":null,"previous_names":[],"tags_count":7,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbolet%2FJPascalCoin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbolet%2FJPascalCoin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbolet%2FJPascalCoin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbolet%2FJPascalCoin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidbolet","download_url":"https://codeload.github.com/davidbolet/JPascalCoin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244861093,"owners_count":20522550,"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":["cryptocurrency","encryption","java","java-library","pascalcoin","wallet"],"created_at":"2025-03-21T20:20:22.139Z","updated_at":"2025-03-21T20:20:22.932Z","avatar_url":"https://github.com/davidbolet.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JPascalCoin\n\nJPascalCoin is a Java library for PascalCoin. Currently supports JSON-RPC API, key generation/encryption and operation offline signing.\nIt's intended to be used both on Android or Java (java 1.7 is requiered).\nUses both google gson library for json deserialization and retrofit for rest calls. \nFor logging uses java.util.logging, as it works by default on both Android and pure Java.\nJunit tests are included.\n\nLast version (4.0.2)\n * Version 4 is a major revision. Not only includes all rpc changes introduced by protocol v4, but also all basic cryptographic functions have been added, including key generation, offline signing/verifying, encryption/decryption and operation generation.\n\nVersion (3.0.1)\nThis version is aligned with wallet version 3.0.1, plus changes on findaccounts introduced by this author ;)\n* Updated entity Operation as specified on [Pascalcoin repo](https://github.com/PascalCoin/PascalCoin)\n* Created new entities \"MultiOperation\", \"OpSender\", \"OpReceiver\" and \"OpChanger\"\n* Added \"startblock\" as an optional parameter to getaccountoperations \n* Now when there is an error, a RPCApiException is thrown, instead of a raw RuntimeException\n* Added following params to findaccounts:\n\n    new boolean parameter 'listed' (by default false): If true, filters returning only accounts for sale\n\n    new boolean parameter 'exact' (by default true): If false, includes all accounts whose name starts by the value of 'name' parameter. If true returns exact match (as in the actual version)\n\n    new double parameter 'min_balance' (by default -1). If \u003e0, filters accounts with balance greater or equal that its value\n\n    new double parameter 'max_balance' (by default -1). If \u003e0, filters accounts with balance less or equal than its value\n\n\nChanges on version 2.1.9\n* Added new optional parameter logLevel on constructor PascalCoinClientImpl(String server, Short port, Integer log). 0 -\u003e No log (default value) 1-Log json requests 2-More verbose log \n* Fixed bug with payloadEncrypt function, added correct parameters\n* Added some missing error-handling in several methods\n* Changed signature of field 'payload' on Operation class, now it's a string to avoid some issues with Base64 encoding/decoding\n\nChanges on version 2.1.8\n* Fixed bug with buyaccount and signbuyaccount functions\n* Added message trace options to server calls\n* removed ignored params start and max on getAccountsCount funcion\n\nVersion version 1.0.3 was renamed to 2.1.6, in order to keep alignment with PascalCoin Wallet. Previous version was 1.0.2,\nwhich works with wallet 2.1.3. Warning: version 2.1.6 fails with wallet 2.1.3 as new functions have been added. \nHowever, version 1.0.2 still works fine with wallet 2.1.6\n\n## Usage\n\nProject has been uploaded to Maven central Repository\n## Maven    \n```\n\u003cdependency\u003e   \n\t\u003cgroupId\u003ecom.github.davidbolet.jpascalcoin\u003c/groupId\u003e    \n\t\u003cartifactId\u003ejPascalcoin\u003c/artifactId\u003e      \n\t\u003cversion\u003e1.0.2\u003c/version\u003e  \n\u003c/dependency\u003e  \n```\n\n## Gradle\n```\nimplementation 'com.github.davidbolet.jpascalcoin:jPascalcoin:1.0.2'   \n```\n\nCheck junit test for full examples\nYou will need to include your account numbers and public keys (default key exported by wallet id b58PubKey)    \n\n\n## Example:  Listing Wallet Accounts\n\n```java\nPascalCoinClient client =  new PascalCoinClientImpl(\"127.0.0.1\",PascalCoinConstants.DEFAULT_MAINNET_RPC_PORT);\n//use either \u003cEncoded Public Key\u003e, \u003cB58 Public Key\u003e\nList\u003cAccount\u003e accounts = client.getWalletAccounts(\"\u003cEncoded Public Key\u003e\", \"\u003cB58 Public Key\u003e\", 0, 100);\n```\n## Full Example show Account's balance:\n```java \nimport java.io.IOException;\nimport com.github.davidbolet.jpascalcoin.api.client.*;\nimport com.github.davidbolet.jpascalcoin.api.model.Account;\n\npublic final class Example1\n{\n    public static void main(final String... args)\n        throws IOException\n    {\n        PascalCoinClient client = new PascalCoinClientImpl();\n        Account account = client.getAccount(0);\n        System.out.println(String.format(\"Account's balance: %.4f PASC\"+account.getBalance()));\n    }\n}\n```\n\n## Example: Sending funds\n\nUnlocking wallet and sending funds\n\n```java \nPascalCoinClient client =  new PascalCoinClientImpl(\"127.0.0.1\",PascalCoinConstants.DEFAULT_MAINNET_RPC_PORT);\nclient.unlock(\"wallet_password\");\nOperation op = client.sendTo(accountSender, accountTarget, amount, fee, payload.getBytes(), PayLoadEncryptionMethod.AES, \"password_to_encrypt_payload\"); \n```\n\n# Credits\nDonations apreciated :)\n\nPascalCoin -\u003e Account 381309-50 (you can test sendTo function, if you want :)))\n\nBitCoin -\u003e \n![18zU5odGJqefdwzNmnj9teSJRZS5auEPRg](./bitcoin.png?raw=true \"18zU5odGJqefdwzNmnj9teSJRZS5auEPRg\")\n\n\nDavid Bolet \u003cdavidbolet@gmail.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbolet%2Fjpascalcoin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidbolet%2Fjpascalcoin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbolet%2Fjpascalcoin/lists"}