models

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// AccountStatusOk captures enum value "ok"
	AccountStatusOk string = "ok"

	// AccountStatusCorrupted captures enum value "corrupted"
	AccountStatusCorrupted string = "corrupted"
)
View Source
const (

	// RollsRequestSideBuy captures enum value "buy"
	RollsRequestSideBuy string = "buy"

	// RollsRequestSideSell captures enum value "sell"
	RollsRequestSideSell string = "sell"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {

	// address
	// Required: true
	Address Address `json:"address"`

	// balance
	// Required: true
	Balance Amount `json:"balance"`

	// candidate balance
	// Required: true
	CandidateBalance Amount `json:"candidateBalance"`

	// key pair
	// Required: true
	KeyPair KeyPair `json:"keyPair"`

	// nickname
	// Required: true
	Nickname Nickname `json:"nickname"`

	// status
	// Enum: [ok corrupted]
	Status string `json:"status,omitempty"`
}

Account Account object (V0).

swagger:model Account

func (*Account) ContextValidate

func (m *Account) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this account based on the context it is used

func (*Account) MarshalBinary

func (m *Account) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Account) UnmarshalBinary

func (m *Account) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Account) Validate

func (m *Account) Validate(formats strfmt.Registry) error

Validate validates this account

type Address

type Address string

Address Account's address.

swagger:model Address

func (Address) ContextValidate

func (m Address) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this address based on context it is used

func (Address) Validate

func (m Address) Validate(formats strfmt.Registry) error

Validate validates this address

type Amount

type Amount string

Amount Mas amount in nanoMassa.

swagger:model Amount

func (Amount) ContextValidate

func (m Amount) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this amount based on context it is used

func (Amount) Validate

func (m Amount) Validate(formats strfmt.Registry) error

Validate validates this amount

type AssetInfo added in v0.2.1

type AssetInfo struct {

	// address
	Address string `json:"address,omitempty"`

	// decimals
	// Minimum: 0
	Decimals *int64 `json:"decimals,omitempty"`

	// name
	Name string `json:"name,omitempty"`

	// symbol
	Symbol string `json:"symbol,omitempty"`
}

AssetInfo Token informations

swagger:model AssetInfo

func (*AssetInfo) ContextValidate added in v0.2.1

func (m *AssetInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this asset info based on context it is used

func (*AssetInfo) MarshalBinary added in v0.2.1

func (m *AssetInfo) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*AssetInfo) UnmarshalBinary added in v0.2.1

func (m *AssetInfo) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AssetInfo) Validate added in v0.2.1

func (m *AssetInfo) Validate(formats strfmt.Registry) error

Validate validates this asset info

type AssetInfoWithBalance added in v0.2.1

type AssetInfoWithBalance struct {
	AssetInfo

	// balance
	Balance string `json:"balance,omitempty"`
}

AssetInfoWithBalance asset info with balance

swagger:model AssetInfoWithBalance

func (*AssetInfoWithBalance) ContextValidate added in v0.2.1

func (m *AssetInfoWithBalance) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this asset info with balance based on the context it is used

func (*AssetInfoWithBalance) MarshalBinary added in v0.2.1

func (m *AssetInfoWithBalance) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (AssetInfoWithBalance) MarshalJSON added in v0.2.1

func (m AssetInfoWithBalance) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object to a JSON structure

func (*AssetInfoWithBalance) UnmarshalBinary added in v0.2.1

func (m *AssetInfoWithBalance) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*AssetInfoWithBalance) UnmarshalJSON added in v0.2.1

func (m *AssetInfoWithBalance) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object from a JSON structure

func (*AssetInfoWithBalance) Validate added in v0.2.1

func (m *AssetInfoWithBalance) Validate(formats strfmt.Registry) error

Validate validates this asset info with balance

type CorrelationID

type CorrelationID strfmt.Base64

CorrelationID Correlation id of the operation batch

swagger:model CorrelationId

func (CorrelationID) ContextValidate

func (m CorrelationID) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this correlation Id based on context it is used

func (*CorrelationID) MarshalBinary

func (m *CorrelationID) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (CorrelationID) MarshalJSON

