void CheckPBaaSAPIsValid()
{
if (!chainActive.LastTip() ||
- CConstVerusSolutionVector::activationHeight.ActiveVersion(chainActive.LastTip()->GetHeight()) >= CConstVerusSolutionVector::activationHeight.SOLUTION_VERUSV4)
+ CConstVerusSolutionVector::activationHeight.ActiveVersion(chainActive.LastTip()->GetHeight()) < CConstVerusSolutionVector::activationHeight.SOLUTION_VERUSV4)
{
throw JSONRPCError(RPC_INVALID_REQUEST, "PBaaS not activated on blockchain.");
}
void CheckIdentityAPIsValid()
{
if (!chainActive.LastTip() ||
- CConstVerusSolutionVector::activationHeight.ActiveVersion(chainActive.LastTip()->GetHeight()) >= CConstVerusSolutionVector::activationHeight.SOLUTION_VERUSV3)
+ CConstVerusSolutionVector::activationHeight.ActiveVersion(chainActive.LastTip()->GetHeight()) < CConstVerusSolutionVector::activationHeight.SOLUTION_VERUSV3)
{
- throw JSONRPCError(RPC_INVALID_REQUEST, "PBaaS not activated on blockchain.");
+ throw JSONRPCError(RPC_INVALID_REQUEST, "Identity APIs not activated on blockchain.");
}
}
);
}
- CheckPBaaSAPIsValid();
+ CheckIdentityAPIsValid();
uint160 parent = IsVerusActive() ? uint160() : ConnectedChains.ThisChain().GetChainID();
std::string name = CIdentity::CleanName(uni_get_str(params[0]), parent);
);
}
- CheckPBaaSAPIsValid();
+ CheckIdentityAPIsValid();
// all names have a parent of the current chain, except if defined on the Verus chain, which has a parent of null
uint160 parent = IsVerusActive() ? uint160() : ConnectedChains.ThisChain().GetChainID();
);
}
- CheckPBaaSAPIsValid();
+ CheckIdentityAPIsValid();
// get identity
bool returnTx = false;
);
}
- CheckPBaaSAPIsValid();
+ CheckIdentityAPIsValid();
// get identity
bool returnTx = false;
+ HelpExampleRpc("recoveridentity", "\'{\"name\" : \"myname\"}\'")
);
}
- CheckPBaaSAPIsValid();
+ CheckIdentityAPIsValid();
// get identity
bool returnTx = false;
);
}
- CheckPBaaSAPIsValid();
+ CheckIdentityAPIsValid();
CTxDestination idID = DecodeDestination(uni_get_str(params[0]));
if (idID.which() != COptCCParams::ADDRTYPE_ID)
);
}
- CheckPBaaSAPIsValid();
+ CheckIdentityAPIsValid();
std::vector<std::pair<CIdentityMapKey, CIdentityMapValue *>> mine, imsigner, notmine;
static const CRPCCommand commands[] =
{ // category name actor (function) okSafeMode
// --------------------- ------------------------ ----------------------- ----------
- { "pbaas", "definechain", &definechain, true },
- { "pbaas", "getdefinedchains", &getdefinedchains, true },
- { "pbaas", "getchaindefinition", &getchaindefinition, true },
- { "pbaas", "getnotarizationdata", &getnotarizationdata, true },
- { "pbaas", "getcrossnotarization", &getcrossnotarization, true },
- { "pbaas", "submitacceptednotarization", &submitacceptednotarization, true },
- { "pbaas", "paynotarizationrewards", &paynotarizationrewards, true },
- { "pbaas", "getinitialcurrencystate", &getinitialcurrencystate, true },
- { "pbaas", "getcurrencystate", &getcurrencystate, true },
- { "pbaas", "sendreserve", &sendreserve, true },
- { "pbaas", "getpendingchaintransfers", &getpendingchaintransfers, true },
- { "pbaas", "getchainexports", &getchainexports, true },
- { "pbaas", "getchainimports", &getchainimports, true },
- { "pbaas", "reserveexchange", &reserveexchange, true },
- { "pbaas", "getlatestimportsout", &getlatestimportsout, true },
- { "pbaas", "getlastimportin", &getlastimportin, true },
- { "pbaas", "refundfailedlaunch", &refundfailedlaunch, true },
- { "pbaas", "registernamecommitment", ®isternamecommitment, true },
- { "pbaas", "registeridentity", ®isteridentity, true },
- { "pbaas", "updateidentity", &updateidentity, true },
- { "pbaas", "revokeidentity", &revokeidentity, true },
- { "pbaas", "recoveridentity", &recoveridentity, true },
- { "pbaas", "getidentity", &getidentity, true },
- { "pbaas", "listidentities", &listidentities, true },
- { "pbaas", "refundfailedlaunch", &refundfailedlaunch, true },
- { "pbaas", "getmergedblocktemplate", &getmergedblocktemplate, true },
- { "pbaas", "addmergedblock", &addmergedblock, true }
+ { "identity", "registernamecommitment", ®isternamecommitment, true },
+ { "identity", "registeridentity", ®isteridentity, true },
+ { "identity", "updateidentity", &updateidentity, true },
+ { "identity", "revokeidentity", &revokeidentity, true },
+ { "identity", "recoveridentity", &recoveridentity, true },
+ { "identity", "getidentity", &getidentity, true },
+ { "identity", "listidentities", &listidentities, true },
+ { "PBaaS", "definechain", &definechain, true },
+ { "PBaaS", "getdefinedchains", &getdefinedchains, true },
+ { "PBaaS", "getchaindefinition", &getchaindefinition, true },
+ { "PBaaS", "getnotarizationdata", &getnotarizationdata, true },
+ { "PBaaS", "getcrossnotarization", &getcrossnotarization, true },
+ { "PBaaS", "submitacceptednotarization", &submitacceptednotarization, true },
+ { "PBaaS", "paynotarizationrewards", &paynotarizationrewards, true },
+ { "PBaaS", "getinitialcurrencystate", &getinitialcurrencystate, true },
+ { "PBaaS", "getcurrencystate", &getcurrencystate, true },
+ { "PBaaS", "sendreserve", &sendreserve, true },
+ { "PBaaS", "getpendingchaintransfers", &getpendingchaintransfers, true },
+ { "PBaaS", "getchainexports", &getchainexports, true },
+ { "PBaaS", "getchainimports", &getchainimports, true },
+ { "PBaaS", "reserveexchange", &reserveexchange, true },
+ { "PBaaS", "getlatestimportsout", &getlatestimportsout, true },
+ { "PBaaS", "getlastimportin", &getlastimportin, true },
+ { "PBaaS", "refundfailedlaunch", &refundfailedlaunch, true },
+ { "PBaaS", "refundfailedlaunch", &refundfailedlaunch, true },
+ { "PBaaS", "getmergedblocktemplate", &getmergedblocktemplate, true },
+ { "PBaaS", "addmergedblock", &addmergedblock, true }
};
void RegisterPBaaSRPCCommands(CRPCTable &tableRPC)