signtransaction

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ForbiddenResponse

type ForbiddenResponse struct {
	Message       string         `json:"message"`
	InvoiceErrors []InvoiceError `json:"invoice_errors"`
}

ForbiddenResponse represents a 403 Forbidden response to a sign transaction request.

type InvoiceError

type InvoiceError struct {
	OperationIndex uint32 `json:"operation_index"`
	Reason         Reason `json:"reason"`
}

InvoiceError is an error specific to an operation (or its corresponding invoice) in the transaction

type Reason

type Reason string

Reason indicates why a transaction operation was rejected

const (
	AlreadyPaid      Reason = "already_paid"
	WrongDestination Reason = "wrong_destination"
	SKUNotFound      Reason = "sku_not_found"
)

type RequestBody

type RequestBody struct {
	KinVersion int `json:"kin_version"`
	// EnvelopeXDR is a base64-encoded transaction envelope XDR
	EnvelopeXDR []byte `json:"envelope_xdr"`
	// SolanaTransaction is a base64-encoded Solana transaction
	SolanaTransaction []byte `json:"solana_transaction"`
	// InvoiceList is a base64-encoded protobuf InvoiceList
	InvoiceList []byte `json:"invoice_list,omitempty"`
}

RequestBody contains the body of a sign transaction request.

func CreateSolanaRequest added in v0.2.3

func CreateSolanaRequest(txn solana.Transaction, invoiceList *commonpb.InvoiceList) (*RequestBody, error)

func CreateStellarRequest added in v0.2.3

type SuccessResponse

type SuccessResponse struct {
	// EnvelopeXDR is a base64-encoded transaction envelope XDR
	EnvelopeXDR []byte `json:"envelope_xdr"`
}

SuccessResponse represents a 200 OK response to a sign transaction request.

func (*SuccessResponse) GetEnvelopeXDR

func (r *SuccessResponse) GetEnvelopeXDR() (*xdr.TransactionEnvelope, error)

Jump to

Keyboard shortcuts

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