Skip to main content

aptos_client_icp/models/
move_module.rs

1/*
2 * Aptos Node API
3 *
4 * The Aptos Node API is a RESTful API for client applications to interact with the Aptos blockchain.
5 *
6 * The version of the OpenAPI document: 1.2.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// MoveModule : A Move module
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct MoveModule {
17    /// A hex encoded 32 byte Aptos account address.  This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.  For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1. 
18    #[serde(rename = "address")]
19    pub address: String,
20    #[serde(rename = "name")]
21    pub name: String,
22    /// Friends of the module
23    #[serde(rename = "friends")]
24    pub friends: Vec<String>,
25    /// Public functions of the module
26    #[serde(rename = "exposed_functions")]
27    pub exposed_functions: Vec<models::MoveFunction>,
28    /// Structs of the module
29    #[serde(rename = "structs")]
30    pub structs: Vec<models::MoveStruct>,
31}
32
33impl MoveModule {
34    /// A Move module
35    pub fn new(address: String, name: String, friends: Vec<String>, exposed_functions: Vec<models::MoveFunction>, structs: Vec<models::MoveStruct>) -> MoveModule {
36        MoveModule {
37            address,
38            name,
39            friends,
40            exposed_functions,
41            structs,
42        }
43    }
44}
45