mpcvault

package module
v0.0.0-...-f97cccc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 13 Imported by: 1

README

Go MPCVault

Go Reference

The official Go library for the MPCVault API.

Installation

Make sure your project is using Go Modules (it will have a go.mod file in its root if it already is):

go mod init

Then, reference stripe-go in a Go program with import:

import (
	"go.mpcvault.com/mpcvault-go-sdk"
)

Alternatively, you can also explicitly go get the package into a project:

go get -u "go.mpcvault.com/mpcvault-go-sdk"

Documentation

For a comprehensive list of examples, check out the API documentation.

Usage

Setup the client

// Initialization variables
var apiKey = "FN0bIZCAFaRHwNacG4vMHKIb25qLKB97noLBBdDP4fU="
var privateKey = `
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACAYE5MuA6XK06g4Gth9TBmRAhb9btoAZfU+4U9T/OLstAAAAJihL6KdoS+i
nQAAAAtzc2gtZWQyNTUxOQAAACAYE5MuA6XK06g4Gth9TBmRAhb9btoAZfU+4U9T/OLstA
AAAEB1cs8dFWbtMrznb9EI8ygRfH4mSA4Cx/qBYyh/QgQIfBgTky4DpcrTqDga2H1MGZEC
Fv1u2gBl9T7hT1P84uy0AAAAEGpvaG5AZXhhbXBsZS5jb20BAgMEBQ==
-----END OPENSSH PRIVATE KEY-----
`
mpcvault := &sdk.API{}
err := mpcvault.SetUp(apiKey, privateKey, "")

Documentation

Overview

Package mpcvault provides the SDK for interacting with MPCVault

Index

Constants

View Source
const (
	APIEndpoint         string = "api.mpcvault.com:443"
	ClientVersion       string = clientVersion
	MPCEnclavePublicKey string = mpcEnclavePublicKey
	GRPCServerCert      string = grpcServerCert
)

Variables

This section is empty.

Functions

func NewIdempotentRequestCallOption

func NewIdempotentRequestCallOption(idempotentKey string) grpc.CallOption

NewIdempotentRequestCallOption creates a grpc call option which sets the idempotent key of this reqeust

Types

type API

type API struct {
	CloudMPCClient cloudmpc.CloudMPCClient

	PrintRequestLog bool
	// contains filtered or unexported fields
}

API is a MPCVault API client

func (*API) SetUp

func (a *API) SetUp(apiKey string, ed25519PrivateKey string, ed25519PrivateKeyPassword string) (err error)

SetUp initialises the client with apiKey, ed25519PrivateKey in SSH key format and ed25519PrivateKeyPassword

Directories

Path Synopsis
proto

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL