API_Presidio

package
v2.0.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccountResponseErrorCodes_name = map[int32]string{
	0: "NO_ERROR",
	1: "INTERNAL_ERROR",
	2: "INVALID_PAGE_NUMBER",
	3: "INVALID_PAGE_SIZE",
}
View Source
var AccountResponseErrorCodes_value = map[string]int32{
	"NO_ERROR":            0,
	"INTERNAL_ERROR":      1,
	"INVALID_PAGE_NUMBER": 2,
	"INVALID_PAGE_SIZE":   3,
}
View Source
var CTokenResponseErrorCodes_name = map[int32]string{
	0: "NO_ERROR",
	1: "INTERNAL_ERROR",
}
View Source
var CTokenResponseErrorCodes_value = map[string]int32{
	"NO_ERROR":       0,
	"INTERNAL_ERROR": 1,
}

Functions

func RegisterAccountServiceServer

func RegisterAccountServiceServer(s *grpc.Server, srv AccountServiceServer)

func RegisterCTokenServiceServer

func RegisterCTokenServiceServer(s *grpc.Server, srv CTokenServiceServer)

func RegisterSharedDataTypesServer

func RegisterSharedDataTypesServer(s *grpc.Server, srv SharedDataTypesServer)

Types

type Account

type Account struct {
	// The public Ethereum address of the account
	Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// The value of all collateral supplied by the account. Calculated as <em>cTokens held • exchange rate • collateral factor</em>.
	// Note: assets can be supplied and gain interest without being counted as collateral.
	TotalCollateralValueInEth *Precise `` /* 142-byte string literal not displayed */
	// The value of all outstanding borrows with accumulated interest.
	TotalBorrowValueInEth *Precise `` /* 130-byte string literal not displayed */
	// <pre>total_collateral_value_in_eth / total_borrow_value_in_eth</pre>. If this value is less than 1.0, the account is subject to liquidation.
	Health *Precise `protobuf:"bytes,5,opt,name=health,proto3" json:"health,omitempty"`
	//doc-false
	BlockUpdated int32 `protobuf:"varint,6,opt,name=block_updated,json=blockUpdated,proto3" json:"block_updated,omitempty"`
	// A list of tokens held by this account, see <ref>AccountCToken</ref> below for details.
	Tokens               []*AccountCToken `protobuf:"bytes,7,rep,name=tokens,proto3" json:"tokens,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

* This includes a list of cTokens contextualized to each account.

<code>{
  "address": "0xbac065be2e8ca097e9ac924e94af000dd3a5663"
  "health": { "value": "1.07264275673050348990755599431194797431802239523113293682619605751591901" }
  "tokens": [
    {
      "address": "0xf5dce57282a584d2746faf1593d3121fcac444dc"
      "borrow_balance_underlying": {"value": "131.4682716123015"}
      "lifetime_borrow_interest_accrued": {"value": "0.44430505829286"}
      "lifetime_supply_interest_accrued": {"value": "0.0000021671829864899976"}
      "supply_balance_underlying": {"value": "0.0"}
    }
  ],
  "total_borrow_value_in_eth": {"value": "0.5100157047140227313856015174794473200000000000000000000000000000" }
  "total_collateral_value_in_eth": {"value": "0.54706465148029978664135447293587201124121731200000000000000000000000000" }
}</code>

func (*Account) Descriptor

func (*Account) Descriptor() ([]byte, []int)

func (*Account) GetAddress

func (m *Account) GetAddress() []byte

func (*Account) GetBlockUpdated

func (m *Account) GetBlockUpdated() int32

func (*Account) GetHealth

func (m *Account) GetHealth() *Precise

func (*Account) GetTokens

func (m *Account) GetTokens() []*AccountCToken

func (*Account) GetTotalBorrowValueInEth

func (m *Account) GetTotalBorrowValueInEth() *Precise

func (*Account) GetTotalCollateralValueInEth

func (m *Account) GetTotalCollateralValueInEth() *Precise

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) Reset

func (m *Account) Reset()

func (*Account) String

func (m *Account) String() string

func (*Account) XXX_DiscardUnknown

func (m *Account) XXX_DiscardUnknown()

func (*Account) XXX_Marshal

func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Account) XXX_Merge

func (m *Account) XXX_Merge(src proto.Message)

func (*Account) XXX_Size

func (m *Account) XXX_Size() int

func (*Account) XXX_Unmarshal

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

type AccountCToken

type AccountCToken struct {
	// The address of the cToken
	Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// The symbol of the cToken
	Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// The cToken balance converted to underlying tokens <pre>cTokens held • exchange rate</pre>
	SupplyBalanceUnderlying *Precise `` /* 132-byte string literal not displayed */
	// The borrow balance (this is denominated in the underlying token, not in cTokens)
	BorrowBalanceUnderlying *Precise `` /* 132-byte string literal not displayed */
	// The amount of supply interest accrued for the lifetime of this account-cToken pair.
	LifetimeSupplyInterestAccrued *Precise `` /* 152-byte string literal not displayed */
	// The amount of borrow interest accrued for the lifetime of this account-cToken pair.
	LifetimeBorrowInterestAccrued *Precise `` /* 152-byte string literal not displayed */
	XXX_NoUnkeyedLiteral          struct{} `json:"-"`
	XXX_unrecognized              []byte   `json:"-"`
	XXX_sizecache                 int32    `json:"-"`
}

* An account's supply, borrow, and interest information for a particular cToken.

<code>{
  "address": "0xf5dce57282a584d2746faf1593d3121fcac444dc"
  "borrow_balance_underlying": {"value": "131.4682716123015"}
  "lifetime_borrow_interest_accrued": {"value": "0.44430505829286"}
  "lifetime_supply_interest_accrued": {"value": "0.0000021671829864899976"}
  "supply_balance_underlying": {"value": "0.0"}
}</code>

func (*AccountCToken) Descriptor

func (*AccountCToken) Descriptor() ([]byte, []int)

func (*AccountCToken) GetAddress

func (m *AccountCToken) GetAddress() []byte

func (*AccountCToken) GetBorrowBalanceUnderlying

func (m *AccountCToken) GetBorrowBalanceUnderlying() *Precise

func (*AccountCToken) GetLifetimeBorrowInterestAccrued

func (m *AccountCToken) GetLifetimeBorrowInterestAccrued() *Precise

func (*AccountCToken) GetLifetimeSupplyInterestAccrued

func (m *AccountCToken) GetLifetimeSupplyInterestAccrued() *Precise

func (*AccountCToken) GetSupplyBalanceUnderlying

func (m *AccountCToken) GetSupplyBalanceUnderlying() *Precise

func (*AccountCToken) GetSymbol

func (m *AccountCToken) GetSymbol() string

func (*AccountCToken) ProtoMessage

func (*AccountCToken) ProtoMessage()

func (*AccountCToken) Reset

func (m *AccountCToken) Reset()

func (*AccountCToken) String

func (m *AccountCToken) String() string

func (*AccountCToken) XXX_DiscardUnknown

func (m *AccountCToken) XXX_DiscardUnknown()

func (*AccountCToken) XXX_Marshal

func (m *AccountCToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccountCToken) XXX_Merge

func (m *AccountCToken) XXX_Merge(src proto.Message)

func (*AccountCToken) XXX_Size

func (m *AccountCToken) XXX_Size() int

func (*AccountCToken) XXX_Unmarshal

func (m *AccountCToken) XXX_Unmarshal(b []byte) error

type AccountRequest

type AccountRequest struct {
	// List of account addresses to filter on, e.g.: ["0x...", ,"0x..."] [Optional]
	Addresses [][]byte `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// Filter for accounts which total outstanding borrows exceeding given amount. [Optional]
	MinBorrowValueInEth *Precise `protobuf:"bytes,2,opt,name=min_borrow_value_in_eth,json=minBorrowValueInEth,proto3" json:"min_borrow_value_in_eth,omitempty"`
	// Filter for accounts where outstanding borrows divided by collateral value is less than the provided amount.
	// If returned value is less than 1.0, for instance, the account is subject to liquidation. If provided,
	// should be given as `{ "value": "...string formatted number..." }` [Optional]
	MaxHealth *Precise `protobuf:"bytes,3,opt,name=max_health,json=maxHealth,proto3" json:"max_health,omitempty"`
	// If provided, API returns data for given block number from our historical data. Otherwise, API defaults to returning the latest information. [Optional]
	BlockNumber uint32 `protobuf:"varint,4,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`
	// If provided, API returns data for given timestamp from our historical data. Otherwise, API defaults to returning the latest information. [Optional]
	BlockTimestamp uint32 `protobuf:"varint,5,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"`
	// Number of accounts to include in the response, default is 10 e.g. page_size=10 [Optional]
	PageSize uint32 `protobuf:"varint,6,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Pagination number for accounts in the response, default is 1 e.g. page_number=1 [Optional]
	PageNumber           uint32   `protobuf:"varint,7,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

* The request to the account API can specify a number filters, such as which addresses to retrieve information about or general health requirements. The following shows an example set of request parameters in JSON:

<code>{
  "addresses": [] // returns all accounts if empty or not included
  "block_number": 0 // returns latest if given 0
  "max_health": { "value": "10.0" }
  "min_borrow_value_in_eth": { "value": "0.002" }
  "page_number": 1
  "page_size": 10
}</code>

func (*AccountRequest) Descriptor

func (*AccountRequest) Descriptor() ([]byte, []int)

func (*AccountRequest) GetAddresses

func (m *AccountRequest) GetAddresses() [][]byte

func (*AccountRequest) GetBlockNumber

func (m *AccountRequest) GetBlockNumber() uint32

func (*AccountRequest) GetBlockTimestamp

func (m *AccountRequest) GetBlockTimestamp() uint32

func (*AccountRequest) GetMaxHealth

func (m *AccountRequest) GetMaxHealth() *Precise

func (*AccountRequest) GetMinBorrowValueInEth

func (m *AccountRequest) GetMinBorrowValueInEth() *Precise

func (*AccountRequest) GetPageNumber

func (m *AccountRequest) GetPageNumber() uint32

func (*AccountRequest) GetPageSize

func (m *AccountRequest) GetPageSize() uint32

func (*AccountRequest) ProtoMessage

func (*AccountRequest) ProtoMessage()

func (*AccountRequest) Reset

func (m *AccountRequest) Reset()

func (*AccountRequest) String

func (m *AccountRequest) String() string

func (*AccountRequest) XXX_DiscardUnknown

func (m *AccountRequest) XXX_DiscardUnknown()

func (*AccountRequest) XXX_Marshal

func (m *AccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccountRequest) XXX_Merge

func (m *AccountRequest) XXX_Merge(src proto.Message)

func (*AccountRequest) XXX_Size

func (m *AccountRequest) XXX_Size() int

func (*AccountRequest) XXX_Unmarshal

func (m *AccountRequest) XXX_Unmarshal(b []byte) error

type AccountResponse

type AccountResponse struct {
	// If set and non-zero, indicates an error returning data.
	// <pre>NO_ERROR = 0
	// INTERNAL_ERROR = 1
	// INVALID_PAGE_NUMBER = 2
	// INVALID_PAGE_SIZE = 3</pre>
	Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// The request parameters are echoed in the response.
	Request *AccountRequest `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
	// For example
	// <pre>{
	//   "page_number": 1,
	//   "page_size": 100,
	//   "total_entries": 83,
	//   "total_pages": 1,
	// }</pre>
	PaginationSummary *PaginationSummary `protobuf:"bytes,3,opt,name=pagination_summary,json=paginationSummary,proto3" json:"pagination_summary,omitempty"`
	// The portion of an outstanding borrow that can be closed in a liquidation,
	// which is a percentage of the total underlying borrow balance. For example if the
	// close factor is 0.1, then an account in liqudation is liable to have 10% of its borrows
	// liquidated.
	CloseFactor float32 `protobuf:"fixed32,4,opt,name=close_factor,json=closeFactor,proto3" json:"close_factor,omitempty"`
	// The amount of extra collateral that will be seized to incentivize liquidation.
	// For example, an incentive of 1.05 implies that a liquidator will receive a 5%
	// bonus on the exchange of collateral during a liquidation
	LiquidationIncentive float32 `protobuf:"fixed32,5,opt,name=liquidation_incentive,json=liquidationIncentive,proto3" json:"liquidation_incentive,omitempty"`
	// The list of accounts (see <ref>Account</ref> below) matching the requested filter,
	// with the associated account and cToken data.
	Accounts             []*Account `protobuf:"bytes,6,rep,name=accounts,proto3" json:"accounts,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

The account API returns an overall picture of accounts matching the filters on Compound.

func (*AccountResponse) Descriptor

func (*AccountResponse) Descriptor() ([]byte, []int)

func (*AccountResponse) GetAccounts

func (m *AccountResponse) GetAccounts() []*Account

func (*AccountResponse) GetCloseFactor

func (m *AccountResponse) GetCloseFactor() float32

func (*AccountResponse) GetError

func (m *AccountResponse) GetError() *Error

func (*AccountResponse) GetLiquidationIncentive

func (m *AccountResponse) GetLiquidationIncentive() float32

func (*AccountResponse) GetPaginationSummary

func (m *AccountResponse) GetPaginationSummary() *PaginationSummary

func (*AccountResponse) GetRequest

func (m *AccountResponse) GetRequest() *AccountRequest

func (*AccountResponse) ProtoMessage

func (*AccountResponse) ProtoMessage()

func (*AccountResponse) Reset

func (m *AccountResponse) Reset()

func (*AccountResponse) String

func (m *AccountResponse) String() string

func (*AccountResponse) XXX_DiscardUnknown

func (m *AccountResponse) XXX_DiscardUnknown()

func (*AccountResponse) XXX_Marshal

func (m *AccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccountResponse) XXX_Merge

func (m *AccountResponse) XXX_Merge(src proto.Message)

func (*AccountResponse) XXX_Size

func (m *AccountResponse) XXX_Size() int

func (*AccountResponse) XXX_Unmarshal

func (m *AccountResponse) XXX_Unmarshal(b []byte) error

type AccountResponseErrorCodes

type AccountResponseErrorCodes int32
const (
	AccountResponse_NO_ERROR            AccountResponseErrorCodes = 0
	AccountResponse_INTERNAL_ERROR      AccountResponseErrorCodes = 1
	AccountResponse_INVALID_PAGE_NUMBER AccountResponseErrorCodes = 2
	AccountResponse_INVALID_PAGE_SIZE   AccountResponseErrorCodes = 3
)

func (AccountResponseErrorCodes) EnumDescriptor

func (AccountResponseErrorCodes) EnumDescriptor() ([]byte, []int)

func (AccountResponseErrorCodes) String

func (x AccountResponseErrorCodes) String() string

type AccountServiceClient

type AccountServiceClient interface {
	Account(ctx context.Context, in *AccountRequest, opts ...grpc.CallOption) (*AccountResponse, error)
	PostAccount(ctx context.Context, in *AccountRequest, opts ...grpc.CallOption) (*AccountResponse, error)
}

AccountServiceClient is the client API for AccountService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAccountServiceClient

func NewAccountServiceClient(cc *grpc.ClientConn) AccountServiceClient

type AccountServiceServer

type AccountServiceServer interface {
	Account(context.Context, *AccountRequest) (*AccountResponse, error)
	PostAccount(context.Context, *AccountRequest) (*AccountResponse, error)
}

AccountServiceServer is the server API for AccountService service.

type Bytes32

type Bytes32 struct {
	Value                []byte   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

doc-false

func (*Bytes32) Descriptor

func (*Bytes32) Descriptor() ([]byte, []int)

func (*Bytes32) GetValue

func (m *Bytes32) GetValue() []byte

func (*Bytes32) ProtoMessage

func (*Bytes32) ProtoMessage()

func (*Bytes32) Reset

func (m *Bytes32) Reset()

func (*Bytes32) String

func (m *Bytes32) String() string

func (*Bytes32) XXX_DiscardUnknown

func (m *Bytes32) XXX_DiscardUnknown()

func (*Bytes32) XXX_Marshal

func (m *Bytes32) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Bytes32) XXX_Merge

func (m *Bytes32) XXX_Merge(src proto.Message)

func (*Bytes32) XXX_Size

func (m *Bytes32) XXX_Size() int

func (*Bytes32) XXX_Unmarshal

func (m *Bytes32) XXX_Unmarshal(b []byte) error

type CToken

type CToken struct {
	// The public Ethereum address of the cToken
	TokenAddress []byte `protobuf:"bytes,1,opt,name=token_address,json=tokenAddress,proto3" json:"token_address,omitempty"`
	// The number of cTokens in existence
	TotalSupply *Precise `protobuf:"bytes,2,opt,name=total_supply,json=totalSupply,proto3" json:"total_supply,omitempty"`
	// The amount of underlying tokens borrowed from the cToken
	TotalBorrows *Precise `protobuf:"bytes,4,opt,name=total_borrows,json=totalBorrows,proto3" json:"total_borrows,omitempty"`
	// The amount of underylying tokens held by reserves
	Reserves *Precise `protobuf:"bytes,5,opt,name=reserves,proto3" json:"reserves,omitempty"`
	// The current liquidity of the cToken
	Cash *Precise `protobuf:"bytes,6,opt,name=cash,proto3" json:"cash,omitempty"`
	// The cToken / underlying exchange rate. This rate increases over time
	// as supply interest accrues.
	ExchangeRate *Precise `protobuf:"bytes,7,opt,name=exchange_rate,json=exchangeRate,proto3" json:"exchange_rate,omitempty"`
	// The floating supply interest rate
	SupplyRate *Precise `protobuf:"bytes,8,opt,name=supply_rate,json=supplyRate,proto3" json:"supply_rate,omitempty"`
	// The floating borrow interest rate
	BorrowRate *Precise `protobuf:"bytes,9,opt,name=borrow_rate,json=borrowRate,proto3" json:"borrow_rate,omitempty"`
	// The amount of the value of the underlying token that will count as collateral.
	// eg. cEth with collataral factor 0.75 means 1 eth of supply allows 0.75 eth of
	// borrowing.
	CollateralFactor *Precise `protobuf:"bytes,10,opt,name=collateral_factor,json=collateralFactor,proto3" json:"collateral_factor,omitempty"`
	// The number of accounts holding this cToken
	NumberOfSuppliers uint32 `protobuf:"varint,11,opt,name=number_of_suppliers,json=numberOfSuppliers,proto3" json:"number_of_suppliers,omitempty"`
	// The number of accounts with oustanding borrows
	NumberOfBorrowers uint32 `protobuf:"varint,12,opt,name=number_of_borrowers,json=numberOfBorrowers,proto3" json:"number_of_borrowers,omitempty"`
	// The price of the underlying token in eth
	UnderlyingPrice *Precise `protobuf:"bytes,13,opt,name=underlying_price,json=underlyingPrice,proto3" json:"underlying_price,omitempty"`
	// The address of the underlying token
	UnderlyingAddress []byte `protobuf:"bytes,14,opt,name=underlying_address,json=underlyingAddress,proto3" json:"underlying_address,omitempty"`
	// The symbol of the ctoken
	Symbol string `protobuf:"bytes,15,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// The name of the ctoken
	Name string `protobuf:"bytes,17,opt,name=name,proto3" json:"name,omitempty"`
	// The symbol of the underlying token
	UnderlyingSymbol string `protobuf:"bytes,18,opt,name=underlying_symbol,json=underlyingSymbol,proto3" json:"underlying_symbol,omitempty"`
	// The name of the underlying token
	UnderlyingName string `protobuf:"bytes,19,opt,name=underlying_name,json=underlyingName,proto3" json:"underlying_name,omitempty"`
	// The address of the interest rate model
	InterestRateModelAddress []byte   `` /* 138-byte string literal not displayed */
	XXX_NoUnkeyedLiteral     struct{} `json:"-"`
	XXX_unrecognized         []byte   `json:"-"`
	XXX_sizecache            int32    `json:"-"`
}

* This includes a list of cTokens contextualized to the full market.

<code>{
 "cToken": [{
   "borrow_rate": {"value": "0.051453109785093843"},
   "cash": {"value": "514.078443"},
   "collateral_factor": {"value": "0.80000000000000000"},
   "exchange_rate": {"value": "0.020024242770802729"},
   "interest_rate_model_address": "0x1a43bfd39b15dcf444e17ab408c4b5be32deb7f5",
   "name": "Compound USD Coin",
   "number_of_borrowers": 3,
   "number_of_suppliers": 34,
   "reserves": {"value": "0"},
   "supply_rate": {"value": "0.013237112532748109"},
   "symbol": "cUSDC",
   "token_address": "0x5b281a6dda0b271e91ae35de655ad301c976edb1",
   "total_borrows": {"value": "178.064546"},
   "total_supply": {"value": "34565.25157651"},
   "underlying_address": "0x4dbcdf9b62e891a7cec5a2568c3f4faf9e8abe2b",
   "underlying_name": "USD Coin",
   "underlying_price": {"value": "0.0041368287055953530000000000"},
   "underlying_symbol":"USDC"
  }],
 "error": null,
 "request": {
   "addresses": ["0x5b281a6dda0b271e91ae35de655ad301c976edb1"],
   "block_number": 4515576,
   "block_timestamp": 0
  }
}</code>

func (*CToken) Descriptor

func (*CToken) Descriptor() ([]byte, []int)

func (*CToken) GetBorrowRate

func (m *CToken) GetBorrowRate() *Precise

func (*CToken) GetCash

func (m *CToken) GetCash() *Precise

func (*CToken) GetCollateralFactor

func (m *CToken) GetCollateralFactor() *Precise

func (*CToken) GetExchangeRate

func (m *CToken) GetExchangeRate() *Precise

func (*CToken) GetInterestRateModelAddress

func (m *CToken) GetInterestRateModelAddress() []byte

func (*CToken) GetName

func (m *CToken) GetName() string

func (*CToken) GetNumberOfBorrowers

func (m *CToken) GetNumberOfBorrowers() uint32

func (*CToken) GetNumberOfSuppliers

func (m *CToken) GetNumberOfSuppliers() uint32

func (*CToken) GetReserves

func (m *CToken) GetReserves() *Precise

func (*CToken) GetSupplyRate

func (m *CToken) GetSupplyRate() *Precise

func (*CToken) GetSymbol

func (m *CToken) GetSymbol() string

func (*CToken) GetTokenAddress

func (m *CToken) GetTokenAddress() []byte

func (*CToken) GetTotalBorrows

func (m *CToken) GetTotalBorrows() *Precise

func (*CToken) GetTotalSupply

func (m *CToken) GetTotalSupply() *Precise

func (*CToken) GetUnderlyingAddress

func (m *CToken) GetUnderlyingAddress() []byte

func (*CToken) GetUnderlyingName

func (m *CToken) GetUnderlyingName() string

func (*CToken) GetUnderlyingPrice

func (m *CToken) GetUnderlyingPrice() *Precise

func (*CToken) GetUnderlyingSymbol

func (m *CToken) GetUnderlyingSymbol() string

func (*CToken) ProtoMessage

func (*CToken) ProtoMessage()

func (*CToken) Reset

func (m *CToken) Reset()

func (*CToken) String

func (m *CToken) String() string

func (*CToken) XXX_DiscardUnknown

func (m *CToken) XXX_DiscardUnknown()

func (*CToken) XXX_Marshal

func (m *CToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CToken) XXX_Merge

func (m *CToken) XXX_Merge(src proto.Message)

func (*CToken) XXX_Size

func (m *CToken) XXX_Size() int

func (*CToken) XXX_Unmarshal

func (m *CToken) XXX_Unmarshal(b []byte) error

type CTokenRequest

type CTokenRequest struct {
	// List of token addresses to filter on, e.g.: ["0x...", ,"0x..."] [Optional]
	Addresses [][]byte `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// Only one of block_number or block timestamp should be provided. If provided, API returns data for given block number from our historical data. Otherwise, API defaults to returning the latest information. [Optional]
	BlockNumber uint32 `protobuf:"varint,2,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"`
	// Only one of block_number or block timestamp should be provided. If provided, API returns data for given block timestamp from our historical data. Otherwise, API defaults to returning the latest information. [Optional]
	BlockTimestamp       uint32   `protobuf:"varint,3,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

* The request to the cToken API can specify a number filters, such as which tokens to retrieve information about or moment in time. The following shows an example set of request parameters in JSON:

<code>{
  "addresses": [] // returns all tokens if empty or not included
  "block_timestamp": 0 // returns latest information if given 0
}</code>

func (*CTokenRequest) Descriptor

func (*CTokenRequest) Descriptor() ([]byte, []int)

func (*CTokenRequest) GetAddresses

func (m *CTokenRequest) GetAddresses() [][]byte

func (*CTokenRequest) GetBlockNumber

func (m *CTokenRequest) GetBlockNumber() uint32

func (*CTokenRequest) GetBlockTimestamp

func (m *CTokenRequest) GetBlockTimestamp() uint32

func (*CTokenRequest) ProtoMessage

func (*CTokenRequest) ProtoMessage()

func (*CTokenRequest) Reset

func (m *CTokenRequest) Reset()

func (*CTokenRequest) String

func (m *CTokenRequest) String() string

func (*CTokenRequest) XXX_DiscardUnknown

func (m *CTokenRequest) XXX_DiscardUnknown()

func (*CTokenRequest) XXX_Marshal

func (m *CTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CTokenRequest) XXX_Merge

func (m *CTokenRequest) XXX_Merge(src proto.Message)

func (*CTokenRequest) XXX_Size

func (m *CTokenRequest) XXX_Size() int

func (*CTokenRequest) XXX_Unmarshal

func (m *CTokenRequest) XXX_Unmarshal(b []byte) error

type CTokenResponse

type CTokenResponse struct {
	// If set and non-zero, indicates an error returning data.
	// <pre>NO_ERROR = 0
	// INTERNAL_ERROR = 1
	Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
	// The request parameters are echoed in the response.
	Request *CTokenRequest `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
	// The list of cToken (see <ref>CToken</ref> below) matching the requested filter.
	CToken               []*CToken `protobuf:"bytes,3,rep,name=cToken,proto3" json:"cToken,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

The cToken API returns an overall picture of cTokens matching the filter.

func (*CTokenResponse) Descriptor

func (*CTokenResponse) Descriptor() ([]byte, []int)

func (*CTokenResponse) GetCToken

func (m *CTokenResponse) GetCToken() []*CToken

func (*CTokenResponse) GetError

func (m *CTokenResponse) GetError() *Error

func (*CTokenResponse) GetRequest

func (m *CTokenResponse) GetRequest() *CTokenRequest

func (*CTokenResponse) ProtoMessage

func (*CTokenResponse) ProtoMessage()

func (*CTokenResponse) Reset

func (m *CTokenResponse) Reset()

func (*CTokenResponse) String

func (m *CTokenResponse) String() string

func (*CTokenResponse) XXX_DiscardUnknown

func (m *CTokenResponse) XXX_DiscardUnknown()

func (*CTokenResponse) XXX_Marshal

func (m *CTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CTokenResponse) XXX_Merge

func (m *CTokenResponse) XXX_Merge(src proto.Message)

func (*CTokenResponse) XXX_Size

func (m *CTokenResponse) XXX_Size() int

func (*CTokenResponse) XXX_Unmarshal

func (m *CTokenResponse) XXX_Unmarshal(b []byte) error

type CTokenResponseErrorCodes

type CTokenResponseErrorCodes int32
const (
	CTokenResponse_NO_ERROR       CTokenResponseErrorCodes = 0
	CTokenResponse_INTERNAL_ERROR CTokenResponseErrorCodes = 1
)

func (CTokenResponseErrorCodes) EnumDescriptor

func (CTokenResponseErrorCodes) EnumDescriptor() ([]byte, []int)

func (CTokenResponseErrorCodes) String

func (x CTokenResponseErrorCodes) String() string

type CTokenServiceClient

type CTokenServiceClient interface {
	Ctoken(ctx context.Context, in *CTokenRequest, opts ...grpc.CallOption) (*CTokenResponse, error)
	PostCtoken(ctx context.Context, in *CTokenRequest, opts ...grpc.CallOption) (*CTokenResponse, error)
}

CTokenServiceClient is the client API for CTokenService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewCTokenServiceClient

func NewCTokenServiceClient(cc *grpc.ClientConn) CTokenServiceClient

type CTokenServiceServer

type CTokenServiceServer interface {
	Ctoken(context.Context, *CTokenRequest) (*CTokenResponse, error)
	PostCtoken(context.Context, *CTokenRequest) (*CTokenResponse, error)
}

CTokenServiceServer is the server API for CTokenService service.

type CurrencyAmount

type CurrencyAmount struct {
	Symbol               string   `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Amount               *Precise `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

doc-false

func (*CurrencyAmount) Descriptor

func (*CurrencyAmount) Descriptor() ([]byte, []int)

func (*CurrencyAmount) GetAmount

func (m *CurrencyAmount) GetAmount() *Precise

func (*CurrencyAmount) GetSymbol

func (m *CurrencyAmount) GetSymbol() string

func (*CurrencyAmount) ProtoMessage

func (*CurrencyAmount) ProtoMessage()

func (*CurrencyAmount) Reset

func (m *CurrencyAmount) Reset()

func (*CurrencyAmount) String

func (m *CurrencyAmount) String() string

func (*CurrencyAmount) XXX_DiscardUnknown

func (m *CurrencyAmount) XXX_DiscardUnknown()

func (*CurrencyAmount) XXX_Marshal

func (m *CurrencyAmount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CurrencyAmount) XXX_Merge

func (m *CurrencyAmount) XXX_Merge(src proto.Message)

func (*CurrencyAmount) XXX_Size

func (m *CurrencyAmount) XXX_Size() int

func (*CurrencyAmount) XXX_Unmarshal

func (m *CurrencyAmount) XXX_Unmarshal(b []byte) error

type Error

type Error struct {
	ErrorCode            uint32            `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
	Message              string            `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	FieldErrors          map[string]string `` /* 182-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

doc-false

func (*Error) Descriptor

func (*Error) Descriptor() ([]byte, []int)

func (*Error) GetErrorCode

func (m *Error) GetErrorCode() uint32

func (*Error) GetFieldErrors

func (m *Error) GetFieldErrors() map[string]string

func (*Error) GetMessage

func (m *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) String

func (m *Error) String() string

func (*Error) XXX_DiscardUnknown

func (m *Error) XXX_DiscardUnknown()

func (*Error) XXX_Marshal

func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Error) XXX_Merge

func (m *Error) XXX_Merge(src proto.Message)

func (*Error) XXX_Size

func (m *Error) XXX_Size() int

func (*Error) XXX_Unmarshal

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

type PaginationSummary

type PaginationSummary struct {
	// The current page number
	PageNumber uint32 `protobuf:"varint,1,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"`
	// The number of entries to show per page.
	PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// The number of items matching the request across all pages.
	TotalEntries uint32 `protobuf:"varint,3,opt,name=total_entries,json=totalEntries,proto3" json:"total_entries,omitempty"`
	// The number of pages need to show total_entries at the given page_size.
	TotalPages           uint32   `protobuf:"varint,4,opt,name=total_pages,json=totalPages,proto3" json:"total_pages,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Used for paginating results.

func (*PaginationSummary) Descriptor

func (*PaginationSummary) Descriptor() ([]byte, []int)

func (*PaginationSummary) GetPageNumber

func (m *PaginationSummary) GetPageNumber() uint32

func (*PaginationSummary) GetPageSize

func (m *PaginationSummary) GetPageSize() uint32

func (*PaginationSummary) GetTotalEntries

func (m *PaginationSummary) GetTotalEntries() uint32

func (*PaginationSummary) GetTotalPages

func (m *PaginationSummary) GetTotalPages() uint32

func (*PaginationSummary) ProtoMessage

func (*PaginationSummary) ProtoMessage()

func (*PaginationSummary) Reset

func (m *PaginationSummary) Reset()

func (*PaginationSummary) String

func (m *PaginationSummary) String() string

func (*PaginationSummary) XXX_DiscardUnknown

func (m *PaginationSummary) XXX_DiscardUnknown()

func (*PaginationSummary) XXX_Marshal

func (m *PaginationSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PaginationSummary) XXX_Merge

func (m *PaginationSummary) XXX_Merge(src proto.Message)

func (*PaginationSummary) XXX_Size

func (m *PaginationSummary) XXX_Size() int

func (*PaginationSummary) XXX_Unmarshal

func (m *PaginationSummary) XXX_Unmarshal(b []byte) error

type Precise

type Precise struct {
	// The full UNSIGNED number in string form. max value is 2^257 - 1,
	// aka 231584178474632390847141970017375815706539969331281128078915168015826259279871
	Value                string   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

For non-negative numbers only.

func (*Precise) Descriptor

func (*Precise) Descriptor() ([]byte, []int)

func (*Precise) GetValue

func (m *Precise) GetValue() string

func (*Precise) ProtoMessage

func (*Precise) ProtoMessage()

func (*Precise) Reset

func (m *Precise) Reset()

func (*Precise) String

func (m *Precise) String() string

func (*Precise) XXX_DiscardUnknown

func (m *Precise) XXX_DiscardUnknown()

func (*Precise) XXX_Marshal

func (m *Precise) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Precise) XXX_Merge

func (m *Precise) XXX_Merge(src proto.Message)

func (*Precise) XXX_Size

func (m *Precise) XXX_Size() int

func (*Precise) XXX_Unmarshal

func (m *Precise) XXX_Unmarshal(b []byte) error

type SharedDataTypesClient

type SharedDataTypesClient interface {
}

SharedDataTypesClient is the client API for SharedDataTypes service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSharedDataTypesClient

func NewSharedDataTypesClient(cc *grpc.ClientConn) SharedDataTypesClient

type SharedDataTypesServer

type SharedDataTypesServer interface {
}

SharedDataTypesServer is the server API for SharedDataTypes service.

type SignedPrecise

type SignedPrecise struct {
	// The full SIGNED number in string form.
	Value                string   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

doc-false

func (*SignedPrecise) Descriptor

func (*SignedPrecise) Descriptor() ([]byte, []int)

func (*SignedPrecise) GetValue

func (m *SignedPrecise) GetValue() string

func (*SignedPrecise) ProtoMessage

func (*SignedPrecise) ProtoMessage()

func (*SignedPrecise) Reset

func (m *SignedPrecise) Reset()

func (*SignedPrecise) String

func (m *SignedPrecise) String() string

func (*SignedPrecise) XXX_DiscardUnknown

func (m *SignedPrecise) XXX_DiscardUnknown()

func (*SignedPrecise) XXX_Marshal

func (m *SignedPrecise) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SignedPrecise) XXX_Merge

func (m *SignedPrecise) XXX_Merge(src proto.Message)

func (*SignedPrecise) XXX_Size

func (m *SignedPrecise) XXX_Size() int

func (*SignedPrecise) XXX_Unmarshal

func (m *SignedPrecise) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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