Metadata-Version: 2.1
Name: tucha_test_new_package
Version: 1.0.0
Summary: Test tucha package
Home-page: https://github.com/maloi56/tucha_test_new_package
Author: Tucha
Author-email: beztfake@yandex.ru
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

# Greencryptopay library for Node.js

The Greencryptopay library for Node.js allows you to easily integrate the Greencryptopay payment system into your Node.js projects. This library provides convenient methods for interacting with the Greencryptopay API.

## Installation

You can install this package using npm:

```sh
npm install greencryptopay-nodejs --save
```

## Dependencies 
This package depends on the "node-fetch" library version ^2.6. If it's not already installed, it will be automatically installed when you install this library.

## Standard API
- [Standard API](https://greencryptopay.com/ru/standard)

> **Getting Started:**

```python
from tucha_test_new_package import Api

# Standard API
standard_api = Api.standard()

# Standard API testnet
standard_api = Api.standard(True)

# Sign up
if not merchant_id or not secret_key:
    data = standard_api.merchant('percent', 'https://example.com/callback')
    merchant_id = data['merchant_id']
    secret_key = data['secret_key']

standard_api.set_merchant_id(merchant_id)
standard_api.set_secret_key(secret_key)

```

> **Sign up:**

| Name    | Parameters | Validation | Description |
| :----  | :----  |  :----  |:---- |
| merchant | <ul><li>string feeType</li><li>string callbackUrl</li></ul>| <ul><li>Enum: [percent, fix]</li><li>Max: 200</li></ul> | <ul><li>Fee type</li><li>URL to send notifications about payments</li></ul>  |


> **Operations:**

| Name    | Parameters | Validation | Description |
| :----  | :----  |  :----  |:---- |
| paymentAddress | <ul><li>string currency</li><li>string callbackUrl</li> <li>string orderId</li> <li>string currencyFrom</li> <li>string amountFrom</li></ul> | <ul><li>Enum: [btc]</li><li>Max: 200</li> <li>Max: 50</li> <li>Enum: [usd]</li> <li> вЂ” </li></ul> | <ul><li>Currency</li><li>URL to send notifications about payments</li> <li>Order identifier in your system</li> <li>Currency to convert from</li> <li>Amount to convert</li></ul> |
| withdraw | <ul><li> string currency </li><li> array recipients </li></ul>| <ul><li> Enum: [btc] </li><li> вЂ” </li></ul> | <ul><li> Currency </li><li>Array structure:  [['address' => 'Recipient address', 'amount' => 'Recipient's amount']] </li></ul>  |
| withdrawAll | <ul><li> string currency </li><li> string recipientAddress </li></ul>| <ul><li> Enum: [btc] </li><li> вЂ” </li></ul> | <ul><li> Currency </li><li> Recipient address </li></ul>  |

> **Stats:**

| Name    | Parameters                                                                                                                                                                                                                                                           | Validation | Description |
| :----  |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|  :----  |:---- |
| merchantState | <ul><li> string currency </li></ul>                                                                                                                                                                                                                                  | <ul><li> Enum: [btc] </li></ul> | <ul><li> Currency </li></ul>  |
| merchantPaymentAddress | <ul><li> string currency </li><li> string / none fromTimestamp </li><li> string / none toTimestamp </li><li> int / none limit </li><li> int / none page </li><li>string / none order</li></ul>                                                                       | <ul><li> Enum: [btc] </li><li> Timestamp in UTC </li><li> Timestamp in UTC </li><li> Min:1, Max:200 </li><li>Min:1 </li><li> Enum: [asc, desc] </li></ul> | <ul><li> Currency </li><li> Address creation timestamp in UTC, from (inclusive, ex. "2035-12-31T15:30:59")</li><li>Address creation timestamp in UTC, to (inclusive, ex. "2035-12-31T15:30:59") </li><li> Number of records in the response </li><li> Page number </li><li> Records order ascending or descending </li></ul>  |
| merchantIncomingPayments | <ul><li> string currency </li><li> string / none paymentAddress </li><li> string / none txid </li><li> string / none fromTimestamp </li><li> string / none toTimestamp </li><li> int / none limit </li><li> int / none page </li><li> string / none order </li></ul> | <ul><li> Enum: [btc] </li><li> вЂ” </li><li> вЂ” </li><li> Timestamp in UTC </li><li> Timestamp in UTC </li><li> Min:1, Max:200 </li><li> Min:1 </li><li> Enum: [asc, desc] </li></ul> | <ul><li> Currency </li><li> Show only payments to specific payment address </li><li> Show only payments with specific transaction </li><li> Payment timestamp in UTC, from (inclusive, ex. "2035-12-31T15:30:59") </li><li> Payment timestamp in UTC, to (inclusive, ex. "2035-12-31T15:30:59") </li><li> Number of records in the response </li><li> Page number </li><li> Records order ascending or descending </li></ul>  |
| merchantWithdrawals | <ul><li> string currency </li><li> string / none fromTimestamp </li><li> string / none toTimestamp </li><li> int / none limit </li><li> int / none page </li><li> string / none order </li></ul>                                                                     | <ul><li>Enum: [btc] </li><li> Timestamp in UTC </li><li> Timestamp in UTC </li><li> Min:1, Max:200 </li><li> Min:1 </li><li> Enum: [asc, desc] </li></ul> | <ul><li> Currency</li><li>Withdrawal timestamp in UTC, from (inclusive, ex. "2035-12-31T15:30:59") </li><li> Withdrawal timestamp in UTC, to (inclusive, ex. "2035-12-31T15:30:59") </li><li> Number of records in the response </li><li> Page number </li><li> Records order ascending or descending </li></ul>  |
| paymentAddressCallbacks  | <ul><li> string currency </li><li> string paymentAddress </li><li> string / none txid </li><li> string / none fromTimestamp </li><li> string / none toTimestamp </li><li> int  / none limit </li><li> int  / none page </li><li> string / none order </li></ul>      | <ul><li>Enum: [btc] </li><li> вЂ” </li><li> вЂ” </li><li> Timestamp in UTC </li><li> Timestamp in UTC </li><li> Min:1, Max:200 </li><li> Min:1 </li><li> Enum: [asc, desc] </li></ul> | <ul><li> Currency </li><li> Payment address </li><li> Show only payment callbacks with specific transaction </li><li> Callback timestamp in UTC, from (inclusive, ex. "2035-12-31T15:30:59") </li><li> Callback timestamp in UTC, to (inclusive, ex. "2035-12-31T15:30:59") </li><li> Number of records in the response </li><li> Page number </li><li> Records order ascending or descending </li></ul>  |
| paymentAddressState | <ul><li> string currency </li><li> string paymentAddress </li></ul>                                                                                                                                                                                                  | <ul><li> Enum: [btc] </li><li> вЂ” </li></ul> | <ul><li> Currency </li><li> Payment address </li></ul>  |

## Transfer API

- [Transfer API](https://greencryptopay.com/ru/transfer)

> **Getting Started:**

```python
from tucha_test_new_package import Api

# Transfer API
transfer_api = Api.transfer()

# Transfer API testnet
transfer_api = Api.transfer(True)

# Sign up
if not merchant_id or not secret_key:
    data = transfer_api.merchant('percent', 'https://example.com/callback')
    merchant_id = data['merchant_id']
    secret_key = data['secret_key']

transfer_api.set_merchant_id(merchant_id)
transfer_api.set_secret_key(secret_key)

```

> **Sign up:**

| Name    | Parameters | Validation | Description |
| :----  | :----  |  :----  |:---- |
| merchant | <ul><li>string feeType</li><li>string callbackUrl</li></ul>| <ul><li>Enum: [percent, fix]</li><li>Max: 200</li></ul> | <ul><li>Fee type</li><li>URL to send notifications about payments</li></ul>  |

> **Operations:**

| Name    | Parameters | Validation | Description |
| :----  | :----  |  :----  |:---- |
| paymentAddress | <ul><li> string currency </li><li> string recipientAddress </li><li> string feeType </li><li> string callbackUrl </li><li> string orderId </li><li> string currencyFrom </li><li> string amountFrom </li></ul>| <ul><li>Enum: [btc] </li><li> вЂ” </li><li>Enum: [percent, fix] </li><li> Max:200 </li><li> Max:50 </li><li> Enum: [usd, rub, try, eur, zar, gbp, uah, aud, brl, pln] </li><li> вЂ” </li></ul> | <ul><li> Currency </li><li> Recipient address </li><li> Fee type </li><li> URL to send notifications about payments </li><li> Order identifier in your system </li><li> Currency to convert from </li><li> Amount to convert </li></ul>  |

> **Stats:**

| Name    | Parameters                                                                                                                                                                                                                                                      | Validation | Description |
| :----  |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|  :----  |:---- |
| paymentAddressState | <ul><li> string currency </li><li> string paymentAddress </li></ul>                                                                                                                                                                                             | <ul><li> Enum: [btc] </li><li> вЂ” </li></ul> | <ul><li> Currency </li><li> Show only payments to specific payment address </li></ul>  |
| paymentAddressPayments  | <ul><li> string currency </li><li> string paymentAddress </li><li> string / none txid </li><li> string / none fromTimestamp </li><li> string / none toTimestamp </li><li> int  / none limit </li><li> int  / none page </li><li> string / none order </li></ul> | <ul><li> Enum: [btc]  </li><li> вЂ” </li><li> вЂ” </li><li> Timestamp in UTC </li><li> Timestamp in UTC </li><li> Min:1, Max:200 </li><li> Min:1 </li><li> Enum: [asc, desc] </li></ul> | <ul><li> Currency </li><li> Payment address </li><li> Show only specific transaction payments </li><li> Payment timestamp in UTC, from (inclusive, ex. "2035-12-31T15:30:59") </li><li> Payment timestamp in UTC, to (inclusive, ex. "2035-12-31T15:30:59") </li><li> Number of records in the response </li><li> Page number </li><li> Records order ascending or descending </li></ul>  |
| paymentAddressCallbacks  | <ul><li> string currency </li><li> string paymentAddress </li><li> string / none txid </li><li> string / none fromTimestamp </li><li> string / none toTimestamp </li><li> int  / none limit </li><li> int  / none page </li><li> string / none order </li></ul> | <ul><li>Enum: [btc] </li><li> вЂ” </li><li> вЂ” </li><li> Timestamp in UTC </li><li> Timestamp in UTC </li><li> Min:1, Max:200 </li><li> Min:1 </li><li> Enum: [asc, desc] </li></ul> | <ul><li> Currency </li><li> Payment address </li><li> Show only payment callbacks with specific transaction </li><li> Payment timestamp in UTC, from (inclusive, ex. "2035-12-31T15:30:59") </li><li> Payment timestamp in UTC, to (inclusive, ex. "2035-12-31T15:30:59") </li><li> Number of records in the response </li><li> Page number </li><li> Records order ascending or descending </li></ul>  |
| merchantState | <ul><li> string currency </li></ul>                                                                                                                                                                                                                             | <ul><li> Enum: [btc] </li></ul> | <ul><li> Currency </li></ul>  |
| merchantPaymentAddress | <ul><li> string currency </li><li> string / none fromTimestamp </li><li> string / none toTimestamp </li><li> int / none limit </li><li> int / none page </li><li>string / none order</li></ul>                                                                  | <ul><li> Enum: [btc] </li><li> Timestamp in UTC </li><li> Timestamp in UTC </li><li> Min:1, Max:200 </li><li>Min:1 </li><li> Enum: [asc, desc] </li></ul> | <ul><li> Currency </li><li> Address creation timestamp in UTC, from (inclusive, ex. "2035-12-31T15:30:59")</li><li>Address creation timestamp in UTC, to (inclusive, ex. "2035-12-31T15:30:59") </li><li> Number of records in the response </li><li> Page number </li><li> Records order ascending or descending </li></ul>  |
| merchantPayments | <ul><li> string currency </li><li> string / none txid  </li><li> string / none fromTimestamp </li><li> string / none toTimestamp </li><li> int  / none limit </li><li> int  / none page </li><li> string / none order </li></ul>                                | <ul><li> Enum: [btc] </li><li> вЂ” </li><li> Timestamp in UTC </li><li> Timestamp in UTC </li><li> Min:1, Max:200 </li><li> Min:1 </li><li> Enum: [asc, desc] </li></ul> | <ul><li> Currency </li><li> Show only specific transaction payments </li><li> Payment timestamp in UTC, from (inclusive, ex. "2035-12-31T15:30:59") </li><li> Payment timestamp in UTC, to (inclusive, ex. "2035-12-31T15:30:59")  </li><li> Number of records in the response  </li><li> Page number  </li><li> Records order ascending or descending </li></ul>  |

