sdk

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: MIT, MIT Imports: 20 Imported by: 0

README

Go API client for sdk

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.3.0
  • Package version: 1.1.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional

Put the package under your project folder and add the following in import:

import "./sdk"

Documentation for API Endpoints

All URIs are relative to http://localhost:12052

Class Method HTTP request Description
AnalyticsApi AnalyticsGetNetworkActivityPost Post /analytics/get_network_activity Get details on past blocks
HealthApi HealthPost Post /health Perform a healthcheck of the node and its dependent services
NodeApi NodeDeleteWalletPost Post /node/delete_wallet Delete a wallet
NodeApi NodeExportWalletPost Post /node/export_wallet Export wallet secret key
NodeApi NodeGenerateWalletPost Post /node/generate_wallet Generate a new wallet
NodeApi NodeGetAllWalletsPost Post /node/get_all_wallets Get all wallet labels
NodeApi NodeGetRulesPost Post /node/get_rules Get network governance rules
NodeApi NodeGetTaskStatusPost Post /node/get_task_status Get all tasks in the node
NodeApi NodeImportWalletPost Post /node/import_wallet Import wallet from secret key
NodeApi NodeUnlockWalletPost Post /node/unlock_wallet Unlocks a wallet for a given amount of seconds [async call]
WalletApi WalletCreateRulePost Post /wallet/create_rule Create & broadcast add-config-rule [async call]
WalletApi WalletDeleteRulePost Post /wallet/delete_rule Create & broadcast delete-config-rule [async call]
WalletApi WalletGetActivityPost Post /wallet/get_activity Get wallet activity (transactions)
WalletApi WalletGetBalancesPost Post /wallet/get_balances Get wallets balance
WalletApi WalletGetNewAddressPost Post /wallet/get_new_address Get a new address from a given diversifier or generate randomly
WalletApi WalletGetPublicKeyPost Post /wallet/get_public_key Get wallet public key
WalletApi WalletIssueAssetPost Post /wallet/issue_asset Issue assets [async call]
WalletApi WalletTransferAssetPost Post /wallet/transfer_asset Transfer assets [async call]

Documentation For Models

Documentation For Authorization

ApiKeyAuth

  • Type: API key

Example

auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
	Key: "APIKEY",
	Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)

Author

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	AnalyticsApi *AnalyticsApiService

	HealthApi *HealthApiService

	NodeApi *NodeApiService

	WalletApi *WalletApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the QED-it - Asset Transfers API v1.3.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type AnalyticIssueWalletTx

type AnalyticIssueWalletTx struct {
	IsIncoming       bool   `json:"is_incoming,omitempty"`
	IssuedBySelf     bool   `json:"issued_by_self,omitempty"`
	Memo             string `json:"memo,omitempty"`
	RecipientAddress string `json:"recipient_address,omitempty"`
	AssetId          int32  `json:"asset_id,omitempty"`
	Amount           int32  `json:"amount,omitempty"`
	IsConfidential   bool   `json:"is_confidential,omitempty"`
}

type AnalyticRuleWalletTx

type AnalyticRuleWalletTx struct {
	SignedBySelf   bool                          `json:"signed_by_self,omitempty"`
	RuleAffectSelf bool                          `json:"rule_affect_self,omitempty"`
	TxSigner       string                        `json:"tx_signer,omitempty"`
	Rule           AnalyticsRuleWalletDefinition `json:"rule,omitempty"`
}

type AnalyticTransaction

type AnalyticTransaction struct {
	Metadata AnalyticsTxMetadata    `json:"metadata,omitempty"`
	Content  map[string]interface{} `json:"content,omitempty"`
}

type AnalyticTransferWalletTx

type AnalyticTransferWalletTx struct {
	IsIncoming       bool   `json:"is_incoming,omitempty"`
	Memo             string `json:"memo,omitempty"`
	RecipientAddress string `json:"recipient_address,omitempty"`
	AssetId          int32  `json:"asset_id,omitempty"`
	Amount           int32  `json:"amount,omitempty"`
}

