A standard interface for Human Capital Accounting tokens.
Abstract
The following standard allows for the implementation of a standard API for HUCAP tokens within smart contracts. This standard provides basic functionality to discover, track and transfer the motivational hierarchy of human resources. While blockchain architecture has succeeded in the financialisation of integrity by way of transparency; correspondingly real world outcomes will be proportional to the degree of individualisation of capital by way of knowledge.
Motivation
The Ethereum protocol architecture has a deterministic world-view bounded to the random reality of the human domain that supplies the intentions and logic. The yellow paper formally defines the EVM as a state machine with only deterministic parameters and state transition operators. Oracle requests to another on-chain contract, and/or off-chain HTTP lookups still make for multiple deterministic transactions.
A standard interface that allows the appraisal of individual capabilities concurrently with output and the overall knowledge-base will reduce market search costs and increase the autonomous insertion of mindful innovation into the blockchain ecosystem. We provide for simple smart contracts to define and track an arbitrarily large number of HUCAP assets. Additional applications are discussed below.
The Belief-Desire-Intention model is a plan-theoretic framework for establishing means-end coherence in agent based modelling system.
The blockchain's cryptographic security architecture reliably scales to a blockchain based PKI web-of-trust hierarchies.
ERC-20 token standard allows any tokens on Ethereum to be re-used by other applications: from wallets to decentralized exchanges.
ERC-721 token standard allows wallet/broker/auction applications to work with any NFT on Ethereum.
ERC-1155 Crypto Item standard allows a smart contract interface where one can represent any number of ERC-20 and ERC-721 assets in a single contract.
This standard is inspired by the belief–desire–intention (BDI) model of human practical reasoning developed by Michael Bratman as a way of explaining future-directed intention. A BDI agent is a particular type of bounded rational software agent, imbued with particular mental attitudes, viz: Beliefs, Desires and Intentions (BDI). The model identifies commitment as the distinguishing factor between desire and intention, and a noteworthy property that leads to (1) temporal persistence in plans and in the sense of explicit reference to time, (2) further plans being made on the basis of those to which it is already committed, (3) hierarchical nature of plans, since the overarching plan remains in effect while subsidiary plans are being executed.
The BDI software model is an attempt to solve a problem of plans and planning choice and the execution thereof. The complement of which tenders a sufficient metric for indicating means-end coherence and ascribing cost baselines to such outcomes.
Specification
Main Interface
pragmasolidity^0.4.25;
pragmaexperimental ABIEncoderV2;
/**
@title ERC-**** Human Capital Accounting Standard
@dev See https://github.com/freeworkculture/kazini/issues/11
Note: the ERC-165 identifier for this interface is 0xf23a6e61.
*/interfaceIERC_HUCAP{/**
@notice Compute the index value of an Agents BDI in the ecosystem.
@param _address Set the stance of an agent
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionupdateIndex()internalreturns(bool);
/**
@notice Get the active/inactive and states of an Agent in the ecosystem.
@param _address Set the stance of an agent
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functioniam()viewpublicreturns(bool iam_, IERC_HUCAP_TYPES.IS state_);
/**
@notice Fetch the bdi index value of an Agent in the ecosystem.
@param _address Set the stance of an agent
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionindex()viewpublicreturns(uint8 index_);
/**
@notice Count of Public Keys in key ring of an Agent in the ecosystem.
@param _address Set the stance of an agent
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionringLength()viewpublicreturns(uint ringlength_);
/**
@notice Get the PGP Public Key Id of an Agent in the ecosystem.
@param "" Set the stance of an agent
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionkeyId()viewpublicreturns(bytes32 KEYID_);
/**
@notice Get the merit data of an Agent in the ecosystem.
@param "" Set the stance of an agent
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionmerits()viewpublicreturns(uint experience_,
bytes32 reputation_,
bytes32 talent_,
uint8 index_,
bytes32 hash_);
/**
@notice Get the accreditation of an Agent in the ecosystem.
@param "" Set the stance of an agent
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionkbase()viewpublicreturns(IERC_HUCAP_TYPES.KBase kbase_);
/**
@notice Get the desire of an Agent in the ecosystem.
@param _desire Pro-attitude
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functiondesire(bytes1_desire)viewexternalreturns(bytes32);
/**
@notice Get the intention of an Agent in the ecosystem.
@param _intention Conduct-controlling pro-attitude
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionintention(bool_intention)viewexternalreturns(bytes32);
/**
@notice Cycle the intention of an Agent in the ecosystem.
@param _intention Conduct-controlling pro-attitude
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionflipIntention()externalreturns(bool);
/**
@notice Get the user data of an Agent in the ecosystem.
@param "" Conduct-controlling pro-attitude
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functiongetDoer()viewexternalreturns(bytes32 fPrint,
bool iam_,
bytes32 email,
bytes32 fName,
bytes32 lName,
uint age,
bytes32 data_);
/**
@notice Get the belief data of an Agent in the ecosystem.
@param _kbase Source address
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functiongetBelief(IERC_HUCAP_TYPES.KBase _kbase)viewexternalreturns(bytes32 country_,
bytes32 cAuthority_,
bytes32 score_);
/**
@notice Get the desire data of an Agent in the ecosystem.
@param _desire Pro-attitides
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functiongetDesire(bytes1_desire)viewexternalreturns(bytes32,bool);
/**
@notice Get the intention of an Agent in the ecosystem.
@param _intention Conduct-controlling pro-attitude
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functiongetIntention(bool_intention)viewexternalreturns(IERC_HUCAP_TYPES.IS,bytes32,uint256);
/**
@notice Sign the Public Key of an Agent in the ecosystem.
@param _address Address of key to sign, must belong to an Agent
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionsign(address_address)publiconlyOwnerreturns(uint, bool signed);
/**
@notice Sign the Public Key of an Agent in the ecosystem.
@param "" internal helper function to add key in keyring
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionsign()externalonlyDoerreturns(uint, bool signed);
/**
@notice Revoke the Public Key of an Agent in the ecosystem.
@param _address Address of key to revoke, must belong to an Agent
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionrevoke(address_address)externalonlyDoerreturns(uint, bool revoked);
/**
@notice Revoke the Public Key of an Agent in the ecosystem.
@param "" internal helper function to remove key from keyring
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionrevoke()externalonlyDoerreturns(uint, bool revoked);
/**
@notice Set the trust level for a Public Key of an Agent in the ecosystem.
@param _level Degree of trust
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functiontrust(Trust_level)returns(bool);
/**
@notice Increment the number of keys in the keyring of an Agent in the ecosystem.
@param _keyd Target key
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionincSigns(bytes32_keyd)externalProxyKeyreturns(uint);
/**
@notice Decrement the number of keys in the keyring of an Agent in the ecosystem.
@param _keyd Target key
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functiondecSigns(bytes32_keyd)externalProxyKeyreturns(uint);
/**
@notice Set the knowledge credentials of an Agent in the ecosystem.
@param _kbase Level of accreditation
@param _country Source country
@param _cAuthority Accreditation authority
@param _score Accreditation
@param _year Year of Accreditation
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionsetbdi(KBase_kbase,
bytes32_country,
bytes32_cAuthority,
bytes32_score,
uint_year)externalProxyBDIreturns(bool qualification_);
/**
@notice Set the SNA metrics of an Agent in the ecosystem
@param _refMSD Minimum shortest distance
@param _refRank Rank of target key
@param _refSigned No of keys signed I have signed
@param _refSigs No. of keys that have signed my key
@param _refTrust Degree of tructThrows on any error rather than return a false flag to minimize user errors
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionsetbdi(uint_refMSD,
uint_refRank,
uint_refSigned,
uint_refSigs,
bytes32_refTrust)externalProxyBDIreturns(bool reputation_);
/**
@notice Set the talents of an Agent in the ecosystem
@param _talent Agent's talent
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionsetbdi(bytes32_talent)externalProxyBDIreturns(bool talent_);
/**
@notice Set the desires of an Agent in the ecosystem
@param _desire Pro-attitude
@param _goal A goal is an instatiated pro-attitude
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionsetbdi(bytes1_desire, Desire_goal)publiconlyDoerreturns(bool);
/**
@notice Set the intention of an Agent in the ecosystem
@param _service Conducting-controlling pro-attitude
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionsetbdi(Intention_service)publiconlyDoerreturns(bool);
/**
@notice Set the targeted intention of an Agent in the ecosystem.
@param _intention Conduct-controlling pro-attitude
@param _state Agent stance
@dev For the purpose of
Throws on any error rather than return a false flag to minimize user errors
*/functionintention(bool_intention, IERC_HUCAP_TYPES.IS _state)externalreturns(IERC_HUCAP_TYPES.IS);
/* End of interface IERC_HUCAP */}
pragmasolidity^0.4.25;
pragmaexperimental ABIEncoderV2;
interfaceIERC_HUCAP_KEYSIGNING_EXTENSION{bytes32constantpublic _InterfaceId_ERC165_ ="CREATOR0.0118XOROFALLFUNCTIONSINTHEINTERFACE"; // Complies to ERC165
// KEY MASKING TABLE
// bytes32 constant public MASK = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
// bytes32 constant public KEYID = 0xffffffffffffffffffffffffffffffffff90EBAC34FC40EAC30FC9CB464A2E56; // EXAMPLE PGP PUBLIC KEY ID
// bytes32 constant public KEY_CERTIFICATION = 0x01ffffffffffffff << 192; // “C” Key Certification
// bytes32 constant public SIGN_DATA = 0x02ffffffffffffff << 192; // “S” Sign Data
// bytes32 constant public ENCRYPT_COMMUNICATIONS = 0x04ffffffffffffff << 192; // “E” Encrypt Communications
// Clearance constant public Trust = 0x03ff << 192; // Trust: Unknown
// BYTES32 Value with
// Public Key Id, masking
// Key Certification masking
// Split Key masking
// Generic masking
// Ordinary masking
// Trust.Unknown masking
// bytes32 constant public DOER = 0x11ff10ff100f03ffff00ffffffffffffffff90EBAC34FC40EAC30FC9CB464A2E56;
bytes32constantpublic KEY_CERTIFICATION =0x01ffffffffffffff<<192; // “C” Key Certification
bytes32constantpublic SIGN_DATA =0x02ffffffffffffff<<192; // “S” Sign Data
bytes32constantpublic ENCRYPT_COMMUNICATIONS =0x04ffffffffffffff<<192; // “E” Encrypt Communications
bytes32constantpublic ENCRYPT_STORAGE =0x08ffffffffffffff<<192; // “E” Encrypt Storage
bytes32constantpublic SPLIT_KEY =0x10ffffffffffffff<<192; // Split key
bytes32constantpublic AUTHENTICATION =0x20ffffffffffffff<<192; // “A” Authentication
bytes32constantpublic MULTI_SIGNATURE =0x80ffffffffffffff<<192; // Held by more than one person
bytes32constantpublic TRUST_AMOUNT =0xffffffffffff00ff<<192;
bytes32constantpublic BINARY_DOCUMENT =0xffff00ffffffffff<<192; // 0x00: Signature of a binary document.
bytes32constantpublic CANONICAL_DOCUMENT =0xffff01ffffffffff<<192; // 0x01: Signature of a canonical text document.
bytes32constantpublic STANDALONE_SIGNATURE =0xffff02ffffffffff<<192; // 0x02: Standalone signature.
bytes32constantpublic GENERIC =0xffff10ffffffffff<<192; // 0x10: Generic certification of a User ID and Public-Key packet.
bytes32constantpublic PERSONA =0xffff11ffffffffff<<192; // 0x11: Persona certification of a User ID and Public-Key packet.
bytes32constantpublic CASUAL =0xffff12ffffffffff<<192; // 0x12: Casual certification of a User ID and Public-Key packet.
bytes32constantpublic POSITIVE =0xffff13ffffffffff<<192; // 0x13: Positive certification of a User ID and Public-Key packet.
bytes32constantpublic SUBKEY_BINDING =0xffff18ffffffffff<<192; // 0x18: Subkey Binding Signature
bytes32constantpublic PRIMARY_KEY_BINDING =0xffff19ffffffffff<<192; // 0x19: Primary Key Binding Signature
bytes32constantpublic DIRECTLY_ON_KEY =0xffff1Fffffffffff<<192; // 0x1F: Signature directly on a key
bytes32constantpublic KEY_REVOCATION =0xffff20ffffffffff<<192; // 0x20: Key revocation signature
bytes32constantpublic SUBKEY_REVOCATION =0xffff28ffffffffff<<192; // 0x28: Subkey revocation signature
bytes32constantpublic CERTIFICATION_REVOCATION =0xffff30ffffffffff<<192; // 0x30: Certification revocation signature
bytes32constantpublic TIMESTAMP =0xffff40ffffffffff<<192; // 0x40: Timestamp signature.
bytes32constantpublic THIRD_PARTY_CONFIRMATION =0xffff50ffffffffff<<192; // 0x50: Third-Party Confirmation signature.
bytes32constantpublic ORDINARY =0xffffffff100fffff<<192;
bytes32constantpublic INTRODUCER =0xffffffff010fffff<<192;
bytes32constantpublic ISSUER =0xffffffff001fffff<<192;
// EDGES MASKING TABLE
Clearance internal TRUST =Clearance({
Zero: 0x01ff<<192,
Unknown: 0x03ff<<192,
Generic: 0x07ff<<192,
Poor: 0xF0ff<<192,
Casual: 0xF1ff<<192,
Partial: 0xF3ff<<192,
Complete: 0xF7ff<<192,
Ultimate: 0xFFff<<192
});
/**
/// @notice Cycle through state transition of an Agent in the ecosystem.
/// @param _address toggle on/off a doer agent
// @dev `anybody` can retrieve the talent data in the contract
*/functionflipTo(address_address)externalonlyOwnerreturns(IS);
/**
/// @notice Turn Agent in the ecosystem to on/off.
/// @param _address toggle on/off a doer agent
// @dev `anybody` can retrieve the talent data in the contract
*/functiontoggle(address_address)externalonlyOwnerreturns(bool);
/**
/// @notice Set the trust level of an Agent in the ecosystem.
/// @param _level toggle on/off a doer agent
// @dev `anybody` can retrieve the talent data in the contract
*/functiontrust(Trust_level)returns(bytes32 Trust);
eventLogCall(addressindexedfrom, addressindexedto, addressindexedorigin, bytes_data);
/* End of interface IERC_HUCAP_KEYSIGNING_EXTENSION */}
Human Capital Accounting Extension Interface
pragmasolidity^0.4.25;
pragmaexperimental ABIEncoderV2;
interfaceIERC_HUCAP_TRACKUSERS_EXTENSION{/// @notice Instantiate an Agent in the ecosystem with default data.
/// @param _address initialise a doer agent
// @dev `anybody` can retrieve the talent data in the contract
functioninitAgent(Doers_address)externalonlyControlledreturns(bool);
/// @notice Get the data by uuid of an Agent in the ecosystem.
/// @param _uuid Get the address of a unique uid
// @dev `anybody` can retrieve the talent data in the contract
functiongetAgent(bytes32_uuid)viewexternalreturns(address);
/// @notice Get the data of all Talents in the ecosystem.
/// @param _address Query if address belongs to an agent
// @dev `anybody` can retrieve the talent data in the contract
functioniam(address_address)viewpublicreturns(bool);
/// @notice Get the data of all Talents in the ecosystem.
/// @param _address Query if address belongs to a doer
// @dev `anybody` can retrieve the talent data in the contract
functionisDoer(address_address)viewpublicreturns(IS);
/// @notice Get the number of doers that can be spawned by a Creators.
/// The query condition of the contract
// @dev `anybody` can retrieve the count data in the contract
functiongetAgent(address_address)viewpublicreturns(bytes32 keyid_, IS state_, bool active_, uint myDoers_);
/// @notice Get the data of all Talents in the ecosystem.
/// @param _talent The talent whose frequency is being queried
// @dev `anybody` can retrieve the talent data in the contract
functiongetTalents(bytes32_talent)viewexternalreturns(uint talentK_, uint talentI_, uint talentR_, uint talentF_);
/// @notice Increment a kind of talent in the ecosystem.
/// @param The talent whose frequency is being queried
// @dev `anybody` can retrieve the talent data in the contract
functionincTalent()payablepubliconlyDoerreturns(bool);
/// @notice Decrement a kind of talent in the ecosystem..
/// @param The talent whose frequency is being queried
// @dev `anybody` can retrieve the talent data in the contract
functiondecTalent()payablepubliconlyDoerreturns(bool);
/// @notice Set the Public-Key Id of an Agent in the ecosystem.
/// @param _address Set the Public-key Id of an agent
// @dev `anybody` can retrieve the talent data in the contract
functionsetAgent(address_address, bytes32_keyId)externalonlyControlledreturns(bytes32);
/// @notice Transition the states of an Agent in the ecosystem.
/// @param _address Set the stance of an agent
// @dev `anybody` can retrieve the talent data in the contract
functionsetAgent(address_address, IS_state)externalonlyControlledreturns(IS);
/// @notice Set the active status of an Agent in the ecosystem.
/// @param _address Toggle the true/false status of an agent
// @dev `anybody` can retrieve the talent data in the contract
functionsetAgent(address_address, bool_active)externalonlyControlledreturns(bool);
/// @notice Set the data of all Intentions of Agents in the ecosystem.
/// @param _serviceId Track number of offers available
// @dev `anybody` can retrieve the talent data in the contract
functionsetAllPromises(bytes32_serviceId)externalonlyControlled;
/* End of interface IERC_HUCAP_TRACKUSERS_EXTENSION */}
Iamnot Chris, "EIP-1491: Human Cost Accounting Standard (Like Gas but for humans),"
Ethereum Improvement Proposals, no. 1491, early access, October 2018. [Online serial].
Available: https://ercs.eips.fyi/1491/.