{ "info": { "author": "Meheret Tesfaye", "author_email": "meherett@zoho.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "

\t\t\n \t\t\n

\n\n# btmhdw\n\n*The implementation of Hierarchical Deterministic (HD) wallets generator for Bytom blockchain.*\n\n[![Build Status](https://travis-ci.org/meherett/btmhdw.svg?branch=master)](https://travis-ci.org/meherett/btmhdw)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/btmhdw.svg)\n![PyPI License](https://img.shields.io/pypi/l/btmhdw.svg?color=black)\n![PyPI Version](https://img.shields.io/pypi/v/btmhdw.svg?color=blue)\n[![Coverage Status](https://coveralls.io/repos/github/meherett/btmhdw/badge.svg?branch=master)](https://coveralls.io/github/meherett/btmhdw?branch=master)\n\n## Installation\nInstall btmhdw\n```\npip install btmhdw\n```\n\n## Development\nClone the repository and then run\n```\npip install -e . -r requirements.txt\n```\n\n## Running the test\nYou can run the tests with:\n```\npytest tests\n```\nOr use `tox` to run the complete suite against the full set of build targets, or pytest to run specific \ntests against a specific version of Python.\n\n## Usage\n#### Create a new Bytom wallet\n```python\nfrom btmhdw import BTMHDW\n\n# init BTMHDW\nbtmhdw = BTMHDW()\n\n# Generate mnemonic english/japanese\nmnemonic = btmhdw.generateMnemonic(\"english\")\n\n# Checking mnemonic language\nif not btmhdw.checkMnemonic(mnemonic, \"english\"):\n exit()\n\n# Create a new wallet\ncreatedWallet = btmhdw.createWallet(mnemonic=mnemonic, network=\"mainnet\")\n\nprint(createdWallet)\n```\n`OUTPUT`\n```json5\n{\n 'mnemonic': 'gauge base climb fit output toast brave crush vacant predict hire remind',\n 'address': 'bm1qn6g0tky8lx44j2ccz8cu88ngn4snfqr74d9ndw',\n 'seed': 'b699dee73ef9be58fbf3490dab6e49071f96df97c5d2614a465b1fd3b76373f56edbac4e24b137f6226402e59902f0eaa882603f94b83618384500db1e30585b',\n 'xprivate': '8007196f3e0841bbdf90d97df172a19cb18edda007466d362fa2d5ff23822a40189b8b295cc023e0b2c78f79725f859ac512afdfebc0b94cfd83faa59e42d82e',\n 'xpublic': 'd47ece6097f93b5d19259886d210dab017f5b37520b4dad8160712fd5b1065e7189b8b295cc023e0b2c78f79725f859ac512afdfebc0b94cfd83faa59e42d82e',\n 'program': '001468029bfd7635cec9100ed21ab6aee3a41986db71',\n 'path': 'm/44/153/1/0/1',\n}\n```\n\n#### Get wallet from XPrivate key\n```python\nfrom btmhdw import BTMHDW\n\nXPRIVATE = \"8007196f3e0841bbdf90d97df172a19cb18edda007466d362fa2d5ff23822a40189b8b295cc023e0b2c78f79725f859ac512afdfebc0b94cfd83faa59e42d82e\"\n\n# init BTMHDW\nbtmhdw = BTMHDW()\n\n# Wallet from xprivate\nwalletFromXPrivate = btmhdw.walletFromXPrivate(xprivate=XPRIVATE,\n network=\"mainnet\")\n```\n`OUTPUT`\n```json5\n{\n 'address': 'bm1qn6g0tky8lx44j2ccz8cu88ngn4snfqr74d9ndw',\n 'xprivate': '8007196f3e0841bbdf90d97df172a19cb18edda007466d362fa2d5ff23822a40189b8b295cc023e0b2c78f79725f859ac512afdfebc0b94cfd83faa59e42d82e',\n 'xpublic': 'd47ece6097f93b5d19259886d210dab017f5b37520b4dad8160712fd5b1065e7189b8b295cc023e0b2c78f79725f859ac512afdfebc0b94cfd83faa59e42d82e', \n 'program': '001468029bfd7635cec9100ed21ab6aee3a41986db71',\n 'path': 'm/44/153/1/0/1'\n}\n```\n\n## Example\nHere are more [btmhdw/example](https://github.com/meherett/btmhdw/blob/master/examples/example.py)\n\n# Running UI\nInstall PyQt5 and clone the repository and then run\n```\ncd ui\n\n# Run BTMHDW\npython BTMHDW.py\n```\n\n## Meta\n\nMeheret Tesfaye \u2013 [@meherett](https://github.com/meherett) \u2013 meherett@zoho.com\n\nDistributed under the MIT license. See ``LICENSE`` for more information.\n\n[https://github.com/meherett](https://github.com/meherett) - *Initial work* - [Cobra](https://github.com/cobraframework)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n## Screenshot\n\nDesktop application of BTMHDW. Here are more [screenshots](https://github.com/meherett/btmhdw/blob/master/ui/screenshot).\n\n

\t\t\n \n

\n\n## API\n\n### Class BTMHDW()\n**`generateMnemonic()`**: It is to generate new mnemonic.\n\n**Parameters**\n\n`Optional`:\n- `String` - *strength*, 128.\n- `String` - *passphrase*, password of the key.\n- `String` - *language*, mnemonic language of the key.\n\n**Returns**\n\n`Object`:\n- `String` - *mnemonic*, generated mnemonic 12 words.\n\n**Example**\n\n```python\nprint(btmhdw.generateMnemonic(language=\"english\", passphrase=\"meherett\"))\nprint(btmhdw.generateMnemonic(language=\"japanese\", passphrase=\"meherett\"))\n```\n
\nOutput\n\n```json5\n\"spare uniform possible grief attitude machine peace update tornado area evolve spread\"\n\"\u3042\u3051\u304b\u3099\u305f\u00e3\u0080\u0080\u3072\u3066\u3044\u00e3\u0080\u0080\u304d\u3099\u3057\u3099\u304b\u304b\u3099\u304f\u00e3\u0080\u0080\u304f\u3046\u304d\u00e3\u0080\u0080\u3068\u3099\u3046\u304f\u3099\u00e3\u0080\u0080\u305f\u3099\u3057\u3099\u3083\u308c\u00e3\u0080\u0080\u304a\u304a\u3046\u00e3\u0080\u0080\u308a\u306d\u3093\u00e3\u0080\u0080\u3053\u3093\u305f\u3099\u3066\u00e3\u0080\u0080\u3066\u308f\u305f\u3057\u00e3\u0080\u0080\u306f\u3075\u3099\u3089\u3057\u00e3\u0080\u0080\u3061\u3044\u304d\"\n```\n
\n\n----\n\n**`checkMnemonic()`**: It is to check mnemonic language.\n\n**Parameters**\n\n`Object`:\n- `String` - *mnemonic*, mnemonic 12 words.\n\n`Optional`:\n- `String` - *language*, english/japanese by default english.\n\n**Returns**\n\n`Object`:\n- `Boolean` - *boolean*, True/False.\n\n**Example**\n\n```python\nMNEMONIC = \"ancient young hurt bone shuffle deposit congress normal crack six boost despair\"\n\nprint(btmhdw.checkMnemonic(MNEMONIC, \"english\"))\nprint(btmhdw.checkMnemonic(MNEMONIC, \"japanese\"))\n```\n
\nOutput\n\n```python\nTrue\nFalse\n```\n
\n\n----\n\n**`generateEntropy()`**: It is to generate new entropy.\n\n**Returns**\n\n`Object`:\n- `String` - *entropy*, generated entropy 32 length.\n\n**Example**\n\n```python\nprint(btmhdw.generateEntropy())\n```\n
\nOutput\n\n```json5\n\"fbb9d20ec1fb94762b56dbc9cd184e23\"\n```\n
\n\n**`createWallet()`**: It is to create new Bytom wallet.\n\n**Parameters**\n\n`Optional`:\n- `String` - *mnemonic*, from mnemonic 12 words.\n- `String` - *passphrase*, password of the key.\n- `String` - *account*, account path index by default 1.\n- `String` - *change*, change path index 0 or 1 by default 0.\n- `String` - *address*, address path index by default 1.\n- `String` - *path*, string of index.\n- `Array` - *indexes*, array of index.\n- `String` - *network*, mainnet(bm)/testnet(tm)/solonet(sm) by default sm.\n\n**Returns**\n\n`Object`:\n- `Object` - *object*, keys are `entropy`, `mnemonic`, `address`, `seed`, `xprivate`, `xpublic`, `program` and `path`\n\n**Example**\n\n```python\nmnemonic = btmhdw.generateMnemonic(\"english\")\n\ncreatedWallet = btmhdw.createWallet(mnemonic=mnemonic, \n network=\"mainnet\")\nprint(createdWallet['address'])\nprint(createdWallet['xprivate'], '\\n')\nprint(createdWallet)\n```\n
\nOutput\n\n```json5\n\"bm1qsv6u5z2uxtefnehkyuetyx4llu27umqscu8vtk\"\n\"983fc70dc7c4a26ff9af39af4c0cc3057565b8f70a31158a6f37e1804ae6414ea6cade89861c53fafa461e5f0e116f47a816b11ba05585b79c577531c6000ffe\" \n\n{\n 'mnemonic': 'alarm fix day evoke void hawk pistol pulp impact farm average mask',\n 'address': 'bm1qsv6u5z2uxtefnehkyuetyx4llu27umqscu8vtk',\n 'seed': '6e269a33fb2c65b9a1966bc9579628869630d7d647792eaa3692fdae1db1a719ff4dfef17acf6027fb20ba7ce04e4715460ea2d280f69f646df1f2a6ef6ffea1',\n 'xprivate': '983fc70dc7c4a26ff9af39af4c0cc3057565b8f70a31158a6f37e1804ae6414ea6cade89861c53fafa461e5f0e116f47a816b11ba05585b79c577531c6000ffe',\n 'xpublic': '4a7bfcbccbe97aa3f92795c761697f98b6b2350597ab73c85109b025301db1aaa6cade89861c53fafa461e5f0e116f47a816b11ba05585b79c577531c6000ffe',\n 'program': '0014312b5e9ee3625a50847ffd5244dbc0d8f01b8566',\n 'path': 'm/44/153/1/0/1',\n}\n```\n
\n\n----\n\n**`walletFromXPrivate()`**: It is to get wallet from XPrivate\n\n**Parameters**\n\n`Object`:\n- `String` - *xprivate*, xprivate key.\n\n`Optional`:\n- `String` - *account*, account path index by default 1.\n- `String` - *change*, change path index 0 or 1 by default 0.\n- `String` - *address*, address path index by default 1.\n- `String` - *path*, string of index.\n- `Array` - *indexes*, array of index.\n- `String` - *network*, mainnet(bm)/testnet(tm)/solonet(sm) by default sm.\n\n**Returns**\n\n`Object`:\n- `Object` - *object*, keys are `address`, `xprivate`, `xpublic`, `program` and `path`\n\n**Example**\n\n```python\nXPRIVATE = \"c003f4bcccf9ad6f05ad2c84fa5ff98430eb8e73de5de232bc29334c7d074759d513bc370335cac51d77f0be5dfe84de024cfee562530b4d873b5f5e2ff4f57c\"\n\nwalletFromXPrivate = btmhdw.walletFromXPrivate(xprivate=XPRIVATE,\n network=\"mainnet\")\nprint(walletFromXPrivate['address'])\nprint(walletFromXPrivate['xprivate'], '\\n')\nprint(walletFromXPrivate)\n```\n
\nOutput\n\n```json5\n\"bm1qtzg058tt5eyf2qqfy2650erxqxhfkt4p236708\"\n\"c003f4bcccf9ad6f05ad2c84fa5ff98430eb8e73de5de232bc29334c7d074759d513bc370335cac51d77f0be5dfe84de024cfee562530b4d873b5f5e2ff4f57c\" \n\n{\n 'address': 'bm1qtzg058tt5eyf2qqfy2650erxqxhfkt4p236708', \n 'xprivate': 'c003f4bcccf9ad6f05ad2c84fa5ff98430eb8e73de5de232bc29334c7d074759d513bc370335cac51d77f0be5dfe84de024cfee562530b4d873b5f5e2ff4f57c',\n 'xpublic': '1b0541a7664cee929edb54d9ef21996b90546918a920a77e1cd6015d97c56563d513bc370335cac51d77f0be5dfe84de024cfee562530b4d873b5f5e2ff4f57c',\n 'program': '0014dcf6b21d83c978d3125d1330c928c38fee315200',\n 'path': 'm/44/153/1/0/1',\n}\n```\n
\n\n----\n\n### Class BytomHDWallet()\n\n**`masterKeyFromMnemonic()`**: It is to get master key from mnemonic.\n\n**Parameters**\n\n`Object`:\n- `String` - *mnemonic*, mnemonic 12 words.\n\n`Optional`:\n- `String` - *passphrase*, password of the key.\n\n**Returns**\n\n`Object`:\n- `Object` - *BytomHDWallet*, class.\n\n**Example**\n\n```python\nMNEMONIC = \"ancient young hurt bone shuffle deposit congress normal crack six boost despair\"\n\nbytomHDWallet = BytomHDWallet.masterKeyFromMnemonic(mnemonic=MNEMONIC,\n passphrase=\"Meheret Tesfaye\")\n```\n\n----\n\n**`masterKeyFromXPrivate()`**: It is to get master key from XPrivate.\n\n**Parameters**\n\n`Object`:\n- `String` - *xprivate*, xprivate key.\n\n**Returns**\n\n`Object`:\n- `Object` - *BytomHDWallet*, class.\n\n**Example**\n\n```python\nXPRIVATE = \"c003f4bcccf9ad6f05ad2c84fa5ff98430eb8e73de5de232bc29334c7d074759d513bc370335cac51d77f0be5dfe84de024cfee562530b4d873b5f5e2ff4f57c\"\n\nbytomHDWallet = BytomHDWallet.masterKeyFromXPrivate(xprivate=XPRIVATE)\n```\n\n----\n\n**`generateEntropy()`**: It is to generate new entropy.\n\n**Returns**\n\n`Object`:\n- `String` - *entropy*, generated entropy.\n\n**Example**\n\n```python\nprint(bytomHDWallet.generateEntropy().hex())\n```\n
\nOutput\n\n```json5\n\"7184af4506fb1b51c52d2e73251cc3a7\"\n```\n
\n\n----\n\n**`masterKeyFromEntropy()`**: It is to get master key from mnemonic.\n\n**Parameters**\n\n`Optional`:\n- `String` - *entropy*, from entropy.\n- `String` - *strength*, 128.\n- `String` - *passphrase*, password of the key.\n- `String` - *language*, mnemonic language of the key.\n\n**Returns**\n\n`Object`:\n- `Object` - *BytomHDWallet*, class.\n- `String` - *mnemonic*, generated mnemonic 12 words.\n\n**Example**\n\n```python\nentropy = bytomHDWallet.generateEntropy()\n\nbytomHDWallet, mnemonic = bytomHDWallet.masterKeyFromEntropy(entropy=entropy,\n passphrase=\"meherett\",\n language=\"japanese\")\nprint(mnemonic)\nprint(bytomHDWallet)\n```\n
\nOutput\n\n```json5\n\"\u305f\u3044\u3080\u00e3\u0080\u0080\u304a\u307e\u3044\u308a\u00e3\u0080\u0080\u305f\u3093\u3081\u3044\u00e3\u0080\u0080\u304d\u3061\u3087\u3046\u00e3\u0080\u0080\u308d\u3093\u3075\u3099\u3093\u00e3\u0080\u0080\u3044\u306a\u304b\u00e3\u0080\u0080\u3057\u306a\u304d\u3099\u308c\u00e3\u0080\u0080\u307b\u3048\u308b\u00e3\u0080\u0080\u3044\u3082\u3046\u3068\u00e3\u0080\u0080\u3072\u3057\u3087\u00e3\u0080\u0080\u3057\u3099\u3086\u3046\u00e3\u0080\u0080\u306b\u3093\u3080\"\n\n```\n
\n\n----\n\n**`xprivateKey()`**: It is to get XPrivate key.\n\n**Returns**\n\n`Object`:\n- `String` - *xprivate*, xprivate from master key.\n\n**Example**\n\n```python\nMNEMONIC = \"ancient young hurt bone shuffle deposit congress normal crack six boost despair\"\n\nbytomHDWallet = BytomHDWallet()\nbytomHDWallet = bytomHDWallet.masterKeyFromMnemonic(mnemonic=MNEMONIC)\nbytomHDWallet.fromPath(\"m/44/153/1/0/1\")\n\nprint(bytomHDWallet.xprivateKey())\n```\n
\nOutput\n\n```json5\n\"302a25c7c0a68a83fa043f594a2db8b44bc871fced553a8a33144b31bc7fb84887c9e75915bb6ba3fd0b9f94a60b7a5897ab9db6a48f888c2559132dba9152b0\"\n```\n
\n\n----\n\n**`xpublicKey()`**: It is to get XPublic key.\n\n**Parameters**\n\n`Optional`:\n- `String` - *xprivate*, from xprivate key.\n\n**Returns**\n\n`Object`:\n- `String` - *xpublic*, xpublic from xprivate/master key.\n\n**Example**\n\n```python\nXPRIVATE = \"c003f4bcccf9ad6f05ad2c84fa5ff98430eb8e73de5de232bc29334c7d074759d513bc370335cac51d77f0be5dfe84de024cfee562530b4d873b5f5e2ff4f57c\"\n\nprint(bytomHDWallet.xpublicKey(xprivate=XPRIVATE))\n```\n
\nOutput\n\n```json5\n\"302a25c7c0a68a83fa043f594a2db8b44bc871fced553a8a33144b31bc7fb84887c9e75915bb6ba3fd0b9f94a60b7a5897ab9db6a48f888c2559132dba9152b0\"\n```\n
\n\n----\n\n**`expandPrivateKey()`**: It is to get Expand XPrivate key.\n\n**Parameters**\n\n`Optional`:\n- `String` - *xprivate*, from xprivate key.\n\n**Returns**\n\n`Object`:\n- `String` - *expandPrivate*, expand private key from xprivate/master key.\n\n**Example**\n\n```python\nXPRIVATE = \"c003f4bcccf9ad6f05ad2c84fa5ff98430eb8e73de5de232bc29334c7d074759d513bc370335cac51d77f0be5dfe84de024cfee562530b4d873b5f5e2ff4f57c\"\n\nprint(bytomHDWallet.expandPrivateKey(xprivate=XPRIVATE))\n```\n
\nOutput\n\n```json5\n\"c003f4bcccf9ad6f05ad2c84fa5ff98430eb8e73de5de232bc29334c7d074759b47fcbbf006db960004839862e694fb3647fdc081ae109bbfe3b07de83e39807\"\n```\n
\n\n----\n\n**`publicKey()`**: It is to get public key(length 64).\n\n**Parameters**\n\n`Optional`:\n- `String` - *xpublic*, from xpublic key.\n\n**Returns**\n\n`Object`:\n- `String` - *public*, public key(length 64) from xpublic/master key.\n\n**Example**\n\n```python\nXPUBLIC = \"3c6664244d2d57168d173c4691dbf8741a67d972b2d3e1b0067eb825e2005d20c5eebd1c26ccad4de5142d7c339bf62cc1fb79a8b3e42a708cd521368dbc9286\"\n\nprint(bytomHDWallet.publicKey(xpublic=XPUBLIC))\n```\n
\nOutput\n\n```json5\n\"3c6664244d2d57168d173c4691dbf8741a67d972b2d3e1b0067eb825e2005d20\"\n```\n
\n\n----\n\n**`fromIndexes()`**: It is to set collection of index.\n\n**Parameters**\n\n`Object`:\n- `Array` - *indexes*, array of index.\n\n**Returns**\n\n`Object`:\n- `Object` - *BytomHDWallet*, class.\n\n**Example**\n\n```python\nINDEXES = ['2c000000', '99000000', '01000000', '01000000', '99000000']\n\nbytomHDWallet = bytomHDWallet.fromIndexes(indexes=INDEXES)\n```\n\n----\n\n**`fromIndex()`**: It is to set index.\n\n**Parameters**\n\n`Object`:\n- `Number` - *index*, number.\n\n**Returns**\n\n`Object`:\n- `Object` - *BytomHDWallet*, class.\n\n**Example**\n\n```python\nbytomHDWallet = BytomHDWallet()\n\nbytomHDWallet.fromIndex(44)\nbytomHDWallet.fromIndex(153)\nbytomHDWallet.fromIndex(1) # account\nbytomHDWallet.fromIndex(0) # change 0 or 1\nbytomHDWallet.fromIndex(1) # address\n\n# Advanced BTMHDW_HARDEN\n\nbytomHDWallet.fromIndex(44)\nbytomHDWallet.fromIndex(153 + BTMHDW_HARDEN)\nbytomHDWallet.fromIndex(1 + BTMHDW_HARDEN)\nbytomHDWallet.fromIndex(0)\nbytomHDWallet.fromIndex(1)\n```\n\n----\n\n**`fromPath()`**: It is to set index from path.\n\n**Parameters**\n\n`Object`:\n- `String` - *path*, string of index.\n\n**Returns**\n\n`Object`:\n- `Object` - *BytomHDWallet*, class.\n\n**Example**\n\n```python\nbytomHDWallet = BytomHDWallet()\n\nbytomHDWallet.fromPath(\"m/44/153/1/0/1\")\n\n# Advanced BTMHDW_HARDEN using \"'\"\n\nbytomHDWallet.fromPath(\"m/44/153'/1'/0/1\")\n```\n\n----\n\n**`getIndexes()`**: It is to get collection of index.\n\n**Returns**\n\n`Object`:\n- `Array` - *indexes*, collection of index.\n\n**Example**\n\n```python\nprint(bytomHDWallet.getIndexes())\n```\n
\nOutput\n\n```json5\n['2c000000', '99000000', '01000000', '01000000', '99000000']\n```\n
\n\n----\n\n**`getPath()`**: It is to get path of indexes.\n\n**Parameters**\n\n`Optional`:\n- `String` - *indexes*, from array of index.\n\n**Returns**\n\n`Object`:\n- `String` - *path*, string of index from indexes/master key.\n\n**Example**\n\n```python\nfrom btmhdw import INDEXES\n\nprint(bytomHDWallet.getPath(indexes=INDEXES))\n```\n
\nOutput\n\n```json5\n\"m/44/153/1/0/1\"\n```\n
\n\n----\n\n**`childXPrivateKey()`**: It is to get child of XPrivate key.\n\n**Parameters**\n\n`Optional`:\n- `String` - *xprivate*, from xprivate key.\n- `String` - *indexes*, collection of index.\n\n**Returns**\n\n`Object`:\n- `String` - *childXPrivate*, child xprivate key from xprivate/indexes/master key.\n\n**Example**\n\n```python\nfrom btmhdw import INDEXES\n\nXPRIVATE = \"c003f4bcccf9ad6f05ad2c84fa5ff98430eb8e73de5de232bc29334c7d074759d513bc370335cac51d77f0be5dfe84de024cfee562530b4d873b5f5e2ff4f57c\"\n\nchildXPrivateKey = bytomHDWallet.childXPrivateKey(xprivate=XPRIVATE,\n indexes=INDEXES)\nprint(childXPrivateKey)\n```\n
\nOutput\n\n```json5\n\"d01acc504811886d732ea6ea19c066b0f1fb4d0b2a0b97414d1d3916c70c47596aca269da2343d4d7588ffa3c8b9244a156748276114e5f2b86fa69ec241b62a\"\n```\n
\n\n----\n\n**`childXPublicKey()`**: It is to get child of XPublic key.\n\n**Parameters**\n\n`Optional`:\n- `String` - *xpublic*, from xpublic key.\n- `String` - *indexes*, collection of index.\n\n**Returns**\n\n`Object`:\n- `String` - *childXPublicKey*, child xpublic key from xpublic/indexes/master key.\n\n**Example**\n\n```python\nfrom btmhdw import INDEXES\n\nXPUBLIC = \"3c6664244d2d57168d173c4691dbf8741a67d972b2d3e1b0067eb825e2005d20c5eebd1c26ccad4de5142d7c339bf62cc1fb79a8b3e42a708cd521368dbc9286\"\n\nchildXPublicKey = bytomHDWallet.childXPublicKey(xpublic=XPUBLIC,\n indexes=INDEXES)\nprint(childXPublicKey)\n```\n
\nOutput\n\n```json5\n\"e87ca3acdebdcad9a1d0f2caecf8ce0dbfc73d060807a210c6f2254883479614bcde9cf9e8ee322097d639b33b398c2e419de4092409bf43b3632ddefc4beae9\"\n```\n
\n\n----\n\n**`program()`**: It is to get control program.\n\n**Parameters**\n\n`Optional`:\n- `String` - *xpublic*, from xpublic key.\n- `String` - *path*, path of index.\n- `String` - *indexes*, collection of index.\n\n**Returns**\n\n`Object`:\n- `String` - *program*, control program from xpublic/master key.\n\n**Example**\n```python\nfrom btmhdw import INDEXES, PATH\n\n# Getting contract Program from xpublic and path or indexes\nprint(BytomHDWallet().program(xpublic=XPUBLIC, path=\"m/44/153/2/0/8\"))\nprint(BytomHDWallet().program(xpublic=XPUBLIC, path=PATH))\nprint(BytomHDWallet().program(xpublic=XPUBLIC, indexes=INDEXES))\nprint(BytomHDWallet().program(xpublic=XPUBLIC, indexes=['2c000000', '99000000', '01000000', '01000000', '01000000']))\n```\n
\nOutput\n\n```json5\n\"00140afb404c13a122306ee86f5ff9b177334d8e23b7\"\n\"0014052620b86a6d5e07311d5019dffa3864ccc8a6bd\"\n\"0014052620b86a6d5e07311d5019dffa3864ccc8a6bd\"\n\"001478c3aa31753389fcde04d33d0779bdc2840f0ad4\"\n```\n
\n\n----\n\n**`address()`**: It is to get address.\n\n**Parameters**\n\n`Optional`:\n- `String` - *program*, from control program.\n- `String` - *network*, mainnet(bm)/testnet(tm)/solonet(sm) by default sm.\n\n**Returns**\n\n`Object`:\n- `String` - *address*, address from control program/master key.\n\n**Example**\n\n```python\nXPUBLIC = \"3c6664244d2d57168d173c4691dbf8741a67d972b2d3e1b0067eb825e2005d20c5eebd1c26ccad4de5142d7c339bf62cc1fb79a8b3e42a708cd521368dbc9286\"\n\nprogram = BytomHDWallet().program(xpublic=XPUBLIC, path=\"m/44/153/2/0/8\")\nprint(bytomHDWallet.address(program=program,\n network='mainnet')) # or network bm\nprint(bytomHDWallet.address(program=program,\n network='testnet')) # or network tm\nprint(bytomHDWallet.address(program=program,\n network='solonet')) # or network sm\n```\n
\nOutput\n\n```json5\n\"bm1qpta5qnqn5y3rqmhgda0lnvthxdxcugahcpaum5\"\n\"tm1qpta5qnqn5y3rqmhgda0lnvthxdxcugahuhucm9\"\n\"sm1qpta5qnqn5y3rqmhgda0lnvthxdxcugahesham6\"\n```\n
\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mehetett/btmhdw", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "btmhdw", "package_url": "https://pypi.org/project/btmhdw/", "platform": "", "project_url": "https://pypi.org/project/btmhdw/", "project_urls": { "Homepage": "https://github.com/mehetett/btmhdw" }, "release_url": "https://pypi.org/project/btmhdw/1.0.3/", "requires_dist": [ "mnemonic (==0.13)", "pytest (==5.0.1)", "pytest-cov (==2.7.1)" ], "requires_python": ">=3.5,<4", "summary": "The implementation of Hierarchical Deterministic (HD) wallets generator for Bytom blockchain", "version": "1.0.3" }, "last_serial": 5704063, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "123f1c4184028914c8512c828681d840", "sha256": "56e4adeef254a7e03f4d3b825798fe4ee8c9ce6a96dd86c06f781bac7855e185" }, "downloads": -1, "filename": "btmhdw-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "123f1c4184028914c8512c828681d840", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14738, "upload_time": "2019-06-02T06:17:05", "url": "https://files.pythonhosted.org/packages/e0/55/72324502c27d74be9fbb2e72b6afab2ad73dd5394ba8fe61820c36fc5e21/btmhdw-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ff6f37b8eb8f13aace7d2ef31a587922", "sha256": "d36ccfcc4dcf60590701cc49608579dd7a4d199f39ba88f919cc819c3b0d8c30" }, "downloads": -1, "filename": "btmhdw-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ff6f37b8eb8f13aace7d2ef31a587922", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14638, "upload_time": "2019-06-02T06:17:07", "url": "https://files.pythonhosted.org/packages/5c/95/453b932cd7d4c718df9aab4d102927e260403f179b3434952cb8c077d621/btmhdw-0.1.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "ce2f6cfc43509bae9dd49f2bb013c84a", "sha256": "0243b80c710c92ccafeac7ab5f541484afa41d628af1b916bfb4151e59c9c7b5" }, "downloads": -1, "filename": "btmhdw-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ce2f6cfc43509bae9dd49f2bb013c84a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14768, "upload_time": "2019-07-31T09:29:11", "url": "https://files.pythonhosted.org/packages/38/9c/7f272d8686dcd3299e681864e7a7194711ee6164c90105eeeee6e82e9e0f/btmhdw-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0abc8cc145b8f5b2789a7772f667dbb5", "sha256": "bffaf452507c673854a0229284d3a54e2aa51ef7e5b80888ae9f99ddc0f201da" }, "downloads": -1, "filename": "btmhdw-1.0.0.tar.gz", "has_sig": false, "md5_digest": "0abc8cc145b8f5b2789a7772f667dbb5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18909, "upload_time": "2019-07-31T09:29:14", "url": "https://files.pythonhosted.org/packages/5e/ef/6eb4a732d54145bd17af1ede1c7d41083e18b7fadd4ac84f728a5b3032ee/btmhdw-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "b75bd34be0c6fbb8c48cb03dc88b0d46", "sha256": "3958e6e8fc2002ea5f0f4b76dbedbf5bd41003c4cefbee402bef393319a8ba50" }, "downloads": -1, "filename": "btmhdw-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b75bd34be0c6fbb8c48cb03dc88b0d46", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5,<4", "size": 14942, "upload_time": "2019-07-31T15:10:19", "url": "https://files.pythonhosted.org/packages/31/e1/154c6f92781c2864fa455d6de13c304b4c533b9cd9f85155223118b2e5b1/btmhdw-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4fc5713783a50b5578cf83f6cfbc6ac2", "sha256": "90a030fc0b7ba9c90bd485b10f3b738ea3ebc60d07ce3c0b2df3fcb0e9854a8e" }, "downloads": -1, "filename": "btmhdw-1.0.1.tar.gz", "has_sig": false, "md5_digest": "4fc5713783a50b5578cf83f6cfbc6ac2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5,<4", "size": 20332, "upload_time": "2019-07-31T15:10:22", "url": "https://files.pythonhosted.org/packages/b5/63/42dc9c14c8cc213fce653c68a7c6638961bd028d41f28c1ad7de28364b02/btmhdw-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "3c61e3fc8fd9ece5f31b3d3bec415022", "sha256": "7ef0b6e902a4ca917f0cf505df0145642386cab40eed683207a3db2cb4ad8cba" }, "downloads": -1, "filename": "btmhdw-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "3c61e3fc8fd9ece5f31b3d3bec415022", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5,<4", "size": 15008, "upload_time": "2019-08-02T06:00:28", "url": "https://files.pythonhosted.org/packages/ac/c6/a205cc67810d1a0781f35bbc7d52016245c419c02dbeacb9a6098731abf8/btmhdw-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "681534a99ecb1c74b4f85fbbb19810c9", "sha256": "ba52953ecf3517b82323b1b93bf04101a1a8d52167482189bf8cdb2ab74068e6" }, "downloads": -1, "filename": "btmhdw-1.0.2.tar.gz", "has_sig": false, "md5_digest": "681534a99ecb1c74b4f85fbbb19810c9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5,<4", "size": 20481, "upload_time": "2019-08-02T06:00:30", "url": "https://files.pythonhosted.org/packages/96/0c/53aca1ae559477aaaedd1e7c63ac4065339aa45513214e53223f638780df/btmhdw-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "48e121c7661a11d6cea8a047b6b83979", "sha256": "aa282955bdf6230e3e1a71d16ea66d4552651fb0f6b53c2b4491b7ba3a0f421e" }, "downloads": -1, "filename": "btmhdw-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "48e121c7661a11d6cea8a047b6b83979", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5,<4", "size": 15117, "upload_time": "2019-08-20T15:39:23", "url": "https://files.pythonhosted.org/packages/3a/2d/73c4f9f4f81207002f85fc2a9e777659f8accb6d2eb87d692be614894955/btmhdw-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "89aae76030fd13c2193b16b2c148cd7b", "sha256": "c49b646b3f51cbcbe521de622dfc990c942ffdc73d9389205fe9d25f34edee21" }, "downloads": -1, "filename": "btmhdw-1.0.3.tar.gz", "has_sig": false, "md5_digest": "89aae76030fd13c2193b16b2c148cd7b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5,<4", "size": 20712, "upload_time": "2019-08-20T15:39:26", "url": "https://files.pythonhosted.org/packages/af/c3/f96843bf2ecde2dbda303af4f254a1a1cee80ebc1a8f3fc64e87a2c1544c/btmhdw-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "48e121c7661a11d6cea8a047b6b83979", "sha256": "aa282955bdf6230e3e1a71d16ea66d4552651fb0f6b53c2b4491b7ba3a0f421e" }, "downloads": -1, "filename": "btmhdw-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "48e121c7661a11d6cea8a047b6b83979", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5,<4", "size": 15117, "upload_time": "2019-08-20T15:39:23", "url": "https://files.pythonhosted.org/packages/3a/2d/73c4f9f4f81207002f85fc2a9e777659f8accb6d2eb87d692be614894955/btmhdw-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "89aae76030fd13c2193b16b2c148cd7b", "sha256": "c49b646b3f51cbcbe521de622dfc990c942ffdc73d9389205fe9d25f34edee21" }, "downloads": -1, "filename": "btmhdw-1.0.3.tar.gz", "has_sig": false, "md5_digest": "89aae76030fd13c2193b16b2c148cd7b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5,<4", "size": 20712, "upload_time": "2019-08-20T15:39:26", "url": "https://files.pythonhosted.org/packages/af/c3/f96843bf2ecde2dbda303af4f254a1a1cee80ebc1a8f3fc64e87a2c1544c/btmhdw-1.0.3.tar.gz" } ] }