type AnalyticWalletMetadata

type AnalyticWalletMetadata struct {
	Type      string `json:"type,omitempty"`
	TxHash    string `json:"tx_hash,omitempty"`
	Timestamp string `json:"timestamp,omitempty"`
}

type AnalyticWalletTx

type AnalyticWalletTx struct {
	Metadata AnalyticWalletMetadata `json:"metadata,omitempty"`
	Content  map[string]interface{} `json:"content,omitempty"`
}

type AnalyticsApiService

type AnalyticsApiService service

func (*AnalyticsApiService) AnalyticsGetNetworkActivityPost

func (a *AnalyticsApiService) AnalyticsGetNetworkActivityPost(ctx context.Context, getNetworkActivityRequest GetNetworkActivityRequest) (GetNetworkActivityResponse, *http.Response, error)

AnalyticsApiService Get details on past blocks

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param getNetworkActivityRequest

@return GetNetworkActivityResponse

type AnalyticsAssetConverterProofDescription

type AnalyticsAssetConverterProofDescription struct {
	InputCv  string `json:"input_cv,omitempty"`
	AmountCv string `json:"amount_cv,omitempty"`
	AssetCv  string `json:"asset_cv,omitempty"`
	Zkproof  string `json:"zkproof,omitempty"`
}

type AnalyticsConfidentialIssuanceDescription

type AnalyticsConfidentialIssuanceDescription struct {
	InputCv string        `json:"input_cv,omitempty"`
	Zkproof string        `json:"zkproof,omitempty"`
	Rule    AnalyticsRule `json:"rule,omitempty"`
}

type AnalyticsContent

type AnalyticsContent struct {
	TxType string `json:"tx_type"`
}

type AnalyticsIssueTx

type AnalyticsIssueTx struct {
	Outputs   []AnalyticsOutput `json:"outputs,omitempty"`
	PublicKey string            `json:"public_key,omitempty"`
	Signature string            `json:"signature,omitempty"`
}

type AnalyticsIssueTxAllOf

type AnalyticsIssueTxAllOf struct {
	Outputs   []AnalyticsOutput `json:"outputs,omitempty"`
	PublicKey string            `json:"public_key,omitempty"`
	Signature string            `json:"signature,omitempty"`
}

type AnalyticsOutput

type AnalyticsOutput struct {
	IsConfidential                  bool                                     `json:"is_confidential,omitempty"`
	PublicIssuanceDescription       AnalyticsPublicIssuanceDescription       `json:"public_issuance_description,omitempty"`
	ConfidentialIssuanceDescription AnalyticsConfidentialIssuanceDescription `json:"confidential_issuance_description,omitempty"`
	OutputDescription               AnalyticsOutputDescription               `json:"output_description,omitempty"`
}

type AnalyticsOutputDescription

type AnalyticsOutputDescription struct {
	Cv        string `json:"cv,omitempty"`
	Cm        string `json:"cm,omitempty"`
	Epk       string `json:"epk,omitempty"`
	Zkproof   string `json:"zkproof,omitempty"`
	EncNote   string `json:"enc_note,omitempty"`
	EncSender string `json:"enc_sender,omitempty"`
}

type AnalyticsPublicIssuanceDescription

type AnalyticsPublicIssuanceDescription struct {
	AssetId int32 `json:"asset_id"`
	Amount  int32 `json:"amount"`
}

type AnalyticsRule

type AnalyticsRule struct {
	MinId int32 `json:"min_id"`
	MaxId int32 `json:"max_id"`
}

type AnalyticsRuleDefinition

type AnalyticsRuleDefinition struct {
	PublicKey              string `json:"public_key,omitempty"`
	CanIssueConfidentially bool   `json:"can_issue_confidentially,omitempty"`
	IsAdmin                bool   `json:"is_admin,omitempty"`
	CanIssueAssetIdFirst   int32  `json:"can_issue_asset_id_first,omitempty"`
	CanIssueAssetIdLast    int32  `json:"can_issue_asset_id_last,omitempty"`
}

