Update whisper types to be optional

This commit is contained in:
coffeepots 2018-12-05 13:37:49 +00:00 committed by zah
parent 2ece661b24
commit ce3c8eaf05
1 changed files with 10 additions and 12 deletions

View File

@ -115,21 +115,19 @@ type
FilterOptions* = object FilterOptions* = object
# Parameter from user # Parameter from user
fromBlock*: string # (optional, default: "latest") integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions. fromBlock*: Option[string] # (optional, default: "latest") integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions.
toBlock*: string # (optional, default: "latest") integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions. toBlock*: Option[string] # (optional, default: "latest") integer block number, or "latest" for the last mined block or "pending", "earliest" for not yet mined transactions.
address*: EthAddress # (optional) contract address or a list of addresses from which logs should originate. address*: Option[EthAddress] # (optional) contract address or a list of addresses from which logs should originate.
topics*: seq[FilterData] # (optional) list of DATA topics. Topics are order-dependent. Each topic can also be a list of DATA with "or" options. topics*: Option[seq[FilterData]] # (optional) list of DATA topics. Topics are order-dependent. Each topic can also be a list of DATA with "or" options.
WhisperPost* = object WhisperPost* = object
# Parameter from user # Parameter from user
source*: WhisperIdentityStr # (optional) the identity of the sender. source*: Option[WhisperIdentityStr] # (optional) the identity of the sender.
to*: WhisperIdentityStr # (optional) the identity of the receiver. When present whisper will encrypt the message so that only the receiver can decrypt it. to*: Option[WhisperIdentityStr] # (optional) the identity of the receiver. When present whisper will encrypt the message so that only the receiver can decrypt it.
topics*: seq[HexDataStr] # list of DATA topics, for the receiver to identify messages. topics*: seq[HexDataStr] # list of DATA topics, for the receiver to identify messages.
payload*: HexDataStr # the payload of the message. payload*: HexDataStr # the payload of the message.
priority*: int # integer of the priority in a rang from. priority*: int # integer of the priority in a rang from.
ttl*: int # integer of the time to live in seconds. ttl*: int # integer of the time to live in seconds.
WhisperIdentity = array[60, byte]
WhisperMessage* = object WhisperMessage* = object
# Returned to user # Returned to user