cic-custodial/internal/tasker/types.go
Mohamed Sohail 9e1d62a014
feat: add transfer authorization (#100)
* wip: add transfer auithorization

* feat: update transferAuthPayload

* switch to MAX_INT for value and use revoke flag
* tranfer handler: fix nonce rollback on EOA account

* feat: switch to session based session transfer auth

* Demurrage contracts require setting the approval value to 0 before updating the value after the initial limit is set
* This implementation auto-revokes every 15 min after arequest is created. Subsequent requests will fail untill the value is set back to 0

* feat: settable approve session timeout
2023-07-10 14:32:05 +08:00

29 lines
571 B
Go

package tasker
import (
"encoding/json"
)
type (
QueueName string
TaskName string
)
type Task struct {
Id string `json:"id"`
Payload json.RawMessage `json:"payload"`
}
const (
AccountRegisterTask TaskName = "sys:register_account"
AccountRefillGasTask TaskName = "sys:refill_gas"
SignTransferTask TaskName = "usr:sign_transfer"
SignTransferTaskAuth TaskName = "usr:sign_transfer_auth"
DispatchTxTask TaskName = "rpc:dispatch"
)
const (
HighPriority QueueName = "high_priority"
DefaultPriority QueueName = "default_priority"
)