type AnalyticsRuleTx

type AnalyticsRuleTx struct {
	SenderPublicKey string                    `json:"sender_public_key,omitempty"`
	RulesToAdd      []AnalyticsRuleDefinition `json:"rules_to_add,omitempty"`
	RulesToDelete   []AnalyticsRuleDefinition `json:"rules_to_delete,omitempty"`
	Nonce           int32                     `json:"nonce,omitempty"`
	Signature       string                    `json:"signature,omitempty"`
}

type AnalyticsRuleTxAllOf

type AnalyticsRuleTxAllOf struct {
	SenderPublicKey string                  `json:"sender_public_key,omitempty"`
	RulesToAdd      AnalyticsRuleDefinition `json:"rules_to_add,omitempty"`
	RulesToDelete   AnalyticsRuleDefinition `json:"rules_to_delete,omitempty"`
	Nonce           int32                   `json:"nonce,omitempty"`
	Signature       string                  `json:"signature,omitempty"`
}

type AnalyticsRuleWalletDefinition

type AnalyticsRuleWalletDefinition struct {
	PublicKey              string `json:"public_key,omitempty"`
	CanIssueConfidentially bool   `json:"can_issue_confidentially,omitempty"`
	IsAdmin                bool   `json:"is_admin,omitempty"`
	CanIssueAssetIdFirst   int32  `json:"can_issue_asset_id_first,omitempty"`
	CanIssueAssetIdLast    int32  `json:"can_issue_asset_id_last,omitempty"`
	Operation              string `json:"operation,omitempty"`
}

type AnalyticsSpendDescription

type AnalyticsSpendDescription struct {
	Cv        string `json:"cv,omitempty"`
	Anchor    string `json:"anchor,omitempty"`
	Nullifier string `json:"nullifier,omitempty"`
	RkOut     string `json:"rk_out,omitempty"`
	Zkproof   string `json:"zkproof,omitempty"`
}

type AnalyticsTransferTx

type AnalyticsTransferTx struct {
	AssetConverterDescriptions []AnalyticsAssetConverterProofDescription `json:"asset_converter_descriptions,omitempty"`
	Spends                     []AnalyticsSpendDescription               `json:"spends,omitempty"`
	Outputs                    []AnalyticsOutputDescription              `json:"outputs,omitempty"`
	BindingSig                 string                                    `json:"binding_sig,omitempty"`
	SpendAuthSigs              []string                                  `json:"spend_auth_sigs,omitempty"`
}

type AnalyticsTransferTxAllOf

type AnalyticsTransferTxAllOf struct {
	AssetConverterDescriptions AnalyticsAssetConverterProofDescription `json:"asset_converter_descriptions,omitempty"`
	Spends                     []AnalyticsSpendDescription             `json:"spends,omitempty"`
	Outputs                    []AnalyticsOutputDescription            `json:"outputs,omitempty"`
	BindingSig                 string                                  `json:"binding_sig,omitempty"`
	SpendAuthSigs              []string                                `json:"spend_auth_sigs,omitempty"`
}

type AnalyticsTxMetadata

type AnalyticsTxMetadata struct {
	Type         string `json:"type,omitempty"`
	TxHash       string `json:"tx_hash,omitempty"`
	BlockHash    string `json:"block_hash,omitempty"`
	Timestamp    string `json:"timestamp,omitempty"`
	IndexInBlock int32  `json:"index_in_block,omitempty"`
	BlockHeight  int32  `json:"block_height,omitempty"`
}

type AsyncApiService

type AsyncApiService service

func (*AsyncApiService) NodeUnlockWalletPost

func (a *AsyncApiService) NodeUnlockWalletPost(ctx context.Context, unlockWalletRequest UnlockWalletRequest) (AsyncTaskCreatedResponse, *http.Response, error)

AsyncApiService Unlocks a wallet for a given amount of seconds [async call]

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param unlockWalletRequest

@return AsyncTaskCreatedResponse

func (*AsyncApiService) WalletCreateRulePost

