Skip to content

Commit

Permalink
Merge pull request #62 from SocketDotTech/feat/apikey
Browse files Browse the repository at this point in the history
feat : added api key and versioning to apis
  • Loading branch information
dimsome authored Apr 4, 2024
2 parents 16619fd + 75f4202 commit 2accb72
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
8 changes: 6 additions & 2 deletions docs/dev-resources/APIReference/CheckConnection.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ The connection can be verified on-chain by calling the `getPlugConfig()` method
## Off-chain


**`GET`** [https://prod.dlapi.socket.tech/check-connection](https://prod.dlapi.socket.tech/check-connection)
**`GET`** [https://prod.dlapi.socket.tech/v1/check-connection](https://prod.dlapi.socket.tech/check-connection)

**Header**: x-api-key : 2Va1n3HzAS5XfXB8ELhX1aATJwzA1A72sNnJE1a0

| Query Param | Description |
| --- | --- |
Expand All @@ -26,7 +28,9 @@ The connection can be verified on-chain by calling the `getPlugConfig()` method

Verifying a connection between Plugs deployed on Goerli and Mumbai testnet

[https://prod.dlapi.socket.tech/check-connection?slugA=2999&slugB=10&plugA=0x7b9ed5C43E87DAFB03211651d4FA41fEa1Eb9b3D&plugB=0x1812ff6bd726934f18159164e2927B34949B16a8](https://prod.dlapi.socket.tech/check-connection?slugA=2999&slugB=10&plugA=0x7b9ed5C43E87DAFB03211651d4FA41fEa1Eb9b3D&plugB=0x1812ff6bd726934f18159164e2927B34949B16a8)
[https://prod.dlapi.socket.tech/v1/check-connection?slugA=2999&slugB=10&plugA=0x7b9ed5C43E87DAFB03211651d4FA41fEa1Eb9b3D&plugB=0x1812ff6bd726934f18159164e2927B34949B16a8](https://prod.dlapi.socket.tech/check-connection?slugA=2999&slugB=10&plugA=0x7b9ed5C43E87DAFB03211651d4FA41fEa1Eb9b3D&plugB=0x1812ff6bd726934f18159164e2927B34949B16a8)

Note : Add the *x-api-key* header mentioned above in the request for authentication.

#### Response Parameters

Expand Down
9 changes: 7 additions & 2 deletions docs/dev-resources/APIReference/EstimateFee.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ The fees for relaying messages can be calculated on-chain by calling the `getMin
## Off-chain API
**`GET`** [https://prod.dlapi.socket.tech/estimate-min-fees](https://prod.dlapi.socket.tech/estimate-min-fees)
**`GET`** [https://prod.dlapi.socket.tech/v1/estimate-min-fees](https://prod.dlapi.socket.tech/estimate-min-fees)
**Header**: x-api-key : 2Va1n3HzAS5XfXB8ELhX1aATJwzA1A72sNnJE1a0
| Query Param | Description |
| --- | --- |
Expand All @@ -64,7 +67,9 @@ The fees for relaying messages can be calculated on-chain by calling the `getMin
Estimating fees for sending a message from Polygon to Optimism
[https://prod.dlapi.socket.tech/estimate-min-fees?srcPlug=0x7b9ed5C43E87DAFB03211651d4FA41fEa1Eb9b3D&srcChainSlug=2999&dstChainSlug=10&msgGasLimit=100000](https://prod.dlapi.socket.tech/estimate-min-fees?srcPlug=0x7b9ed5C43E87DAFB03211651d4FA41fEa1Eb9b3D&srcChainSlug=2999&dstChainSlug=10&msgGasLimit=100000)
[https://prod.dlapi.socket.tech/v1/estimate-min-fees?srcPlug=0x7b9ed5C43E87DAFB03211651d4FA41fEa1Eb9b3D&srcChainSlug=2999&dstChainSlug=10&msgGasLimit=100000](https://prod.dlapi.socket.tech/estimate-min-fees?srcPlug=0x7b9ed5C43E87DAFB03211651d4FA41fEa1Eb9b3D&srcChainSlug=2999&dstChainSlug=10&msgGasLimit=100000)
Note : Add the *x-api-key* header mentioned above in the request for authentication.
#### Response Parameters
Expand Down
9 changes: 7 additions & 2 deletions docs/dev-resources/APIReference/Track.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ sidebar_position: 3

Tracks the status of a message

**`GET`** [https://prod.dlapi.socket.tech/messages-from-tx](https://prod.dlapi.socket.tech/messages-from-tx)
**`GET`** [https://prod.dlapi.socket.tech/v1/messages-from-tx](https://prod.dlapi.socket.tech/messages-from-tx)

**Header**: x-api-key : 2Va1n3HzAS5XfXB8ELhX1aATJwzA1A72sNnJE1a0


#### Query Parameters
| Query param | Description |
Expand All @@ -16,7 +19,9 @@ Tracks the status of a message

#### Example Request

[https://prod.dlapi.socket.tech/messages-from-tx?srcChainSlug=10&srcTxHash=0xc3243233916c25f0455a9440fcd2183d49858149ad103c6ff8d6167d812bc0dc](https://prod.dlapi.socket.tech/messages-from-tx?srcChainSlug=10&srcTxHash=0xc3243233916c25f0455a9440fcd2183d49858149ad103c6ff8d6167d812bc0dc)
[https://prod.dlapi.socket.tech/v1/messages-from-tx?srcChainSlug=10&srcTxHash=0xc3243233916c25f0455a9440fcd2183d49858149ad103c6ff8d6167d812bc0dc](https://prod.dlapi.socket.tech/messages-from-tx?srcChainSlug=10&srcTxHash=0xc3243233916c25f0455a9440fcd2183d49858149ad103c6ff8d6167d812bc0dc)

Note : Add the *x-api-key* header mentioned above in the request for authentication.

#### Response Parameters

Expand Down

0 comments on commit 2accb72

Please sign in to comment.