Documentation
¶
Index ¶
- Variables
- type AppConfig
- type AppInfo
- type AppInfoDefinition
- type AuthorizationRequest
- type AuthorizationResponse
- type Block
- type Connection
- type CreatedNode
- type CurrentBlock
- type DataPartition
- type EntryInfo
- type EntryRequest
- type EntryResponse
- type GenesisBlock
- type InviteRequest
- type InviteResponse
- type JoinRequest
- type MasterCard
- func (m *MasterCard) Authorize(req *AuthorizationRequest) (*AuthorizationResponse, error)
- func (m *MasterCard) CreateNode() error
- func (m *MasterCard) GetApp(id string) (*AppInfo, error)
- func (m *MasterCard) GetBlock(id string) error
- func (m *MasterCard) GetLastBlock() error
- func (m *MasterCard) GetNode(addr string) error
- func (m *MasterCard) GetStatus() error
- func (m *MasterCard) GetTransaction(hash string) error
- func (m *MasterCard) Invite() error
- func (m *MasterCard) Join() error
- func (m *MasterCard) PostTransaction(thing *artland.PostRequest) error
- func (m *MasterCard) Settle() error
- func (m *MasterCard) Sign() error
- type NodeDefinition
- type NodeInfo
- type SettlementRequest
- type SettlementResponse
- type SignRequest
- type SignResponse
- type SimpleError
- type StatusResponse
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
View Source
var API_ENDPOINT string = "/labs/proxy/chain/api/v1/network/"
View Source
var APP_ID string = "4127"
View Source
var OAUTH_AUTHORIZATION string = "Authorization"
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct { Definition AppInfoDefinition Description *string // Description of your blockchain application Name string // Your application identifier. MUST be the protobuf package name Version *string // Version of your blockchain application }
type AppInfo ¶
type AppInfo struct { Definition *AppInfoDefinition Id *string // Your application identifier. MUST be the protobuf package name }
type AppInfoDefinition ¶
type AuthorizationRequest ¶
type AuthorizationRequest struct { Amount_min_or_units int // The amount to authorize, in minor units of the specified currency Currency string // ISO 4217 Currency Code specifying the currency Description string // A description of the event for which the authorization message is to be generated Merchant_id string // Unique identifier of the merchant Pan string // The Personal Account Number of the card for which to generate an authorization message Pos_id string // An identifier for the point-of-sale terminal for which the authorization message is to be generated }
type AuthorizationResponse ¶
type Block ¶
type Block struct { Authority *string // The signing identity from the audit nodes, either as a blockchain address, or as the raw public key Hash *string // The hash of this block (hex) Nonce *string // Random number used in the generation of this block Partitions []DataPartition Previous_Block *string // hash of the previous block (hex) Signature *string // The signature confirmation from the audit nodes Slot *int32 // The slot number of this block Version *string // The version of the block format, 1.0.0.0 }
type Connection ¶
type Connection struct {
Address *string // The address of the connected node (base58)
}
type CreatedNode ¶
type CreatedNode struct { Address *string // The address of your newly created blockchain node Authority *string // The signing identity from the audit nodes, either as a blockchain address, or as the raw public key Peers []Connection // Connected nodes Type *string // customer }
type CurrentBlock ¶
type DataPartition ¶
type DataPartition struct { Application *string // Application ID Entries []string // List of hashes for all entries in this partition Entry_Count *int // Number of entries referred to by the merkle root hash Merkle_Root *string // Its the root hash of all entries for this application in this block (hex) }
type EntryRequest ¶
type EntryResponse ¶
type GenesisBlock ¶
type InviteRequest ¶
type InviteRequest struct {
Invitations []string // List of email addresses
}
type InviteResponse ¶
type InviteResponse struct {
Tokens string // An array of invitation/activation codes (hex)
}
type JoinRequest ¶
type JoinRequest struct {
Activation_key string // Invitation code you received in your MasterCard blockchain invitation email
}
type MasterCard ¶
type MasterCard struct {
// contains filtered or unexported fields
}
func NewMasterCardAPI ¶
func NewMasterCardAPI(keystoreloc, protoloc, userkey, keyalias, keystorepass string) (*MasterCard, error)
func (*MasterCard) Authorize ¶
func (m *MasterCard) Authorize(req *AuthorizationRequest) (*AuthorizationResponse, error)
func (*MasterCard) CreateNode ¶
func (m *MasterCard) CreateNode() error
func (*MasterCard) GetBlock ¶
func (m *MasterCard) GetBlock(id string) error
func (*MasterCard) GetLastBlock ¶
func (m *MasterCard) GetLastBlock() error
func (*MasterCard) GetNode ¶
func (m *MasterCard) GetNode(addr string) error
func (*MasterCard) GetStatus ¶
func (m *MasterCard) GetStatus() error
GetStatus gets general network status information
func (*MasterCard) GetTransaction ¶
func (m *MasterCard) GetTransaction(hash string) error
func (*MasterCard) Invite ¶
func (m *MasterCard) Invite() error
func (*MasterCard) Join ¶
func (m *MasterCard) Join() error
func (*MasterCard) PostTransaction ¶
func (m *MasterCard) PostTransaction(thing *artland.PostRequest) error
func (*MasterCard) Settle ¶
func (m *MasterCard) Settle() error
func (*MasterCard) Sign ¶
func (m *MasterCard) Sign() error
Sign signs one or more (binary) values with the caller's node private key
type NodeDefinition ¶
type NodeInfo ¶
type NodeInfo struct { Address *string // The address of this node (base58) Authority *string // The signing identity from the audit nodes, either as a blockchain address, or as the raw public key (base58) Chain_Height *int32 // Last verified slot on the chain as seen by this node Delay *int // Consensus delay - expected delay from when you send a transaction entry and when it is expected to be written into a block on the chain Drift *int // Time drift on this node Peers []Connection // Connected nodes Public_Key *string // Public key of node. Can be used to validate signatures from this node Type *string // Enum audit, consensus, application, customer Unconfirmed *int32 // The number of blockchain entries awaiting confirmation }
type SettlementRequest ¶
type SettlementResponse ¶
type SettlementResponse struct { Encoding string // Encoding scheme used to encode your protocol. base58, base64, hex Public_Key string // secp2561 public key with which the signature in a settlement notification on the blockchain may be verified Signature string // The signed hash of the request using the private key corresponding to the public key above }
type SignRequest ¶
type SignResponse ¶
type SimpleError ¶
type StatusResponse ¶
type StatusResponse struct { Alerts []string // Informational alerts such as upcoming version or config changes Applications []string // The application identifiers that are on this node Current *CurrentBlock Genesis *GenesisBlock Network int //Should always be 1513115205 }
type ValidationError ¶
Click to show internal directories.
Click to hide internal directories.