func (a *AsyncApiService) WalletCreateRulePost(ctx context.Context, createRuleRequest CreateRuleRequest) (AsyncTaskCreatedResponse, *http.Response, error)

AsyncApiService Create & broadcast add-config-rule [async call]

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createRuleRequest

@return AsyncTaskCreatedResponse

func (*AsyncApiService) WalletDeleteRulePost

func (a *AsyncApiService) WalletDeleteRulePost(ctx context.Context, deleteRuleRequest DeleteRuleRequest) (AsyncTaskCreatedResponse, *http.Response, error)

AsyncApiService Create & broadcast delete-config-rule [async call]

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param deleteRuleRequest

@return AsyncTaskCreatedResponse

func (*AsyncApiService) WalletIssueAssetPost

func (a *AsyncApiService) WalletIssueAssetPost(ctx context.Context, issueAssetRequest IssueAssetRequest) (AsyncTaskCreatedResponse, *http.Response, error)

AsyncApiService Issue assets [async call]

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param issueAssetRequest

@return AsyncTaskCreatedResponse

func (*AsyncApiService) WalletTransferAssetPost

func (a *AsyncApiService) WalletTransferAssetPost(ctx context.Context, transferAssetRequest TransferAssetRequest) (AsyncTaskCreatedResponse, *http.Response, error)

AsyncApiService Transfer assets [async call]

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param transferAssetRequest

@return AsyncTaskCreatedResponse

type AsyncTaskCreatedResponse

type AsyncTaskCreatedResponse struct {
	Id string `json:"id"`
}

type BalanceForAsset

type BalanceForAsset struct {
	AssetId int32 `json:"asset_id"`
	Amount  int32 `json:"amount"`
}

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Block

type Block struct {
	BlockHash    string   `json:"block_hash"`
	Height       int32    `json:"height"`
	Transactions []string `json:"transactions"`
}

type ConfidentialAnalyticsOutput

type ConfidentialAnalyticsOutput struct {
	IsConfidential                  bool                                     `json:"is_confidential"`
	OutputDescription               AnalyticsOutputDescription               `json:"output_description"`
	ConfidentialIssuanceDescription AnalyticsConfidentialIssuanceDescription `json:"confidential_issuance_description"`
}

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

type CreateRuleRequest

type CreateRuleRequest struct {
	WalletId      string `json:"wallet_id"`
	Authorization string `json:"authorization"`
	RulesToAdd    []Rule `json:"rules_to_add"`
}

type DeleteRuleRequest

type DeleteRuleRequest struct {
	WalletId      string `json:"wallet_id"`
	Authorization string `json:"authorization"`
	RulesToDelete []Rule `json:"rules_to_delete"`
}

type DeleteWalletRequest

type DeleteWalletRequest struct {
	WalletId      string `json:"wallet_id"`
	Authorization string `json:"authorization"`
}

type ErrorResponse

type ErrorResponse struct {
	ErrorCode int32  `json:"error_code"`
	Message   string `json:"message,omitempty"`
}

type ExportWalletRequest

type ExportWalletRequest struct {
	WalletId string `json:"wallet_id"`
}

type ExportWalletResponse

type ExportWalletResponse struct {
	WalletId    string `json:"wallet_id"`
	EncryptedSk string `json:"encrypted_sk"`
	Salt        string `json:"salt"`
}

type GenerateWalletRequest

type GenerateWalletRequest struct {
	WalletId      string `json:"wallet_id"`
	Authorization string `json:"authorization"`
}

type GenericOpenAPIError

type GenericOpenAPIError struct {
	// contains filtered or unexported fields
}

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type GetActivityRequest

type GetActivityRequest struct {
	WalletId        string `json:"wallet_id"`
	StartIndex      int32  `json:"start_index"`
	NumberOfResults int32  `json:"number_of_results"`
}

type GetActivityResponse

type GetActivityResponse struct {
	WalletId     string                  `json:"wallet_id"`
	Transactions []TransactionsForWallet `json:"transactions"`
}

type GetAllWalletsResponse