func (m CorrelationID) MarshalJSON() ([]byte, error)

MarshalJSON retrieves a CorrelationID value as JSON output

func (*CorrelationID) UnmarshalBinary

func (m *CorrelationID) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CorrelationID) UnmarshalJSON

func (m *CorrelationID) UnmarshalJSON(b []byte) error

UnmarshalJSON sets a CorrelationID value from JSON input

func (CorrelationID) Validate

func (m CorrelationID) Validate(formats strfmt.Registry) error

Validate validates this correlation Id

type Error

type Error struct {

	// error code.
	// Required: true
	Code string `json:"code"`

	// error message.
	// Required: true
	Message string `json:"message"`
}

Error Error object.

swagger:model Error

func (*Error) ContextValidate

func (m *Error) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this error based on context it is used

func (*Error) MarshalBinary

func (m *Error) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Error) UnmarshalBinary

func (m *Error) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Error) Validate

func (m *Error) Validate(formats strfmt.Registry) error

Validate validates this error

type KeyPair

type KeyPair struct {

	// Nonce used by the AES-GCM algorithm used to protect the key pair's private key.
	// Required: true
	Nonce string `json:"nonce"`

	// Key pair's private key.
	// Required: true
	PrivateKey string `json:"privateKey"`

	// Key pair's public key.
	// Required: true
	PublicKey string `json:"publicKey"`

	// Salt used by the PBKDF that generates the secret key used to protect the key pair's private key.
	// Required: true
	Salt string `json:"salt"`
}

KeyPair Account's key pair.

swagger:model KeyPair

func (*KeyPair) ContextValidate

func (m *KeyPair) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this key pair based on context it is used

func (*KeyPair) MarshalBinary

func (m *KeyPair) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*KeyPair) UnmarshalBinary

func (m *KeyPair) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*KeyPair) Validate

func (m *KeyPair) Validate(formats strfmt.Registry) error

Validate validates this key pair

type Nickname

type Nickname string

Nickname Account's short name.

swagger:model Nickname

func (Nickname) ContextValidate

func (m Nickname) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this nickname based on context it is used

func (Nickname) Validate

func (m Nickname) Validate(formats strfmt.Registry) error

Validate validates this nickname

type OperationResponse

type OperationResponse struct {

	// operation Id
	// Read Only: true
	OperationID string `json:"operationId,omitempty"`
}

OperationResponse operation response

swagger:model OperationResponse

func (*OperationResponse) ContextValidate

