{"name":"truffle-contract-schema","version":"2.0.3","keywords":["ethereum","json","schema","contract","artifacts"],"author":{"name":"Tim Coulter","email":"tim.coulter@consensys.net"},"license":"MIT","_id":"truffle-contract-schema@2.0.3","maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"davidmurdoch","email":"david@davidmurdoch.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"tcoulter","email":"tim@timothyjcoulter.com"}],"homepage":"https://github.com/trufflesuite/truffle-schema#readme","bugs":{"url":"https://github.com/trufflesuite/truffle-schema/issues"},"dist":{"shasum":"0af8e19a39c630730bc19dd41b48f5b4137a6977","tarball":"https://registry.npmjs.org/truffle-contract-schema/-/truffle-contract-schema-2.0.3.tgz","fileCount":13,"integrity":"sha512-eI5cFifbB3zpcO4RsXSnjN9JMSlJ4M50GQPdrfbrIXRTXHsyQ433SkgFjIATUwfq++TXWkCRfKMjN8eA7YQ3+Q==","signatures":[{"sig":"MEUCIHQOjff81NG2Ziz4++5bgprc2kxiZsJJINeMrwPTB9LWAiEAnsV5abifsylcSWFQPvrw2KCyyHHz4YZAbjkeNclgwsk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":75243,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaBd+CRA9TVsSAnZWagAAaIIP/2GzVhHRfJ0+NdfuulH9\nlbOkAZWDYL8Egw1ssjMbK/jzEGmJbCj8yWPnCUDNB19gqRByZgV5BkCe3gTY\nDHJVPzhA2i0n76Izhqdyj+waU0MrUTgisZmprp437pRK65UobxYnQ04y/m/h\nhp72U9QLzw1kHKQLSO/z7zWchBsQecm9Uq+U4abu4q09DDFuJbxBZd7N6OP/\nuY4QePPgq51iao8PZhLZxPgtuzWrtR2Ybt0peMZCQXNOTxpbr7sKAl2CmYjL\nm1X6dShjldC4j3sVgraN0EOzAp3+TKDj9KjK0Z3cVGgcC8ce0qgdtLTc7tat\n7pgSUDYfSOeOIm7f7V0Y55dfNfzRUECYT0FWY8RsbfDoql82AFaq9jClRX/E\ngIegPbJA9hUTqCpyAOkfqPJqqVbznPLVRoXWe/cndH0GnEfnwYctvHnfd/TW\nNvekjZ/ccVD7V4a3vHWbcRbmCzTTbGDXhhyZHhyqeLwiRHHnZPPwqMxkn7Bd\n0JOAFLGrTu2EHwdRi1+mosStuj1HRzqnJjq/AyM0DbFg+yPLiOdfsDfW1AGj\nb+aUMYpcDjQiCwct0KpHDX0vOgNxUvvh9WUIkJp+mJUhfalVk/RCj5xUKlkM\nXh9GQL0UKjD1JCX3F2PqgXZPTOTE6bUG/JOc9+Rt+r0qUa/jFBWru78h3y8a\nrCuB\r\n=ypjC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","readme":"# Schema Description: Truffle Contract Object\n\n| type | _object_ |\n| ---: | ---- |\n| JSON Schema | [contract-object.spec.json](spec/contract-object.spec.json) |\n\n\n[truffle-contract](https://github.com/trufflesuite/truffle-contract) uses a\nformally specified<sup>[1](#footnote-1)</sup> JSON object format to represent\nEthereum Virtual Machine (EVM) smart contracts. This representation is intended\nto facilitate the use of general purpose smart contract abstractions\n(such as truffle-contract) by capturing relevant smart contract information in a\npersistent and portable manner.\n\nObjects following this schema represent individual smart contracts as defined\nby their name and interface. Each object primarily includes a JSON array\nrepresenting the contract's ABI<sup>[2](#footnote-2)</sup>, but extends to\ninclude any and all information related to the contract and its lifecycle(s).\nObjects in this schema may represent pre-compiled source code, compilation\nannotations such as source mappings, references to specified deployed instances\non multiple networks, and/or links to external contracts.\n\nA full property listing is below. Properties not marked \"**required**\" are not\nnecessary to include in valid descriptions of contract objects, but functionally\ncertain information must be present to allow the contract object representation\nto be useful (`source`/`bytecode`/etc. enable the deployment of new instances,\n`networks` listed with prior contract instance `address`es enable interaction\nwith deployed contracts on-chain)\n\n\n## References\n\n<a name=\"footnote-1\">1.</a> JSON Schema [http://json-schema.org](http://json-schema.org/)\n\n<a name=\"footnote-2\">2.</a> Ethereum Contract JSON ABI [https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI#json](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI#json)\n\n\n\n## Properties\n\n\n### `contractName`\n\n| type | _string_ matching pattern `^[a-zA-Z_][a-zA-Z0-9_]*$` |\n| ---: | ---- |\n| default | `\"Contract\"` |\n\n\nName used to identify the contract. Semi-alphanumeric string.\n\n\n### `abi`\n\n| type | _array_ |\n| ---: | ---- |\n| JSON Schema | [abi.spec.json](spec/abi.spec.json) |\n| **required** |\n\nExternal programmatic description of contract's interface. The contract's ABI\ndetermines the means by which applications may interact with individual contract\ninstances. Array of functions and events representing valid inputs and outputs\nfor the instance.\n\n\n### `ast`\n\n| type | _object_ |\n| ---: | ---- |\n\n_not included in current version of this specification_\n\nAbstract Syntax Tree. A nested JSON object representation of contract source\ncode, as output by compiler.\n\n\n\n### `bytecode`\n\n| type | _string_ matching pattern `^0x0$\\|^0x([a-fA-F0-9]{2}\\|__.{38})+$` |\n| ---: | ---- |\n| ref | [Bytecode](#contract-object--bytecode) |\n\n\nEVM instruction bytecode that runs as part of contract create transaction.\nConstructor code for new contract instance.\nSpecified as a hexadecimal string, may include `__`-prefixed (double underscore)\nlink references.\n\n\n\n### `deployedBytecode`\n\n| type | _string_ matching pattern `^0x0$\\|^0x([a-fA-F0-9]{2}\\|__.{38})+$` |\n| ---: | ---- |\n| ref | [Bytecode](#contract-object--bytecode) |\n\n\nEVM instruction bytecode associated with contract that specifies behavior for\nincoming transactions/messages. Underlying implementation of ABI.\nSpecified as a hexadecimal string, may include `__`-prefixed (double underscore)\nlink references.\n\n\n### `source`\n\n| type | _string_ |\n| ---: | ---- |\n\n\nUncompiled source code for contract. Text string.\n\n\n### `sourcePath`\n\n| type | _string_ |\n| ---: | ---- |\n\nFile path for uncompiled source code.\n\n\n### `sourceMap`\n\n| type | _string_ matching pattern `^[0-9;]*` |\n| ---: | ---- |\n\n\nSource mapping for `bytecode`, pairing contract creation transaction data bytes\nwith origin statements in uncompiled `source`.\n\n\n### `deployedSourceMap`\n\n| type | _string_ matching pattern `^[0-9;]*` |\n| ---: | ---- |\n\nSource mapping for `deployedBytecode`, pairing contract program data bytes\nwith origin statements in uncompiled `source`.\n\n\n### `schemaVersion`\n\n| type | _string_ matching pattern `[0-9]+\\.[0-9]+\\.[0-9]+` |\n| ---: | ---- |\n\nVersion of this schema used by contract object representation.\n\n\n\n### `updatedAt`\n\n| type | _string_ |\n| ---: | ---- |\n| format | IS0-8601 Datetime |\n\n\nTime at which contract object representation was generated/most recently\nupdated.\n\n\n### `networks`\n\n| type | _object_ |\n| ---: | ---- |\n\nListing of contract instances. Object mapping network ID keys to network object\nvalues. Includes address information, links to other contract instances, and/or\ncontract event logs.\n\n#### Properties (key matching `^[a-zA-Z0-9]+$`)\n\n| type | _object_ |\n| ---: | ---- |\n| ref | [Network Object](network-object.spec.md) |\n\n\n## Custom Properties\n\n### `^x-([a-zA-Z]+-)*[a-zA-Z]+`\n\n| type | _string or number or object or array_ |\n| ---: | ---- |\n\nObjects following this schema may include additional properties with\n`x-`-prefixed keys.\n\n\n\n## Definitions\n\n\n\n\n### <a name=\"contract-object--bytecode\">Bytecode</a>\n\n| type | _string_ matching pattern `^0x0$\\|^0x([a-fA-F0-9]{2}\\|__.{38})+$` |\n| ---: | ---- |\n\n`0x`-prefixed string representing compiled EVM machine language.\n\nThis string representation may indicate link references in place of\nlinked instance addresses. Link references must begin with `__` and be exactly\n40 characters long (i.e., string length of an address in hexadecimal).\n","gitHead":"071583e5c3e3ad99c6cc4e8b979d93b48f61c373","scripts":{"test":"mocha","prepare":"cd spec && json2ts -i contract-object.spec.json -o ./index.d.ts"},"_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"deprecated":"WARNING: This package has been renamed to @truffle/contract-schema.","repository":{"url":"git+https://github.com/trufflesuite/truffle-schema.git","type":"git"},"_npmVersion":"lerna/3.4.3/node@v8.16.1+x64 (darwin)","description":"JSON schema for contract artifacts","directories":{"spec":"./spec"},"_nodeVersion":"8.16.1","dependencies":{"ajv":"^5.1.1","debug":"^3.1.0","crypto-js":"^3.1.9-1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"solc":"0.4.26","mocha":"5.2.0","json-schema-to-typescript":"^5.5.0"},"_npmOperationalInternal":{"tmp":"tmp/truffle-contract-schema_2.0.3_1567102846143_0.6975161369185736","host":"s3://npm-registry-packages"}}