type GetAllWalletsResponse struct {
	WalletIds []string `json:"wallet_ids,omitempty"`
}

type GetBlocksRequest

type GetBlocksRequest struct {
	StartIndex      int32 `json:"start_index"`
	NumberOfResults int32 `json:"number_of_results"`
}

type GetBlocksResponse

type GetBlocksResponse struct {
	Blocks []Block `json:"blocks"`
}

type GetNetworkActivityRequest

type GetNetworkActivityRequest struct {
	StartIndex      int32 `json:"start_index"`
	NumberOfResults int32 `json:"number_of_results"`
}

type GetNetworkActivityResponse

type GetNetworkActivityResponse struct {
	Transactions []AnalyticTransaction `json:"transactions,omitempty"`
}

type GetNewAddressRequest

type GetNewAddressRequest struct {
	WalletId    string `json:"wallet_id"`
	Diversifier string `json:"diversifier,omitempty"`
}

type GetNewAddressResponse

type GetNewAddressResponse struct {
	WalletId         string `json:"wallet_id"`
	RecipientAddress string `json:"recipient_address"`
}

type GetPublicKeyRequest

type GetPublicKeyRequest struct {
	WalletId string `json:"wallet_id"`
}

type GetPublicKeyResponse

type GetPublicKeyResponse struct {
	WalletId  string `json:"wallet_id"`
	PublicKey string `json:"public_key"`
}

type GetRulesResponse

type GetRulesResponse struct {
	Rules []Rule `json:"rules,omitempty"`
}

type GetTaskStatusRequest

type GetTaskStatusRequest struct {
	Id string `json:"id"`
}

type GetTaskStatusResponse

type GetTaskStatusResponse struct {
	Id        string                 `json:"id,omitempty"`
	CreatedAt string                 `json:"created_at,omitempty"`
	UpdatedAt string                 `json:"updated_at,omitempty"`
	Result    string                 `json:"result,omitempty"`
	TxHash    string                 `json:"tx_hash,omitempty"`
	Type      string                 `json:"type,omitempty"`
	Data      map[string]interface{} `json:"data,omitempty"`
	Error     string                 `json:"error,omitempty"`
}

type GetTransactionsRequest

type GetTransactionsRequest struct {
	WalletId        string `json:"wallet_id"`
	StartIndex      int32  `json:"start_index"`
	NumberOfResults int32  `json:"number_of_results"`
}

type GetTransactionsResponse

type GetTransactionsResponse struct {
	WalletId     string                  `json:"wallet_id"`
	Transactions []TransactionsForWallet `json:"transactions"`
}

type GetWalletActivityRequest

type GetWalletActivityRequest struct {
	WalletId        string `json:"wallet_id"`
	StartIndex      int32  `json:"start_index"`
	NumberOfResults int32  `json:"number_of_results"`
}

type GetWalletActivityResponse

type GetWalletActivityResponse struct {
	WalletId     string             `json:"wallet_id,omitempty"`
	Transactions []AnalyticWalletTx `json:"transactions,omitempty"`
}

type GetWalletBalanceRequest

type GetWalletBalanceRequest struct {
	WalletId string `json:"wallet_id"`
}

type GetWalletBalanceResponse

type GetWalletBalanceResponse struct {
	WalletId string            `json:"wallet_id"`
	Assets   []BalanceForAsset `json:"assets"`
}

type HealthApiService

type HealthApiService service

func (*HealthApiService) HealthPost

HealthApiService Perform a healthcheck of the node and its dependent services

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return HealthcheckResponse

type HealthcheckResponse

type HealthcheckResponse struct {
	Version             string                  `json:"version,omitempty"`
	BlockchainConnector HealthcheckResponseItem `json:"blockchain_connector,omitempty"`
	MessageQueue        HealthcheckResponseItem `json:"message_queue,omitempty"`
	Database            HealthcheckResponseItem `json:"database,omitempty"`
	Passing             bool                    `json:"passing,omitempty"`
}

type HealthcheckResponseBlockchainConnector