func (m *OperationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this operation response based on the context it is used

func (*OperationResponse) MarshalBinary

func (m *OperationResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*OperationResponse) UnmarshalBinary

func (m *OperationResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*OperationResponse) Validate

func (m *OperationResponse) Validate(formats strfmt.Registry) error

Validate validates this operation response

type RollsRequest

type RollsRequest struct {

	// amount
	// Required: true
	Amount Amount `json:"amount"`

	// fee
	// Required: true
	Fee Amount `json:"fee"`

	// side
	// Required: true
	// Enum: [buy sell]
	Side *string `json:"side"`
}

RollsRequest rolls request

swagger:model RollsRequest

func (*RollsRequest) ContextValidate

func (m *RollsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this rolls request based on the context it is used

func (*RollsRequest) MarshalBinary

func (m *RollsRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*RollsRequest) UnmarshalBinary

func (m *RollsRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*RollsRequest) Validate

func (m *RollsRequest) Validate(formats strfmt.Registry) error

Validate validates this rolls request

type SignMessageRequest added in v0.2.5

type SignMessageRequest struct {

	// A boolean indicating whether to display data.
	DisplayData *bool `json:"DisplayData,omitempty"`

	// Description text of what is being signed (optional)
	// Max Length: 280
	Description string `json:"description,omitempty"`

	// The message to sign.
	Message string `json:"message,omitempty"`
}

SignMessageRequest sign message request

swagger:model SignMessageRequest

func (*SignMessageRequest) ContextValidate added in v0.2.5

func (m *SignMessageRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this sign message request based on context it is used

func (*SignMessageRequest) MarshalBinary added in v0.2.5

func (m *SignMessageRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SignMessageRequest) UnmarshalBinary added in v0.2.5

func (m *SignMessageRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SignMessageRequest) Validate added in v0.2.5

func (m *SignMessageRequest) Validate(formats strfmt.Registry) error

Validate validates this sign message request

type SignRequest

type SignRequest struct {

	// A boolean property that indicates whether the sign operation is part of a batch of operations. Set to true if this operation is part of a batch, otherwise set to false.
	Batch bool `json:"batch,omitempty"`

	// The chain id of the network to which the operation will be sent.
	// Required: true
	ChainID *int64 `json:"chainId"`

	// correlation Id
	// Format: byte
	CorrelationID CorrelationID `json:"correlationId,omitempty"`

	// Description text of what is being signed (optional)
	// Max Length: 280
	Description string `json:"description,omitempty"`

	// Serialized attributes of the operation to be signed with the key pair corresponding to the given nickname.
	// Required: true
	// Format: byte
	Operation *strfmt.Base64 `json:"operation"`
}

SignRequest sign request

swagger:model SignRequest

func (*SignRequest) ContextValidate

func (m *SignRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this sign request based on the context it is used

func (*SignRequest) MarshalBinary

func (m *SignRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SignRequest) UnmarshalBinary

func (m *SignRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SignRequest) Validate

func (m *SignRequest) Validate(formats strfmt.Registry) error

Validate validates this sign request

type SignResponse

type SignResponse struct {

	// correlation Id
	// Format: byte
	CorrelationID CorrelationID `json:"correlationId,omitempty"`

	// The modified operation (usr can change the fees).
	// Read Only: true
	// Format: byte
	Operation strfmt.Base64 `json:"operation,omitempty"`

	// Public part of the key pair used to sign the operation.
	// Read Only: true
	PublicKey string `json:"publicKey,omitempty"`

	// Hash of the operation attributes encrypted with the private part of the key pair.
	// Read Only: true
	// Format: byte
	Signature strfmt.Base64 `json:"signature,omitempty"`
}

SignResponse Signature of a sent operation.

swagger:model SignResponse

func (*SignResponse) ContextValidate

func (m *SignResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this sign response based on the context it is used

func (*SignResponse) MarshalBinary

func (m *SignResponse) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*SignResponse) UnmarshalBinary

func (m *SignResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*SignResponse) Validate

func (m *SignResponse) Validate(formats strfmt.Registry) error

Validate validates this sign response

type TransferRequest

type TransferRequest struct {

	// amount
	// Required: true
	Amount Amount `json:"amount"`

	// fee
	// Required: true
	Fee Amount `json:"fee"`

	// recipient address
	// Required: true
	RecipientAddress *string `json:"recipientAddress"`
}

TransferRequest transfer request

swagger:model TransferRequest

func (*TransferRequest) ContextValidate

func (m *TransferRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this transfer request based on the context it is used

func (*TransferRequest) MarshalBinary

func (m *TransferRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TransferRequest) UnmarshalBinary

func (m *TransferRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TransferRequest) Validate

func (m *TransferRequest) Validate(formats strfmt.Registry) error

Validate validates this transfer request

type UpdateAccountRequest

type UpdateAccountRequest struct {

	// address
	Address Address `json:"address,omitempty"`

	// balance
	Balance Amount `json:"balance,omitempty"`

	// candidate balance
	CandidateBalance Amount `json:"candidateBalance,omitempty"`

	// key pair
	KeyPair KeyPair `json:"keyPair,omitempty"`

	// nickname
	// Required: true
	Nickname Nickname `json:"nickname"`
}

UpdateAccountRequest Account object (V0).

swagger:model UpdateAccountRequest

func (*UpdateAccountRequest) ContextValidate

func (m *UpdateAccountRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this update account request based on the context it is used

func (*UpdateAccountRequest) MarshalBinary

func (m *UpdateAccountRequest) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UpdateAccountRequest) UnmarshalBinary

func (m *UpdateAccountRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UpdateAccountRequest) Validate

func (m *UpdateAccountRequest) Validate(formats strfmt.Registry) error

Validate validates this update account request

Jump to

Keyboard shortcuts

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