βοΈPost-quantum transactions
NextGen cryptography already on KLY
Last updated
NextGen cryptography already on KLY
Last updated
PQC - Post-Quantum Cryptography
As we said earlier, we use Dilithium and BLISS signatures as post-quantum signature schemes. Depending on the Dilithium mode, the size of the keys may change, but the structure of the key pair remains unchanged. Also, since post-quantum schemes usually have large public keys, the address of the post-quantum key pair will be the BLAKE3 hash of the public key. Here's what it looks like:
Post-quantum cryptography is just coming into play. Unlike other cryptography primitives which works for decades for various purposes(AES, ED25519, ECDSA, RSA, SHA, etc.), these algorithms are still going through the final stages of NIST certification. Although we have chosen the best ones, there is still the possibility of a zerodays and errors in the implementation. Be careful
import {crypto} from 'web1337';
const dilithiumKeypair = crypto.pqc.dilithium.generateDilithiumKeypair();
console.log(dilithiumKeypair);
const blissKeypair = crypto.pqc.bliss.generateBlissKeypair();
console.log(blissKeypair);
```
Output:
Dilithium
{
pubKey: 'b109bb2a651ef81e735a40c8ba33dd6aa1558bb45568d338de35c7d39b88080679ce28cb49e6b3e7439e1446bc6ec12babf68844e6a3187fd212a12f1ad58e71b8975a61052a544322a22b1c1e6fe223fd32b12b1a63737ebcdd4575c7c311700a499e5adc915d278850c88228c12cd229e3ea78cb66f88424979677df4d82732ae7bb713f5f514c0688c337c280ed1d792271855fc09d032f0712b9bc82d7a7ab7774066d7e17b704bae5eff164e49aa0b259e9a038dfc0d0f251b5836b55e6fc4bc22a967b21a17286a88a0ad56937abc45dfd65be5ca4d2861fb41b350ec2845f5d903031ec02bb372d3c6f159ca252655a9ff7a2de68273d154aee630038e158579306e92f16aacbe75ad30daec0b256cad9068fd13ef81f59227312d6cc4151b1aea998e15a7ff6412a2c3b495fbe83271bb9cda94511427bddc9943b0c9578a0676d0eb3c0aa75512e7c4e056942a01aba0a08694dfca2b4b2450281cc3ed6b483c6ab329aba0b05a2f2345143c0034a41dd67a28f0a49c28e78b5f35d82efeee403d135958830fad9548bf4a1b2ff481bf989dd0659bbf279b26d758a4b0dccf24ae96266239fb85ae40e0a8dc21cf2f487de9ea2a229d5ce3313aab8c5287abc706e5abf21081f0ef5afdaa828c2e0cc42745250b3cb32fb979b19d45e7bdf48202f50c65cc060b6c9d2c624f5cab7dcfe1075975e218e4ce37f156d3a9fc61dd1054b0b6c30ba3624cbd7e160b3fe112944dc617a6b68b97378e914f9f000b8aafb345ff6df96801a886709461a2943f7c701950293bb3ddfbadc4a8a8d0158df3a0519dd84d278553a21fa918fdd7e0b5d174bdacfc518c57f3b2272503ea9bdc5aedb4383bc497a8709738d1bb987231315bd69e912ab13ced3808d806f60054184ddd5a5ca3ed9aa6d46f5a5fa14d4cfd50a84980d83438184c6a1ef170a0de85a313d66bee57e5f012b0c31997fba83553f84169d307682689d311821daa3e670ff666090b022956b633eeba44eca4d67d63927c6167b149377a6012bb55621bc77fae499f6a9af9e638283af650e66a5c957b09d41f0d741b1426eda2009e5a9c08e9b50dbbbdbec184f249f89a37745b8dc2b9bc6d8dfe5b4406320e4ba59a76be109b532f48e6547f57ed50ea68e595c39ee60ccee09b98a1dfd9ca03300ffca2d37f9c66888f3273a5390c962e507108c5826018884f25243f6ad4d6733f2aaf736fcba3fe9abbdc5eff2806e042d2da256716ff5a191edbf7482a48453d0b3ab50be78667a220057572e2e41aaa8584a16c21c851c8e0f92fe663be4cfc6a475d25784338df21a430b718bb6b7022121773f27d0707b270b190f1620386af7f6f5d65633803b8355f7ba502e596521422b3fd5f3d810d78dedb285b0904174010c8736c1cce7ca5f11691bab74a819d6974ce22b7b814fc60393001ab3a74336a55b1ec4481bb8c8085153a8f193410225672dc5944213f1af8f748d533e5251aeeaa8303f2e2b503ba1fd093aaa39e3e560478af34be33340d92f0032935fd244d17cf927d6b677cba25939c6fe73b7a368dde57fe7fbc88c03538dfbb5147864cccbf9f9dac06436e40ef96ea9bdde9de3351c41eb6ddbc738abe4aa626a4287b740be60ac7e244a8d4434b5c1dc3c6816453df0ae6460762878dd84d33bd55710bedd5d7fbd1adea3c691b1c7d8a4b6f60710c1d154885411f5594f7b242ef0329572a7aeab838cab4a81148145c6fe79c44df401dd455c169b27060d84faa5d98f3a1fa1d9e7c23162928df75e11b827a596127ef92a741b86595457bd7dfd89705d6f88fed1e5488234ba79716c0d7f4089bef1de97a51ec0443006940a05bfba6d56031526a79212a498c2ba587d31d46549c1e09c578e3ac7838565aa443c3938ec30635ae8fc2d97edb7fac666e14670663188340a0a6444401dda5f56d2e4993630d12901e67456f3add1164f4309591d376d6a60c5288eea132b160b30cc386d9905d8e4a066c92c48545eed37ab5335f7e7107e205fb63005f4ad827c6777adf5fc61bcf10d8c04f0459b31cbfaed8ea6b7ab8de029f0c61c63ae6ed735631ecd7850e6a460afd06f8f4f375ea14f9e3ded2d46c0c24ce903fad6a9d705b4aea3e1cdfb3be0633fc5dabff4e5f32efe510be601542ba32bed4c70f598e8e31039c37183953a0e8f8e0ede324bc6d76583a3af4bc1718e4308555b29049f8b497a330bd53870b93689c65d841b7ca3a42097dc35dc86b4062557905d5d2d63455afd1aa23fecd98edcc3e74547f3e4221b00212a373df3506270e7397468ef175275147d1b5d1f2aec57a27d23833e9e176e86b56d8fd2f8aa826c577005d33786b737fa4ce02045447d20522393a8457b17b650df17f05abe99d39fa7cd0f3bd8b388b7f4dc28f38cabadb8aec7d6910744ab18d3ceed0f60fbe966678bc886a11b70fe60a8fcf007dd2195553561411aa01f3049b8b8f37624290da9d79d1ff43af764b783fffba42c43ef28ab7d646a4c908ab8d53364d2bce988aee3f4bca00deb31639bc78ac67a63c65cc42caf840d2b49b38e3eff1134cae06408659c61888fd1315947b353a4d9f509e2369f0aae7a979d3aadb5b7eb9840aff0c79fbbfe7560641ece973d3ecd34432b97f1725ca11c5596fc7e9330199a1c56f58275661ce94a54c7f974342730887996520478db455c7a041b1213e55792fd3611ee96279cfb1d5a44e11b6b493dca8bebac4dccd3df766226e92b79f15f71fba50501318348368bbe49ac1d203aee0c67fc4efacd104ad2b2bdbbde4ed892ff63e16c9370412a36080f187325cc135ba4480b5f293eca309d64454de479d1dc1300d2a97d4994c278d9b52ddd78c1b7488d6b4672e47ad2b02458efab927add6cb86f76ccd7c217054ab316c86391cf8e105c97434d0a32f7fbbf143add43b935876730cc7620b206cc230bf92e81d665ce86e6f1cb5d381ebfe91b48d1ce2d750bed55ceb66dac468393af58536ee22d26aff8d4feed62c333e2c68718a582f8ffd564c5fa1960d64c03329cf8c81ad54598a23ad298e65319e5bc272c5f31b26d50f6ef9ec3fc30698693e60c5bde7b2c4b52f263252487638b75ee8e3791559c55844659c2cebea47173efb3e770b325d422856ae19e6a29eea4bfc45b50353921067205152911c6fd641618c54d2bf2d2fffd3a7649010960e596deaa002d184965ef34301d1064b53659f7cf57ac7d1520eea371ca8ff0baf1b50c2ca825c6268e6ab9deb0fbd1de5920f7f68b5d6035579a4233b37e1c8aa0e2a876d914052368725a905709184a8376bb01af500ec83f52b05466f2a0ec187ce2b23a5024f60594f36fc5aad9de5253ffa7398bb4efdc0831394332576f7035a21af6ef48283cbcda7f498ef6f8634f5e7b71119a460c3e4dcf6e1330adc276ac1d20c615a35cd51f9afcf994f431ad82a1d6fb67624bf77893f44d94f506b36fc63c042f291292e66e4541fd43f48f3630b587695f31115f31b69ea1c4f58ba476f06b6b69cc9e1c16735e479bedfc6fcb9bd3753d6b7fb64d18a31074493e9540ceec926d1e4d0ad9b9a7b89969083da099100edcf9d0c46baf87eddeb2de9f57c8181e3e2b6acd3211c91c3d5b9be8b2c9670703',
privateKey: 'b109bb2a651ef81e735a40c8ba33dd6aa1558bb45568d338de35c7d39b88080667a7442c7011f749b57a4eccd0f0c0e0d86ab7c64cd9009dd452e0b9d34d469221aa5ecd804fcb8c6328481bde8d8b815416af4129a8d1edde3f9d9488c3450d9b2805a40444e3828514b40501808d20a411ca048edca8609224124832505928250c1940d0b42504c4491427464c486ea0c06d6196691c074688346dccc66d418690a1462c8904720929010bc328c0108849a840ca48524336291b258a49c685582801d9326809c3215b9240991484801290512001198861ca282258922c51260513a808cc226a08126511438500440800a96dca406552164e6046044b4620db4824c1c2905c240d140062a0266c230040d8366914c18814b265924810944046e4c00d49068a011412848651e4044d0c38460127641c07464226641c40461b448ca3080910b2459c022651a66904470d5400106206041a109218b609e3c61193a2888aa05154c49190900c22174452a46542884c412448e0982d8c028d01b92c99c62d40148e198764180346d9266442442e9a108c0c846d88c66d0a2502610471cb880cca384a091591a028821a205104822900468c9010861c846d024631c1025248b60d602649c1968c59060ad020726244460812081834525b823109b60919a66910830913c55054904118004c50345082302ec0a008a2a64522c9018a0604e03652808868239311202781cb4466e0048a60b271e1401048303112246c1b1785c4806923450ee32840121865a0260a6124815a204c81106d03a460449609c31486511090cb187198488e501226e3c00019032488028121c7218b96245c380922182982b270d9c8096108466234501a10850bb608cb3668d2a4919c3070243142d8404cd3288451286999302604295163160a22064d5848651c44521306248b88408c128ee3c001a3007040940c5c44521a486a42441019910409290d20208602b74c62c00c18378edb462c01b984e2988898804192b0105014248086489a0009d0126e13356514071021322ea0b66018a2201c09105896481402650c264a422689908484c226311335501ab331812862dc2626420432cb044c013210649831e084849110222006415a4466e092294ca00c1a036108c04dc84285d906814c849100806102424113408aa0264c01858c4aa44404435188b68049182488306e203468a0c665d1283003000d4ab041e33642134780cca850642024dc90884a00801932629a4832124524011550040451093969a0968081c604498245dab040a024859c94441c166983c4654cb84121932c0092285396680928298340211c92444c98255b025050806412258ee02441d1b60dc4a84502190514320890489212c18dc8364051166e19378212266249804c1a490201c09121a59150c20c13a42c4b42121233481b462ac1a281124849cba050083586c240325c1872d93226049808213589d21885e1b2649800261288889048918aa2705816201b381114a20811858961964598a225a14272e04811e4226ae3100c14a1090ac94d9b3228d9246023055181082cd0b4085c9471dc4450a396415b0271d8302a9b384619c22950984811b0911b9670e3b88459104d1232245bc288c0145263326de212681181110b23815a3220d4041064282188b624d43262582602d2220dd2a8119496452332860b247210862c834865a0c28c23b65161a8800917269342114b16020bc94810477214a36de446288a162e41002d19a604893070d90681140109a4b80554423063b071814866d9c848889231122020a1380280c04cd0402c84424200090e62300014248d1c164ada06409840920a16481b192818a80910a860d9288cdac881243992a082640ba58c4314414a96099a464213c185dbb84599425003314882b06199166ad914414ab84148944d903461121920494440c9902562c08c1c8548d80251d09030da202104382100c58d18282201312023b4448406804128040b8508c9168d8c862889366cd20482d8b2414a2446c9468122198c1c9271d1b089d2c630814069a1a0804c262e0a926c53b2715bc08d09c24988482d5b30911a008d81284dcb202583980d23c18c143210c4086e512881c984100287101b818c22a22c181550fe509d39fd5c7ccdcd098f18f32cd4867a13d42acc4eb26ec5072d15ee828f087758a4d33832260c447849953b0591ecbf4e27e1330caa1c434fe35c3d01228bf5bb324d71d299a3adb091861e630c4b114063b9e20b910d7addbb37332ff36b9ea381cbdfa249532c2210768e8f6e347fd8b018a269f09f0a9e57c5f55c35a3a1e04bed45b38a922b1012b616e556f1ebed17239a89cee031f374186c6899648b131d5d1098da6192eb274ab315f57d5dfe20bc7fdf9593104ea1e62f6ba81aba3dfea618ff9194b524dc73728ef5ecd8e4a074b629995164eb4c5b9fdb976735373cec0eae1dfa312e4089b39706a570f6df3d5a3f724cfde13f42acf4090fca1014adc3601b56492c53abc3d2cdad8e43eb89b5ec917124a9147c62805ec398300c3513de82fab4a4743a0c858641875f7b1e6fa65da3807ab15284b872692bdd01b58ebd2b3241d188ce296c3b9dd5b9c9bcfd10bcfe4cf92c1e67a1400a41c5e9cfaefa5f94ca5c8e044027e8af841e888dd969d76ab9b361723e0f9e0c2cc55b82acf3c2af19a950e6526ddff4f09cab340368e045435ad9b65e4995479af69ba32e636a62d064681a46f235acc097a41d5f2190a6c63eca28b783fb2fb8e03b17196ed898fe729c460d5d6c322c89a6b89dfeb122ed2e1f36c6854f0bbbc6f26de3796741b6700fe61d0618572db7ce50146114e936eff079ff4b80093e23dad90ae1806846f4bb024303f5ebb2b68102f4ada2222c64cf9989c1ef5db2e629c240e184a546b847127cc53b0008597045fb39c039fdfd05294048295ffd592b746f769da17294e4eef8b83865327208c7eeb0e37e10ad4c928bd988f1c21461ba15d3c2c15f684e636409bf713966a6582361e487040f16bbec4d3fabd798801bd2a1aee776003f16cb6ea15de3f4ac0a62f43a90aa873779f0935e2dd4538901f7d65b0a4d9809a951a7954f8a211e58d5ba371c710a4a743464d441add99f01f8e19617072cc0befa95329402c2aeb342ddc3394f2892a88b96c8fb64276c1f5394e6b474570b4eab0fe62dbfc4666da01a15e3075e3b663f6234f3ff8dfaaa055c1ffcbc725516e11d89078dfc0a5c26317b9fc2aac5ea9564873b79b545b3572bc56af407a5ae6462fd84f480515539291b08223d0ecc892ba1601bae0a45ac97477a509c0ab77e52125d1ef27f83469b77ad549dd73b9c9e7ac7bdbd7ddf22f3edd6f4b7558dc8cd13893aaebba227edbd55300627484d4187b88937238aa0cfbc635f4a43b662efd1c703cd633012e6f14fdac39a0d7692b853f1b955574c90bface7e6b15e58f537ba9625988fb75280fe1da68bad34b96952efefdd5cfe839d152e4fefc199061b322d9c8b0d3990ea21dbdf3d69688e37557d3378d4eaaf5aef8b464bdf27c7d7a47d7ece9e5041fcda9e2c25cc9f863b89c68951b4dcbf130760ef55db1615bcf90240ef558d2081218a968124e9c85cc5fa1fa3a9b69855030b2c4d957d7eb2563855fcfb7fe75770cb2432d28ed14a20d4b2ea6a43946ce5d2f6032df8346f2285180099ec14c3cbde5d0f14521094a3ea1519403512ed99e67a6701106713eae94e15fd8ca6275df3b0c5424fff70184c5216b77f9d1f5496ce6bc5f698f5afeede2f6e702e7dd05fea7fd6eca5dd940f702c18f79cbf10a64acebcf5051c8a030b2f44053276a9915487a3895c9a7cba89c0a0addb3278d9b0eadb88aebbdf708f639a36139c49416ae3a0002377e28adee7ada51d4104f0634937edff59b5d62b29706441dd51c866ccb3dc26e3cec2da675872357c0d63606126e9f7e4beda4f43c8dc936729cf66e94800b1f2bca2da471dc33fa8bbe75f6039d409a0e0ef07ee1c943095d05a98bc9e5fba360a7a4ec5c1d7e2185683b7615b8c48fe0bebf6fb65b4ce17ac51eb198056b2451ce9b37eb81a3d14cbe70637d0cb9decc1e287ad41e9af56f2cc6e4652d6824e1f67759040133e8cf8855295efbe60f1f7636d9a97a07c5f5f375addeccce0647376556884ac915a4e10f5614f639cedb608e020247c4b4c7a9c2c7db6b2a761f9a6c2b4a9080f499a4c683df5b89dcd16e1d6faf08c2dc3390576226e68f29b725dbe496d39e58d687ab3fdecd1e02d718f1397e462bf475718cb771f7b68ee8ad79183a93881a59dcceff3fb8f228065a86893fb1f365200c915df33f4f745ba98fb37cc110126227da9ac02e3ac4fdb87383db5578b50e09dbfe856488267901fa0b78647ec73f94c1309b80633724545638c11ac92f70f380200e895769fb9680c031695856de1869bb00783f4bf5fe85e22ebc90524ab580bb10d1068321fd6cd3b44bd78e9678fc18d4eb4eb517b3edb1a343a40b825d7df85e7c888a3ac76fc29b5a86722c1b3720a9df40b420d341d4f7a8429241d1a1dd630e55f47ffaa3494780bb10c193940e4e26eb09d45eb91334454dd26a148f07882c3618c96eeaecbdbe1911a1cee45ee06d6d1559747491db8c570c1f4fbdd53c6e026aa78044575c8e8e9a11c1cdd720f32a2eb3c3da22a4498237a4e19e0f86fe272eda89cb82b3a120838e1e0ccb4e8d4b6f23a172e7edb90da2e1d755d159058baa1b287501d0e67f6df374f4cd062441cf4f070349cc9b9b0bd29b18ae6fe96c941dda03662472055ad5d5e32e3ac37648bd2a25e87b29dd88c32e2fbf0d0fc0a26ca92b494ad5add41d1fc8e5042342b0862c78ec7d969a0521383f59d8f517a26d8381d4026d7c2db635afd3ab02f7377460899560cb6e303358205ceba0abbccf088b3cc4f8a38712ba6da8a7b94d2c21204af50f197e2af57a446b5c49654f70067c3d687bbfe160db6e533f29d49b456d3dfd8f314bca7347a57e3abc2f8f5f45db8a8cacaa1be7f5836dbf84eb1d8d1165aa59438f88911ed332fc4e9ae660d0687e658b5f56c6a560aae764d23875200fcd0336725c064cbc1ece3ae070e307941fcd274921181ed85e1e96f0a9104277f86a859de4a90128522bc0afb7dabb43c377f36f4335dfb7f04b28acf1c53114b417fa3aafd44707f8c28dd6fe2b9f0a870908a2fea1802c23ff0253892ba6c19694023d1ebaf9a33b3074d987894b6c5e0bad99a55fabc15bac7ca6e7f1c44012dc40065121074582cba4ee0afb0defb7b0cfd7f394230cb5ea5e31e87f10dba5e36a5e105f5f54ded8950fdacbe71458e89a019fa3dde103823990ece5de24e899b102205547b8aa6f4d3838aa6e68624e1915fd5491a9e85c5fca6ec2a8c2a378118db794428dbdd868974331602dfd604ded554d3dfac49de4bfabdfc537672a615cb6a5bce51b110e04574464cb5f07328f4311626cef7d1ccc6843c561ec9bc034726ec3abf4a2530dd54244cc5c0b66e947557caed19ad56e9cc9ef0555abcb6f5e9310dd065534cd3dedbea7f53ba81f5eb3d969cfb26c5202143be66ede826fb797abae7b3e879246a872a01734ba5ab5dd9fa24bf8ff4b4d319d6260f67de355ca869cb91d19a90e32652306f3848abd2ac7251b344e9b58c427e02eaebf22fc3fe5652a0d54297d3140c929eba77fe570a1b2bbae73b00d993a68978b66b2451c2b4f896dae5bee8cf525aac34b0ddb179f17963028e71e82c5de6ea3c75334bbf97180f275060a53004b7361eb744acd17f12121470088535af07c2d099d24cb0aeab58d2df7ce59182d969cfa62efb3df70713a74c18da0032c82d7fd309a3641c045ad4b9a09d57e87aa60f64426c53bdef9493b4fcb6e6ac20c7cc0b260bb4fad771b88cfee4b6b8974a6b2dc89ec3fac5d3d43f6893b5dcf7e524a701240f36e5e58021e029631ad3705b32fdc41f1993e56ad8c88e8e24b5f54cb2988b3c186827f075724f6111ffe64d94fe3600429f3ff8e40b5209da8fdb34aa726e25a215ff427321232ea550cce84007b520400df6d081a505d163dd96271f6bf08b4297e683a5d230962440205b52a2873741fb53ec77b6d0e8ddef30e94028bf7d32180d0956ff01105d908f3e374cf06e0e1d6efe16ffcafc6b6243d8d8b2deac2313cb90d027afb26ee586152699450bca258e553ced7eaa6ddc5219938eea3ddfdd8c8cdccbd22836c625c10e79541a313237b4e302e15c46d7dbdfb33c1d9e62bbe95f9640f4ca3b05fa41ac0f3aaa7c22a75e84d566aec01087ccad86a609e93e5f4993789b49402ea59d605f17797eb0a7781f339cb423673af4b67cf4c228a165a42fc7d8f6083bddda34ac93067264db4a53b83f5585c7d908ba0f8edf22d978dd7e684fee1f5472f069e8c428d3d845409d9d5914723a7b1da4784162fd6f25358599cc1a466ca1196ff1037f23225a60f17837a6708b4d6fcef750f42d1848036db50530bef83c43aa64a2ef2a541b4d7d304ea2bd9e2ae25960b1d227ec1a121b1f58671869f7c85d870ee82513412fa60c142f9782a97000c7df1823fb310362d0e5c12783f5abbbfde8d422b5f0bfb69d763ac1c70772e83ec04055c8feef4330572d88a89135b9a8540ead2e9c0c376673ac3719d56d95953f520a3d64bd5dd2aaf717c54999b33a2bd5283e73579a2ed8322c110ca0f2f4fd73ad00052f16b10cf57722635155b550829f9d9057dbd2a81d9583b7c941fcce5deb42ea88746e22a9cf24817ae19eebe00212ddbefc1ea7bdff6b3e89373aa6bc45a24a9ab8b486ba',
address: '4f0ee9c71bfa059ba1f27db0b098373bd958ea638ad65074bc575f4744b7e14d'
}
```
BLISS
{
pubKey: '0003e2011e03b5081d030111100ec50b8101b301be01381117043a0676023607390f100907132419d2085b1dbe0023056001b40de60c9b04e30a2314d50adb1c7919cc1494036f01b10ba115a802a2145a176a0bd808a21aa00a831d59032908ac012a03f905e6092616f610061c7209ef14ec1c3f0a1f08fe14600632167615d20d4e0ad018a315610e231b4718be0b161a3e09e0119f12fb1af607fc10a10952132601720dc40ace18e6191d0fb60a12071f0a8306621517006401db0ae10b82077e032414e211b906d6195b0fc4067812030da512b61ced15a415fc15c70da102af196a08c00e4d189e049a030307281da10f1600f600dc1396155f08211a53142306ed082b0b2d1687111407ed168c0508086f025d07f708c814d20c3c1c420d1d0ecb09d40c751941004c09b6054b171505740011168e1b960db50217194d1dd7179f028b072c00ab051b0d3a1d74084b19d014bc119811a913001daa018b031109a00bef1a4f0e9f12c6153e17b91528159216ee09af013f1bad14c311390b580d9f155f0c0c1c0919e105a00cdd054a10121d42004311b11bdc18011a5003401a020107016108cb1ceb184e0ee70a57040419da1870004a0b390f2806f002960ff819fb1db30e4703b104a9083c1b150a7d00031c6411b60f270355104d18a1081f17f50fde07f01a8c0f4405a71008044f0d0f0e3d18700adf1ad00a61',
privateKey: '13492e5f8289f31a9a8d31071bc06f3645d80c6325031fee6a0fbc46285666f7e87319890419caf3bd21a37ef33121886104bc86617e6e40be244b54a11def87',
address: '1720a8e0eed9604dc03b9ab5e99473775e70bae3bdad8d515621619fcb681d52'
}
Now, you can use these addresses on KLY network
Post-quantum algorithms usually have a large public key. It would not be rational to use it when sending a large number of transactions.
For this reason, the hash of the public key is used as an ID for such accounts. This will be your address
For example, in the examples above that we generated, the addresses will be:
4f0ee9c71bfa059ba1f27db0b098373bd958ea638ad65074bc575f4744b7e14d
AND
1720a8e0eed9604dc03b9ab5e99473775e70bae3bdad8d515621619fcb681d52
However, to verify the signature, the network must store the public key:address pairs somewhere so that the small address can be used in the transaction instead of the large public key.
Therefore, when initially replenishing an account, it is worth adding the pqcPub
field to the payload.
Example:
let web1337 = new Web1337({
chainID:'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
workflowVersion:0,
nodeURL: 'http://localhost:7332'
}); // need node endpoint to return the correct nonce. If you know your nonce - you can omit it
const keypair = {
pub:"9GQ46rqY238rk2neSwgidap9ww5zbAN4dyqyC7j5ZnBK",
prv:"MC4CAQAwBQYDK2VwBCIEILdhTMVYFz2GP8+uKUA+1FnZTEdN8eHFzbb8400cpEU9",
};
const shardID = "shard_0";
const payload = {
to: "4218fb0aaace62c4bfafbdd9adb05b99a9bf1a33eeae074215a51cb644b9a85c",
amount: 13.37,
shard:shardID,
pqcPub: "0003e2011e03b5081d030111100ec50b8101b301be01381117043a0676023607390f100907132419d2085b1dbe0023056001b40de60c9b04e30a2314d50adb1c7919cc1494036f01b10ba115a802a2145a176a0bd808a21aa00a831d59032908ac012a03f905e6092616f610061c7209ef14ec1c3f0a1f08fe14600632167615d20d4e0ad018a315610e231b4718be0b161a3e09e0119f12fb1af607fc10a10952132601720dc40ace18e6191d0fb60a12071f0a8306621517006401db0ae10b82077e032414e211b906d6195b0fc4067812030da512b61ced15a415fc15c70da102af196a08c00e4d189e049a030307281da10f1600f600dc1396155f08211a53142306ed082b0b2d1687111407ed168c0508086f025d07f708c814d20c3c1c420d1d0ecb09d40c751941004c09b6054b171505740011168e1b960db50217194d1dd7179f028b072c00ab051b0d3a1d74084b19d014bc119811a913001daa018b031109a00bef1a4f0e9f12c6153e17b91528159216ee09af013f1bad14c311390b580d9f155f0c0c1c0919e105a00cdd054a10121d42004311b11bdc18011a5003401a020107016108cb1ceb184e0ee70a57040419da1870004a0b390f2806f002960ff819fb1db30e4703b104a9083c1b150a7d00031c6411b60f270355104d18a1081f17f50fde07f01a8c0f4405a71008044f0d0f0e3d18700adf1ad00a61"
};
const fee = 0.03;
const nonce = await web1337.getAccount(shardID,keypair.pub).then(account=>account.nonce+1);
const txType = "TX";
let tx = web1337.createEd25519Transaction(shardID,txType,keypair.pub,keypair.prv,nonce,fee,payload);
console.log(tx);
Now when you have post-quantum accout with balance in state - you can initiate transactions to other accounts formats
let web1337 = new Web1337({
chainID:'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
workflowVersion:0,
nodeURL:'http://localhost:7332'
});
let dilithiumKeyPair = {
pub: 'bfafb8ac70403cb603342a90b0f62673a2bbd2cd237148d47620794135abeeba56b72ce5d2e6df9b96d11b2335f23712735eaeeeaf25c1f1d5709dccff4387146e8c7ed52ae6982b0ca5a6e921c4f61e2c527e2d9da3d7a842372e34290aea51781a1f561f0daf49e6a0a1067524099a4741c7f64a25a55d02a2971b31ab27f6baae0c66f7bfc7619d03ff3771b029378c5e79b725b6ce9c39a0cf4c8708993c19b65fd3492a96076b01fa2f89c5bc49c142db67480460adcf9f628486e6cac6af8340bd96345bb9e8ef41905e5f5082428393ffa8ae978830ad3d96b5f705c45f0640d87fecee7a43e6c0c493833c72d24d2108dad6e20b2ad36a38f1790d835238138831fbb93dfd9f11f46cc2e7ebdccd3f76d0c160cdd743969ec5ce8ad26029f85325713e083f9fe8169f235ab2d719c7135b1ab8deec707f0caf1d118fbfe469f65d29fd88fb07a6d4d3adc861df4c8f2708ea0357ccf4b396cd1c0b41aed632527508c2396010de94134d90dc03a30a95e32336ab839c7b3976583891ccda980c9104c8de8dd784ba9c587a93083c4ae4f9d117e025e2cbb3c53b8828e11199f1fed89dca12e521df07eed3e28cab3fe1e1404c5891ee29e95854536cc065e1afd558e7da0adce618fd09953820df5bb959dfe317d5ad7b2882e33c637851956898438c10f3537d907a5f68e6c813f40b2e4ddd25f6d8fe57ac456cfd0477a327dff747ccf469356b0ba1365860b39ca038670a8f4255755c5b8d8925d70a3bca508c0d53c75a9d7863aea0fdc0964fae59c2ecf150620224e49096064bc56689b169f4dab85c964bac05036c6ba0006f300cbc72dd866574e76a35ec239bc94d4b7601baf13da3eb9457714748ab82e80ebfa163618c64926ac06fa6ca83d713ab7b1debd78d115244ad7924175e00d827675f248c5c54b247d425d3fa379fbb9c1b90b1d5e7242132cd3e672891e3eda74651585f4d5038bfe12a8a3b289f15ea42dfe480f1a76290b2e78e7f8668712e144af4eeb9906235285e669f4c85d268ec6dcb73310331dc2550b151b41df6b570d7124f90af0f6ad18b2e296afd30c08eb36e1fe2d58d8ad462482c598a0e17e55c4f101af212356d9cee2aa1fb8342fe26b060e93509e21d895f11f742d4707b74027348b2838a045c51c10dd0c8fe563fd813bb6f99ebaf20182431d927fd6738c8c9731086997b1b9cb2ed628bd931ca996db3572b6ce075e0e78bdfc066790110e5e8e538c11623ceaf66e14aa1757ce052f52b9c9bee54f765b74a48de44cad593d4973bf84f663b594d475fcfc638fef7414d546fb2fdd0785958499ea16fbc7df84646d05b769675f781538319447292f72304a163d1f7155d72fda67907b7af9bee6a0b323c65e4800603f72501027e339691c899b4154d519a3fcb5d33824e06e194fdbcb4e7a390151915b644e55416cfc129ed2a07e30a7adf1a363dfcc3e20731ec2ba18c6115324516de9bea5b1f3b0852aece124648340842b4658484da6f53d5edfb197d081cc96fdfcb350e4152b3eb17853cca40b6d584e81bf133b098962f876054a77faeacc662a935056893c06c876d92392457d4465372a3770911772eedb507e2d54645229c5aa1217dc1bb0a4a6f6e90e46a60d35e790e0283a31f754ede7be16619050abc7abc93ba06965d59c50d2f9e749a2151724369928dee17f4a2ff469a0c449c69c7e94cc1a9a0a74948b19672483cfeaea253bdbb032ff22edd80fe6024e087893f29f7fa3f03b346b7719f4946010d4eb7d42f0a6b37f616b3b54417e507f04e5fffc640eb31ff50a7d227462710c29181d116dcbae010a23b82f865b8e90f8f29096216dbb932ae9df1aa51befacfb730b08bb08907a660a06336ac2bba2026a4133ee471ebe369e2b2d29c2e7b7eae15c827b9b615107f13fd8fe7d74362e15cf9afaa7fa352eaff83db0dc68504c96a5b3999ad1fccd78018f4a6d50745f4c8835fb0adc93dc921953d2ec161f53664ae9a7e73e879469c42b52beb9c2a14ab5e3e12f64f9a80dac4844a887443b0b0d4c290462d0712e9a02d2f216f99f15235a23b4ca6d628e28d3d9c2af79686ae09ca110611577fee4a204c7bab4d23d1da5b29edbee9489b3f3c119e2dfe796b7a758aed1a9280f39b73a5d9b5888e52f4c5c2ed9434fb53940c1878ebaa369bc40a31c8227da7ede0cf3e2f619744bf1ede2adfe2d91256522b66fcd6ac194e13e2c0b069708e0df9b8a3e0b3b02614400b7ba69be77453b7be612ecb6adfde93b64ce01c07f28de175f71b657d53414a7cb1ccdabe770d4f7b3a1f6dee1548f7d8e6491d7054afc434837009c53ebf9762074900b7afeb2bfa172b4e2980aee6089c3e6b776b18fc63866b18f17be22aa8c705f70c4daf428bb408f14deadb5ee26f1e22c29fe6d0923336fab98e866399758d06dbda2558ce14bf2e9d5e5aa70b10096939c17471e8391fb9ff7f013c6fa68150dc6373b50439676a468a0b2effb6eb1c7c2c4a1df38fd6f1c9cee639f7d8fce7b838fa13c3905b366bc0f4d0b9a417d82e42405ea175319b565df822beb8915dada8500aab1436bf632500f2eb72e32fbc2026e89808cf2c91a5c1b98ad767a73d0b3a8d60d24283686d65f2563c5b40d35d1c305760c18715211f955e4ca04dfb35c2c9dbee08c62470ee2db89c06817992ef10eadaff468d21afcff0a480dde314f4976699b48841074e8b2cd259198a9c2a149cd984e0187e77bb3d5d3e229e2b4502f0d6433342c0325d3140a23f2e0c0ee8274ecb2bd35217722beb2fa529f549714a4e1a07170b326edf043958b5a63739395a988a693e25c25e74a64b44c00f750329c55e6647e0c5a2760914ff1cd7add97de4bddccffee21747f9d150baa3abc59de5804309a8d932652b793803b50db3c7811265b87a71e4d6ad9b54809d66b542aed1dacd0a3b1057f196ee7afefb8b59ec09fca0c7b7941dbed1b642b0ab96c0b8fe5b1aa62b63861f220c8b89bc9af95ed52fd0f683ead5b39495163188cca5298d51e91860021919ac2f7af737adb4a03592bd2bc590e1ad064f831a1841ea1f35836885d40192113cf55cbd589df21f5d1716e88eebb79494ca6a3ba908e0b1e098d31a0e30d87ce08d52145995a57ecb51c02d9ab0a516fcb2b288646dbad6eb32579635a841e3c111ed7cbeae065d58cba66c26f1191ca9ae90adc5d6496a41ddf4c22885923fa5a8d0e60c51fd6b2c6300daa0018a12d71351b7cb58f81c3e7bca4d729ab6bbe597b57e0772bac47c5b33235eb2cc4d33aeaabb5dad9cb247aba7aa90be1c3dbce42b7214e1cf99b11da92496213006d528f344e4af2156f385eaba211582a49292daf1721dc834f86dffe908b099c3b65259940daef5649955a3939ceb5de7f6199d0aff23dbe25af939a9d119ba12d16366abcc5c0c07aae531fec8153eff260a4bc81195aa9d7f7478558cd3f89ec23690acb0a5705b31e7ff899a98f129696ef923af9f31185dae1645cc3d680cdc8c3f4160b202089f1102e6c27e5ee949f17efeb5adae1f50c53527876b3e4dd03337aa3688d9fc60d288dde8e4d8c3c74c4fc11c572b07b2a00d1d26e0682fcf868a4ff96db5d1993a4ccab7646fe08ec69d0031',
prv: 'bfafb8ac70403cb603342a90b0f62673a2bbd2cd237148d47620794135abeeba4968f5030f39cba05052505c6fbee0e4230519f2ad11f2edd7d95d2b53266bf673d735deba83fa286679bc5c8b98baf29e03826e8da7c1fbb2675f2f1b706e2e60360a13a36403034852b688a22406481012888011c9305201a44800028283c001100141c2800049404d58200212498d881060e0a83023c8218bc669e11809a186491212610b2032e3a850c9342c5aa284d1c68988428964444d90060964244022c75103b381e0b48062c82009063153a8240c41020a828500100e6426510aa86da1b86892c24409137220200dd89664e0460512c78c01b0488c206e009061148568d036904b228d0c95241c208d181669db400e11a52888062edb224621125280240ccba669513285a230692425281a27080a101202b74d13c14d8c304064402ac9b8241c17899a209224199252c4694836304c366d98384e23c9495c8405e4046698947104c30122b9304a8229d432901c944d08475052a46924b190da08080bc12504130e11b91018108002c510a4062e628621614600d2c4251a924022043002940d948868db023211c62d8036025406405a048248422ddb1412101782e03860990800c114728a4206c3a06dc4c41010c448d04620940682c1126e0436448c204842c671c930711b834d41a064d2924590a82ddb8601d9340009a96961064c1114606248602385201cc681d490250c452d0a407124c38c119030c1a85021252cd2262c013461a3904dc48225dca4500a256a1229921c2460090951592864148220c0b008243944da048204022e0a012e9bb068141186da340018150251966d1c89206046215b008c12173113b14dda16120a9089d3a010c1822593408c1205125112641b310aa2b871d9108d0033040a0432dac010123102e3042ed2860d834442d9b84cc1120688003263222890a249c2184ed9042da216688c0208e02631c28469c84491dbc491d12891d2448858828cd8485183420cd0048c222269482632823228233321901864209610dc9629d4c84c61283191b408490286d20249012345c2b60d212709d4a2401ba3651a44448bb22c1b04711c020c1a21244010510c418d08030890804551b031234846833804123862ca802c43824512094609214d0915421b866840026c02c788043050cba06080865140c46084308100892488b270d1448d1419901ba4691a048e2244855ab2290ca001ccb40d24c80c22a3488b864c524260d41090e1c829d08091c92628412471ccc201e3160aa2b860e2162cc12020a2c6602336651bc39154044e9434291bb04008b09192082d02a820849044c89401812204c9a40d99c22cc8b805da1068d03065c49251cc02049a200c9ab440e39644c208328ac824da0264419884e4461203b02c1b85251212454bc2904c12081a354e53a2210c314252c66008814c0ab060dc2660d800818b1826c0960c41404ad1486a6182909830420bb28011459143822119268c4a308109452c0b420919c965d2082203c730cc221188263183026803232911c26dccb86118394dd3148a044328a3228e88b26c01957110a92983084ea4a0495326265ba871c1926d89003018c328c9003289382e12196a81b88009496414964d40b80542422a239809514022904612021789239451208331a4b66c8246889a048453c0481b352488942541384593306649084024a660e1083083084a5a94441b2245808809c114305c462d01113193468689188a48b42581086143066920c7308236060846805c120a12b3490a00600999490090451cc0095832520c406250308ad8b81019164108392898b649d3328e0a82008c12721c0681022549423424c0042621b06d94c20410100e0239428b2289d2487102168d02370a64100ae0140c2002241028890491090c43481a224c24c69000c641601432c8049192844598387222880003a20c4496901a3310213200d400208b8008204521512090d9c03091204c0889118b44919848025ba821083260e410052311519b4482e1202d190589519609e19241012648e49045e2966498169211a64d13a2299b4250240461c2a68d82c210a4120903157003204e118169c0221214154409a2500827650c9611040085dcb8248d61b8cda53d8ec94c17f5700f28dda5d9ac7a759521c4cbf53d3201883c1dce095fb230926afdb3fd13f1c0317d8a3d1bae5b8d39ad2d123bbba4aea9618168ba9b42392ed57d1fad85fff388e26897e51c8cb2ceafc405a1e618f339b6ca11db667719c1c6ec811db902dafb94e5eed6644592f390f42f6d741fcdf9b8511432c260f51a7c900ada82f550732ad013606287e860b5d6413dacaf3d0916e9be2afafdbe9a8949d05fece51919bb8b6403d59af1f2435ea102f419d31c63a209d4dda92ecb73b288d855bdb89faaba1f33f7590dee25a2202f04117e721528013c6bb9424b8ed41a655c6e1926b283a7dcc2a3899935fc4cd4cb78bb7b7cb06d7cf21f1c8a86ea0c818ab86a0526ff4e43ddbabdb8507212c79506ad54d6afa195a0f35c391693852c64014b9aa6450805b75982fbfe2321a8eb80a7a415550ce92ee3e9c01496ed9f82cfcd54568e0cfa50280afa927081d36bf19a76b94d24c69ffd7a6e2865c41a3a69d3b76816f450d6d71865d1721076402cefa8c68987e2fba474cbec44a91d5fe375a4ff68a408566b919f315e09a00a678b614b938d82a692e7f26a81319837600091267a088cfc2aeb04563ec6ddf762508cda60893869a54b7a9058f00e68e814bfda071923d89e544474b81acd90a60c16e270104c4efe5e712556ed007b4b6e9ba5ffa8f967094d6b1263aeaa5f827a7c32b993d6d455bcd803b448455297d8dbc66f695df2df49d3fb61f9a1fd0dd8d40004a68143589d83d5757ecd431e96a09ba9a825444fb3eae0d3dc9a60bfbb36def16867a8d2534bf347605dfd3bb192ffa59471e7a58a93bf33ba57f424fefcd00def85c3e1b1323958f1bf1e70999d82bc6cb69ba0b0bb8b98e3c4ca7e49fa0f2c8faeea502f5ee28cff6821f223ab05a599ab5fdcc76f8007a516692e6f4e863a5ca919b9371cac9090959357959e7bac5b2d26d128fb1a21cb3db00e17382d31980967f7781d17f117a7daca7e2bbcfb0a3d4921daaaf43417b7a673e9cf78e1102624bbadd9b62e6e89b2cffe8e1ef746c939323bd23a5f24cf712fe01776d983fd4fa9f22eb773592f8b84ee8be3eb29a41a7a79d31fcdba3a0df399bde9d12760ba010e226937849a9f56469a5c3ed9159e6a1d4341ccf00b3c8dc50b42d8c4c696228d92a6cace380822be55e33fc6c538dc437355b986bc25f4e392a85f8ba8703d75481880ac6674497ed6f7906d046da49b39f7893252dd428e4a60f0104d31e66ef06e7087fcae3d476d71fdb4e28859697d88e980586cf27239da828c01023b4e9f9492f23a68e410fe3c6bafc5eadcac37ed53c1e261592c83630cb9096f3b2148218ec5f994e44afc455ae767318aa83d4f5d4d016753f40a458d00677e42ceda2b9d850feb76f4000cbd5b4543d02bee5999c10c2f042fb6e965d16ea22a7bb07f26ee5bc100cbb2831e7f9ae8c56ba428ebb31cb82c24106be3b3615ba263ed90fbba37b976a58e2a5eb65feb1bfcbf1c463c691c542bc228ea5fa1c1c168ca2ef3acb8fccf801d7551dbe9d00c254f67a0d261d1370aaa81daca2792edc6ff6ee8e64850e2e1f44f99dac0f993a28ecfafe19420e7dddebaedad9ec9bff1beb5f6c8851186d4f0f5232b27e239bc14f3e78b3d982aba60948516666ab4d4d553a3c635fb22635aefac31939b0e69d6231a4fcd767444ae52df00f78216714d4e284081fd66b008d543f23d8a9bb276d1136ea542c0892a1c52121892c2082149003f1ae646948f4e09134da0df87c6aa737a19cba43b2075ebf51e8cd49dae521c4c38a7955f46cb59d3debf9ab8cf3d11e56ebe9a43a2ba69957c57ab86e73deccf7541b5f79bf6f13e1028939353ebec170a8db99226e5364f9b16ba8b5669e2389fc2821049fd975525c84434b02c1252544c7217b828a35bb1c774ef6dc4694df8a965e07568ea43fe7799b278e153b1100ed69353255bfd9ff486966542ba0c6548cdc7eb4f092268024207485840f1b45fc8e6d8366f6affb5a9fd57d6e9ff57ba2e14557e69d7a48c9100e9f6b39e79f2f6ded230f02c09ebca43ffae04271a386aa8cf4f0aa74ea82d028efda3974478869ed59f620ae7f0ee8355a52b2544962991b26f4177968125d101e5eeb52d38cd2249659c9bf7886ee455dfb77b58b1bca3f54c6aff17b9de3901609fa2d33bfc634abc96411a8b1807b6d42d4b6313cecc8f2ca71696ebbfc8e03c6a658c71c250e6cf609de1ca12a20e3a503667b9ba4ec664df03fdf9f9e040d671167eeece6b9c455025114760e861c8e6d739a089309d3677c6d1448ec9cf5250dcd25e8a590597b29e131ce6167e627e629224f8ec8ec84ae7282c348a7b7c716ee364766ab885b65d8529a849112dedc580bb52a51cb1107f3b59e70b1d47c121b3c5f9b26f2e4d10a0450b7dce43f5ecb0be5b91cff412111195d8215bf21ea413c22d9f007f9988d89153e17210c35afd801d0e45af8f6f6c9117c66ced6f0758d128bf13b51a73d86675f80fd65d97cb129cfe7ce4c5c1c9c5f47fd99b3e4c001aedc3837d39d94dbfea5f350a2747ac5d0b0958d45425d9c5260f0ee26a59f2f4b3d498f287229819b87cf76aa4f763459dd8fea899d3dea36f0c89072a65d4f9b7aaf48a6c1d3035d6a46d27a581ab44413608ca56e4c22ba79e0acecf5d4b0ffd055880012b9d0cf21881dffb23246369e3776efa20b06ea7d76f16297714da06d49cbfd136b4f4bc742e5b1d4fbe78d54a63855a75eb353d6412542194f015f9a88cfb83b681207048e47789846e7dda1eff957162f969b3f1a348ec7c6ea9518759618f9ccd6a52e4acacc4c0ab921c21f1ba1ded108bc7462a24938d113d345743f746e253bb24512840c80c0117541ea0064cee4eb4836ca35fa82ce1a06f970f73626d4a0b9ca017e146e3f658d913d455d3f726741dc8e4ef78e820c79a5e0dba7350d9f238c3f232449e5b4563a75f9f23a7352f953ff40a3f530bb09244436df5bf147ff3be40356eb7b366b0d1d15fa04471da896bae32e0f14c0b92632918f56fd91fb65d3d2752cf9944370b0a5dd6f9060e0da4984ea7c6b9869a456d3d7b9293be6b2c58be858ea7498f4976dc5c3bf699e0b7df8dbf249f846cff0cedb6b13754707473f7932511ba84b7ddc795aba3010bb25e46ec2cecb97048cece0b0231f7e3bedf447a06a8104fd89bd78fb2323aa031b14ec161dd32ac1b0383a82016d50fdf50fafab5bc03370fc38cde7cf62b7a3bc928fe007869e6934383b87a2769b01657ca311fe7e9b0f7e2331ebe2bd0f71148830ce01af8c9d64edba289bee7c2c7041ebc7862ca05510d70753cb04e78e855cb0470f75cdeb8043dfa2df584a1e35ca0cf9a64dc866240754a20f7a5e7973436e1bb71bbcc1980f94193585c31a97be54402d18271314884c9d59a7354a87675fb20d9466493087ae75e9fc8ce781e9924f38baf85ced237345c5e4b7e4d0b6111f71d76b3d433e244642d681615856759dcc59fc7d5316150d0c89b46d9e7c5391eaa7e1944748a964680d84c217b62118808c680bfcdf8f824be1e14403df26cd486c16efe5a1589e2d401684619273134ae9a078fde634f2f199ef48f538464d3c187c9a2f304afaab767c997edc6dd29d5419770b50918c514ec07d81e42972006f613c92aad27e810dc686a09f0cedd9d01c399a03bbd0233a14baa9ba09c1afd9c20f8fe2ee383d4eae4c29cda584ef3406da3eedd35ce47ffbd911a466ac5c0760bf2912474214451d4c7364d6ff815321d03dcda4c1a0769bf226610a6821c459df9ebd02f0dbbe58495026d8ad41a4d6ddd63ca99d00f109b65bd0f6fe5e14e3dfdb1ec7dcd58be4dc26d1b9cb93c34bf5704ec566a804bb9cd0ee272df03277f4abe73915ce3d989c547e848d3a5476f7caaea120c62812a3fca6d17a96d82e87d27f201895f2e909ed3e3bc7ade19b1c7eb7532a4fa692e2fdd682f2c290f0b933e5982b652d3ec5ad52b43df8e4220c69977da7636cac5339e3377e4441ab61c8ebb17934a1f83ca0a2ef9c6be2bfc6fbdb277dac9580e8a2baad5406caf2dbea55042cd015b6df0f62ca26dd503bbc35b14df5b8f7c83131800370be8c361cbaa5b85c60c20e944f6564a4bca56bae600eb794f67f266d9059279aa168f24c5150eea6b16182b699506441959f37e0e8107c6bc7b9566e00c2c8456efc77a3f410113b0688cdcecb073023c9f08251a486a962cbb4803f765920e0c997598acb85f8b78d66b66b2bf78ff7cdee1294c0d81f459b0738b6ada2310e1c781353154db959ee8ad90ad0c87cba69ee8155c45036d9d2f5561f605d935b70629332c9437b12858cafabede9b6a2f55949177959ecd1d021c9b552074a467d3995d6b7f38e1028d008ed6d4bbc2300c0dc317b941b3093d5267f364de944dda55c9ec030035d977fd59f2678b581ab2a36e977095cf381520380e1940e09739ce8cca147021163c15467d0dc5d8321be33defe0dbf5f0e28bf694c4570e27e3d21a714a3affd484bd4f2670e222b37885d9d16fcf983885efb855cb73d28ab2b1011c3a507ebfb4d1b7139b06378a8a8fbc2c7083917e56de2aef7f2b34c88af92948fa54a3d46e2eb6ba895cbb3e1019fcba4a6cb066a870103a65105af8f8317ba61f1d5d42',
address: 'f5091405e28455880fc4191cbda9f1e57f72399e732222d4639294b66d3a5076'
};
const shardID = 'shard_0';
let blissKeyPair = {
pub: '001b4609d500e31a0a188911900aac07fb06f91566038104e90c01031707d6154701701a15046d07f5089f0c730c8515e712c90b5a130d10081bca0ab40c8f0027101501870ccb17041d691bac0c30162d11ff0566198710f308cd08b30be804261a040c530cb8042e16841623069200b9175410a5016a171e1ceb10f813261bae0acc06be176214471d7013530d92180a0dbd15c800fd09f700ed0a8616141a14095b08a71c3317031d78106602ef1c1f1a53097016df192905b50ad40b5c1d1c027e026b0ecb115417ae1b6f1c1101c60d3f1c12016010a309f8183411840d7d12d414071a5b10d1162111f712951b36066209500e1d137d1dbf055417e6075c0ce307460ff9040715b51d0000cc11cf1bd1194c0a2d19e901191c5306040c8002be0d19024f10b31b19152912fe06900de21b2e10110ab111f80b6403ac1b8505221bac09830e3501a1175705c7138e1db6035c09871c4c121706b70b560ac70c001d2305b0107117ef02c1178a13f010bb193004ca02bc035e036f109419770a2017f11dd00cb3016405b41604091206c61603085208fa0df0130912cb14cd187914b009e306440a3018ca0c5810c305400507103b1113016c0ead00100e3f02b6003410981cdf04c50d0213d61984110c0ba700ae0c8912f618a01a231bc81066010a1d051242103013ac05c30dae14030f890e1117b319a002a707f30923',
prv: 'd112525a9435c29d732592e9ec90eba2ae7b1ae2c0d3ac9b6d6ce662ca5140abb02bc846c7f54f955a84fed543107c9180366d025324aac2d253ec60515cf9ee',
address: '1826d3782d53b127c53129fe67f4a3e3c1140feb2af36a0517077297a6e867e5'
};
const recipient = 'nXSYHp74u88zKPiRi7t22nv4WCBHXUBpGrVw3V93f2s';
const nonceBliss = await web1337.getAccount(shardID,blissKeyPair.address).then(account=>account.nonce+1);
const nonceDilithium = await web1337.getAccount(shardID,dilithiumKeyPair.address).then(account=>account.nonce+1);
const fee = 1;
const amountInKLY = 13.37;
const txType = 'TX'
let payload={
to:recipient,
amount:amountInKLY,
shard: shardID
}
let signedDilithiumTx = web1337.createPostQuantumTransaction(shardID,txType,'dilithium',dilithiumKeyPair.address,dilithiumKeyPair.prv,nonceDilithium,fee,payload);
console.log('\n===================== Transaction with Dilithium signature =====================\n');
console.log(signedDilithiumTx);
console.log('\n===================== Transaction with BLISS signature =====================\n');
// Or BLISS
let signedBlissTx = web1337.createPostQuantumTransaction(shardID,txType,'bliss',blissKeyPair.address,blissKeyPair.prv,nonceBliss,fee,payload);
console.log(signedBlissTx);
```
Dilithium
{
v: 0,
creator: 'f5091405e28455880fc4191cbda9f1e57f72399e732222d4639294b66d3a5076',
type: 'TX',
nonce: 0,
fee: 1,
payload: { to: 'nXSYHp74u88zKPiRi7t22nv4WCBHXUBpGrVw3V93f2s', amount: 13.37, shard:"shard_0" },
sigType: 'P/D',
sig: 'efc20146ad24c6439c584cce5802bf51bf5e96eacefc3491acc7dec18d7b38158426d48dab6a43ca110923bc921e9343e92e09e1a3affa77d669876f2fd539979e12ed76b2e3f8a3ad3daa6ee9ea60caf74317193e849d4cb58a392d3ef084c379abc64009f71fb25460c080c05f2a651199dbceea0ad5bfbb83998d4ea66a80acc7a8a5622b4bae1154741ca56f003f96752caad04c9587d0e411d345924580d7207f7fbfedee572a0b022d9b6c8b941ed2e48fe25669be2679bf7d4ecf7b182857f938de741082acf50705bb107e7d2fd1a1cb51578e00b30abae43274e4efbdaa1997572689cf91dc6e88569bf5c039508f91ed85644021d9569a04d6ef7c57ebd4070ee976fb421e5ac44098db92e9f3daca4cc21928217544222ff2a1f3f22882b97fd47a823d7be1d114a5d7b6440d8a40fa3d054bee280d67df47f5cff0a6f7c9eb38e1e9c4e99df13506d160558990a527ad1b74ccb5a817691c3841e182d7ddd36938ca7bdbbfda2eccc300eb5a284d272ec60fd24f895f7fcd08f790b53acf957da10d1d6c55df917e3178d578527746ec9be8eb4bf7677df986e5dfc7466025a33db408d7d1c5ab839c1fd7fd6446c9bf52c5a44208520ad6319c63ad5aa05b5456cfad99c0341d01d227ec1974425266a1e8b34051bc7d7c5c1b96434aaab4fb940eafcc14686079045d23f4c79221e651fdc27d421d219c764bf2ac2b940a12caf21db76fcbcf4e8f686ce028029000c6efa82c609e79871aa344980d37447e545407ff9c5f5648b4a37f7470b5be34367181170b5d625bd77ef94ac696a2f22abd067ca9a258012c3e742a78a16d90dedd0c6ce6ab8a7af6e46aa64d05add22dca1b0ab5cf3382fc659d5106fbdccfc51b0b6eaa834dda6524590ab7e7bc001435eefc6abe754211d082afb3485024286df155eda65df64e4a8d52b33be36e20640d3a76793abb56d7bd88051ed6a0bb9fb1ef5f81a468b72b08994275cb5121d22565cb46b6f274a7312b2c5e2f2580052cc5dc6626ea2ba77911a5776ea515c7a5825125dee50764d5a86341b249f28827711be9b1cc00a9ceea66a3ad52724a66118b77a5199e3b01afddf3c9659b8b0d479113e6fcb6b5682dafb69aa3d984dcac8a98b29ca2b0de67462374fa088102700e80a405044b6b20144d726294cd53b82f44a46b0bc260d9fd5f3d56438d9aeb48aa4fd9339067b352ac6626ca0873ad96653e3d5bb83e8309fc0753b14d86226cf6f220c75a2b4211825b317e3c6aeaf2e05d7f30fba23ee65b0b9d717d6edf75ac11f964732bab6ca8829d3ade06b91040d6c65353c1fbc7b9efba94b95569c13478729c93fee0c43b68bacf3619032698c78b23157c477689f0ea350b4cd364ab638824dbe8757e1283c0573647afde128e440968c7f05a7c6ed9067ca04c9fd33e78eb1be2b201d815ae1c791bfb544a3f2d74e4de9a9f59db7cbf7d5a9e07e6cf2ea505bd7081919c0ebef9d11741d2f58958d3da845e898ed9924692d46c1b2389d40d5e3d8388fa18d16f442987da612d0a6aeaa15f6c5bfca4fd8620a256631da034fe334c182952a71d06ba383c82347ae71e80f050a8e16fefff5f61bb5a0c98035166312cb80f015163a33452dd4b507abb7990b3eaf6d9d2977a2fa351fdcd776c72fea642a20928298f3bb7b09df7e7309c68c9ada2e00c89c047bc01cf22199a0efa0b1ebda1acc3fd34b64531087d04d2cc2067d6d0151a553ea556d28fbac84d53e07db4474f9bb4d0b095fa6f08d8375b5ee7b721f2f693b0657cb3c2a7addd4dcdb81940610fbe561277e5b300c9182c71660254566e35a8ccca0058545208733bcd202a6a328f03efe0f97262682100d115fc5ecfee65e0ebcf45b10110b0a3cbbd288a51ae54924e6805e7f1a08e400cf9047ee84edf38aaf65c134a8b459fd815c4ed59b60234bb24a5e65e0e1b01054116f10d8402ae445b9557b5b5d9c0504b662a5d72d147652910173d0c7ae4eccfaa25898fb0df889ba14d2505622d2083ec18f119015b227ad453cba7237026d1d8b796ef5dd7f84a3049f7d5b60cd2f0cf72656b0ea1f3edc4004eb0a8e82e17ec2ef64b4b2d012871ddb91f2b078a6ee44158e0d2be73d6df8e6c9e4d61f33c16c38d793da1c67fdd0d314e7a7f967b72d02a618b9b76d045fe4515b2e54cd9a5d6d4f2a203e753c869e9868f402cec78c77fb0dfdb81711558be1c62f881e97361753cee187e6550f4bf8d56bad0ab4609706394e6141c305fc841eb274650c5b77406e7e2a0737a8b638722194ac55d18e6edd8c4a600683f5d582239ec3274ac59d8f114ba39b52e583a7016396cd8b4c9a080127e4671c9d28561ad7ac265071db754a86a839ff516cb081a3fc7ff01276ee6b361c25b41be1c6b00f78c29be14954b7f630b96a7f5effcb30347dff69a93718cf26418e41e976803b5bb22b7354358154dd2098eeef29542566184dd4643021ce2402ad4078c4685227d06d3d93f8693b2fd2635589bee071b9c2775add5c0dde5a4b4cb99a77a2f8c7abf329bc95bccb71908298fe65289584dc679a619296fc6fae55d94452281cf40802c419f3b417d1739b5e2c2d61b940cdbdb98edf5ded87e0156a83e474e3e9339309a7cc3ea24b939bf07ffb8614ed13f6c93c795ad0a039141f775528ba2b15729dac6eec403a811fcac59ad988e4835d0f5b620dd3b1dd37af18acdfc3089ed6fae5528546d30f6795eb6639da27b901d1e7ed0b6bc713d57e8a7129be5eb9ad6269905fe7c940fe74ebd65ab4739f580285cbd772ad058ccc7a81e0c39b841ac39d600a27211bed38c5c03eef3958b9b0a930d15110330196b55e3691d47234e6bcc8a6177b704f5b877ec8571a7b4f72aab2ee8382c5984abbbd5742044dc35694f27f03fe9b5a2e63b6fe06958476fb524bda1ed9a1a578bdeee24cdc0e8082c30db7eb9815747d615232a1fa48a5896a923b52db42671e4a8c742caac2c87bacd5c04bb8c7e3c42e39d2eff1d10b5e42c35d8131eba3ee2c15958f787bab97db81840cf9a3db8a07bec1c74f4a9ae68595367b3443a68a16f16a97973c41f504ededea3703456caa6fe53cd3b32a02fca753033ad0dc1df8f3126e43efc0e9a523217047d7eea5a3cb2002efcc6d47a7d05c815d1e54681a4034de24084e54c84a51fa93495030c81c6f99318f175adbf35d9ab0354460ffdda0ac3d2217969e4e04ce573fb7e6a96e950949299772900367fd25d09b69642b6d18d149ac14f6a85b6de11c7b6a761c0f87b4d6dfdc29731c7d941708cd0653d4f16d000cb44f01328c3466e9dc823816326eb5db1dbc932a9bc445d4f617aa5dceca78e5253b0509828bcb3713d54e2ffda5b97434460d770abd0857502341664af254def6f99493be46834f6e0467b171bd8360f26fcbc94984b0d018ebe6044e9c400d77ed6ee8ccc557497b75750f196ace7ae72757e2f2935cc80b4e0f318c5ace2e2e11b4f5016e1fe3f286589b9806aa7b646064d048e76c55eb97f95402a6376fcf1638a3ac0b19c4826dcde636bc8836ad939b191aad7027d51d7f5b39ccb3df4877f164e8362d024122e4acfac1bea875cc3b17a905f79540f8ddc05718982742a7fbe05ae0b6fe671e57b637e526a25195234f256043f9fbc28dbda48b3a9022cae5ef4c9aa5e2b7d00dd2d2f828e6777b1048549d18938f3748c75e1173d543c2019ac63b8c1cb892ec191c0859afc757735ced3d371a9f2eb173390b0d89ea07c43d325dcb1d828f86fc63e7e16fb4e70f961a00e024ff83de41a0529c04a84e2ebce587f429aeedc1f11707751387183bff491c4eb01ea7edc79d33b9b40d3f495430bce85f3eb5a960021cfdb72238a24744c445dcf304c6278d60d92227fd642d203644f763f5c6d87da27a74a8b5125df1b66dc4c552a8a1fc4577253c82652b2e34ef1bda0df7276a4a3383505eff1870fd0787f082ce38db5acfee7e3e4d922b145fdadb5de875bb607656337496191c240bdbcd6edd7038038d40dd2495ee777b5ddfeb2daf387d784ba718cb97463b882bd5ebc8d03cae9879a0505974a04c00dde2b2fe0c0c322f23740c4e03f1fc42b76ccd1e8c87a91427eca45e7baa2cf9f3073d172752456a7ef50de1b998a58bd38d9a6e33af199c0fc07b3f41ee46886564a8798270d5e88fadba1686044c7090616360a19a1c5cce461c88f19b07871ebba298da61a4aba24fa868848d4f38bc663f1808555f69ce409d96b3c09e746b1ad13b303519381bb74f751d6c4c0be8116a47228ce91eb6fbf78698adaecc489370a7f4a581469edf0b494a299701237fbf7c6b2a4c496c23f9b861c4f952f9160365cc55aeef2f5911754b58b1a881ea2e3ce8485f8baf25cb67377053a0bd23b71ee46df70a4c0ed60aa5397f43d4210d94f7871bc42f6b62b983c0e748d9660bd4241d8cef95544d56edaf58bfe7a46f0b3f458bb6e6a3bc16b0ccfd011427998315f118c5465ecaf38fffbe63cbf47647f43ae33f364d546b5f968b527dc8f09928daea990ccfe56828438a6247682121cb57f3fe6d575f1b08a90a8bc3d4ff8523ef0351a523ac5b02f60f73bd6831c3fa76c30a0399e20e1e0498ec2786fb15d5586ee4ed32c2ead455245f39f1a4c684efae74c2a8becd1f351469a8ade65475da42a61333f2929661a71fef5521f72ee593ceea7c6dab4ec1e2f06385482aa4a16b857f174cffdff8dc516f41378a6728ae0ffab172ed58a71f8129b9e85361c6c86f15880ce3ba42f751eca95febef3f953369c0a16e763f1d35789e9b04b38cec92eed32f4983b998628b2ce797a5faa6affa65a239dd7763a5d16db4a0d6888af03b6db52ed2fe5a741508000e4d2567bf01e3c179e76570f5ad1f654366a394aed472a37a7808037301f027b5ef75d70a813083af17c8e10c1aac04ff34ea827df68c75aab30a697fd8a478d3535f527618595ae88509c98d95c8b634a78fee4c8127e8f6f01f8ba7753517ddfd66af8705d0012029ba9455bc7363e8d16b20e2fbbcbb81e20559abfb5beb957881078b7e536768ced8920b01e0c7ec431e40d875ee40831c29715b373700ef0c3a9f15d049b3216ea0b57ad4e09725d7f3891c5ff279bc78807bdb47cfe0a95b0da77d6e5c82a7b93ef90a9844271139072121730d68fa100e675a04379ff334f2b9a86a5e508550dd8dc090f860709415b62c61b3cad40591f0c7ddb8e76557aed8e165e29c9ab0c6ad65c7835eb48c499ea0f656215523ad2afd41a2aeb65ff58bce823af7e46df07b5b4eda105354885cc7d94c27323b85621183bc494d157be59b0cd87bafdbf39277dc0c958b0974cf0819d5e566f3c70a3f4a9c350b258fce8eb6db21789284b98176adc07c03843330be4ced1e74d0f86d84e3c5a903c4fc6d52a0b193a59dd10e18fd1f6e5d5a295a55f49806131aa5b2f60509cfb728329bd082dacbd0e6c7e6d22529fe0c27f623bbcfe0248fadb327167dd71cc6e1be6217906d40e255235174c4204434ac2b28b885241c72a5dc6855dcb1eacdc94e7a0821dbd623356557946e515c18d8b69f4c209931c28e0e5d1b323055a4e7e9d9ffe3ab73dbd23aca53dcef35f9cbb8e557e681610daad5f842b3b79461ec66ead0ebf3415ba89ef3e86b6f1db67372cfc2e85fb5f960d13411094ea1bf5562e394f76c73bf8aca3cb8be940a3c1df1c226de8fa88148de4c0707f596f458fd5d9947ecaa7d52aa5eab765b1daf240caa66a3374e6a97b77fe9b55dee63fcc260697ca1afe1dcdb68d5054e69b0d078beb41287c1e9784eb2787bcb4605a04096f0e93e57668902d678eb88b98366da09aca16a33bd205b91542b7cc178a7a6fd984501e7cd2a3840b6dda7c07a98ec7cea07ba45d926aaab6add8f410cd66ad5795fb1c27d0027dfb1c2d85bd287da2fb282d36fc6535abf248f5379e4d8ccb6b829c3176ae72a68940fb3e1acfc8de25aa8e28a52c1a7f972fae3f58f86a4966a113c791137551cb395e1acbce3ed2863f84f6ded6e0a06e85ce62b63624323fa14ed7897bc3021b0b4374315b5023f1e58995f99db8c5209c3a500fc7e86fe92f2e84361ff1bfabb9fa36ab80f234aea741a7bca8efb91247f9e53dbf292b8598c3ff548f269aee2a5f41db5cc3dee44188d228944e537bd17eb8c56ee3ea6943fba69a8c178910e9fed8ca8e5b85ef6c9a35628cad1f17be67e230517323c7173bde2cc6611c5fcd04a792a83ae4aeaa194fca9e895037c91a1210351e289efcdc81a86b7d4ae06214f1a7b1ab4fc82d6a2d1957442d30782a6065b2540397dc19e360f7038c933866fb134466717695edf2f8f9093d435b5e7f95ef0f1c1e3f5d5f6895a6cfe0e8eaf2050e3444a4aacd12687b9c9eaabdc2d8e6f10f121e2237b1c9161f2784c2c8c9cbe222555982aab40000000a12202732394248'
}
BLISS
{
v: 0,
creator: '1826d3782d53b127c53129fe67f4a3e3c1140feb2af36a0517077297a6e867e5',
type: 'TX',
nonce: 0,
fee: 1,
payload: { to: 'nXSYHp74u88zKPiRi7t22nv4WCBHXUBpGrVw3V93f2s', amount: 13.37, shard:"shard_0" },
sigType: 'P/B',
sig: '001dbe1d6900500040000b002000bb0014003d1d5f003200b8004000ac1dda004c1d9e1de81dbc1d7f0046002e009400d61dfb00781dba0013004000a90064002a1dc400341df91dc3002e1d961d0a009c004b1dad1d27002e1def1df1001000701db0008900141d6a00981d721ded1dfa1de11dc01daf1d761d8d1dcf1dbb1d7d1ddb008c0085001e1dfc003b00131dfd003000431de000701dda1dd7005c0056000000ca007600cd1dbd1d271d511dd51ddf1dd51df31d631d521dd0005f1deb00791da41dec1d441d6800181d751d880097002e1e0000fb1d9b1dbd00900046001f007b1ddd00501dd000271dc91d5f00270034003c1df000ce1db200a900131de100531db61de61d581cca1d5b005d1d8f1dbd009d1de0002b1dc11d501d8c00701da4000e000e1dd6000d1d7e000500161db90001007100421d601d8000031dc71d55004e003f1dda000700361dfb1dac1d871dbd00e01def1dae1dbd010200111d9c00251df61dea006800f71d9c00121dc51d5c1db7000700471d6400411dcc0022009e1dae1dc11d7b006b1ddc000f005f000c003c1d7e1d40003b1d9e1d3700221dbd1d811dc41deb00821de9004200171dc01db200211de700a900df1dfe1db20026008600590014006c009600631ddc1dff1dc91dcd1d87009b1da81df01dbb001d00cb0039002000901d8a0005009a005400021db4008900430024040201020301030404020302020304020307040302010203020201040501050300040405050602020302000401010100060908060103020201010103030102010303050600030304040301010303010402080202040102000202010201030606020401000103020102030001050103010205000505020002020104010805020705030102070200010102000502060500060200020203000702020701070004010404030102000102020104030902030100010201000001020505060401010104030103020402040402030407020005030200020402030105030200040200010100040201040206030103000403030701020302020202020604000204030502000a87a3063d143076234550ce46149170f94615120371411154eb35816640d100008b0081003c00b300910011007800330007001200ca0002'
}
Then, this transaction can be send to mempool with default way:
await web1337.sendTransaction(signedDilithiumTx)
await web1337.sendTransaction(signedBlissTx)
// and get the receipt later. Reminder - id of tx and receipt is 256-bit BLAKE3 hash of transaction signature
let receipt1 = await web1337.getTransactionReceiptById(web1337.blake3(signedDilithiumTx))
let receipt2 = await web1337.getTransactionReceiptById(web1337.blake3(signedBlissTx))
We decided to add Dilithium and BLISS support because:
BLISS have a short enough signatures
Dilithium is a prime candidate for NIST certification
So it was kind of like a compromise. In any case, only users can choose what to us
Same as
Same as
Same as