ixofoundation / ixo-assistant

A chat widget for Rasa and Botfront
https://botfront.io/rasa
Apache License 2.0
0 stars 0 forks source link

Voting Bond #5

Closed ig-shaun closed 3 years ago

ig-shaun commented 3 years ago

This set of custom actions will assist the user to interact with a voting bond on the ixo blockchain.

  1. Get the state of the bond. Get /bonds/did:ixo: We will use the test network for the test, but this param will be set as a "endpoint":"https://testnet.ixo.world/" entity from the client side with the following intent
/relayer_vote{ "trigger":"proto_msg", "type":"bonds/MsgBuy", "user_did":","did:sov:CiPYfm8c83af2UraeDnNSk", "bond_did":"did:ixo:49BSStn5nAwrfZwvGT6HFa"}

An example response message can be seen at https://testnet.ixo.world/bonds/did:ixo:49BSStn5nAwrfZwvGT6HFa

This contains the property "state" (near the last line), for which the enum values are "HATCH", "OPEN", "SETTLE", "FAILED"

The custom action should set the slot "bond_state" to the returned value, which we will use in a conversation about voting (when the state is "hatch" or "open" or withdrawing their vote stake when the state is "settle" or "failed".