### Install Evervault Go SDK
Source: https://docs.evervault.com/sdks/go
Install the Evervault Go SDK using the go get command. This is the first step to integrating Evervault into your Go application.
```go
1go get github.com/evervault/evervault-go
```
--------------------------------
### Install the Evervault Node.js SDK
Source: https://docs.evervault.com/sdks/nodejs
Install the SDK using npm, yarn, or pnpm.
```bash
1npm install @evervault/sdk
```
--------------------------------
### Example Node.js Dockerfile
Source: https://docs.evervault.com/enclaves
A complete example of a Dockerfile for a Node.js enclave, including base image, file copying, port exposure, dependency installation, and entrypoint definition.
```dockerfile
FROM node:16-alpine3.16
COPY ./index.js /index.js
COPY ./package.json /package.json
COPY ./package-lock.json /package-lock.json
EXPOSE 8008
RUN npm i
ENTRYPOINT ["node", "/index.js"]
```
--------------------------------
### Install Evervault PHP SDK using Composer
Source: https://docs.evervault.com/sdks/php
Install the Evervault PHP bindings using Composer. Ensure you have Composer installed and run the command in your project directory.
```bash
1$ composer require evervault/evervault-php
```
--------------------------------
### Install Evervault React SDK
Source: https://docs.evervault.com/sdks/react
Install the Evervault React SDK using npm, yarn, or pnpm.
```bash
1npm install @evervault/react
```
--------------------------------
### Install and Initialize Evervault SDK
Source: https://docs.evervault.com/cards/3d-secure
Install the Evervault JavaScript SDK via CDN or npm and initialize it with your Team ID and App ID.
```APIDOC
## Client-Side SDK Installation
### Using CDN
Include the following script tag in the head of your HTML file:
```html
```
### Using npm
Install the package:
```bash
npm install @evervault/js
```
### Initialization
Initialize the SDK using your Team ID and App ID:
**Using CDN:**
```javascript
const evervault = new Evervault("", "");
```
**Using npm:**
```javascript
import { loadEvervault } from "@evervault/js";
const evervault = loadEvervault("", "");
```
```
--------------------------------
### Install Evervault CLI
Source: https://docs.evervault.com/sdks/cli
Run this command to install the Evervault CLI. It can also be used to upgrade from a previous major version.
```bash
1sh <(curl https://cli.evervault.com/v4/install -sL)
```
--------------------------------
### Install Evervault Ruby SDK
Source: https://docs.evervault.com/sdks/ruby
Install the Evervault Ruby SDK using RubyGems. Add the gem to your Gemfile or install it directly via the command line.
```ruby
gem 'evervault'
```
--------------------------------
### Install Evervault Python SDK
Source: https://docs.evervault.com/sdks/python
Install the Evervault Python SDK using pip. This is the first step to using the SDK in your project.
```bash
1pip install evervault
```
--------------------------------
### Install and Initialize Evervault SDK (npm)
Source: https://docs.evervault.com/cards/reveal
Install the `@evervault/js` package via npm. This package is a lightweight wrapper that loads the SDK from our CDN and provides TypeScript definitions. Initialize it with your Team ID and App ID.
```javascript
import { loadEvervault } from "@evervault/js";
const evervault = loadEvervault("", "");
```
--------------------------------
### Install Evervault CLI
Source: https://docs.evervault.com/sdks/cli
This command installs or upgrades the Evervault CLI to the latest version. For major version upgrades, re-running the installation command is recommended.
```APIDOC
## Installation
Run the following command to install the Evervault CLI. This command can also be used to upgrade from a previous major version of the Evervault CLI.
```bash
curl -fsSL https://cli.evervault.com/install | bash
```
```
--------------------------------
### Install React Native SDK
Source: https://docs.evervault.com/sdks/react-native
Install the Evervault React Native SDK and its peer dependency react-native-webview using npm or yarn.
```bash
npm install @evervault/react-native react-native-webview@13
```
--------------------------------
### Install Evervault CLI
Source: https://docs.evervault.com/enclaves
Installs the Evervault CLI using a curl command. Ensure you have shell access to run this script.
```bash
1curl https://cli.evervault.com/v4/install -sL | sh
```
--------------------------------
### Acquirer Creation Response Example
Source: https://docs.evervault.com/api
This is an example of a successful response when creating an acquirer. It includes the acquirer's ID, name, description, default status, and detailed configurations.
```json
{
"id": "acquirer_adk3kdljc3",
"name": "Ollivanders Wand Shop Production Configuration",
"description": "Ollivanders Wand Shop Production Configuration",
"default": true,
"configurations": [
{
"network": "mastercard",
"bin": "424242",
"acquirerMerchantIdentifier": "38191048173",
"state": "active",
"country": "ie"
},
{
"network": "visa",
"bin": "424242",
"acquirerMerchantIdentifier": "38191048173",
"state": "active",
"country": "ie"
}
]
}
```
--------------------------------
### Installation via npm
Source: https://docs.evervault.com/sdks/javascript
Install the Evervault JavaScript SDK using npm. This package provides a light wrapper for loading the SDK from our CDN and includes TypeScript definitions.
```APIDOC
## Installation via npm
You can also install Evervault via the `@evervault/js` package on npm. This package is a light wrapper which handles loading the SDK from our CDN and also provides TypeScript definitions.
```javascript
import { loadEvervault } from "@evervault/js";
const evervault = loadEvervault("", "");
```
**Note:** It is important to note that for PCI Compliance you must load the Evervault SDK directly from our CDN and cannot bundle it with your application. The `loadEvervault` function will always load the latest version of the Evervault SDK regardless of which version of `@evervault/js` you are using.
```
--------------------------------
### Create Payment Request Example
Source: https://docs.evervault.com/api-spec.json
This example demonstrates the structure of a request payload for creating a payment. It includes card details, transaction information, and optional extensions like address and cardholder verification.
```json
{
"card": {
"number": "4111111111111111",
"expiry": {
"month": "09",
"year": "29"
},
"cvv": "123"
},
"extensions": [
"capabilities",
"fees",
"cvv",
"address",
"cardholder"
],
"transaction": {
"amount": 2500,
"currency": "usd"
},
"cardholder": {
"firstName": "John",
"lastName": "Doe"
},
"address": {
"postalCode": "10001",
"line1": "123 Main Street",
"line2": "Apt 4B",
"city": "New York",
"state": "ny",
"country": "us"
}
}
```
--------------------------------
### Initialize Function Project
Source: https://docs.evervault.com/sdks/cli
Initializes a sample "hello world" Function project in the current or a specified directory.
```bash
1ev function init
```
--------------------------------
### Start Google Pay Availability Check
Source: https://docs.evervault.com/cards/google-pay?client=android
Call `viewModel.start()` to check if Google Pay is supported on the device and ready for transactions. This should typically be done once, for example, within a `LaunchedEffect`.
```kotlin
1viewModel.start()
```
--------------------------------
### Configure Shared Evervault Instance
Source: https://docs.evervault.com/sdks/ios
Configure the shared instance of the Evervault class using your Team ID and App ID. This is the simplest way to get started if you only need to use a single Evervault team/app.
```APIDOC
## Configure Shared Evervault Instance
### Description
Configure the shared instance of the Evervault class using your Team ID and App ID. This is the simplest way to get started if you only need to use a single Evervault team/app.
### Method Signature
`Evervault.shared.configure(teamId: String, appId: String)`
### Parameters
#### Path Parameters
- **teamId** (String) - Required - The Uuid of your Evervault Team
- **appId** (String) - Required - The Uuid of your Evervault App
### Request Example
```swift
import EvervaultCore
Evervault.shared.configure(teamId: "", appId: "")
```
```
--------------------------------
### Initialize Function
Source: https://docs.evervault.com/sdks/cli
Initializes a sample "hello world" Evervault Function in the current directory or a specified directory.
```APIDOC
### function init
Initialize a sample “hello world” Function either in your current directory, or the directory provided.
```bash
ev function init
```
```
--------------------------------
### Initialize Evervault SDK (Dedicated Instance)
Source: https://docs.evervault.com/sdks/ios
Create a dedicated instance of the Evervault SDK if you require multiple configurations or prefer not to use the shared instance. Provide your Team ID and App ID.
```swift
import EvervaultCore
let evervault = Evervault.init(teamId: "", appId: "")
```
--------------------------------
### Function Deployment Started Event
Source: https://docs.evervault.com/api-spec.json
This event is triggered when a function deployment is started.
```APIDOC
## POST /function.deployment.started
### Description
This event is triggered when a function deployment is started.
### Method
POST
### Endpoint
/function.deployment.started
### Request Body
- **id** (string) - Required - The id of the webhook event.
- **type** (string) - Required - The type of webhook event. Must be one of: "function.deployment.started".
- **data** (FunctionDeployment) - Required - The data payload for the function deployment.
### Request Example
{
"example": {
"id": "webhook_event_0aa6ff0fee57",
"type": "function.deployment.started",
"data": {
"function": {
"id": "func_0aa6ff0fee57",
"name": "my-function"
},
"app": {
"id": "app_0aa6ff0fee57",
"name": "Production"
},
"team": {
"id": "team_0aa6ff0fee57",
"name": "My Team"
},
"message": "Starting function deployment",
"status": "in-progress",
"dashboardUrl": "https://dashboard.evervault.com/functions/func_0aa6ff0fee57",
"createdAt": 1692972623233,
"updatedAt": 1692972623233
}
}
}
### Response
#### Success Response (200)
- **id** (string) - The id of the webhook event.
- **type** (string) - The type of webhook event.
- **data** (FunctionDeployment) - The data payload for the function deployment.
#### Response Example
{
"example": {
"id": "webhook_event_0aa6ff0fee57",
"type": "function.deployment.started",
"data": {
"function": {
"id": "func_0aa6ff0fee57",
"name": "my-function"
},
"app": {
"id": "app_0aa6ff0fee57",
"name": "Production"
},
"team": {
"id": "team_0aa6ff0fee57",
"name": "My Team"
},
"message": "Starting function deployment",
"status": "in-progress",
"dashboardUrl": "https://dashboard.evervault.com/functions/func_0aa6ff0fee57",
"createdAt": 1692972623233,
"updatedAt": 1692972623233
}
}
}
```
--------------------------------
### Initialize the SDK
Source: https://docs.evervault.com/sdks/go
Initialize the Evervault Go SDK with your App ID and API Key. Ensure you have created an App in the Evervault Dashboard to obtain these credentials.
```APIDOC
## Initialize the SDK
Initialize the SDK using your App's ID and API key. If you don't have one yet, you can get one by creating an App in the Evervault Dashboard.
```go
import "github.com/evervault/evervault-go"
evClient, err := evervault.MakeClient("", "")
```
```
--------------------------------
### Customization Example
Source: https://docs.evervault.com/sdks/android
Example of how to use and customize the InlinePaymentCard within a custom theme.
```APIDOC
## Customization Example
### Description
Demonstrates how to customize the PaymentCard component using modifiers and themes.
### Code
```kotlin
UserCustomTheme {
// ...
val modifier: Modifier = Modifier
val onDataChange: (PaymentCardData) -> Unit = {} // Handle card data
// ...
InlinePaymentCard(modifier = modifier, onDataChange = onDataChange)
}
```
```
--------------------------------
### Enclave Response Example
Source: https://docs.evervault.com/enclaves
This is an example of a successful response from an enclave, typically echoing a message.
```json
1{
2 "response": "Hello! I'm writing to you from within an enclave"
3}
```
--------------------------------
### Initialize Evervault Go Client
Source: https://docs.evervault.com/sdks/go
Initialize the Evervault client with your App ID and API key. Obtain these credentials from the Evervault Dashboard.
```go
1import "github.com/evervault/evervault-go"
2
evClient, err := evervault.MakeClient("", "")
```
--------------------------------
### Install react-native-webview
Source: https://docs.evervault.com/sdks/react-native/v2-migration
The `react-native-webview` package is now a peer dependency and must be installed separately using npm, yarn, or Expo.
```bash
npm install react-native-webview
```
```bash
yarn add react-native-webview
```
```bash
npx expo install react-native-webview
```
--------------------------------
### Initialize a new function
Source: https://docs.evervault.com/sdks/cli
Creates a starter `function.toml` file in the current directory to define a new Evervault function.
```bash
1ev function create-toml
```
--------------------------------
### Initialize the Evervault SDK
Source: https://docs.evervault.com/sdks/php
Initialize the Evervault SDK with your App ID and API key. Obtain these credentials from the Evervault Dashboard.
```php
1', '');
```
--------------------------------
### Initialize an enclave with custom signing keys
Source: https://docs.evervault.com/sdks/cli
Initializes an Enclave using provided private key and signing certificate files for image signing, overriding the default key pair generation.
```bash
1ev enclave init --name my-enclave --private-key private.key --signing-cert cert.pem
```
--------------------------------
### Initialize Evervault SDK
Source: https://docs.evervault.com/sdks/ruby
Initialize the Evervault SDK with your App ID and API Key. Obtain these credentials from the Evervault Dashboard.
```ruby
require "evervault"
Evervault.app_id = ""
Evervault.api_key = ""
```
--------------------------------
### Example API Response for Action Required
Source: https://docs.evervault.com/api
This is an example of a 200 OK response indicating that an action is required, typically for a payment transaction.
```json
{
"id": "tds_57aa862f8bf7",
"merchant": {
"name": "Ollivanders Wand Shop",
"website": "https://www.ollivanders.co.uk",
"categoryCode": "5945",
"country": "gb"
},
"card": {
"lastFour": "4242",
"expiry": {
"month": "09",
"year": "26"
},
"brand": "visa",
"funding": "debit",
"segment": "consumer",
"country": "gb",
"currency": "gbp"
},
"initiator": {
"type": "customer"
},
"challenge": {
"preference": "no-preference",
"reason": null
},
"acquirer": {
"bin": "567834",
"merchantIdentifier": "530249576123943",
"country": "gb"
},
"payment": {
"type": "one-off",
"amount": 1000,
"currency": "eur"
},
"version": "2.2.0",
"status": "action-required",
"nextAction": {
"type": "use-sdk"
},
"threeDSServer": {
"transactionIdentifier": "a623edc1-54bc-455d-9dea-c909783a37c3"
},
"createdAt": 1692972623233,
"updatedAt": 1692972623768
}
```
--------------------------------
### Initialize Evervault Python SDK
Source: https://docs.evervault.com/sdks/python
Initialize the SDK with your App ID and API Key. Obtain these credentials from the Evervault Dashboard.
```python
1import evervault
2evervault.init("", "")
```
--------------------------------
### Encrypted Response Example
Source: https://docs.evervault.com/api
Example of a successful response from the Evervault encrypt endpoint, showing the encrypted value for the provided JSON data.
```json
{
"phoneNumber": "ev:debug:Tk9D:GWgxSXezEFNw10b/:A6JZWe29uiZpP72w+nc0RXOdWdvgCulNqJv8aJpLE/gH:3V/PD54obBv0j+EJMaNNa/ny2tmZq7QM:$"
}
```
--------------------------------
### Initialize the SDK
Source: https://docs.evervault.com/sdks/java
Initialize the Evervault SDK with your App's ID and API key. Ensure you have these credentials from the Evervault Dashboard.
```APIDOC
## Initialize the SDK
### Description
Initialize the Evervault SDK using your App's ID and API key.
### Code
```java
import com.evervault.Evervault;
Evervault evervault = new Evervault("", "");
```
```
--------------------------------
### Initialize the Evervault Node.js SDK
Source: https://docs.evervault.com/sdks/nodejs
Initialize the SDK with your App ID and API Key. Obtain these from the Evervault Dashboard.
```javascript
1const Evervault = require("@evervault/sdk");
2const evervault = new Evervault("", "");
```
--------------------------------
### Example Merchant Response
Source: https://docs.evervault.com/sdks/api
This is an example of a successful response when retrieving or updating merchant details. It includes configuration for network tokens and Apple Pay.
```json
{
"id": "merchant_eead1d640d7c",
"name": "Ollivanders Wand Shop",
"website": "https://www.ollivanders.co.uk",
"categoryCode": "5945",
"business": {
"legalName": "Ollivanders Wand Shop Ltd.",
"address": {
"line1": "Diagon Alley",
"city": "London",
"postalCode": "WD1 1AA",
"country": "gb"
}
},
"networkTokens": {
"enrolment": [
{
"cardBrand": "mastercard",
"tokenRequestorIdentifier": "50165156978",
"status": "active"
},
{
"cardBrand": "visa",
"tokenRequestorIdentifier": "402338123804",
"status": "active"
},
{
"cardBrand": "american-express",
"tokenRequestorIdentifier": null,
"status": "inactive"
}
]
},
"applePay": {
"domains": [
{
"domain": "ollivanders.co.uk",
"status": "pending"
}
]
},
"createdAt": 1692972623233,
"updatedAt": 1692972623768
}
```
--------------------------------
### Decrypted Response Example
Source: https://docs.evervault.com/api
Example of a successful response from the Evervault decrypt endpoint, showing the original plaintext value for the provided encrypted data.
```json
{
"phoneNumber": "555-2368"
}
```
--------------------------------
### Enclave Deployment Started Event
Source: https://docs.evervault.com/api-spec.json
This event is triggered when a enclave deployment is started. It provides details about the enclave, application, team, and the current status and stage of the deployment.
```APIDOC
## enclaveDeploymentStarted
### Description
This event is triggered when a enclave deployment is started.
### Method
POST
### Endpoint
/enclave/deployment/started
### Request Body
- **id** (string) - The id of the webhook event.
- **type** (string) - The type of webhook event. Must be one of: "enclave.deployment.started".
- **data** (object) - Contains details about the enclave deployment.
- **id** (string) - The id of the enclave deployment.
- **enclave** (object) - Information about the enclave.
- **id** (string) - The id of the enclave.
- **name** (string) - The name of the enclave.
- **app** (object) - Information about the application.
- **id** (string) - The id of the application.
- **name** (string) - The name of the application.
- **team** (object) - Information about the team.
- **id** (string) - The id of the team.
- **name** (string) - The name of the team.
- **message** (string) - A message describing the deployment status.
- **status** (string) - The current status of the deployment (e.g., "in-progress").
- **stage** (string) - The current stage of the deployment (e.g., "image.building").
### Request Example
```json
{
"id": "webhook_event_0aa6ff0fee57",
"type": "enclave.deployment.started",
"data": {
"id": "enclave_deployment_0aa6ff0fee57",
"enclave": {
"id": "enclave_0aa6ff0fee57",
"name": "My Enclave"
},
"app": {
"id": "app_0aa6ff0fee57",
"name": "Production"
},
"team": {
"id": "team_0aa6ff0fee57",
"name": "My Team"
},
"message": "Deployment started. Building image on Evervault infrastructure",
"status": "in-progress",
"stage": "image.building"
}
}
```
### Response
#### Success Response (200)
(No specific response schema provided for this event.)
#### Response Example
(No example provided for this event.)
```
--------------------------------
### Initialize SDK with Named Parameters
Source: https://docs.evervault.com/sdks/python
Initialize the Evervault SDK using named parameters for clarity. Ensure your App ID and API Key are correctly provided.
```python
1import evervault
2
evervault.init(
# Your App's ID
app_id=""
# Your App's API key
api_key="",
)
```
--------------------------------
### Updated Relay Object Example
Source: https://docs.evervault.com/api-spec.json
This example shows the structure of a Relay object after an update, including its ID, domain configurations, encryption settings, and defined routes.
```json
{
"id": "relay_destination_d4ja57js9lnh",
"destinationDomain": "example.com",
"evervaultDomain": "example-com.app-12345.relay.evervault.app",
"encryptEmptyStrings": true,
"authentication": null,
"routes": [
{
"method": "POST",
"path": "/checkout",
"request": [
{
"action": "encrypt",
"selections": [
{
"type": "json",
"role": "pci",
"selector": "$.cardNumber"
}
]
}
],
"response": []
}
],
"app": "app_cc7fcd533649",
"createdAt": 1692972623233,
"updatedAt": 1692972623234
}
```
--------------------------------
### Initialize the Evervault SDK
Source: https://docs.evervault.com/sdks/java
Initialize the SDK with your App's ID and API key. Ensure you have these credentials from the Evervault Dashboard.
```java
import com.evervault.Evervault;
Evervault evervault = new Evervault("", "");
```
--------------------------------
### Initialize the SDK
Source: https://docs.evervault.com/sdks/php
Initialize the Evervault SDK with your App ID and API key to begin making requests.
```APIDOC
## Initialize the SDK
The SDK needs to be initialized with an App's ID and API key. If you don't have one yet, you can get one by creating an App in the Evervault Dashboard.
```php
', '');
```
```
--------------------------------
### Example Relay Response Body
Source: https://docs.evervault.com/api
This is an example of the JSON response received when retrieving a Relay. It includes details such as destination domain, authentication type, and route configurations.
```json
{
"id": "relay_destination_d4ja57js9lnh",
"destinationDomain": "example.com",
"evervaultDomain": "example-com.app-12345.relay.evervault.app",
"encryptEmptyStrings": true,
"authentication": "api-key",
"routes": [
{
"method": "POST",
"path": "/checkout",
"request": [
{
"action": "encrypt",
"selections": [
{
"type": "json",
"role": "pci",
"selector": "$.cardNumber"
}
]
}
],
"response": []
}
],
"app": "app_cc7fcd533649",
"createdAt": 1692972623233
}
```
--------------------------------
### Run an Evervault Function (Node.js)
Source: https://docs.evervault.com/primitives/functions
This snippet shows how to initialize the Evervault SDK, encrypt data, and then run a deployed function named 'hello-function'. The function's output is then logged.
```javascript
1const Evervault = require('@evervault/sdk');
2const evervault = new Evervault('', '');
3
4const encryptedName = await evervault.encrypt("Claude Shannon");
5const result = await evervault.run("hello-function", {
name: encryptedName
});
6
7console.log(result);
```
--------------------------------
### Initialize SDK with Proxy Agent
Source: https://docs.evervault.com/sdks/nodejs
Initialize the SDK with an `https-proxy-agent` to route SDK requests through an HTTP proxy.
```javascript
1const { HttpsProxyAgent } = require("https-proxy-agent");
2const Evervault = require("@evervault/sdk");
3
4const agent = new HttpsProxyAgent("https://proxy.example.com:8080");
5
6const evervault = new Evervault("", "", { httpsAgent: agent });
```
--------------------------------
### Relay Response Example
Source: https://docs.evervault.com/api
This is an example of a successful response when creating or retrieving a Relay. It includes details about the Relay's configuration, including its ID, domains, and routing rules.
```json
{
"id": "relay_destination_d4ja57js9lnh",
"destinationDomain": "example.com",
"evervaultDomain": "example-com.app-12345.relay.evervault.app",
"encryptEmptyStrings": true,
"routes": [
{
"method": "POST",
"path": "/checkout",
"request": [
{
"action": "encrypt",
"selections": [
{
"type": "json",
"role": "pci",
"selector": "$.cardNumber"
}
]
}
],
"response": [
{
"action": "decrypt",
"selections": [
{
"type": "json",
"selector": "$..*"
}
]
}
]
}
],
"app": "app_cc7fcd533649",
"createdAt": 1692972623233,
"updatedAt": 1692972623234
}
```
--------------------------------
### Initialize Evervault SDK (CDN)
Source: https://docs.evervault.com/cards/reveal
After installing the SDK via CDN, initialize it with your Team ID and App ID obtained from the Evervault Dashboard.
```javascript
const evervault = new Evervault("", "");
```