Download the PHP package circularprotocol/circular-enterprise-apis without Composer
On this page you can find all versions of the php package circularprotocol/circular-enterprise-apis. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download circularprotocol/circular-enterprise-apis
More information about circularprotocol/circular-enterprise-apis
Files in circularprotocol/circular-enterprise-apis
Package circular-enterprise-apis
Short Description Official Circular Enterprise APIs
License MIT
Informations about the package circular-enterprise-apis
Circular Enterprise PHP APIs for Data Certification
This repository provides PHP implementations of the Circular Enterprise APIs for data certification and blockchain integration. It includes classes and helper functions to interact with the Circular network, submit certificates, retrieve transactions, and manage accounts.
Features
- Data Certification: Submit data to the blockchain for certification.
- Transaction Retrieval: Fetch transaction details by ID or block range.
- Account Management: Open, update, and close accounts.
- Secure Signing: Sign data using elliptic curve cryptography (secp256k1).
- Network Integration: Connect to different blockchain networks (mainnet, testnet, devnet).
Installation
You can install this library using Composer or by cloning the repository.
Option 1: Install via Composer (Recommended)
-
Run the following command in your project directory:
- Include the Composer autoloader in your PHP script:
Option 2: Clone the Repository
-
Clone the repository:
-
Install dependencies using Composer:
- Include the autoloader in your PHP script:
Usage
1. Opening an Account
To open an account and retrieve account details:
2. Chosing a network and the blockchain:
3. Retrieve account informations
Update account informations such as Nonce:
4. Submitting a Certificate
To submit data for certification:
5. Retrieving a Transaction
To fetch transaction details:
Helper Functions
hexFix(string $hex)
: Removes0x
from hexadecimal strings.stringToHex(string $string)
: Converts a string to its hexadecimal representation.hexToString(string $hex)
: Converts a hexadecimal string back to a regular string.getFormattedTimestamp()
: Returns the current timestamp inYYYY:MM:DD-HH:MM:SS
format.
Example Workflow
- Open an account.
- Set network and blockchain info
- Submit data for certification.
- Retrieve the transaction ID from the response.
- Fetch transaction details using the TxID and the BlockID.
Contributing
Contributions are welcome! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Submit a pull request with a detailed description of your changes.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Support
For questions or issues, please open an issue on the GitHub repository.
This version of the README.md
includes installation via Composer, making it easier for users to integrate the library into their projects. It also provides clear examples and a structured workflow for using the API. Let me know if you need further adjustments!