Documentation ¶
Rendered for js/wasm
Index ¶
- func BoolToUint8(b bool) uint8
- func EventLogsFromCommonType(eventLogs []ethtypes.Log) js.Value
- func EventLogsToCommonType(eventLogs js.Value) []ethtypes.Log
- func MetadataToCommonType(metadata *Metadata) *types.Metadata
- func MiniHeaderFromCommonType(miniHeader *types.MiniHeader) js.Value
- func MiniHeaderToCommonType(miniHeader js.Value) *types.MiniHeader
- func MiniHeadersFromCommonType(miniHeaders []*types.MiniHeader) js.Value
- func MiniHeadersToCommonType(miniHeaders js.Value) []*types.MiniHeader
- func OrderToCommonType(order *Order) *types.OrderWithMetadata
- func OrdersToCommonType(orders []*Order) []*types.OrderWithMetadata
- func ParsedAssetDataFromCommonType(parsedAssetData []*types.SingleAssetData) string
- func ParsedAssetDataToCommonType(parsedAssetData string) []*types.SingleAssetData
- func SingleAssetDataToCommonType(singleAssetData *SingleAssetData) *types.SingleAssetData
- type BigInt
- type Metadata
- type Order
- type ParsedAssetData
- type SingleAssetData
- type SortedBigInt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolToUint8 ¶
func MetadataToCommonType ¶
func MiniHeaderFromCommonType ¶
func MiniHeaderFromCommonType(miniHeader *types.MiniHeader) js.Value
func MiniHeaderToCommonType ¶
func MiniHeaderToCommonType(miniHeader js.Value) *types.MiniHeader
func MiniHeadersFromCommonType ¶
func MiniHeadersFromCommonType(miniHeaders []*types.MiniHeader) js.Value
func MiniHeadersToCommonType ¶
func MiniHeadersToCommonType(miniHeaders js.Value) []*types.MiniHeader
func OrderToCommonType ¶
func OrderToCommonType(order *Order) *types.OrderWithMetadata
func OrdersToCommonType ¶
func OrdersToCommonType(orders []*Order) []*types.OrderWithMetadata
func ParsedAssetDataFromCommonType ¶
func ParsedAssetDataFromCommonType(parsedAssetData []*types.SingleAssetData) string
func ParsedAssetDataToCommonType ¶
func ParsedAssetDataToCommonType(parsedAssetData string) []*types.SingleAssetData
func SingleAssetDataToCommonType ¶
func SingleAssetDataToCommonType(singleAssetData *SingleAssetData) *types.SingleAssetData
Types ¶
type BigInt ¶
BigInt is a wrapper around *big.Int that implements the json.Marshaler and json.Unmarshaler interfaces in a way that is compatible with Dexie.js but *does not* pad with zeroes and *does not* retain sort order.
func BigIntFromInt64 ¶
func BigIntFromString ¶
func (*BigInt) MarshalJSON ¶
func (*BigInt) UnmarshalJSON ¶
type Metadata ¶
type Metadata struct { EthereumChainID int `json:"ethereumChainID"` EthRPCRequestsSentInCurrentUTCDay int `json:"ethRPCRequestsSentInCurrentUTCDay"` StartOfCurrentUTCDay time.Time `json:"startOfCurrentUTCDay"` }
func MetadataFromCommonType ¶
type Order ¶
type Order struct { Hash common.Hash `json:"hash"` ChainID *SortedBigInt `json:"chainID"` ExchangeAddress common.Address `json:"exchangeAddress"` MakerAddress common.Address `json:"makerAddress"` MakerAssetData []byte `json:"makerAssetData"` MakerFeeAssetData []byte `json:"makerFeeAssetData"` MakerAssetAmount *SortedBigInt `json:"makerAssetAmount"` MakerFee *SortedBigInt `json:"makerFee"` TakerAddress common.Address `json:"takerAddress"` TakerAssetData []byte `json:"takerAssetData"` TakerFeeAssetData []byte `json:"takerFeeAssetData"` TakerAssetAmount *SortedBigInt `json:"takerAssetAmount"` TakerFee *SortedBigInt `json:"takerFee"` SenderAddress common.Address `json:"senderAddress"` FeeRecipientAddress common.Address `json:"feeRecipientAddress"` ExpirationTimeSeconds *SortedBigInt `json:"expirationTimeSeconds"` Salt *SortedBigInt `json:"salt"` Signature []byte `json:"signature"` LastUpdated time.Time `json:"lastUpdated"` FillableTakerAssetAmount *SortedBigInt `json:"fillableTakerAssetAmount"` IsRemoved uint8 `json:"isRemoved"` IsPinned uint8 `json:"isPinned"` IsNotPinned uint8 `json:"isNotPinned"` // Used in a compound index in queries related to max expiration time. ParsedMakerAssetData string `json:"parsedMakerAssetData"` ParsedMakerFeeAssetData string `json:"parsedMakerFeeAssetData"` LastValidatedBlockNumber *SortedBigInt `json:"lastValidatedBlockNumber"` LastValidatedBlockHash common.Hash `json:"lastValidatedBlockHash"` }
Order is the SQL database representation a 0x order along with some relevant metadata.
func OrderFromCommonType ¶
func OrderFromCommonType(order *types.OrderWithMetadata) *Order
func OrdersFromCommonType ¶
func OrdersFromCommonType(orders []*types.OrderWithMetadata) []*Order
type ParsedAssetData ¶
type ParsedAssetData []*SingleAssetData
ParsedAssetData is a wrapper around []*SingleAssetData that implements the sql.Valuer and sql.Scanner interfaces.
type SingleAssetData ¶
type SingleAssetData struct { Address common.Address `json:"address"` TokenID *BigInt `json:"tokenID"` }
func SingleAssetDataFromCommonType ¶
func SingleAssetDataFromCommonType(singleAssetData *types.SingleAssetData) *SingleAssetData
type SortedBigInt ¶
SortedBigInt is a wrapper around *big.Int that implements the json.Marshaler and json.Unmarshaler interfaces in a way that is compatible with Dexie.js and retains sort order by padding with zeroes.
func NewSortedBigInt ¶
func NewSortedBigInt(v *big.Int) *SortedBigInt
func SortedBigIntFromInt64 ¶
func SortedBigIntFromInt64(v int64) *SortedBigInt
func SortedBigIntFromString ¶
func SortedBigIntFromString(v string) (*SortedBigInt, error)
func (*SortedBigInt) FixedLengthString ¶
func (i *SortedBigInt) FixedLengthString() string
func (*SortedBigInt) MarshalJSON ¶
func (i *SortedBigInt) MarshalJSON() ([]byte, error)
func (*SortedBigInt) UnmarshalJSON ¶
func (i *SortedBigInt) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.