Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gtsc/attestation-rest-client

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gtsc/attestation-rest-client - npm Package Compare versions

Comparing version 0.0.3-next.1 to 0.0.3-next.2

docs/reference/globals.md

18

docs/overview.md

@@ -1,3 +0,7 @@

# @gtsc/attestation-rest-client - Overview
[**@gtsc/attestation-rest-client**](attestation-rest-client/overview.md) • **Docs**
***
# GTSC Attestation REST Client
Attestation contract implementation which can connect to REST endpoints.

@@ -10,1 +14,13 @@

```
## Examples
Usage of the APIs is shown in the examples [docs/examples.md](docs/examples.md)
## Reference
Detailed reference documentation for the API can be found in [docs/reference/modules.md](docs/reference/modules.md)
## Changelog
The changes between each version can be found in [docs/changelog.md](docs/changelog.md)

105

docs/reference/classes/AttestationClient.md

@@ -0,1 +1,5 @@

[**@gtsc/attestation-rest-client**](../overview.md) • **Docs**
***
# Class: AttestationClient

@@ -5,8 +9,6 @@

## Hierarchy
## Extends
- `BaseRestClient`
↳ **`AttestationClient`**
## Implements

@@ -18,5 +20,5 @@

### constructor
### new AttestationClient()
• **new AttestationClient**(`config`): [`AttestationClient`](AttestationClient.md)
> **new AttestationClient**(`config`): [`AttestationClient`](AttestationClient.md)

@@ -27,6 +29,6 @@ Create a new instance of AttestationClient.

| Name | Type | Description |
| :------ | :------ | :------ |
| `config` | `IBaseRestClientConfig` | The configuration for the client. |
• **config**: `IBaseRestClientConfig`
The configuration for the client.
#### Returns

@@ -38,9 +40,9 @@

BaseRestClient.constructor
`BaseRestClient.constructor`
## Methods
### fetch
### fetch()
▸ **fetch**\<`T`, `U`\>(`requestContext`, `route`, `method`, `request?`): `Promise`\<`U`\>
> **fetch**\<`T`, `U`\>(`requestContext`, `route`, `method`, `request`?): `Promise`\<`U`\>

@@ -51,16 +53,24 @@ Perform a request in json format.

| Name | Type |
| :------ | :------ |
| `T` | extends `IHttpRequest`\<`unknown`\> |
| `U` | extends `IHttpResponse`\<`unknown`\> |
• **T** *extends* `IHttpRequest`\<`unknown`\>
• **U** *extends* `IHttpResponse`\<`unknown`\>
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `requestContext` | `IRequestContext` | The context for the request. |
| `route` | `string` | The route of the request. |
| `method` | `HttpMethods` | The http method. |
| `request?` | `T` | Request to send to the endpoint. |
• **requestContext**: `IRequestContext`
The context for the request.
• **route**: `string`
The route of the request.
• **method**: `HttpMethods`
The http method.
• **request?**: `T`
Request to send to the endpoint.
#### Returns

@@ -74,9 +84,9 @@

BaseRestClient.fetch
`BaseRestClient.fetch`
___
***
### getEndpointWithPrefix
### getEndpointWithPrefix()
▸ **getEndpointWithPrefix**(): `string`
> **getEndpointWithPrefix**(): `string`

@@ -93,9 +103,9 @@ Get the endpoint with the prefix for the namespace.

BaseRestClient.getEndpointWithPrefix
`BaseRestClient.getEndpointWithPrefix`
___
***
### sign
### sign()
▸ **sign**(`requestContext`, `data`): `Promise`\<`IDidProof`\>
> **sign**(`requestContext`, `data`): `Promise`\<`IDidProof`\>

@@ -106,7 +116,10 @@ Sign the data and return the proof.

| Name | Type | Description |
| :------ | :------ | :------ |
| `requestContext` | `IRequestContext` | The context for the request. |
| `data` | `unknown` | The data to sign. |
• **requestContext**: `IRequestContext`
The context for the request.
• **data**: `unknown`
The data to sign.
#### Returns

@@ -120,9 +133,9 @@

IAttestation.sign
`IAttestation.sign`
___
***
### verify
### verify()
▸ **verify**(`requestContext`, `data`, `proof`): `Promise`\<`boolean`\>
> **verify**(`requestContext`, `data`, `proof`): `Promise`\<`boolean`\>

@@ -133,8 +146,14 @@ Verify the data against the proof the proof.

| Name | Type | Description |
| :------ | :------ | :------ |
| `requestContext` | `IRequestContext` | The context for the request. |
| `data` | `unknown` | The data to verify. |
| `proof` | `IDidProof` | The proof to verify against. |
• **requestContext**: `IRequestContext`
The context for the request.
• **data**: `unknown`
The data to verify.
• **proof**: `IDidProof`
The proof to verify against.
#### Returns

@@ -148,2 +167,2 @@

IAttestation.verify
`IAttestation.verify`
{
"name": "@gtsc/attestation-rest-client",
"version": "0.0.3-next.1",
"version": "0.0.3-next.2",
"description": "Attestation contract implementation which can connect to REST endpoints",

@@ -18,3 +18,3 @@ "repository": {

"@gtsc/api-models": "next",
"@gtsc/attestation-models": "0.0.3-next.1",
"@gtsc/attestation-models": "0.0.3-next.2",
"@gtsc/core": "next",

@@ -21,0 +21,0 @@ "@gtsc/entity": "next",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc