// opens a new subscription to make queries to the node
type MsguserOpenSubscription struct {
Pubkey common.Pubkey // pubkey of data host
Chain common.chain // chain querying data for
Req common.Address // address that can make these queries
Block int // number of blocks the contract is being open for (min 1 hours, max 1 year)
Tokens int // number of tokens willing to be spent. This should be used to validate/confirm that the number of blocks * tokens == subscription rate (to ensure host does not change rate underneath the subscription)
Signer cosmos.AccAddress
}
// cancels a subscription
type MsgUserCancelSubscribe struct {
Pubkey common.Pubkey // pubkey of data host
Chain common.chain // chain querying data for
Signer cosmos.AccAddress
}
// opens a new pay-as-you-go contract to make queries to the node. These cannot be canceled, as hosts collect requests and claim rewards at a later time.
type MsgUserOpenPasAsYouGo struct {
Pubkey common.Pubkey // pubkey of data host
Chain common.chain // chain querying data for
Req common.Address // address that can make these queries
Block int // number of blocks the contract is being open for (min 1 hours, max 1 year)
Rate int // number of tokens per request. This is to ensure the data host does not “rug” the user last sec with a much higher price
Signer cosmos.AccAddress
}