Documentation
¶
Index ¶
- func NullableString(s string) *string
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func TxToAPITx(tx models.Transaction, indexType models.TxIndexType) interface{}
- type ClosedTransactionsParams
- type DigestHeader
- type EchoRouter
- type ErrorMessage
- type InvalidTransactionListParameters
- type MemberByPublicKeyParams
- type MemberTransactionsParams
- type ObserverServer
- func (s *ObserverServer) Balance(ctx echo.Context, reference string) error
- func (s *ObserverServer) ClosedTransactions(ctx echo.Context, params ClosedTransactionsParams) error
- func (s *ObserverServer) Member(ctx echo.Context, reference string) error
- func (s *ObserverServer) MemberByPublicKey(ctx echo.Context, params MemberByPublicKeyParams) error
- func (s *ObserverServer) MemberTransactions(ctx echo.Context, reference string, params MemberTransactionsParams) error
- func (s *ObserverServer) PulseNumber(ctx echo.Context) error
- func (s *ObserverServer) PulseRange(ctx echo.Context, params PulseRangeParams) error
- func (s *ObserverServer) Transaction(ctx echo.Context, txIDStr string) error
- func (s *ObserverServer) TransactionsByPulseNumberRange(ctx echo.Context, params TransactionsByPulseNumberRangeParams) error
- func (s *ObserverServer) TransactionsSearch(ctx echo.Context, params TransactionsSearchParams) error
- type ObserverServerExtended
- func (s *ObserverServerExtended) AugmentedAddress(ctx echo.Context, reference string) error
- func (s *ObserverServerExtended) Balance(ctx echo.Context, reference string) error
- func (s *ObserverServerExtended) ClosedTransactions(ctx echo.Context, params ClosedTransactionsParams) error
- func (s *ObserverServerExtended) Fee(ctx echo.Context, amount string) error
- func (s *ObserverServerExtended) Member(ctx echo.Context, reference string) error
- func (s *ObserverServerExtended) MemberByPublicKey(ctx echo.Context, params MemberByPublicKeyParams) error
- func (s *ObserverServerExtended) MemberTransactions(ctx echo.Context, reference string, params MemberTransactionsParams) error
- func (s *ObserverServerExtended) Notification(ctx echo.Context) error
- func (s *ObserverServerExtended) PulseNumber(ctx echo.Context) error
- func (s *ObserverServerExtended) PulseRange(ctx echo.Context, params PulseRangeParams) error
- func (s *ObserverServerExtended) SetAugmentedAddress(ctx echo.Context, reference string, params SetAugmentedAddressParams) error
- func (s *ObserverServerExtended) SupplyStatsTotal(ctx echo.Context) error
- func (s *ObserverServerExtended) Transaction(ctx echo.Context, txIDStr string) error
- func (s *ObserverServerExtended) TransactionsByPulseNumberRange(ctx echo.Context, params TransactionsByPulseNumberRangeParams) error
- func (s *ObserverServerExtended) TransactionsSearch(ctx echo.Context, params TransactionsSearchParams) error
- type PulseRangeParams
- type ResponsesAugmentedAddressYaml
- type ResponsesFeeYaml
- type ResponsesInvalidAmountYaml
- type ResponsesInvalidReferenceYaml
- type ResponsesInvalidSignatureYaml
- type ResponsesInvalidTransactionIdYaml
- type ResponsesMemberBalanceYaml
- type ResponsesMemberYaml
- type ResponsesNotificationInfoYaml
- type ResponsesPulseNumberYaml
- type ResponsesPulseRangeYaml
- type SchemaAllocation
- type SchemaAugmentedAddressInfo
- type SchemaBurn
- type SchemaDeposit
- type SchemaMigration
- type SchemaNextRelease
- type SchemaRelease
- type SchemaTransfer
- type SchemasTransaction
- type SchemasTransactionAbstract
- type SchemasTransactions
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) AugmentedAddress(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) Balance(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) ClosedTransactions(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) Fee(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) Member(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) MemberByPublicKey(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) MemberTransactions(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) Notification(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) PulseNumber(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) PulseRange(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) SetAugmentedAddress(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) SupplyStatsTotal(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) Transaction(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) TransactionsByPulseNumberRange(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) TransactionsSearch(ctx echo.Context) error
- type SetAugmentedAddressJSONBody
- type SetAugmentedAddressJSONRequestBody
- type SetAugmentedAddressParams
- type SignatureHeader
- type Transactions
- type TransactionsByPulseNumberRangeParams
- type TransactionsSearchParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NullableString ¶
func RegisterHandlers ¶
func RegisterHandlers(router EchoRouter, si ServerInterface)
RegisterHandlers adds each server route to the EchoRouter.
func TxToAPITx ¶
func TxToAPITx(tx models.Transaction, indexType models.TxIndexType) interface{}
Types ¶
type ClosedTransactionsParams ¶
type ClosedTransactionsParams struct { // Number of entries per list. Limit int `json:"limit"` // Index of the last known transaction. The list starts from the next one. // // Each returned transaction has an `index` that can be specified as the value of this parameter. // // To get the list of most recent or old (depending on the `order` value) transactions, omit the index. Index *string `json:"index,omitempty"` // Chronological `order` of the transaction list starting from a given `index`: // // * `chronological`—get transactions that chronologically follow a transaction with a given `index`. // * `reverse`—get transactions that chronologically precede a transaction with a given `index`. Order *string `json:"order,omitempty"` }
ClosedTransactionsParams defines parameters for ClosedTransactions.
type EchoRouter ¶
type EchoRouter interface { CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route }
This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration
type ErrorMessage ¶
type ErrorMessage struct {
Error []string `json:"error"`
}
func NewSingleMessageError ¶
func NewSingleMessageError(err string) ErrorMessage
type InvalidTransactionListParameters ¶
type InvalidTransactionListParameters struct { // Array of error messages. Error []string `json:"error"` }
InvalidTransactionListParameters defines model for invalidTransactionListParameters.
type MemberByPublicKeyParams ¶
type MemberByPublicKeyParams struct { // Public key of the target `member` object. With or without the `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----` delimiters. // // Note: Query parameters must be properly included into the URL, so `publicKey` value should comply with the HTML URL encoding. PublicKey string `json:"publicKey"` }
MemberByPublicKeyParams defines parameters for MemberByPublicKey.
type MemberTransactionsParams ¶
type MemberTransactionsParams struct { // Number of entries per list. Limit int `json:"limit"` // Index of the last known transaction. The list starts from the next one. // Each returned transaction has an `index` that can be specified as the value of this parameter. // // To get the list of most recent or old (depending on the `order` value) transactions, omit the index. Index *string `json:"index,omitempty"` // Transaction direction: // // * `incoming`—only transactions to the `member`. // * `outgoing`—only transactions from the `member`. // * `all`—both of the above. Direction *string `json:"direction,omitempty"` // Chronological `order` of the transaction list starting from a given `index`: // // * `chronological`—get transactions that chronologically follow a transaction with a given `index`. // * `reverse`—get transactions that chronologically preceed a transaction with a given `index. Order *string `json:"order,omitempty"` // Transaction type: // // * `transfer`—transactions to/from the member. // * `migration`—only transactions to the member's deposits. // * `allocation`—only transactions used by Insolar for internal funding purposes. // * `release`—only transactions from the member's deposits to this member's account. // * `burn`-only transactions used by Insolar for internal burning purposes. Type *string `json:"type,omitempty"` // Transaction status: // // * `registered`—transfer request is registered. // * `sent`—transfer of funds from the sender is finalized. // * `received`—transfer of funds to the receiver is finalized. // * `failed`—transfer of funds is finalized with an error; for example, in case of insufficient balance. Status *string `json:"status,omitempty"` }
MemberTransactionsParams defines parameters for MemberTransactions.
type ObserverServer ¶
type ObserverServer struct {
// contains filtered or unexported fields
}
func NewObserverServer ¶
func NewObserverServer(db *pg.DB, log insolar.Logger, pStorage observer.PulseStorage, config configuration.APIConfig) *ObserverServer
func (*ObserverServer) Balance ¶
func (s *ObserverServer) Balance(ctx echo.Context, reference string) error
func (*ObserverServer) ClosedTransactions ¶
func (s *ObserverServer) ClosedTransactions(ctx echo.Context, params ClosedTransactionsParams) error
CloseTransactions returns a list of closed transactions (only with statuses `received` and `failed`).
func (*ObserverServer) Member ¶
func (s *ObserverServer) Member(ctx echo.Context, reference string) error
func (*ObserverServer) MemberByPublicKey ¶
func (s *ObserverServer) MemberByPublicKey(ctx echo.Context, params MemberByPublicKeyParams) error
func (*ObserverServer) MemberTransactions ¶
func (s *ObserverServer) MemberTransactions(ctx echo.Context, reference string, params MemberTransactionsParams) error
func (*ObserverServer) PulseNumber ¶
func (s *ObserverServer) PulseNumber(ctx echo.Context) error
func (*ObserverServer) PulseRange ¶
func (s *ObserverServer) PulseRange(ctx echo.Context, params PulseRangeParams) error
func (*ObserverServer) Transaction ¶
func (s *ObserverServer) Transaction(ctx echo.Context, txIDStr string) error
func (*ObserverServer) TransactionsByPulseNumberRange ¶
func (s *ObserverServer) TransactionsByPulseNumberRange(ctx echo.Context, params TransactionsByPulseNumberRangeParams) error
func (*ObserverServer) TransactionsSearch ¶
func (s *ObserverServer) TransactionsSearch(ctx echo.Context, params TransactionsSearchParams) error
type ObserverServerExtended ¶
type ObserverServerExtended struct {
// contains filtered or unexported fields
}
func NewObserverServerExtended ¶
func NewObserverServerExtended(db *pg.DB, log insolar.Logger, pStorage observer.PulseStorage, config configuration.APIConfig) *ObserverServerExtended
func (*ObserverServerExtended) AugmentedAddress ¶
func (s *ObserverServerExtended) AugmentedAddress(ctx echo.Context, reference string) error
func (*ObserverServerExtended) Balance ¶
func (s *ObserverServerExtended) Balance(ctx echo.Context, reference string) error
func (*ObserverServerExtended) ClosedTransactions ¶
func (s *ObserverServerExtended) ClosedTransactions(ctx echo.Context, params ClosedTransactionsParams) error
CloseTransactions returns a list of closed transactions (only with statuses `received` and `failed`).
func (*ObserverServerExtended) Fee ¶
func (s *ObserverServerExtended) Fee(ctx echo.Context, amount string) error
func (*ObserverServerExtended) Member ¶
func (s *ObserverServerExtended) Member(ctx echo.Context, reference string) error
func (*ObserverServerExtended) MemberByPublicKey ¶
func (s *ObserverServerExtended) MemberByPublicKey(ctx echo.Context, params MemberByPublicKeyParams) error
func (*ObserverServerExtended) MemberTransactions ¶
func (s *ObserverServerExtended) MemberTransactions(ctx echo.Context, reference string, params MemberTransactionsParams) error
func (*ObserverServerExtended) Notification ¶
func (s *ObserverServerExtended) Notification(ctx echo.Context) error
func (*ObserverServerExtended) PulseNumber ¶
func (s *ObserverServerExtended) PulseNumber(ctx echo.Context) error
func (*ObserverServerExtended) PulseRange ¶
func (s *ObserverServerExtended) PulseRange(ctx echo.Context, params PulseRangeParams) error
func (*ObserverServerExtended) SetAugmentedAddress ¶
func (s *ObserverServerExtended) SetAugmentedAddress(ctx echo.Context, reference string, params SetAugmentedAddressParams) error
func (*ObserverServerExtended) SupplyStatsTotal ¶
func (s *ObserverServerExtended) SupplyStatsTotal(ctx echo.Context) error
func (*ObserverServerExtended) Transaction ¶
func (s *ObserverServerExtended) Transaction(ctx echo.Context, txIDStr string) error
func (*ObserverServerExtended) TransactionsByPulseNumberRange ¶
func (s *ObserverServerExtended) TransactionsByPulseNumberRange(ctx echo.Context, params TransactionsByPulseNumberRangeParams) error
func (*ObserverServerExtended) TransactionsSearch ¶
func (s *ObserverServerExtended) TransactionsSearch(ctx echo.Context, params TransactionsSearchParams) error
type PulseRangeParams ¶
type PulseRangeParams struct { // Unix timestamp to start the finalized pulse number range from. Must chronologically precede the `toTimestamp` parameter. FromTimestamp int64 `json:"fromTimestamp"` // Unix timestamp to end the finalized pulse number range at. Must chronologically succeed the `fromTimestamp` parameter. ToTimestamp int64 `json:"toTimestamp"` // Number of integers in the returned array. Limit int `json:"limit"` // Last known `pulseNumber`. Array starts from the next one. // // Each returned `pulseNumber` can be specified as the value of this parameter in subsequent requests. // // To get a `pulseNumber` array that starts from the nearest pulse after the `fromTimestamp` value, omit this parameter. PulseNumber *int64 `json:"pulseNumber,omitempty"` }
PulseRangeParams defines parameters for PulseRange.
type ResponsesAugmentedAddressYaml ¶
type ResponsesAugmentedAddressYaml struct { // Special address on the Ethereum network. AugmentedAddress string `json:"augmentedAddress"` }
ResponsesAugmentedAddressYaml defines model for responses-augmentedAddress-yaml.
type ResponsesFeeYaml ¶
type ResponsesFeeYaml struct { // Fee value in XNS coin fractions expressed as an integer. The smallest XNS fraction is `1/10^10`. To calculate an XNS value, divide the number of fractions by `10^10`. For example: `1000000000 fractions / 10^10 = 0.1 XNS`. Fee string `json:"fee"` }
ResponsesFeeYaml defines model for responses-fee-yaml.
type ResponsesInvalidAmountYaml ¶
type ResponsesInvalidAmountYaml struct { // Array of error messages. Error []string `json:"error"` }
ResponsesInvalidAmountYaml defines model for responses-invalidAmount-yaml.
type ResponsesInvalidReferenceYaml ¶
type ResponsesInvalidReferenceYaml struct { // Array of error messages. Error []string `json:"error"` }
ResponsesInvalidReferenceYaml defines model for responses-invalidReference-yaml.
type ResponsesInvalidSignatureYaml ¶
type ResponsesInvalidSignatureYaml struct { // Array of error messages. Error []string `json:"error"` }
ResponsesInvalidSignatureYaml defines model for responses-invalidSignature-yaml.
type ResponsesInvalidTransactionIdYaml ¶
type ResponsesInvalidTransactionIdYaml struct { // Array of error messages. Error []string `json:"error"` }
ResponsesInvalidTransactionIdYaml defines model for responses-invalidTransactionId-yaml.
type ResponsesMemberBalanceYaml ¶
type ResponsesMemberBalanceYaml struct { // Member's balance in XNS coin fractions expressed as an integer. The smallest XNS fraction is `1/10^10`. To calculate an XNS value, divide the number of fractions by `10^10`. For example: `1000000000 fractions / 10^10 = 0.1 XNS`. Balance string `json:"balance"` }
ResponsesMemberBalanceYaml defines model for responses-memberBalance-yaml.
type ResponsesMemberYaml ¶
type ResponsesMemberYaml struct { // Reference to the member's account object. AccountReference string `json:"accountReference"` // Account's balance in XNS coin fractions expressed as an integer. The smallest XNS fraction is `1/10^10`. To calculate an XNS value, divide the number of fractions by `10^10`. For example: `1000000000 fractions / 10^10 = 0.1 XNS`. Balance string `json:"balance"` // Amount of burned XNS coin fractions expressed as an integer, optional. The smallest XNS fraction is `1/10^10`. To calculate an XNS value, divide the number of fractions by `10^10`. For example: `1000000000 fractions / 10^10 = 0.1 XNS`. BurnedBalance *string `json:"burnedBalance,omitempty"` // Deposits associated with the member. Deposits *[]SchemaDeposit `json:"deposits,omitempty"` // Special address on the Ethereum network—a transfer destination for INS tokens during the migration period. MigrationAddress *string `json:"migrationAddress,omitempty"` // Reference to the `member` object. Reference string `json:"reference"` // Reference to the member's wallet object. WalletReference string `json:"walletReference"` }
ResponsesMemberYaml defines model for responses-member-yaml.
func MemberToAPIMember ¶
func MemberToAPIMember(member models.Member, deposits []models.Deposit, burnedBalance *models.BurnedBalance, withMemberRef bool) (ResponsesMemberYaml, error)
type ResponsesNotificationInfoYaml ¶
type ResponsesNotificationInfoYaml struct { // Notification message. Notification string `json:"notification"` }
ResponsesNotificationInfoYaml defines model for responses-notificationInfo-yaml.
type ResponsesPulseNumberYaml ¶
type ResponsesPulseNumberYaml struct { // Number of the latest finalized pulse. PulseNumber int64 `json:"pulseNumber"` }
ResponsesPulseNumberYaml defines model for responses-pulse-number-yaml.
type ResponsesPulseRangeYaml ¶
type ResponsesPulseRangeYaml []int64
ResponsesPulseRangeYaml defines model for responses-pulse-range-yaml.
type SchemaAllocation ¶
type SchemaAllocation struct { // Embedded struct due to allOf(#/components/schemas/schemas-transactionAbstract) SchemasTransactionAbstract // Reference to the sending member object (migration daemon). FromMemberReference string `json:"fromMemberReference"` // Reference to the receiving deposit object. ToDepositReference string `json:"toDepositReference"` // Reference to the receiving member object. ToMemberReference string `json:"toMemberReference"` Type string `json:"type"` }
SchemaAllocation defines model for schema-allocation.
type SchemaAugmentedAddressInfo ¶
type SchemaAugmentedAddressInfo struct { // Special address on the Ethereum network. AugmentedAddress string `json:"augmentedAddress"` // Public key of the target `member` object. With or without the `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----` delimiters. PublicKey string `json:"publicKey"` }
SchemaAugmentedAddressInfo defines model for schema-augmentedAddressInfo.
type SchemaBurn ¶
type SchemaBurn struct { // Embedded struct due to allOf(#/components/schemas/schemas-transactionAbstract) SchemasTransactionAbstract // Reference to the sending member object. FromMemberReference string `json:"fromMemberReference"` // Reference to the receiving member object. ToMemberReference *string `json:"toMemberReference"` Type string `json:"type"` }
SchemaBurn defines model for schema-burn.
type SchemaDeposit ¶
type SchemaDeposit struct { // An integer amount of XNS coin fractions in the deposit that are on hold. The smallest XNS fraction is `1/10^10`. To calculate an XNS value, divide the number of fractions by `10^10`. For example: `1000000000 fractions / 10^10 = 0.1 XNS`. AmountOnHold string `json:"amountOnHold"` // An integer amount of XNS coin fractions available for transfer from the deposit. The smallest XNS fraction is `1/10^10`. To calculate an XNS value, divide the number of fractions by `10^10`. For example: `1000000000 fractions / 10^10 = 0.1 XNS`. AvailableAmount string `json:"availableAmount"` // Reference to the `deposit` object. DepositReference string `json:"depositReference"` // Ethereum transaction hash associated with the deposit. EthTxHash string `json:"ethTxHash"` // Date in Unix timestamp format to start the release of the held coins. HoldReleaseDate int64 `json:"holdReleaseDate"` // Deposit sequence number. Index int `json:"index"` // Reference to the `member` object. Returned if, instead of `reference`, the request had a `migrationAddress` in path. MemberReference *string `json:"memberReference,omitempty"` // Next partial release—amount of XNS coin fractions to release at a particular Unix timestamp in the future. NextRelease *SchemaNextRelease `json:"nextRelease,omitempty"` // Date in Unix timestamp format to end the release period meaning release of all coins. ReleaseEndDate int64 `json:"releaseEndDate"` // An integer amount of released XNS coin fractions from the start of the release period. The smallest XNS fraction is `1/10^10`. To calculate an XNS value, divide the number of fractions by `10^10`. For example: `1000000000 fractions / 10^10 = 0.1 XNS`. ReleasedAmount string `json:"releasedAmount"` // * `AVAILABLE`—deposit is active, you can transfer coins from it. // * `LOCKED`—deposit is on hold until the `releaseEndDate`. // * `MIGRATION`—approvals from migration daemons are being collected. Status string `json:"status"` // Deposit creation time in Unix timestamp format. Timestamp int64 `json:"timestamp"` }
SchemaDeposit defines model for schema-deposit.
type SchemaMigration ¶
type SchemaMigration struct { // Embedded struct due to allOf(#/components/schemas/schemas-transactionAbstract) SchemasTransactionAbstract // Reference to the sending member object (migration daemon). FromMemberReference string `json:"fromMemberReference"` // Reference to the receiving deposit object. ToDepositReference string `json:"toDepositReference"` // Reference to the receiving member object. ToMemberReference string `json:"toMemberReference"` Type string `json:"type"` }
SchemaMigration defines model for schema-migration.
type SchemaNextRelease ¶
type SchemaNextRelease struct { // An integer amount of XNS coin fractions to release. The smallest XNS fraction is `1/10^10`. To calculate an XNS value, divide the number of fractions by `10^10`. For example: `1000000000 fractions / 10^10 = 0.1 XNS`. Amount string `json:"amount"` // Unix timestamp in the future. Timestamp int64 `json:"timestamp"` }
SchemaNextRelease defines model for schema-next-release.
type SchemaRelease ¶
type SchemaRelease struct { // Embedded struct due to allOf(#/components/schemas/schemas-transactionAbstract) SchemasTransactionAbstract // Reference to the sending deposit object. FromDepositReference string `json:"fromDepositReference"` // Reference to the receiving member object. ToMemberReference string `json:"toMemberReference"` Type string `json:"type"` }
SchemaRelease defines model for schema-release.
type SchemaTransfer ¶
type SchemaTransfer struct { // Embedded struct due to allOf(#/components/schemas/schemas-transactionAbstract) SchemasTransactionAbstract // Reference to the sending member object. FromMemberReference string `json:"fromMemberReference"` // Reference to the receiving member object. ToMemberReference *string `json:"toMemberReference"` Type string `json:"type"` }
SchemaTransfer defines model for schema-transfer.
type SchemasTransaction ¶
type SchemasTransaction interface{}
SchemasTransaction defines model for schemas-transaction.
type SchemasTransactionAbstract ¶
type SchemasTransactionAbstract struct { // An integer amount of XNS coin fractions. The smallest XNS fraction is `1/10^10`. To calculate an XNS value, divide the number of fractions by `10^10`. For example: `1000000000 fractions / 10^10 = 0.1 XNS`. Amount string `json:"amount"` // Fee value in XNS coin fractions. Only finalized transactions (with `received` status) have this value. Fee *string `json:"fee,omitempty"` // Transaction index. Index string `json:"index"` // Pulse number at the transaction timestamp. PulseNumber int64 `json:"pulseNumber"` // Transaction status: // // * `registered`—transfer request is registered. // * `sent`—transfer of funds from the sender is finalized. // * `received`—transfer of funds to the receiver is finalized. // * `failed`—transfer of funds is finalized with an error; for example, in case of insufficient balance. Status string `json:"status"` // Unix timestamp of the initial transfer request. Timestamp int64 `json:"timestamp"` // Transaction ID. TxID string `json:"txID"` // Transaction type that all references depend on. Type string `json:"type"` }
SchemasTransactionAbstract defines model for schemas-transactionAbstract.
type SchemasTransactions ¶
type SchemasTransactions []SchemasTransaction
SchemasTransactions defines model for schemas-transactions.
type ServerInterface ¶
type ServerInterface interface { // Fee // (GET /api/fee/{amount}) Fee(ctx echo.Context, amount string) error // Member ethereum augmented address // (GET /api/member/augmentedAddress/{reference}) AugmentedAddress(ctx echo.Context, reference string) error // Member ethereum augmented address // (POST /api/member/augmentedAddress/{reference}) SetAugmentedAddress(ctx echo.Context, reference string, params SetAugmentedAddressParams) error // Member by public key // (GET /api/member/byPublicKey) MemberByPublicKey(ctx echo.Context, params MemberByPublicKeyParams) error // Member // (GET /api/member/{reference}) Member(ctx echo.Context, reference string) error // Member balance // (GET /api/member/{reference}/balance) Balance(ctx echo.Context, reference string) error // Member transactions // (GET /api/member/{reference}/transactions) MemberTransactions(ctx echo.Context, reference string, params MemberTransactionsParams) error // Notification // (GET /api/notification) Notification(ctx echo.Context) error // Pulse number // (GET /api/pulse/number) PulseNumber(ctx echo.Context) error // Pulse number range // (GET /api/pulse/range) PulseRange(ctx echo.Context, params PulseRangeParams) error // Total supply // (GET /api/stats/supply/total) SupplyStatsTotal(ctx echo.Context) error // Transaction // (GET /api/transaction/{txID}) Transaction(ctx echo.Context, txID string) error // Transactions // (GET /api/transactions) TransactionsSearch(ctx echo.Context, params TransactionsSearchParams) error // Closed transactions // (GET /api/transactions/closed) ClosedTransactions(ctx echo.Context, params ClosedTransactionsParams) error // Transactions within a range of pulse numbers // (GET /api/transactions/inPulseNumberRange) TransactionsByPulseNumberRange(ctx echo.Context, params TransactionsByPulseNumberRangeParams) error }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) AugmentedAddress ¶
func (w *ServerInterfaceWrapper) AugmentedAddress(ctx echo.Context) error
AugmentedAddress converts echo context to params.
func (*ServerInterfaceWrapper) Balance ¶
func (w *ServerInterfaceWrapper) Balance(ctx echo.Context) error
Balance converts echo context to params.
func (*ServerInterfaceWrapper) ClosedTransactions ¶
func (w *ServerInterfaceWrapper) ClosedTransactions(ctx echo.Context) error
ClosedTransactions converts echo context to params.
func (*ServerInterfaceWrapper) Fee ¶
func (w *ServerInterfaceWrapper) Fee(ctx echo.Context) error
Fee converts echo context to params.
func (*ServerInterfaceWrapper) Member ¶
func (w *ServerInterfaceWrapper) Member(ctx echo.Context) error
Member converts echo context to params.
func (*ServerInterfaceWrapper) MemberByPublicKey ¶
func (w *ServerInterfaceWrapper) MemberByPublicKey(ctx echo.Context) error
MemberByPublicKey converts echo context to params.
func (*ServerInterfaceWrapper) MemberTransactions ¶
func (w *ServerInterfaceWrapper) MemberTransactions(ctx echo.Context) error
MemberTransactions converts echo context to params.
func (*ServerInterfaceWrapper) Notification ¶
func (w *ServerInterfaceWrapper) Notification(ctx echo.Context) error
Notification converts echo context to params.
func (*ServerInterfaceWrapper) PulseNumber ¶
func (w *ServerInterfaceWrapper) PulseNumber(ctx echo.Context) error
PulseNumber converts echo context to params.
func (*ServerInterfaceWrapper) PulseRange ¶
func (w *ServerInterfaceWrapper) PulseRange(ctx echo.Context) error
PulseRange converts echo context to params.
func (*ServerInterfaceWrapper) SetAugmentedAddress ¶
func (w *ServerInterfaceWrapper) SetAugmentedAddress(ctx echo.Context) error
SetAugmentedAddress converts echo context to params.
func (*ServerInterfaceWrapper) SupplyStatsTotal ¶
func (w *ServerInterfaceWrapper) SupplyStatsTotal(ctx echo.Context) error
SupplyStatsTotal converts echo context to params.
func (*ServerInterfaceWrapper) Transaction ¶
func (w *ServerInterfaceWrapper) Transaction(ctx echo.Context) error
Transaction converts echo context to params.
func (*ServerInterfaceWrapper) TransactionsByPulseNumberRange ¶
func (w *ServerInterfaceWrapper) TransactionsByPulseNumberRange(ctx echo.Context) error
TransactionsByPulseNumberRange converts echo context to params.
func (*ServerInterfaceWrapper) TransactionsSearch ¶
func (w *ServerInterfaceWrapper) TransactionsSearch(ctx echo.Context) error
TransactionsSearch converts echo context to params.
type SetAugmentedAddressJSONBody ¶
type SetAugmentedAddressJSONBody SchemaAugmentedAddressInfo
SetAugmentedAddressJSONBody defines parameters for SetAugmentedAddress.
type SetAugmentedAddressJSONRequestBody ¶
type SetAugmentedAddressJSONRequestBody SetAugmentedAddressJSONBody
SetAugmentedAddressRequestBody defines body for SetAugmentedAddress for application/json ContentType.
type SetAugmentedAddressParams ¶
type SetAugmentedAddressParams struct { // [Digest HTTP header](https://tools.ietf.org/html/rfc3230#section-4.3.2) with an SHA-256 hash of the request's payload bytes in a Base64 `<hashString>`. Digest DigestHeader `json:"Digest"` // [Signature HTTP header](https://tools.ietf.org/id/draft-cavage-http-signatures-11.html#sig-header) with the signed hash bytes in a Base64 `<signatureString>`. // // The signature is: // // * in [ASN.1 DER format](https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-X.690-201508-I!!PDF-E&type=items); // * generated by an ECDSA private key; // * checked by the paired public key (`publicKey`). Signature SignatureHeader `json:"Signature"` }
SetAugmentedAddressParams defines parameters for SetAugmentedAddress.
type SignatureHeader ¶
type SignatureHeader string
SignatureHeader defines model for signatureHeader.
type Transactions ¶
type Transactions struct { // Embedded fields due to inline allOf schema // Embedded struct due to allOf(#/components/schemas/schemas-transactions) SchemasTransactions }
Transactions defines model for transactions.
type TransactionsByPulseNumberRangeParams ¶
type TransactionsByPulseNumberRangeParams struct { // Reference to the `member` object. // // Note: Path parameters must be properly included into the URL, so `:` after `insolar` in references and IDs should be replaced with `%3A` to comply with the HTML URL encoding. MemberReference *string `json:"memberReference,omitempty"` // Pulse number to start the first transaction list from. This parameter must chronologically precede the `toPulseNumber`. FromPulseNumber int64 `json:"fromPulseNumber"` // Pulse number to end the last transaction list at. This parameter must chronologically succeed the `fromPulseNumber`. ToPulseNumber int64 `json:"toPulseNumber"` // Number of entries per list. Limit int `json:"limit"` // Index of the last known transaction. The list starts from the next one. // // Each returned transaction has an `index` that can be specified as the value of this parameter. // // To get the list transactions with a pulse number starting from the value of `fromPulseNumber`, omit the index. Index *string `json:"index,omitempty"` }
TransactionsByPulseNumberRangeParams defines parameters for TransactionsByPulseNumberRange.
type TransactionsSearchParams ¶
type TransactionsSearchParams struct { // Value of `txID`, `fromMemberReference`, `toMemberReference` or `pulseNumber` by which to search (filter) transactions. // // Note: Path parameters must be properly included into the URL, so `:` after `insolar` in references and IDs should be replaced with `%3A` to comply with the HTML URL encoding. Value *string `json:"value,omitempty"` // Number of entries per list. Limit int `json:"limit"` // Index of the last known transaction. List starts from the next one. // // Each returned transaction has an `index` that can be specified as the value of this parameter. // // To get the list of most recent or old (depending on the `order` value) transactions, omit the index. Index *string `json:"index,omitempty"` // Chronological `order` of the transaction list starting from a given `index`: // // * `chronological`—get transactions that chronologically follow a transaction with a given `index`; // * `reverse`—get transactions that chronologically precede a transaction with a given `index`. Order *string `json:"order,omitempty"` // Transaction type: // // * `transfer`—transactions to/from to the member. // * `migration`—only transactions to the member's deposits. // * `allocation`—only transactions used by Insolar for internal funding purposes. // * `release`—only transactions from the member's deposits to this member's account. // * `burn`-transfers of burned coins from the member. Type *string `json:"type,omitempty"` // Transaction status: // // * `registered`—transfer request is registered. // * `sent`—transfer of funds from the sender is finalized. // * `received`—transfer of funds to the receiver is finalized. // * `failed`—transfer of funds is finalized with an error; for example, in case of insufficient balance. Status *string `json:"status,omitempty"` }
TransactionsSearchParams defines parameters for TransactionsSearch.