Skip to content

Commit

Permalink
Merge branch 'main' into feat/update-client-all
Browse files Browse the repository at this point in the history
  • Loading branch information
maratsh authored Dec 17, 2024
2 parents 8f0c0c3 + f59edf4 commit 1726fd9
Showing 1 changed file with 45 additions and 10 deletions.
55 changes: 45 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,32 @@ To learn how to integrate Affinidi TDK and use the different modules into your a
- [Affinidi TDK Libraries](https://docs.affinidi.com/dev-tools/affinidi-tdk/libraries/)
- [Affinidi TDK Packages](https://docs.affinidi.com/dev-tools/affinidi-tdk/packages/)

## Install
## Requirements

- PHP version 7.4 or higher
- [Composer](https://getcomposer.org/download/) package manager

## Installation

### Setting up a New Project

If you're starting a new project, first create a new directory and initialize it:

```bash
mkdir my-affinidi-project
cd my-affinidi-project
composer init
```

Install the Affinidi TDK via Composer:

```bash
composer install affinidi-tdk/affinidi-tdk-php
composer require affinidi-tdk/affinidi-tdk-php
```

## Usage
## Quick Start

Here's a basic example of using the TDK to list wallets:

```php
<?php
Expand All @@ -43,14 +62,16 @@ require_once 'vendor/autoload.php';
use AuthProvider\AuthProvider;
use AffinidiTdk\Clients\WalletsClient;

// Configuration parameters
$params = [
'privateKey' => "",
// 'apiGatewayUrl' => 'https://apse1.api.affinidi.io',
// 'tokenEndpoint' => 'https://apse1.auth.developer.affinidi.io/auth/oauth2/token',
'keyId' => '',
'passphrase' => '',
'projectId' => '',
'tokenId' => ''
'privateKey' => "", // Your private key
'keyId' => '', // Your key ID
'passphrase' => '', // Your passphrase
'projectId' => '', // Your project ID
'tokenId' => '' // Your token ID
// Optional parameters:
// 'apiGatewayUrl' => 'https://apse1.api.affinidi.io',
// 'tokenEndpoint' => 'https://apse1.auth.developer.affinidi.io/auth/oauth2/token',
];

$authProvider = new AuthProvider($params);
Expand Down Expand Up @@ -78,6 +99,20 @@ try {
}
```

## Testing

To run the test suite, use one of the following commands:

```bash
# Run all tests
composer run-script test

# Run tests with debug information
composer run-script test:debug
```

The debug mode provides additional information that can be helpful when troubleshooting failing tests.

## Support & feedback

If you face any issues or have suggestions, please don't hesitate to contact us using [this link](https://share.hsforms.com/1i-4HKZRXSsmENzXtPdIG4g8oa2v).
Expand Down

0 comments on commit 1726fd9

Please sign in to comment.