Skip to main content

Action Protocol

tip

Trident is MTG application, which read multisig transactions from Mixin Network.

Sending transfer is the only way to talk to Trident MTG.

Action Fields

symbolexplainmemo
TAction typerequired
NNFT's token_idrequired, uuid
Oorder_idrequired, uuid
Ppricestring
Aasset_idMixin asset id
Eexpired_atUnix time, integer
Rreserve pricestring
Cclient_idoptional

Action Types

symbolexplain
ACreate ask order(Fixed price order)
BCreate bid order
AUCreate auction order
CCancel order
FFill order

Create Fixed Price Order

type OrderAction struct {
T string // action type
N uuid.UUID // token id
O uuid.UUID // order id
P string // price
A uuid.UUID // asset
E int // expired_at
}

memo = base64.StdEncoding.EncodeToString(msgpack(OrderAction{
T: "A",
N: uuid.FromString("97701fb3-c773-31ed-aa6b-d85bcf3550df"),
O: uuid.FromString("943122cb-edeb-4656-9d12-22731353f4ae"),
P: "1.0",
A: uuid.FromString("c6d0c728-2624-429b-8e0d-d9d19b6592fa"),
E: 1658249820
}))

Create Auction Order

type OrderAction struct {
T string // action type
N uuid.UUID // token id
O uuid.UUID // order id
P string // price
R string // reserve price
A uuid.UUID // asset
E int // expired_at
}

memo = base64.StdEncoding.EncodeToString(msgpack(OrderAction{
T: "AU",
N: uuid.FromString("97701fb3-c773-31ed-aa6b-d85bcf3550df"),
O: uuid.FromString("943122cb-edeb-4656-9d12-22731353f4ae"),
P: "1.0",
R: "1.5",
A: uuid.FromString("c6d0c728-2624-429b-8e0d-d9d19b6592fa"),
E: 1658249820
}))

Create Bid Order

type OrderAction struct {
T string // action type
N uuid.UUID // token id
O uuid.UUID // order id
P string // price
E int // expired_at
}

memo = base64.StdEncoding.EncodeToString(msgpack(OrderAction{
T: "B",
N: uuid.FromString("97701fb3-c773-31ed-aa6b-d85bcf3550df"),
O: uuid.FromString("943122cb-edeb-4656-9d12-22731353f4ae"),
P: "1.0",
E: 1658249820
}))

Fill Order

type OrderAction struct {
T string // action type
N uuid.UUID // token id
O uuid.UUID // order id
}

memo = base64.StdEncoding.EncodeToString(msgpack(OrderAction{
T: "F",
N: uuid.FromString("97701fb3-c773-31ed-aa6b-d85bcf3550df"),
O: uuid.FromString("943122cb-edeb-4656-9d12-22731353f4ae"),
}))

Cancel Order

type OrderAction struct {
T string // action type
N uuid.UUID // token id
O uuid.UUID // order id
}

memo = base64.StdEncoding.EncodeToString(msgpack(OrderAction{
T: "C",
N: uuid.FromString("97701fb3-c773-31ed-aa6b-d85bcf3550df"),
O: uuid.FromString("943122cb-edeb-4656-9d12-22731353f4ae"),
}))