Documentation ¶
Index ¶
- type Block
- type BlockForged
- type BlockGenerator
- type BlockPayload
- type Blocks
- type BlocksService
- func (s *BlocksService) First(ctx context.Context) (*GetBlock, *http.Response, error)
- func (s *BlocksService) Get(ctx context.Context, id int64) (*GetBlock, *http.Response, error)
- func (s *BlocksService) Last(ctx context.Context) (*GetBlock, *http.Response, error)
- func (s *BlocksService) List(ctx context.Context, query *Pagination) (*Blocks, *http.Response, error)
- func (s *BlocksService) Transactions(ctx context.Context, id int64, query *Pagination) (*GetBlockTransactions, *http.Response, error)
- type ClaimAsset
- type Client
- type CreateTransaction
- type CreateTransactionRequest
- type Delegate
- type DelegateAsset
- type DelegateBlocks
- type DelegateForged
- type DelegateProduction
- type Delegates
- type DelegatesService
- func (s *DelegatesService) Blocks(ctx context.Context, id string, query *Pagination) (*GetDelegateBlocks, *http.Response, error)
- func (s *DelegatesService) Get(ctx context.Context, id string) (*GetDelegate, *http.Response, error)
- func (s *DelegatesService) List(ctx context.Context, query *Pagination) (*Delegates, *http.Response, error)
- func (s *DelegatesService) Voters(ctx context.Context, id string, query *Pagination) (*GetDelegateVoters, *http.Response, error)
- type DynamicFees
- type FeeStatistic
- type FeeTypes
- type FeesRequest
- type FromTo
- type GetBlock
- type GetBlockTransactions
- type GetCreateTransaction
- type GetDelegate
- type GetDelegateBlocks
- type GetDelegateVoters
- type GetDelegates
- type GetLock
- type GetNodeConfiguration
- type GetNodeFees
- type GetNodeStatus
- type GetNodeSyncing
- type GetPeer
- type GetTransaction
- type GetWallet
- type IpfsAsset
- type Lock
- type Locks
- type LocksService
- func (s *LocksService) Get(ctx context.Context, id string) (*GetLock, *http.Response, error)
- func (s *LocksService) List(ctx context.Context, query *Pagination) (*Locks, *http.Response, error)
- func (s *LocksService) Unlocked(ctx context.Context, query *Pagination, body *LocksUnlockedRequest) (*Transactions, *http.Response, error)
- type LocksUnlockedRequest
- type Meta
- type MultiPaymentAsset
- type MultiSignatureRegistrationAsset
- type NodeConfiguration
- type NodeConstants
- type NodeConstantsBlock
- type NodeFees
- type NodeService
- func (s *NodeService) Configuration(ctx context.Context) (*GetNodeConfiguration, *http.Response, error)
- func (s *NodeService) Fees(ctx context.Context, days int) (*GetNodeFees, *http.Response, error)
- func (s *NodeService) Status(ctx context.Context) (*GetNodeStatus, *http.Response, error)
- func (s *NodeService) Syncing(ctx context.Context) (*GetNodeSyncing, *http.Response, error)
- type NodeStatus
- type NodeSyncing
- type NodeTransactionPool
- type Pagination
- type Peer
- type PeerPorts
- type Peers
- type PeersService
- type RoundDelegate
- type RoundsService
- type SecondSignatureRegistrationAsset
- type Service
- type Timestamp
- type Transaction
- type TransactionAsset
- type TransactionFees
- type TransactionTypes
- type Transactions
- type TransactionsService
- func (s *TransactionsService) Create(ctx context.Context, body *CreateTransactionRequest) (*CreateTransaction, *http.Response, error)
- func (s *TransactionsService) Fees(ctx context.Context) (*TransactionFees, *http.Response, error)
- func (s *TransactionsService) Get(ctx context.Context, id string) (*GetTransaction, *http.Response, error)
- func (s *TransactionsService) GetUnconfirmed(ctx context.Context, id string) (*GetTransaction, *http.Response, error)
- func (s *TransactionsService) List(ctx context.Context, query *Pagination) (*Transactions, *http.Response, error)
- func (s *TransactionsService) ListUnconfirmed(ctx context.Context, query *Pagination) (*Transactions, *http.Response, error)
- func (s *TransactionsService) Types(ctx context.Context) (*TransactionTypes, *http.Response, error)
- type TypeGroupTypes
- type VotesService
- type Wallet
- type Wallets
- type WalletsService
- func (s *WalletsService) Get(ctx context.Context, id string) (*GetWallet, *http.Response, error)
- func (s *WalletsService) List(ctx context.Context, query *Pagination) (*Wallets, *http.Response, error)
- func (s *WalletsService) Locks(ctx context.Context, id string, query *Pagination) (*Locks, *http.Response, error)
- func (s *WalletsService) ReceivedTransactions(ctx context.Context, id string, query *Pagination) (*Transactions, *http.Response, error)
- func (s *WalletsService) SentTransactions(ctx context.Context, id string, query *Pagination) (*Transactions, *http.Response, error)
- func (s *WalletsService) Top(ctx context.Context, query *Pagination) (*Wallets, *http.Response, error)
- func (s *WalletsService) Transactions(ctx context.Context, id string, query *Pagination) (*Transactions, *http.Response, error)
- func (s *WalletsService) Votes(ctx context.Context, id string, query *Pagination) (*Transactions, *http.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { Id string `json:"id,omitempty"` Version byte `json:"version,omitempty"` Height int64 `json:"height,omitempty"` Previous string `json:"previous,omitempty"` Forged BlockForged `json:"forged,omitempty"` Payload BlockPayload `json:"payload,omitempty"` Generator BlockGenerator `json:"generator,omitempty"` Signature string `json:"signature,omitempty"` Confirmations uint32 `json:"confirmations,omitempty"` Transactions byte `json:"transactions,omitempty"` Timestamp Timestamp `json:"timestamp,omitempty"` }
type BlockForged ¶
type BlockGenerator ¶
type BlockPayload ¶
type BlocksService ¶
type BlocksService Service
BlocksService handles communication with the blocks related methods of the Ark Core API - Version 2.
func (*BlocksService) List ¶
func (s *BlocksService) List(ctx context.Context, query *Pagination) (*Blocks, *http.Response, error)
Get all blocks.
func (*BlocksService) Transactions ¶
func (s *BlocksService) Transactions(ctx context.Context, id int64, query *Pagination) (*GetBlockTransactions, *http.Response, error)
Get all transactions by the given block.
type ClaimAsset ¶
type Client ¶
type Client struct { BaseURL *url.URL Blocks *BlocksService Delegates *DelegatesService Locks *LocksService Node *NodeService Peers *PeersService Rounds *RoundsService Transactions *TransactionsService Votes *VotesService Wallets *WalletsService // contains filtered or unexported fields }
type CreateTransaction ¶
type CreateTransactionRequest ¶
type CreateTransactionRequest struct {
Transactions []Transaction `json:"transactions,omitempty"`
}
type Delegate ¶
type Delegate struct { Username string `json:"username,omitempty"` Address string `json:"address,omitempty"` PublicKey string `json:"publicKey,omitempty"` Votes int64 `json:"votes,omitempty"` Rank byte `json:"rank,omitempty"` Blocks DelegateBlocks `json:"blocks,omitempty"` Production DelegateProduction `json:"production,omitempty"` Forged DelegateForged `json:"forged,omitempty"` }
type DelegateAsset ¶
type DelegateAsset struct {
Username string `json:"username,omitempty"`
}
type DelegateBlocks ¶
type DelegateForged ¶
type DelegateProduction ¶
type DelegateProduction struct {
Approval float64 `json:"approval,omitempty"`
}
type DelegatesService ¶
type DelegatesService Service
DelegatesService handles communication with the delegates related methods of the Ark Core API - Version 2.
func (*DelegatesService) Blocks ¶
func (s *DelegatesService) Blocks(ctx context.Context, id string, query *Pagination) (*GetDelegateBlocks, *http.Response, error)
Get all blocks for the given delegate.
func (*DelegatesService) Get ¶
func (s *DelegatesService) Get(ctx context.Context, id string) (*GetDelegate, *http.Response, error)
Get a delegate by the given ID. (address, publicKey and username are valid)
func (*DelegatesService) List ¶
func (s *DelegatesService) List(ctx context.Context, query *Pagination) (*Delegates, *http.Response, error)
Get all accounts.
func (*DelegatesService) Voters ¶
func (s *DelegatesService) Voters(ctx context.Context, id string, query *Pagination) (*GetDelegateVoters, *http.Response, error)
Get all voters for the given delegate.
type DynamicFees ¶
type FeeStatistic ¶
type FeeTypes ¶
type FeeTypes struct { Transfer uint32 `json:"transfer,omitempty"` SecondSignature uint32 `json:"secondSignature,omitempty"` DelegateRegistration uint32 `json:"delegateRegistration,omitempty"` Vote uint32 `json:"vote,omitempty"` MultiSignature uint32 `json:"multiSignature,omitempty"` Ipfs uint32 `json:"ipfs,omitempty"` MultiPayment uint32 `json:"multiPayment,omitempty"` DelegateResignation uint32 `json:"delegateResignation,omitempty"` HtlcLock uint32 `json:"htlcLock,omitempty"` HtlcClaim uint32 `json:"htlcClaim,omitempty"` HtlcRefund uint32 `json:"htlcRefund,omitempty"` }
type FeesRequest ¶
type FeesRequest struct {
Days int `url:"days"`
}
type FromTo ¶
type FromTo struct { From interface{} `json:"from,omitempty"` To interface{} `json:"from,omitempty"` }
type GetBlockTransactions ¶
type GetBlockTransactions struct { Meta Meta `json:"meta,omitempty"` Data []Transaction `json:"data,omitempty"` }
type GetCreateTransaction ¶
type GetCreateTransaction struct {
Data CreateTransaction `json:"data,omitempty"`
}
type GetDelegate ¶
type GetDelegateBlocks ¶
type GetDelegateVoters ¶
type GetDelegates ¶
type GetDelegates struct {
Data []RoundDelegate `json:"data,omitempty"`
}
type GetNodeConfiguration ¶
type GetNodeConfiguration struct {
Data NodeConfiguration `json:"data,omitempty"`
}
type GetNodeFees ¶
type GetNodeFees struct {
Data NodeFees `json:"data,omitempty"`
}
type GetNodeStatus ¶
type GetNodeStatus struct {
Data NodeStatus `json:"data,omitempty"`
}
type GetNodeSyncing ¶
type GetNodeSyncing struct {
Data NodeSyncing `json:"data,omitempty"`
}
type GetTransaction ¶
type GetTransaction struct {
Data Transaction `json:"data,omitempty"`
}
type Lock ¶
type Lock struct { LockId string `json:"lockId,omitempty"` Amount uint64 `json:"amount,omitempty,string"` SecretHash string `json:"secretHash,omitempty"` SenderPublicKey string `json:"senderPublicKey,omitempty"` RecipientId string `json:"recipientId,omitempty"` Timestamp Timestamp `json:"timestamp,omitempty"` ExpirationType byte `json:"expirationType,omitempty"` ExpirationValue uint32 `json:"expirationValue,omitempty"` VendorField string `json:"vendorField,omitempty"` IsExpired bool `json:"isExpired,omitempty"` }
type LocksService ¶
type LocksService Service
LocksService handles communication with the locks related methods of the Ark Core API - Version 2.
func (*LocksService) List ¶
func (s *LocksService) List(ctx context.Context, query *Pagination) (*Locks, *http.Response, error)
Get all locks.
func (*LocksService) Unlocked ¶
func (s *LocksService) Unlocked(ctx context.Context, query *Pagination, body *LocksUnlockedRequest) (*Transactions, *http.Response, error)
Retrieve transactions by the given lock ids.
type LocksUnlockedRequest ¶
type LocksUnlockedRequest struct {
Ids []string `json:"ids,omitempty"`
}
type Meta ¶
type Meta struct { Count uint32 `url:"count,omitempty"` PageCount uint32 `url:"pageCount,omitempty"` TotalCount uint32 `url:"totalCount,omitempty"` Next string `url:"next,omitempty"` Previous string `url:"previous,omitempty"` Self string `url:"self,omitempty"` First string `url:"first,omitempty"` Last string `url:"last,omitempty"` }
type MultiPaymentAsset ¶
type NodeConfiguration ¶
type NodeConfiguration struct { Nethash string `json:"nethash,omitempty"` Token string `json:"token,omitempty"` Symbol string `json:"symbol,omitempty"` Explorer string `json:"explorer,omitempty"` Version int16 `json:"version,omitempty"` Ports map[string]int16 `json:"ports,omitempty"` Constants NodeConstants `json:"constants,omitempty"` TransactionPool NodeTransactionPool `json:"transactionPool,omitempty"` }
type NodeConstants ¶
type NodeConstants struct { Height int64 `json:"height,omitempty"` Reward int64 `json:"reward,omitempty"` ActiveDelegates byte `json:"activeDelegates,omitempty"` BlockTime byte `json:"blocktime,omitempty"` Block NodeConstantsBlock `json:"block,omitempty"` Epoch string `json:"epoch,omitempty"` Fees map[string]FeeTypes `json:"fees,omitempty"` }
type NodeConstantsBlock ¶
type NodeFees ¶
type NodeFees []FeeStatistic
type NodeService ¶
type NodeService Service
NodeService handles communication with the node related methods of the Ark Core API - Version 2.
func (*NodeService) Configuration ¶
func (s *NodeService) Configuration(ctx context.Context) (*GetNodeConfiguration, *http.Response, error)
Get the node configuration.
func (*NodeService) Fees ¶
func (s *NodeService) Fees(ctx context.Context, days int) (*GetNodeFees, *http.Response, error)
Get the node fee statistics.
func (*NodeService) Status ¶
func (s *NodeService) Status(ctx context.Context) (*GetNodeStatus, *http.Response, error)
Get the node status.
func (*NodeService) Syncing ¶
func (s *NodeService) Syncing(ctx context.Context) (*GetNodeSyncing, *http.Response, error)
Get the node syncing status.
type NodeStatus ¶
type NodeSyncing ¶
type NodeTransactionPool ¶
type NodeTransactionPool struct {
DynamicFees DynamicFees `json:"dynamicFees,omitempty"`
}
type Pagination ¶
type PeersService ¶
type PeersService Service
PeersService handles communication with the peers related methods of the Ark Core API - Version 2.
func (*PeersService) List ¶
func (s *PeersService) List(ctx context.Context, query *Pagination) (*Peers, *http.Response, error)
Get all peers.
type RoundDelegate ¶
type RoundsService ¶
type RoundsService Service
RoundsService handles communication with the rounds related methods of the Ark Core API - Version 2.
func (*RoundsService) Delegates ¶
func (s *RoundsService) Delegates(ctx context.Context, id int64) (*GetDelegates, *http.Response, error)
Get the forging delegates of a round by the given id.
type SecondSignatureRegistrationAsset ¶
type SecondSignatureRegistrationAsset struct {
PublicKey string `json:"publicKey,omitempty"`
}
type Timestamp ¶
type Transaction ¶
type Transaction struct { Id string `json:"id,omitempty"` BlockId string `json:"blockId,omitempty"` Version byte `json:"version,omitempty"` Type byte `json:"type,omitempty"` TypeGroup uint16 `json:"typeGroup,omitempty"` Amount uint64 `json:"amount,omitempty,string"` Fee uint64 `json:"fee,omitempty,string"` Sender string `json:"sender,omitempty"` SenderPublicKey string `json:"senderPublicKey,omitempty"` Recipient string `json:"recipient,omitempty"` Signature string `json:"signature,omitempty"` Asset *TransactionAsset `json:"asset,omitempty"` VendorField string `json:"vendorField,omitempty"` Confirmations uint32 `json:"confirmations,omitempty"` Timestamp Timestamp `json:"timestamp,omitempty"` Nonce uint64 `json:"nonce,omitempty,string"` }
type TransactionAsset ¶
type TransactionAsset struct { Votes []string `json:"votes,omitempty"` Signature *SecondSignatureRegistrationAsset `json:"signature,omitempty"` Delegate *DelegateAsset `json:"publicKey,omitempty"` MultiSignature *MultiSignatureRegistrationAsset `json:"multisignature,omitempty"` Ipfs *IpfsAsset `json:"ipfs,omitempty"` Payments []*MultiPaymentAsset `json:"payments,omitempty"` Claim *ClaimAsset `json:"claim,omitempty"` }
type TransactionFees ¶
type TransactionTypes ¶
type TransactionTypes struct {
Data map[string]TypeGroupTypes `json:"data,omitempty"`
}
type Transactions ¶
type Transactions struct { Meta Meta `json:"meta,omitempty"` Data []Transaction `json:"data,omitempty"` }
type TransactionsService ¶
type TransactionsService Service
TransactionsService handles communication with the transactions related methods of the Ark Core API - Version 2.
func (*TransactionsService) Create ¶
func (s *TransactionsService) Create(ctx context.Context, body *CreateTransactionRequest) (*CreateTransaction, *http.Response, error)
Create a new transaction.
func (*TransactionsService) Fees ¶
func (s *TransactionsService) Fees(ctx context.Context) (*TransactionFees, *http.Response, error)
Get a list of static transaction fees.
func (*TransactionsService) Get ¶
func (s *TransactionsService) Get(ctx context.Context, id string) (*GetTransaction, *http.Response, error)
Get a transaction by the given id.
func (*TransactionsService) GetUnconfirmed ¶
func (s *TransactionsService) GetUnconfirmed(ctx context.Context, id string) (*GetTransaction, *http.Response, error)
Get an unconfirmed transaction by the given id.
func (*TransactionsService) List ¶
func (s *TransactionsService) List(ctx context.Context, query *Pagination) (*Transactions, *http.Response, error)
Get all transactions.
func (*TransactionsService) ListUnconfirmed ¶
func (s *TransactionsService) ListUnconfirmed(ctx context.Context, query *Pagination) (*Transactions, *http.Response, error)
Get all unconfirmed transactions.
func (*TransactionsService) Types ¶
func (s *TransactionsService) Types(ctx context.Context) (*TransactionTypes, *http.Response, error)
Get a list of valid transaction types.
type TypeGroupTypes ¶
type VotesService ¶
type VotesService Service
VotesService handles communication with the votes related methods of the Ark Core API - Version 2.
func (*VotesService) Get ¶
func (s *VotesService) Get(ctx context.Context, id string) (*GetTransaction, *http.Response, error)
Get a vote by the given id.
func (*VotesService) List ¶
func (s *VotesService) List(ctx context.Context, query *Pagination) (*Transactions, *http.Response, error)
Get all votes.
type WalletsService ¶
type WalletsService Service
WalletsService handles communication with the wallets related methods of the Ark Core API - Version 2.
func (*WalletsService) Get ¶
Get a wallet by the given id. (address, publicKey and username are valid)
func (*WalletsService) List ¶
func (s *WalletsService) List(ctx context.Context, query *Pagination) (*Wallets, *http.Response, error)
Get all wallets.
func (*WalletsService) Locks ¶
func (s *WalletsService) Locks(ctx context.Context, id string, query *Pagination) (*Locks, *http.Response, error)
Get all locks for the given wallet.
func (*WalletsService) ReceivedTransactions ¶
func (s *WalletsService) ReceivedTransactions(ctx context.Context, id string, query *Pagination) (*Transactions, *http.Response, error)
Get all transactions received by the given wallet.
func (*WalletsService) SentTransactions ¶
func (s *WalletsService) SentTransactions(ctx context.Context, id string, query *Pagination) (*Transactions, *http.Response, error)
Get all transactions sent by the given wallet.
func (*WalletsService) Top ¶
func (s *WalletsService) Top(ctx context.Context, query *Pagination) (*Wallets, *http.Response, error)
Get all wallets sorted by balance in descending order.
func (*WalletsService) Transactions ¶
func (s *WalletsService) Transactions(ctx context.Context, id string, query *Pagination) (*Transactions, *http.Response, error)
Get all transactions for the given wallet.
func (*WalletsService) Votes ¶
func (s *WalletsService) Votes(ctx context.Context, id string, query *Pagination) (*Transactions, *http.Response, error)
Get all votes by the given wallet.
Source Files ¶
- blocks.go
- blocks_responses.go
- client.go
- delegates.go
- delegates_responses.go
- locks.go
- locks_requests.go
- locks_responses.go
- meta.go
- node.go
- node_requests.go
- node_responses.go
- pagination.go
- peers.go
- peers_responses.go
- rounds.go
- rounds_responses.go
- structs.go
- testing.go
- transactions.go
- transactions_requests.go
- transactions_responses.go
- votes.go
- wallets.go
- wallets_responses.go