cosmwasm-std 0.9.2

Standard library for Wasm based smart contracts on Cosmos blockchains
Documentation
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "CosmosMsg_for_Empty",
  "anyOf": [
    {
      "type": "object",
      "required": [
        "bank"
      ],
      "properties": {
        "bank": {
          "$ref": "#/definitions/BankMsg"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "custom"
      ],
      "properties": {
        "custom": {
          "$ref": "#/definitions/Empty"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "staking"
      ],
      "properties": {
        "staking": {
          "$ref": "#/definitions/StakingMsg"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "wasm"
      ],
      "properties": {
        "wasm": {
          "$ref": "#/definitions/WasmMsg"
        }
      }
    }
  ],
  "definitions": {
    "BankMsg": {
      "anyOf": [
        {
          "type": "object",
          "required": [
            "send"
          ],
          "properties": {
            "send": {
              "type": "object",
              "required": [
                "amount",
                "from_address",
                "to_address"
              ],
              "properties": {
                "amount": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Coin"
                  }
                },
                "from_address": {
                  "$ref": "#/definitions/HumanAddr"
                },
                "to_address": {
                  "$ref": "#/definitions/HumanAddr"
                }
              }
            }
          }
        }
      ]
    },
    "Binary": {
      "description": "Binary is a wrapper around Vec<u8> to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec<u8>",
      "type": "string"
    },
    "Coin": {
      "type": "object",
      "required": [
        "amount",
        "denom"
      ],
      "properties": {
        "amount": {
          "$ref": "#/definitions/Uint128"
        },
        "denom": {
          "type": "string"
        }
      }
    },
    "Empty": {
      "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)",
      "type": "object"
    },
    "HumanAddr": {
      "type": "string"
    },
    "StakingMsg": {
      "anyOf": [
        {
          "type": "object",
          "required": [
            "delegate"
          ],
          "properties": {
            "delegate": {
              "type": "object",
              "required": [
                "amount",
                "validator"
              ],
              "properties": {
                "amount": {
                  "$ref": "#/definitions/Coin"
                },
                "validator": {
                  "$ref": "#/definitions/HumanAddr"
                }
              }
            }
          }
        },
        {
          "type": "object",
          "required": [
            "undelegate"
          ],
          "properties": {
            "undelegate": {
              "type": "object",
              "required": [
                "amount",
                "validator"
              ],
              "properties": {
                "amount": {
                  "$ref": "#/definitions/Coin"
                },
                "validator": {
                  "$ref": "#/definitions/HumanAddr"
                }
              }
            }
          }
        },
        {
          "type": "object",
          "required": [
            "withdraw"
          ],
          "properties": {
            "withdraw": {
              "type": "object",
              "required": [
                "validator"
              ],
              "properties": {
                "recipient": {
                  "description": "this is the \"withdraw address\", the one that should receive the rewards if None, then use delegator address",
                  "anyOf": [
                    {
                      "$ref": "#/definitions/HumanAddr"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "validator": {
                  "$ref": "#/definitions/HumanAddr"
                }
              }
            }
          }
        },
        {
          "type": "object",
          "required": [
            "redelegate"
          ],
          "properties": {
            "redelegate": {
              "type": "object",
              "required": [
                "amount",
                "dst_validator",
                "src_validator"
              ],
              "properties": {
                "amount": {
                  "$ref": "#/definitions/Coin"
                },
                "dst_validator": {
                  "$ref": "#/definitions/HumanAddr"
                },
                "src_validator": {
                  "$ref": "#/definitions/HumanAddr"
                }
              }
            }
          }
        }
      ]
    },
    "Uint128": {
      "type": "string"
    },
    "WasmMsg": {
      "anyOf": [
        {
          "description": "this dispatches a call to another contract at a known address (with known ABI)",
          "type": "object",
          "required": [
            "execute"
          ],
          "properties": {
            "execute": {
              "type": "object",
              "required": [
                "contract_addr",
                "msg",
                "send"
              ],
              "properties": {
                "contract_addr": {
                  "$ref": "#/definitions/HumanAddr"
                },
                "msg": {
                  "description": "msg is the json-encoded HandleMsg struct (as raw Binary)",
                  "allOf": [
                    {
                      "$ref": "#/definitions/Binary"
                    }
                  ]
                },
                "send": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Coin"
                  }
                }
              }
            }
          }
        },
        {
          "description": "this instantiates a new contracts from previously uploaded wasm code",
          "type": "object",
          "required": [
            "instantiate"
          ],
          "properties": {
            "instantiate": {
              "type": "object",
              "required": [
                "code_id",
                "msg",
                "send"
              ],
              "properties": {
                "code_id": {
                  "type": "integer",
                  "format": "uint64",
                  "minimum": 0.0
                },
                "label": {
                  "description": "optional human-readbale label for the contract",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "msg": {
                  "description": "msg is the json-encoded InitMsg struct (as raw Binary)",
                  "allOf": [
                    {
                      "$ref": "#/definitions/Binary"
                    }
                  ]
                },
                "send": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Coin"
                  }
                }
              }
            }
          }
        }
      ]
    }
  }
}