@meeco/svx-api-sdk 1.0.0-develop.20230810153330.3fa2721 → 1.0.0-develop.20230810172652.f61230e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,18 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
## Installation
|
|
4
4
|
|
|
5
|
-
`npm install
|
|
5
|
+
`npm install @meeco/svx-api-sdk`
|
|
6
6
|
|
|
7
7
|
## Usage
|
|
8
8
|
|
|
9
9
|
1. Import the desired model or,
|
|
10
10
|
|
|
11
11
|
```ts
|
|
12
|
-
|
|
12
|
+
import { Configuration, DIDsApi } from '@meeco/svx-api-sdk';
|
|
13
|
+
|
|
14
|
+
async function main() {
|
|
15
|
+
try {
|
|
16
|
+
const token = 'eyJhbGciOiJSUzI1NiI...';
|
|
17
|
+
const orgId = '48519b0e-8..';
|
|
18
|
+
const api = new DIDsApi(
|
|
19
|
+
new Configuration({
|
|
20
|
+
basePath: 'https://api-sandbox.svx.exchange/',
|
|
21
|
+
headers: {
|
|
22
|
+
Authorization: `Bearer ${token}`,
|
|
23
|
+
'Meeco-Organisation-Id': orgId,
|
|
24
|
+
},
|
|
25
|
+
})
|
|
26
|
+
);
|
|
27
|
+
const response = await api.didIdentifierGet(
|
|
28
|
+
'did:web:did-web.securevalue.exchange:62116bdc-7025-4ded-9204-b4f61c36ba7e'
|
|
29
|
+
);
|
|
30
|
+
console.log(response);
|
|
31
|
+
} catch (error) {
|
|
32
|
+
console.error('An error occurred:', error);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
main();
|
|
13
37
|
```
|
|
14
38
|
|
|
15
39
|
alternatively, the entire SDK can be imported as an alias
|
|
16
40
|
|
|
17
41
|
```ts
|
|
18
|
-
import * as SVX from 'svx-api-sdk';
|
|
42
|
+
import * as SVX from '@meeco/svx-api-sdk';
|
|
19
43
|
```
|
package/package.json
CHANGED