BluefinDecryptxP2pe SDK
Decryptx External Api client, generated from the OpenAPI spec.
The purpose of the Decryptx management APIs are to provide Decryptx Partners and Key Injection Facilities (KIFs) a way to integrate their services to the Decryptx Platform.
Learn more about Decryptx External Api at p2pemanager.com.
This is an unofficial SDK for the Decryptx External public API, generated by Voxgig with @voxgig/sdkgen. It is not affiliated with, endorsed by, or sponsored by the upstream API provider.
Learn more about Voxgig SDKs at voxgig.com/sdk.
TypeScript, Python, PHP, Golang, Ruby, Lua, C, Clojure, C++, C#, Dart, Elixir, Haskell, Java, JavaScript, Kotlin, OCaml, Perl, Rust, Scala, Swift, Zig SDKs, a CLI, an interactive REPL, and an MCP server for AI agents — all generated from one OpenAPI spec by @voxgig/sdkgen.
Entities, not endpoints
This SDK exposes the API as 22 semantic entities that you
call directly, instead of assembling URL paths and query strings. See the Entities table below for the full list. Entities are
Capitalised to mark them as the primary surface, each with the operations they
support (list, load, create, update, remove):
const client = new BluefinDecryptxP2peSDK()
const items = await client.Attestation().list()
Thinking in entities keeps the mental model small — for people and AI agents alike — rather than reasoning about raw HTTP routes and query parameters.
Offline unit testing
Every SDK ships a built-in test mode that swaps the HTTP transport for an in-memory mock, so your unit tests run fully offline — no server, no network, and no credentials:
TypeScript
const client = BluefinDecryptxP2peSDK.test()
const devicetypes = await client.DeviceType().list()
// devicetypes is an array of bare DeviceType records populated with mock data
console.log(devicetypes)
Python
client = BluefinDecryptxP2peSDK.test()
devicetypes = client.DeviceType().list()
print(devicetypes)
PHP
// Seed fixture data so offline calls resolve without a live server.
$client = BluefinDecryptxP2peSDK::test([
"entity" => ["devicetype" => ["test01" => ["id" => "test01"]]],
]);
$devicetypes = $client->DeviceType()->list();
Golang
client := sdk.Test()
result, err := client.DeviceType(nil).List(
nil, nil,
)
Ruby
# Seed fixture data so offline calls resolve without a live server.
client = BluefinDecryptxP2peSDK.test({
"entity" => { "devicetype" => { "test01" => { "id" => "test01" } } },
})
devicetypes = client.DeviceType.list()
Lua
local client = sdk.test()
local results, err = client:DeviceType():list()
C
#include "core/api.h"
BluefinDecryptxP2peSDK* client = test_sdk(NULL, NULL);
PNError* err = NULL;
Entity* device_type = bluefindecryptxp2pe_device_type(client, NULL);
voxgig_value* device_types = device_type->vt->list(device_type, NULL, NULL, &err);
printf("%s\n", voxgig_to_json(device_types));
Clojure
(require '[sdk.api :as api]
'[sdk.entity.device_type :as e-device_type]
'[voxgig.struct :as vs])
(def client (api/test-sdk nil nil))
(def device_types (e-device_type/list (api/device_type client nil) nil nil))
(println device_types)
C++
auto client = BluefinDecryptxP2peSDK::testSDK();
Value device_types = client->device_type()->list(Value::undef(), Value::undef());
std::cout << Struct::jsonify(device_types) << std::endl;
C#
var client = BluefinDecryptxP2peSDK.TestSDK(null, null);
var deviceTypeList = client.DeviceType().List(null);
Console.WriteLine(deviceTypeList);
Dart
import 'package:bluefin_decryptx_p2pe_sdk/BluefinDecryptxP2peSDK.dart';
Future<void> main() async {
final client = BluefinDecryptxP2peSDK.test();
final devicetypes = await client.DeviceType().list();
print(devicetypes);
}
Elixir
alias BluefinDecryptxP2pe.Helpers, as: H
sdk = BluefinDecryptxP2pe.test()
device_type = BluefinDecryptxP2pe.device_type(sdk)
records = BluefinDecryptxP2pe.Entity.DeviceType.list(device_type, H.deep(%{}))
IO.inspect(records)
Haskell
import qualified SdkClient as Sdk
import VoxgigStruct (Value (..), emptyMap)
import SdkHelpers (jo)
main :: IO ()
main = do
sdk <- Sdk.testSdk0
ent <- Sdk.device_type sdk VNoval
arg <- emptyMap
ctrl <- emptyMap
device_types <- Sdk.eList ent arg ctrl
print device_types
Java
BluefinDecryptxP2peSDK client = BluefinDecryptxP2peSDK.testSDK(null, null);
Object deviceTypeList = client.deviceType(null).list(null, null);
System.out.println(deviceTypeList);
JavaScript
const client = BluefinDecryptxP2peSDK.test()
const devicetypes = await client.DeviceType().list()
// devicetypes is an array of bare entities populated with mock data
console.log(devicetypes)
Kotlin
val client = BluefinDecryptxP2peSDK.testSDK(null, null)
val deviceTypeList = client.deviceType(null).list(null, null)
println(deviceTypeList)
OCaml
let () =
let client = Sdk_client.test () in
let result = (Sdk_client.device_type client Noval).e_list (empty_map ()) Noval in
print_endline (stringify result)
Perl
use lib 'perl/lib';
use BluefinDecryptxP2peSDK;
my $client = BluefinDecryptxP2peSDK->test(undef, undef);
my $devicetypes = $client->DeviceType->list();
print scalar(@$devicetypes), " records\n";
Rust
use bluefin_decryptx_p2pe_sdk::{jo, test_sdk, Value};
let client = test_sdk(Value::Noval, Value::Noval);
let device_types = client.device_type(Value::Noval).list(Value::Noval, Value::Noval).unwrap();
println!("{:?}", device_types);
Scala
val client = BluefinDecryptxP2peSDK.testSDK(null, null)
val deviceTypeList = client.deviceType(null).list(null, null)
println(deviceTypeList)
Swift
let client = BluefinDecryptxP2peSDK.testSDK(nil, nil)
let deviceTypeList = try client.DeviceType().list(nil, nil)
print(deviceTypeList)
Zig
const std = @import("std");
const sdk = @import("sdk");
const h = sdk.h;
const client = sdk.test_sdk(h.vnull(), h.vnull());
switch (client.device_type(h.vnull()).list(h.vnull(), h.vnull())) {
.ok => |device_types| std.debug.print("{s}\n", .{h.stringify(device_types)}),
.err => |e| std.debug.print("list failed: {s}\n", .{e.msg}),
}
Packages
| Language | Package | Install |
|---|---|---|
| TypeScript | @voxgig-sdk/bluefin-decryptx-p2pe | publish pending — install from git tag |
| Python | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| PHP | voxgig-sdk/bluefin-decryptx-p2pe | publish pending — install from git tag |
| Golang | github.com/voxgig-sdk/bluefin-decryptx-p2pe-sdk/go | go get github.com/voxgig-sdk/bluefin-decryptx-p2pe-sdk/go@latest |
| Ruby | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| Lua | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| C | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| Clojure | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| C++ | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| C# | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| Dart | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| Elixir | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| Haskell | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| Java | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| JavaScript | @voxgig-sdk/bluefin-decryptx-p2pe-js | publish pending — install from git tag |
| Kotlin | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| OCaml | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| Perl | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| Rust | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| Scala | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| Swift | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| Zig | voxgig-sdk-bluefin-decryptx-p2pe | publish pending — install from git tag |
| Go CLI | github.com/voxgig-sdk/bluefin-decryptx-p2pe-sdk/go-cli | go install github.com/voxgig-sdk/bluefin-decryptx-p2pe-sdk/go-cli/cmd/bluefin-decryptx-p2pe@latest |
| Go MCP server | github.com/voxgig-sdk/bluefin-decryptx-p2pe-sdk/go-mcp | go get github.com/voxgig-sdk/bluefin-decryptx-p2pe-sdk/go-mcp@latest |
Quickstart
TypeScript
import { BluefinDecryptxP2peSDK } from '@voxgig-sdk/bluefin-decryptx-p2pe'
const client = new BluefinDecryptxP2peSDK({
apikey: process.env.BLUEFIN_DECRYPTX_P2PE_APIKEY,
})
// List all attestations (returns Attestation[])
const attestations = await client.Attestation().list()
for (const attestation of attestations) {
console.log(attestation)
}
// Load a specific devicecustodydetail (returns a DeviceCustodyDetail)
const devicecustodydetail = await client.DeviceCustodyDetail().load({
device_type: 'example_device_type',
serial_number: 'example_serial_number',
id: 'example_id',
})
console.log(devicecustodydetail)
See the TypeScript README for the full guide.
Surfaces
| Surface | Path |
|---|---|
| SDK (TypeScript, Python, PHP, Golang, Ruby, Lua, C, Clojure, C++, C#, Dart, Elixir, Haskell, Java, JavaScript, Kotlin, OCaml, Perl, Rust, Scala, Swift, Zig) | ts/ py/ php/ go/ rb/ lua/ c/ clojure/ cpp/ csharp/ dart/ elixir/ haskell/ java/ js/ kotlin/ ocaml/ perl/ rust/ scala/ swift/ zig/ |
| CLI | go-cli/ |
| MCP server | go-mcp/ |
Use it from an AI agent (MCP)
The generated MCP server exposes every operation in this SDK as an MCP tool that Claude, Cursor or Cline can call directly. Build and register it:
cd go-mcp && go build -o bluefin-decryptx-p2pe-mcp .
Then add it to your agent’s MCP config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"bluefin-decryptx-p2pe": {
"command": "/abs/path/to/bluefin-decryptx-p2pe-mcp"
}
}
}
Entities
The API exposes 22 entities:
| Entity | Description | API path |
|---|---|---|
| Attestation | The Attestation entity (create, list, load). | /attestations |
| Client | The Client entity (create, list, load, remove). | /clients |
| CreateResult | The CreateResult entity (create). | /devices/{serialNumber}/{deviceType}/custody |
| Decryption | The Decryption entity (create). | /decryption |
| Device | The Device entity (create, list, load). | /devices |
| DeviceBuild | The DeviceBuild entity (list, load). | /deviceBuilds |
| DeviceCustodyDetail | The DeviceCustodyDetail entity (load). | /devices/{serialNumber}/{deviceType}/custody/{id} |
| DeviceCustodyList | The DeviceCustodyList entity (list). | /devices/{serialNumber}/{deviceType}/custody |
| DeviceList | The DeviceList entity (load). | /virtualDevices/{sharePartnerTo} |
| DeviceReceiveResult | The DeviceReceiveResult entity (create). | /devices/receive |
| DeviceRkiActivateResult | The DeviceRkiActivateResult entity (create). | /devices/rki/activate |
| DeviceState | The DeviceState entity (list). | /deviceStates |
| DeviceType | The DeviceType entity (list, load). | /deviceTypes |
| InjectKey | The InjectKey entity (list, load). | /injectKeys |
| Kif | The Kif entity (list). | /kifs |
| Location | The Location entity (create, list, load, remove). | /locations |
| Partner | The Partner entity (create, list, load). | /partners |
| Shipment | The Shipment entity (create, list, load). | /shipments |
| Success | The Success entity (create, remove). | /virtualDevices/{sharePartnerTo} |
| Transaction | The Transaction entity (create, list, load). | /transactions |
| UpdateResult | The UpdateResult entity (create, list, update). | /users |
| User | The User entity (load, remove). | /users/{id} |
The operations available across these entities are load, list, create, update, remove — see each entity’s own list above for exactly which it supports.
Quickstart in other languages
Python
import os
from bluefindecryptxp2pe_sdk import BluefinDecryptxP2peSDK
client = BluefinDecryptxP2peSDK({
"apikey": os.environ.get("BLUEFIN_DECRYPTX_P2PE_APIKEY"),
})
# List all attestations (returns a list, raises on error)
attestations = client.Attestation().list()
for attestation in attestations:
print(attestation)
# Load a specific attestation (returns the record, raises on error)
attestation = client.Attestation().load({"id": "example_id"})
print(attestation)
PHP
<?php
require_once 'bluefindecryptxp2pe_sdk.php';
$client = new BluefinDecryptxP2peSDK([
"apikey" => getenv("BLUEFIN_DECRYPTX_P2PE_APIKEY"),
]);
// List all attestations (returns an array; throws on error)
$attestations = $client->Attestation()->list();
print_r($attestations);
// Load a specific attestation (returns the bare record; throws on error)
$attestation = $client->Attestation()->load(["id" => "example_id"]);
print_r($attestation);
Golang
import sdk "github.com/voxgig-sdk/bluefin-decryptx-p2pe-sdk/go"
client := sdk.NewBluefinDecryptxP2peSDK(map[string]any{
"apikey": os.Getenv("BLUEFIN_DECRYPTX_P2PE_APIKEY"),
})
// List all attestations
attestations, err := client.Attestation(nil).List(nil, nil)
if err != nil {
panic(err)
}
fmt.Println(attestations)
// Load a specific devicecustodydetail
deviceCustodyDetail, err := client.DeviceCustodyDetail(nil).Load(
map[string]any{"device_type": "example_device_type", "serial_number": "example_serial_number", "id": "example_id"}, nil,
)
if err != nil {
panic(err)
}
fmt.Println(deviceCustodyDetail)
Ruby
require_relative "BluefinDecryptxP2pe_sdk"
client = BluefinDecryptxP2peSDK.new({
"apikey" => ENV["BLUEFIN_DECRYPTX_P2PE_APIKEY"],
})
# List all attestations (returns an Array; raises on error)
attestations = client.Attestation.list
puts attestations
# Load a specific attestation (returns the bare record; raises on error)
attestation = client.Attestation.load({ "id" => "example_id" })
puts attestation
Lua
local sdk = require("bluefin-decryptx-p2pe_sdk")
local client = sdk.new({
apikey = os.getenv("BLUEFIN_DECRYPTX_P2PE_APIKEY"),
})
-- List all attestations
local attestations, err = client:Attestation():list()
print(attestations)
-- Load a specific attestation
local attestation, err = client:Attestation():load({ id = "example_id" })
print(attestation)
C
#include "core/api.h"
BluefinDecryptxP2peSDK* client = bluefindecryptxp2pe_sdk_new(cmap(1,
"apikey", v_str(getenv("BLUEFIN_DECRYPTX_P2PE_APIKEY"))));
PNError* err = NULL;
Entity* attestation = bluefindecryptxp2pe_attestation(client, NULL);
// List all attestations (returns a List, sets *err on failure)
voxgig_value* attestations = attestation->vt->list(attestation, NULL, NULL, &err);
for (size_t i = 0; i < (size_t)voxgig_size(attestations); i++) {
printf("%s\n", voxgig_to_json(voxgig_getelem(attestations, v_int(i), NULL)));
}
// Load a specific attestation (returns the record, sets *err on failure)
voxgig_value* attestation_rec = attestation->vt->load(attestation, cmap(1, "id", v_str("example_id")), NULL, &err);
printf("%s\n", voxgig_to_json(attestation_rec));
Clojure
(require '[sdk.api :as api]
'[sdk.entity.attestation :as e-attestation]
'[voxgig.struct :as vs])
(def client (api/make-sdk (vs/jm "apikey" (System/getenv "BLUEFIN_DECRYPTX_P2PE_APIKEY"))))
;; List all attestations (returns a vector, raises on error)
(doseq [attestation (e-attestation/list (api/attestation client nil) nil nil)]
(println attestation))
;; Load a specific attestation (returns the record, raises on error)
(def attestation (e-attestation/load (api/attestation client nil) (vs/jm "id" "example_id") nil))
(println attestation)
C++
#include <cstdlib>
#include "core/sdk.hpp"
using namespace sdk;
const char* apikey = std::getenv("BLUEFIN_DECRYPTX_P2PE_APIKEY");
auto client = std::make_shared<BluefinDecryptxP2peSDK>(vmap({
{"apikey", Value(apikey ? apikey : "")},
}));
// List all attestations (returns a Value list, throws on error)
Value attestations = client->attestation()->list(Value::undef(), Value::undef());
for (const auto& attestation : *attestations.as_list()) {
std::cout << Struct::jsonify(attestation) << std::endl;
}
// Load a specific attestation (returns the record, throws on error)
Value attestation = client->attestation()->load(vmap({{"id", Value("example_id")}}), Value::undef());
std::cout << Struct::jsonify(attestation) << std::endl;
C#
using BluefinDecryptxP2peSdk;
var client = new BluefinDecryptxP2peSDK(new Dictionary<string, object?>
{
["apikey"] = Environment.GetEnvironmentVariable("BLUEFIN_DECRYPTX_P2PE_APIKEY"),
});
// List all attestations (returns object?, an aggregate list; raises on error)
var attestationList = client.Attestation().List(null);
Console.WriteLine(attestationList);
// Load a specific attestation (returns the record, raises on error)
var attestation = client.Attestation().Load(new Dictionary<string, object?> { ["id"] = "example_id" });
Console.WriteLine(attestation);
Dart
import 'dart:io';
import 'package:bluefin_decryptx_p2pe_sdk/BluefinDecryptxP2peSDK.dart';
Future<void> main() async {
final client = BluefinDecryptxP2peSDK({
'apikey': Platform.environment['BLUEFIN_DECRYPTX_P2PE_APIKEY'],
});
// List all attestations (returns a list of entities, throws on error)
final attestations = await client.Attestation().list();
for (final item in attestations) {
print(item.data());
}
// Load a specific attestation (returns the record, throws on error)
final attestation = await client.Attestation().load({'id': 'example_id'});
print(attestation);
}
Elixir
alias BluefinDecryptxP2pe.Helpers, as: H
sdk = BluefinDecryptxP2pe.new(H.deep(%{"apikey" => System.get_env("BLUEFIN_DECRYPTX_P2PE_APIKEY")}))
attestation = BluefinDecryptxP2pe.attestation(sdk)
# List all attestation records (raises on error)
records = BluefinDecryptxP2pe.Entity.Attestation.list(attestation)
IO.inspect(records)
# Load a specific attestation (returns the record, raises on error)
record = BluefinDecryptxP2pe.Entity.Attestation.load(attestation, H.deep(%{"id" => "example_id"}))
IO.inspect(record)
Haskell
import System.Environment (lookupEnv)
import qualified SdkClient as Sdk
import VoxgigStruct (Value (..), emptyMap)
import SdkHelpers (jo)
main :: IO ()
main = do
mkey <- lookupEnv "BLUEFIN_DECRYPTX_P2PE_APIKEY"
opts <- jo [("apikey", maybe VNoval VStr mkey)]
sdk <- Sdk.newSdk opts
-- List all attestations (returns a list Value, raises on error)
ent <- Sdk.attestation sdk VNoval
match <- emptyMap
ctrl <- emptyMap
attestations <- Sdk.eList ent match ctrl
print attestations
-- Load a specific attestation (returns the record, raises on error)
ent2 <- Sdk.attestation sdk VNoval
m <- jo [("id", VStr "example_id")]
ctrl2 <- emptyMap
attestation <- Sdk.eLoad ent2 m ctrl2
print attestation
Java
import voxgig.bluefindecryptxp2pesdk.core.BluefinDecryptxP2peSDK;
Map<String, Object> options = new java.util.LinkedHashMap<>();
options.put("apikey", System.getenv("BLUEFIN_DECRYPTX_P2PE_APIKEY"));
BluefinDecryptxP2peSDK client = new BluefinDecryptxP2peSDK(options);
// List all attestations (returns Object, an aggregate list; raises on error)
Object attestationList = client.attestation(null).list(null, null);
System.out.println(attestationList);
// Load a specific attestation (returns the record, raises on error)
Object attestation = client.attestation(null).load(Map.of("id", "example_id"), null);
System.out.println(attestation);
JavaScript
const { BluefinDecryptxP2peSDK } = require('@voxgig-sdk/bluefin-decryptx-p2pe-js')
const client = new BluefinDecryptxP2peSDK({
apikey: process.env.BLUEFIN_DECRYPTX_P2PE_APIKEY,
})
// List all attestations (returns an array)
const attestations = await client.Attestation().list()
for (const attestation of attestations) {
console.log(attestation)
}
// Load a specific devicecustodydetail (returns the entity)
const devicecustodydetail = await client.DeviceCustodyDetail().load({
device_type: 'example_device_type',
serial_number: 'example_serial_number',
id: 'example_id',
})
console.log(devicecustodydetail)
Kotlin
import voxgig.bluefindecryptxp2pesdk.core.BluefinDecryptxP2peSDK
val client = BluefinDecryptxP2peSDK(mutableMapOf<String, Any?>(
"apikey" to System.getenv("BLUEFIN_DECRYPTX_P2PE_APIKEY"),
))
// List all attestations (returns Any?, an aggregate list; raises on error)
val attestationList = client.attestation(null).list(null, null)
println(attestationList)
// Load a specific attestation (returns the record, raises on error)
val attestation = client.attestation(null).load(mutableMapOf<String, Any?>("id" to "example_id"), null)
println(attestation)
OCaml
open Voxgig_struct
open Sdk_helpers
let () =
let client = Sdk_client.make (jo [("apikey", Str (Sys.getenv "BLUEFIN_DECRYPTX_P2PE_APIKEY"))]) in
(* List all attestation records (returns a List value; raises on error) *)
let attestations = (Sdk_client.attestation client Noval).e_list (empty_map ()) Noval in
(match attestations with List items -> List.iter (fun r -> print_endline (stringify r)) !items | _ -> ());
(* Load a specific attestation (returns the record; raises on error) *)
let attestation = (Sdk_client.attestation client Noval).e_load (jo [("id", (Str "example_id"))]) Noval in
print_endline (stringify attestation)
Perl
use lib 'perl/lib';
use BluefinDecryptxP2peSDK;
my $client = BluefinDecryptxP2peSDK->new({
'apikey' => $ENV{'BLUEFIN_DECRYPTX_P2PE_APIKEY'},
});
# List all attestations (returns an arrayref; dies on error)
my $attestations = $client->Attestation->list;
for my $attestation (@$attestations) {
print "$attestation->{id}\n";
}
# Load a specific attestation (returns the bare record; dies on error)
my $attestation = $client->Attestation->load({ 'id' => 'example_id' });
print "$attestation->{id}\n";
Rust
use bluefin_decryptx_p2pe_sdk::{jo, BluefinDecryptxP2peSDK, Value};
let client = BluefinDecryptxP2peSDK::new(jo(vec![
("apikey", Value::str(std::env::var("BLUEFIN_DECRYPTX_P2PE_APIKEY").unwrap_or_default())),
]));
// List all attestations (returns a Value::List, Err on failure)
let attestations = client.attestation(Value::Noval).list(Value::Noval, Value::Noval).unwrap();
if let Value::List(items) = &attestations {
for attestation in items.borrow().iter() {
println!("{:?}", attestation);
}
}
// Load a specific attestation (returns the record, Err on failure)
let attestation = client.attestation(Value::Noval).load(jo(vec![("id", Value::str("example_id"))]), Value::Noval).unwrap();
println!("{:?}", attestation);
Scala
import voxgig.bluefindecryptxp2pesdk.core.BluefinDecryptxP2peSDK
val options = new java.util.LinkedHashMap[String, Object]()
options.put("apikey", System.getenv("BLUEFIN_DECRYPTX_P2PE_APIKEY"))
val client = new BluefinDecryptxP2peSDK(options)
// List all attestations (returns Object, an aggregate list; raises on error)
val attestationList = client.attestation(null).list(null, null)
println(attestationList)
// Load a specific attestation (returns the record, raises on error)
val attestation = client.attestation(null).load(java.util.Map.of("id", "example_id"), null)
println(attestation)
Swift
import BluefinDecryptxP2peSdk
let options = VMap()
options.entries["apikey"] = .string(
ProcessInfo.processInfo.environment["BLUEFIN_DECRYPTX_P2PE_APIKEY"] ?? "")
let client = BluefinDecryptxP2peSDK(options)
// List all attestations (returns a Value list, throws on error)
let attestationList = try client.Attestation().list(nil, nil)
for attestation in attestationList.asList?.items ?? [] {
print(attestation)
}
// Load a specific attestation (returns the record, throws on error)
let attestation = try client.Attestation().load(VMap([("id", .string("example_id"))]), nil)
print(attestation)
Zig
const std = @import("std");
const sdk = @import("sdk");
const h = sdk.h;
const client = sdk.BluefinDecryptxP2peSDK.new(h.jo(&.{
.{ "apikey", h.vstr(std.posix.getenv("BLUEFIN_DECRYPTX_P2PE_APIKEY") orelse "") },
}));
// List all attestations (Ok is a Value array, .err on failure)
switch (client.attestation(h.vnull()).list(h.vnull(), h.vnull())) {
.ok => |attestations| std.debug.print("{s}\n", .{h.stringify(attestations)}),
.err => |e| std.debug.print("list failed: {s}\n", .{e.msg}),
}
// Load a specific attestation (Ok is the record, .err on failure)
switch (client.attestation(h.vnull()).load(h.jo(&.{.{ "id", h.vstr("example_id") }}), h.vnull())) {
.ok => |attestation| std.debug.print("{s}\n", .{h.stringify(attestation)}),
.err => |e| std.debug.print("load failed: {s}\n", .{e.msg}),
}
Direct and prepare
For endpoints the entity model doesn’t cover, use the low-level methods:
direct(fetchargs)— build and send an HTTP request in one step.prepare(fetchargs)— build the request without sending it.
Both accept a map with path, method, params, query,
headers, and body. See the How-to guides below.
How-to guides
Make a direct API call
When the entity interface does not cover an endpoint, use direct:
TypeScript:
const result = await client.direct({
path: '/api/resource/{id}',
method: 'GET',
params: { id: 'example' },
})
if (result instanceof Error) {
throw result
}
console.log(result.data)
Python:
result = client.direct({
"path": "/api/resource/{id}",
"method": "GET",
"params": {"id": "example"},
})
PHP:
$result = $client->direct([
"path" => "/api/resource/{id}",
"method" => "GET",
"params" => ["id" => "example"],
]);
Go:
result, err := client.Direct(map[string]any{
"path": "/api/resource/{id}",
"method": "GET",
"params": map[string]any{"id": "example"},
})
if err != nil {
panic(err)
}
fmt.Println(result)
Ruby:
result = client.direct({
"path" => "/api/resource/{id}",
"method" => "GET",
"params" => { "id" => "example" },
})
Lua:
local result, err = client:direct({
path = "/api/resource/{id}",
method = "GET",
params = { id = "example" },
})
C:
PNError* err = NULL;
voxgig_value* result = sdk_direct(client, cmap(3,
"path", v_str("/api/resource/{id}"),
"method", v_str("GET"),
"params", cmap(1, "id", v_str("example"))), &err);
Clojure:
(def result
(api/direct client
(vs/jm "path" "/api/resource/{id}"
"method" "GET"
"params" (vs/jm "id" "example"))))
C++:
Value result = client->direct(vmap({
{"path", Value("/api/resource/{id}")},
{"method", Value("GET")},
{"params", vmap({{"id", Value("example")}})},
}));
C#:
var result = client.Direct(new Dictionary<string, object?>
{
["path"] = "/api/resource/{id}",
["method"] = "GET",
["params"] = new Dictionary<string, object?> { ["id"] = "example" },
});
Dart:
final result = await client.direct({
'path': '/api/resource/{id}',
'method': 'GET',
'params': {'id': 'example'},
});
Elixir:
result = BluefinDecryptxP2pe.direct(sdk, BluefinDecryptxP2pe.Helpers.deep(%{
"path" => "/api/resource/{id}",
"method" => "GET",
"params" => %{"id" => "example"}
}))
Haskell:
import qualified SdkClient as Sdk
import qualified SdkFeatures as F
import VoxgigStruct (Value (..))
import SdkHelpers (jo)
main :: IO ()
main = do
sdk <- Sdk.newSdk0
params <- jo [("id", VStr "example")]
args <- jo [("path", VStr "/api/resource/{id}"), ("method", VStr "GET"), ("params", params)]
result <- F.direct sdk args
print result
Java:
Map<String, Object> result = client.direct(Map.of(
"path", "/api/resource/{id}",
"method", "GET",
"params", Map.of("id", "example")));
JavaScript:
const result = await client.direct({
path: '/api/resource/{id}',
method: 'GET',
params: { id: 'example' },
})
if (result instanceof Error) {
throw result
}
console.log(result.data)
Kotlin:
val result = client.direct(mutableMapOf<String, Any?>(
"path" to "/api/resource/{id}",
"method" to "GET",
"params" to mapOf("id" to "example")))
OCaml:
let result = Sdk_client.direct client (jo [
("path", Str "/api/resource/{id}");
("method", Str "GET");
("params", jo [("id", Str "example")]);
]) in
ignore result
Perl:
my $result = $client->direct({
'path' => '/api/resource/{id}',
'method' => 'GET',
'params' => { 'id' => 'example' },
});
Rust:
let result = client.direct(jo(vec![
("path", Value::str("/api/resource/{id}")),
("method", Value::str("GET")),
("params", jo(vec![("id", Value::str("example"))])),
]));
Scala:
val result = client.direct(java.util.Map.of(
"path", "/api/resource/{id}",
"method", "GET",
"params", java.util.Map.of("id", "example")))
Swift:
let result = client.direct(VMap([
("path", .string("/api/resource/{id}")),
("method", .string("GET")),
("params", .map([("id", .string("example"))])),
]))
Zig:
const result = client.direct(h.jo(&.{
.{ "path", h.vstr("/api/resource/{id}") },
.{ "method", h.vstr("GET") },
.{ "params", h.jo(&.{.{ "id", h.vstr("example") }}) },
}));
Advanced
Everyday use only needs the sections above. This explains the internals behind every call — relevant when writing custom features.
Every SDK call runs the same five-stage pipeline:
- Point — resolve the API endpoint from the operation definition.
- Spec — build the HTTP specification (URL, method, headers, body).
- Request — send the HTTP request.
- Response — receive and parse the response.
- Result — extract the result data for the caller.
A feature hook fires at each stage (e.g. PrePoint, PreSpec,
PreRequest), so features can inspect or modify the pipeline without
forking the SDK.
Features
| Feature | Purpose |
|---|---|
| TestFeature | In-memory mock transport for testing without a live server |
Pass custom features via the extend option at construction time.
Per-language documentation
- TypeScript
- Python
- PHP
- Golang
- Ruby
- Lua
- C
- Clojure
- C++
- C#
- Dart
- Elixir
- Haskell
- Java
- JavaScript
- Kotlin
- OCaml
- Perl
- Rust
- Scala
- Swift
- Zig
Upstream API
This SDK is generated from the upstream OpenAPI specification. It is an unofficial client and is not affiliated with the API provider.
- Upstream API: https://apis.p2pemanager.com/api/v1
Security
Please report security issues to security@voxgig.com. See SECURITY.md. Do not open public issues for suspected vulnerabilities.
Generated from the Decryptx External Api OpenAPI spec by @voxgig/sdkgen.