mirror of
https://github.com/hanzo-cpp/sdk.git
synced 2026-11-20 19:55:32 +00:00
The projection these were generated from was a month old and predated the compute migration, so every one of them described /v1/visor — which the API serves at zero paths now. That is why a hand-written console client and a generated one had drifted the same way at the same time. No /v1/visor path survives here. The word still appears as a source-plane value and inside gvisor and supervisor, which are not this rename.
184 lines
6.1 KiB
C++
184 lines
6.1 KiB
C++
/**
|
|
* Hanzo Cloud API
|
|
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
*
|
|
* The version of the OpenAPI document: v1
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI-Generator 7.14.0.
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
/*
|
|
* Wallet.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_Wallet_H_
|
|
#define HANZO_MODEL_Wallet_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
|
|
|
|
class Wallet
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
Wallet();
|
|
virtual ~Wallet();
|
|
|
|
/////////////////////////////////////////////
|
|
/// ModelBase overrides
|
|
|
|
void validate() override;
|
|
|
|
web::json::value toJson() const override;
|
|
bool fromJson(const web::json::value& json) override;
|
|
|
|
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
|
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// Wallet members
|
|
|
|
|
|
utility::string_t getAccountId() const;
|
|
bool accountIdIsSet() const;
|
|
void unsetAccountId();
|
|
void setAccountId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Address is the on-chain address. For kms/mpc/treasury it is the EOA a signature from this wallet recovers to; for safe it is the CREATE2 address of the Safe CONTRACT, which holds no key — its approvals recover to the MPC owner instead. Rotating a kms wallet mints a new key and therefore a NEW address, and funds and approvals at the old one do not follow; mpc, treasury and safe addresses are invariant under rotation.
|
|
/// </summary>
|
|
utility::string_t getAddress() const;
|
|
bool addressIsSet() const;
|
|
void unsetAddress();
|
|
void setAddress(const utility::string_t& value);
|
|
|
|
utility::string_t getAgent() const;
|
|
bool agentIsSet() const;
|
|
void unsetAgent();
|
|
void setAgent(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Chain is the EVM chain the wallet is bound to, CAIP-2 \"eip155:<n>\" or a bare decimal chain id. Empty is chain-agnostic: the ring signs an unbound digest, and a Safe falls back to the Hanzo L1 (36963) because a Safe and its EIP-712 domain must be chain-bound.
|
|
/// </summary>
|
|
utility::string_t getChain() const;
|
|
bool chainIsSet() const;
|
|
void unsetChain();
|
|
void setChain(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// CreatedAt is when the wallet was provisioned, Unix seconds. Listings order by it, newest first.
|
|
/// </summary>
|
|
int64_t getCreatedAt() const;
|
|
bool createdAtIsSet() const;
|
|
void unsetCreatedAt();
|
|
void setCreatedAt(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Custody is the backend holding the signing material, fixed at creation: \"kms\" (a secp256k1 key sealed under KMS and opened in-process), \"mpc\" or \"treasury\" (an m-of-n threshold key on the deployed ring, which differ by governance and not by signing mechanics), or \"safe\" (a Safe contract owned by an MPC key). A kind the deployment has not wired refuses with 503 rather than fabricating a signature.
|
|
/// </summary>
|
|
utility::string_t getCustody() const;
|
|
bool custodyIsSet() const;
|
|
void unsetCustody();
|
|
void setCustody(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// FinanceAccount is the finance ledger account bound to this wallet — the lookup that turns a ledger account back into an on-chain signer. Absent is the normal state and means unbound; the column is NULL until something binds it.
|
|
/// </summary>
|
|
utility::string_t getFinanceAccount() const;
|
|
bool financeAccountIsSet() const;
|
|
void unsetFinanceAccount();
|
|
void setFinanceAccount(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// ID is the wallet id, minted by the server as \"wal_\" + 24 hex. It is the last segment of the key ref, and it is the LEDGER SUBJECT an x402 payment into this wallet credits — so it names money as well as key material.
|
|
/// </summary>
|
|
utility::string_t getId() const;
|
|
bool idIsSet() const;
|
|
void unsetId();
|
|
void setId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Name is the display label given at creation. It addresses nothing: the key ref is derived from the scope and the id, so renaming moves no material.
|
|
/// </summary>
|
|
utility::string_t getName() const;
|
|
bool nameIsSet() const;
|
|
void unsetName();
|
|
void setName(const utility::string_t& value);
|
|
|
|
utility::string_t getOrg() const;
|
|
bool orgIsSet() const;
|
|
void unsetOrg();
|
|
void setOrg(const utility::string_t& value);
|
|
|
|
utility::string_t getProject() const;
|
|
bool projectIsSet() const;
|
|
void unsetProject();
|
|
void setProject(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Tier is the wallet tier the ring keys its TierPolicy on: hot, warm, cold, gas, bridge, contract_admin, validator, quarantine or disaster_recovery. It defaults to hot and is refused at the boundary if it is none of the nine.
|
|
/// </summary>
|
|
utility::string_t getTier() const;
|
|
bool tierIsSet() const;
|
|
void unsetTier();
|
|
void setTier(const utility::string_t& value);
|
|
|
|
|
|
protected:
|
|
utility::string_t m_AccountId;
|
|
bool m_AccountIdIsSet;
|
|
|
|
utility::string_t m_Address;
|
|
bool m_AddressIsSet;
|
|
|
|
utility::string_t m_Agent;
|
|
bool m_AgentIsSet;
|
|
|
|
utility::string_t m_Chain;
|
|
bool m_ChainIsSet;
|
|
|
|
int64_t m_CreatedAt;
|
|
bool m_CreatedAtIsSet;
|
|
|
|
utility::string_t m_Custody;
|
|
bool m_CustodyIsSet;
|
|
|
|
utility::string_t m_FinanceAccount;
|
|
bool m_FinanceAccountIsSet;
|
|
|
|
utility::string_t m_Id;
|
|
bool m_IdIsSet;
|
|
|
|
utility::string_t m_Name;
|
|
bool m_NameIsSet;
|
|
|
|
utility::string_t m_Org;
|
|
bool m_OrgIsSet;
|
|
|
|
utility::string_t m_Project;
|
|
bool m_ProjectIsSet;
|
|
|
|
utility::string_t m_Tier;
|
|
bool m_TierIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_Wallet_H_ */
|