type HealthcheckResponseBlockchainConnector struct {
	Passing bool   `json:"passing,omitempty"`
	Error   string `json:"error,omitempty"`
}

type HealthcheckResponseItem

type HealthcheckResponseItem struct {
	Passing bool   `json:"passing,omitempty"`
	Error   string `json:"error,omitempty"`
}

type ImportWalletRequest

type ImportWalletRequest struct {
	WalletId      string `json:"wallet_id"`
	EncryptedSk   string `json:"encrypted_sk"`
	Authorization string `json:"authorization"`
	Salt          string `json:"salt"`
}

type IssueAssetRequest

type IssueAssetRequest struct {
	WalletId         string `json:"wallet_id"`
	Authorization    string `json:"authorization"`
	RecipientAddress string `json:"recipient_address"`
	Amount           int32  `json:"amount"`
	AssetId          int32  `json:"asset_id"`
	Confidential     bool   `json:"confidential"`
	Memo             string `json:"memo"`
}

type NodeApiService

type NodeApiService service

func (*NodeApiService) NodeDeleteWalletPost

func (a *NodeApiService) NodeDeleteWalletPost(ctx context.Context, deleteWalletRequest DeleteWalletRequest) (*http.Response, error)

NodeApiService Delete a wallet

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param deleteWalletRequest

func (*NodeApiService) NodeExportWalletPost

func (a *NodeApiService) NodeExportWalletPost(ctx context.Context, exportWalletRequest ExportWalletRequest) (ExportWalletResponse, *http.Response, error)

NodeApiService Export wallet secret key

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param exportWalletRequest

@return ExportWalletResponse

func (*NodeApiService) NodeGenerateWalletPost

func (a *NodeApiService) NodeGenerateWalletPost(ctx context.Context, generateWalletRequest GenerateWalletRequest) (*http.Response, error)

NodeApiService Generate a new wallet

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param generateWalletRequest

func (*NodeApiService) NodeGetAllWalletsPost

func (a *NodeApiService) NodeGetAllWalletsPost(ctx context.Context) (GetAllWalletsResponse, *http.Response, error)

NodeApiService Get all wallet labels

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return GetAllWalletsResponse

func (*NodeApiService) NodeGetRulesPost

func (a *NodeApiService) NodeGetRulesPost(ctx context.Context) (GetRulesResponse, *http.Response, error)

NodeApiService Get network governance rules

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return GetRulesResponse

func (*NodeApiService) NodeGetTaskStatusPost

func (a *NodeApiService) NodeGetTaskStatusPost(ctx context.Context, getTaskStatusRequest GetTaskStatusRequest) (GetTaskStatusResponse, *http.Response, error)

NodeApiService Get all tasks in the node

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param getTaskStatusRequest

@return GetTaskStatusResponse

func (*NodeApiService) NodeImportWalletPost

func (a *NodeApiService) NodeImportWalletPost(ctx context.Context, importWalletRequest ImportWalletRequest) (*http.Response, error)

NodeApiService Import wallet from secret key

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param importWalletRequest

func (*NodeApiService) NodeUnlockWalletPost

func (a *NodeApiService) NodeUnlockWalletPost(ctx context.Context, unlockWalletRequest UnlockWalletRequest) (AsyncTaskCreatedResponse, *http.Response, error)

NodeApiService Unlocks a wallet for a given amount of seconds [async call]

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param unlockWalletRequest

@return AsyncTaskCreatedResponse

type PublicAnalyticsOutput

type PublicAnalyticsOutput struct {
	IsConfidential            bool                               `json:"is_confidential"`
	OutputDescription         AnalyticsOutputDescription         `json:"output_description"`
	PublicIssuanceDescription AnalyticsPublicIssuanceDescription `json:"public_issuance_description"`
}

type Rule

type Rule struct {
	PublicKey              string `json:"public_key"`
	CanIssueConfidentially bool   `json:"can_issue_confidentially,omitempty"`
	CanIssueAssetIdFirst   int32  `json:"can_issue_asset_id_first,omitempty"`
	CanIssueAssetIdLast    int32  `json:"can_issue_asset_id_last,omitempty"`
	IsAdmin                bool   `json:"is_admin,omitempty"`
}

