mirror of
https://github.com/grassrootseconomics/cic-custodial.git
synced 2024-11-24 15:06:45 +01:00
Mohamed Sohail
9e1d62a014
* 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
29 lines
571 B
Go
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"
|
|
)
|