type TransactionsForWallet

type TransactionsForWallet struct {
	IsIncoming       bool   `json:"is_incoming"`
	AssetId          int32  `json:"asset_id"`
	Amount           int32  `json:"amount"`
	RecipientAddress string `json:"recipient_address"`
	Memo             string `json:"memo"`
	Id               string `json:"id"`
}

type TransferAssetRequest

type TransferAssetRequest struct {
	WalletId         string `json:"wallet_id"`
	Authorization    string `json:"authorization"`
	RecipientAddress string `json:"recipient_address"`
	Amount           int32  `json:"amount"`
	AssetId          int32  `json:"asset_id"`
	Memo             string `json:"memo"`
}

type UnlockWalletRequest

type UnlockWalletRequest struct {
	WalletId      string `json:"wallet_id"`
	Authorization string `json:"authorization"`
	Seconds       int32  `json:"seconds"`
}

type WalletApiService

type WalletApiService service

func (*WalletApiService) WalletCreateRulePost

func (a *WalletApiService) WalletCreateRulePost(ctx context.Context, createRuleRequest CreateRuleRequest) (AsyncTaskCreatedResponse, *http.Response, error)

WalletApiService Create & broadcast add-config-rule [async call]

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param createRuleRequest

@return AsyncTaskCreatedResponse

func (*WalletApiService) WalletDeleteRulePost

func (a *WalletApiService) WalletDeleteRulePost(ctx context.Context, deleteRuleRequest DeleteRuleRequest) (AsyncTaskCreatedResponse, *http.Response, error)

WalletApiService Create & broadcast delete-config-rule [async call]

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param deleteRuleRequest

@return AsyncTaskCreatedResponse

func (*WalletApiService) WalletGetActivityPost

func (a *WalletApiService) WalletGetActivityPost(ctx context.Context, getWalletActivityRequest GetWalletActivityRequest) (GetWalletActivityResponse, *http.Response, error)

WalletApiService Get wallet activity (transactions)

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param getWalletActivityRequest

@return GetWalletActivityResponse

func (*WalletApiService) WalletGetBalancesPost

func (a *WalletApiService) WalletGetBalancesPost(ctx context.Context, getWalletBalanceRequest GetWalletBalanceRequest) (GetWalletBalanceResponse, *http.Response, error)

WalletApiService Get wallets balance

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param getWalletBalanceRequest

@return GetWalletBalanceResponse

func (*WalletApiService) WalletGetNewAddressPost

func (a *WalletApiService) WalletGetNewAddressPost(ctx context.Context, getNewAddressRequest GetNewAddressRequest) (GetNewAddressResponse, *http.Response, error)

WalletApiService Get a new address from a given diversifier or generate randomly

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param getNewAddressRequest

@return GetNewAddressResponse

func (*WalletApiService) WalletGetPublicKeyPost

func (a *WalletApiService) WalletGetPublicKeyPost(ctx context.Context, getPublicKeyRequest GetPublicKeyRequest) (GetPublicKeyResponse, *http.Response, error)

WalletApiService Get wallet public key

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param getPublicKeyRequest

@return GetPublicKeyResponse

func (*WalletApiService) WalletIssueAssetPost

func (a *WalletApiService) WalletIssueAssetPost(ctx context.Context, issueAssetRequest IssueAssetRequest) (AsyncTaskCreatedResponse, *http.Response, error)

WalletApiService Issue assets [async call]

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param issueAssetRequest

@return AsyncTaskCreatedResponse

func (*WalletApiService) WalletTransferAssetPost

func (a *WalletApiService) WalletTransferAssetPost(ctx context.Context, transferAssetRequest TransferAssetRequest) (AsyncTaskCreatedResponse, *http.Response, error)

WalletApiService Transfer assets [async call]

  • @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param transferAssetRequest

@return AsyncTaskCreatedResponse

Source Files

Jump to

Keyboard shortcuts

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