Make an encrypt value - CLI

Once @sight-oracle/sightjs is installed, you can use CLI to prepare an encrypted value to submit to Sight Oracle.

npx sight encrypt [options] <bits> <value>

For example, below command with get you the bytes representation of an euint32 value of 2

npx sight encrypt -n http://localhost:8545 32 2

The output looks like this:

0x1004000000000000176942fb6155f9cf46b4235bd06e3d4494fe756cb2725b4ff2750c4b1ab7887ef9c42bec82e2af0f757cd4f9a28d8f3327a2cce01a022d2b805a860a530b914cbec9240c9e1f9b5efa87112ee27b0d170d67dac839cc6dba2ff2448c9c926871b5ea520e4844b0d7169803015a9644a690286cbfe7981029abab71d9163b3f629470295171cfe660054970b0fe80d9d12c8073ae6e813afb3514e3d965cf13fb8c4f993313aae5d6ce8a298cdcaba4a2bca22325f5d16a4600f28ca1551692626e33afa23cad5f6dd165dcc4a9a1605cffac29fcaa6ace966aba0d4da8b5695bff30337e0d6df3bd4573f0398000c8928954c327a9c392a3414b4398719eec1e2ae7c9dccbbc08981f88646d1e970b804f543c6e7a055ecf4bed1305dc56288a08894bcae5df1e3db6f27f51ecbdf7483ff42d42274e54ec4d503535f42c17bdfa82ee728e8b263cea2d5531683694320e6c314d611c7d90ac734687191e0e58e98290cbc48cf34ebd2c234a545fe2502893c18cf21b1b92a47356f2c4e668678d3fa7c5365b594a96968cf49119edddf6b49ccc144181aff3c8cdf0094ecfb81df5f877819347cd87c434363eb3d9cd533d5592f73b9fabc67196a9f36b64e771b3acb8389edf94291e80c699be2ca1d891367ec1548d28370a83c66a90e6958f4c9fd840acef84206e528139bae3fda0ff4b211c4214e7db1d2972b2894d48a283f83b9737c7861e68f68849694bffb599e5f1d2de0f42a7bdc9f64c318e88ee4adb9d3e6cc2acf0467f79ccbfe6a2c8ec715f60e0207e6af45dde357c316dded8289b2b8c84b56f8b5da4199fbd392e56c7927b66c3eb820d3c4951620b81fe03920a74ad6be21f225b6d79fef79f0997bccee35058381973fdbe98702bf8110a5d917789717d78cd0e498b944153fbc45454e9719ccaf518d4dae832eafa1ae4268629d145c5ba886fd2407f7f4b65b8e7e633b6d8ba1b45643cd48d398dbff72949074b4182387796a1a5636a54bffe20cddfd5f42e44eb13ac1bae29e9e42e7c1e3b763ba5f372ef6d3481cc733b91fe1d612b39eb4036d71eee357c47284218434aea3fced6efdff6444673f9a65c9b4dfd77548df41026d28217c6604f8cf1d0abaec0e4a3f6d431fac6227d520113e4283cccaf72569c1e41cbe30786f53fc5e9f75941af0f5670656484c7b00728c5d139a7f188d13eb08b933e1f0aafbf5f08448bd817e8072d14048e8fa1115777884b8fb0a29f9e42a77ce4a842feb1e1f416262aa0d936c16351b024c30eb08810bef6491c975f3e93b77f5a0a472618caa5f0436c9c1772c28f1d0b42b204d224b7210bac2cc4317800d241abdd07102af23234ee38942bd06667b827e85e30f4973ed6d53710427b249c7a4c31e46d473d9d671bb30f457a8da83d7c5f81a7b9554420827aacb0c9256e9a9492d83512dc2ff607d546963d2c84e47daa8ea6a8ac48ff93c74d32a34fcf797656096957e81e909afa2632d41d92ec703f48e6403666e0b9d55d24a77d538f5ef9fc5b49adfdeac68c624ee126fabfecfe05a58ff979768dd0a346dd2f557d471673213bddda0d7d05937bbfa6ac0a271348e4d346b484fbf0248a35692f37038cb71fc981665d725813a6fdc78d49bd4135ab5c958b6e80914c4a7798ef5eec0673d476761427c252eb0027d5ae885a4f61a0211320bb782d409bf11eb76d0a17d9ca93c97c7ee3a07c8d5b92e3945c9d72f2c24521e989ea64e344838ca2ea3ae6cf1e4890486b959ffa7963f29ab9b28ee879a2c5950075b456430846ef1a6dfdce9a6cf0511c8902a294701425336ef615008e321f03fae26e4889ac054dc7488702ad619cb250946a231fc4e55b039dad52637f1bd3a3efac4d91bee40d6d38b0627677f6aef20f8b5c9f3f7ddd680daba8ffba615ce118ac4a706907f0d22df5df5f597eed8781fecf35e26682b23579da75fe02eef17fa9c4ff997f2db3fd46e628e63922c4d0c8c40d9695809727e4be2a0f02f1be059f8fc742f10cfa092e2b401490f6ffe4fa8ee5ab75907d0283b64c185b15d23820c8a887de2323c67de77e9e9ce1dec3bd39ce819bb505068e46a69a9810017570bd4682f245aa23583c824e5f50c2d7827ac3d75e1b75fa05650f1a49c5031f8cf1507f302515a20bd6f30c890f37f23c3e49573d30fcac937eb30c655df5856442427fe157e64886dfb7e5d56c13c29ce102e9fa35000ccc742ca9a80182b8a827ad3cfc652c58aaf8278a5994928cd8758f57fd0d3b610cc25f7178d53d688bdb36381f60e745afab8a6b28ec05474c6fcb5f7bd43546126ca4639bc4cec0f41799a11129e529f9e47f4de478547d75e88af639fcc3fd1fee4c60b53469392dc801c803b8b64a674c8e17acd75834e9f75f680e8c0e5c38631f53c90590ca9df34c17afa756675cf938d07a875b6626f72a73fc523ee296ea17160466911d2abd287c56a552965f02631af841bbcce00581a087a12f0143f2244af40f247a228f2325eeff162985fde44db4d497a6bb723161ef2957c7a155390806714f30604047bd73e5666ff0cee33082be7a0a406ca9793b4cc2dfa3505c0f63cff90dd3f8f8ce1825ddf81153618c665ea7fcae3cf24c7ff508c2be1f53f51f36a7d4254c6f2d7f5f8a2730b19809cc84a19c9580b26d24e2b47d33d02587bbb58fa119775fe4d342901315ad6358ee21734db62c1fb51c3343354100cb6c3336a7dfc4661cda0ef887e24a2bbc0d7ac9d26e98aad25a93953ee193ee6ac1c4e98c5f68ddb8a0f99a5c36855bd9c74bb7a04490937d6ac83f138e43109c51387b1e0073c614d99b9c9a9d0afe6c7a461fa01acf49cc49936628487540da0e725d68da6c76f53c48765c66606564fac609d2cfbcde8a5fa6e422a748d5d6dbaca675311420f3fc86e3c936bd8485bca0cacca96f2d65c854bffd393ad8b196d0965382a35271174682d252cbe54cd504dc45c78f32784f7e3fb84df648df5d931b4bb4fbf411381bf7f315a0985acbd72791081d26dbfa6d789e44040352d53b6df44b9a460a71377edefe754a1f97df1be19d8336a8a6f12cf726410c1e6fb5d3e1ea1b21c5161231034dbcc20323d92e99ad440edc65c98ab7c1ec70b45e3175c560fbbed9885ead4255786abf8be5cde7773f7dc96ab8a01b7238f741ece19352a2b62cb14e4314725239c77ccafca29e923f6ef0901ef0d65c9b98566598d95e1b2b2ca8ec93981244b62f47911745007a7da79328a20241571683e68db1feaf5b31ad4537802e4c7b5f76455323f8f8259c568e068c12ca0cf87a85b5478dbd9e7b08b09d6f0b04b020377e8d58ef0830256694120dbbf0dad1336d4f3bd36ae9cf5cb576a76b7e6cca8ea93ef7abcd8ce16546d4931c58eed3be609ea3168e1bbd9d550d69aa100fa987db6c33af925a79e5c0bb31b1f82ae11c728683c6fa4ce3620445ca2526575fa8484929293b789444bee1978e50556b57039bec2d1ad412ae70913202d7bc8978ef9f8717163c6a5c9d98b5e696a2902749effe33b9d0a6db62c3f3100c66500af48610aaa745c31b0d8cf0f10f89b0ddc3aa0566d2d1a81f1e482664a4453865ed5e65c5c3bdbeb9a927efaa4e4da311674458ea1cbf9f9f1cb211dfc22c21d7f5a4c47fcda5f1f6513bca4b2e2b7473b577a844dc7d87198faff1dcb38c22f289114ce52564b22e64499b1c822da47fc0d79607e1d6a2a386e49074bdfbc17572b7e5013718cc60067662fddb597a9c9fa5d8c0689e25f5caffac6162f5944757c4eaa39f19ccd6eac8681d72c79082243e3afca8cee4c849da60d8b7dc22a52b0f3ffaba7c0ff29e3d219c8671cbb1ffb8590ea6e2bc36cfdfafe67eea45cc572b33bf9071d56035d9060740bdda3d8d49cad3e35a665bf2074d87ad20de5a9895e0010b05c9d452c286348a7d87133d6bbf92c8e68325aea7db634e8e00dba1e7a33f417f23a0f93a4ba06d296e4e92885f776e696de44c22f96ec81d5d71dfd6dea34934c61e51cb293077983287c19a3d3e86d1525fdf65c442f87afa322c9209b70e0f88a29c8b7cdde6150d26715533ef7233c9b631a99a0474ba9407e3044772c462db104f009e18eb4806450510033e80347ff7026bde17c04475a614d7df0ab437d2ae8fd44f4d86fba09d82c2490c0d5cd71b3a135e15331672df92867314442cb0ffc34d22786fa03894101748922066257acc3826fda09ffae7da6ece94d8d1bf8e5ed9b460014e970be82a6a94a3d2d0a2a7d2e0b0959d1908d48f5103f5aa3e05709be7bd1018e5e15bd927f470fecf4858cb98c90b26f4a3e5d62910485f74506b62151d7411c0a02ee4513501012fa55774d9c6bfb99a183aabd1d7bf8a5c2451f2657f31079fdaf2f990d2046633af594fd12a73e2fc47e14a2f63b14ffe20db813de531789dda856afddef2b6dfafcf342ff83826fc4604789cee27ecf0394d89aff075ba288581ac1f18c639bd889338a05af061d15db5aa0b41782c5e321235c4e8d4f2aa50d6ad16932322e09a69f9144a607ffa06b98d57c2bda22f0bca7d0d6d1e85cd464c65898b59825bff275865b911303103398344681ee3ccc0cadc2228177d1fa01b8604c56e83c08cbc45f4f1a1a9ae122fe2cc2091fd189f75015a6ca044d5e1ce1cf9e4f33aa14450e2b0d5f6c74d6c7f92085eb27640e513f0fa3d455b100d166d731d21cdb64e5688425916c1743e063d0590aa9ac0285dacee8cd24fea20a2316b1aab5b3ca732608620bb8243b6fbdd2623beff41379861d6d17d0c6923691f0fa1235e2370cdf55e7522740b97dc5d9c4eaf820bbe073059b6badc3c069a6bff4a32fc8889f85320a4738e66339e6abda1f9836159b8732ee448da117f5566c450b46bf180a4cb55b831d6f4f748ff075b6ef72582c7e4bbbc5bc16d9805266a0eceaa14310f0d3661b50afb50968ec6f042a707ccfa5ef94ec6391c436beecb9a0c05503892d67cf318d01935ffab0b717aac6981dd81cc9a732ce7ca84f96f053397c865fdc18f8cec6659d77e763e877ab679097756fe3a4160f70216f017832b21a5652c8e47816a0df572b891fa55062ee14463b6db92630399a8a07c8648664a1c60ed035c2302907b90fac77eb1121d9ef1d5e9072dcc5bcff508fc910777a17306124b7fda379bddb7d73b83e970df30a8e6143f9b40089c0bf8b14850b9fe5d2b851112c3e03e3e1d494b83d87f767481ece0f4dbaeddef09d7905b130efd067cf6f2298b2b21fb38f3c73d060fe6040277a759139c1866a1493b4b88a0dba7b2f328ad7f2ac561eb058df0c43146e421a822f767f3f71ed015152fdb4655efaf4566b692a6a62e07c46c614eeef17fd0a21dacbdc7da8d205522981af65b2e92bf9d3e346f459026c208490221945b39514f0b6cfdaa675135c6dafe2d0ade8a7a92076c7be0a476a379336d0207b4e0f7a132732b525e484c198daaa81dfa8c6bd4df2ed7fb8499989cc866e616556bd1363d20c1164f0952221b537f16b0baa9f3b21b1009fe7714b9cda30f70dcbb4dc9250c4fff5bae64e15d616064e9c65f0bb0bbb858deb1081473680f5be1084fc7690fe6294c1d9e713cb7b686eebcd6e044d3fa5501a5f67d7957c55e2d174e223525367eea0ff01bf00f5d0fdb207d29beb9e1deeb8ce46a74644e1ef1be43b37cf5be16c7df22c07d5b1df765b6c6cbef170dbea19e6765a4d4e7ddd833fc6d708dc8553a3bd205d2d922387a7836d35674f1aabdd7766d89a091da3231a155c651ab13a79e7cebc8130e7005563fd4898c31093f6884dd4523dc6a0995f353707bd917ca80191b35450e2175bf57541dc44bd540bf182254a3cca1a373f9c36a272d45161bbcd4b32213c93581162dea983c1f5b13cebc4bb52713f5efdab960b256ff330dbac8c4e9b3d29980e180cc4a644274d453b80e6bd42d8b091610c83a9be19ad743a48ae12acd3064739148b770c66ac29bc494fd5a8b1e8babe5372dbefd6b52aeb5aeb83cda95d25ed83d17c3b6aad51dbb61b3b290c40cc75bdcdf4a1488f3b8e4351363096827ff9f20f6833e9277c0de036680c2688a955493d4e58af272ae3be257a5af5ca80d56ae2ecae2b3f7e048ba53b3f1838c558a7464e26ede235773975745d1d8776af8e2f0afb685916e8e4371aab7b4ffe77b21a997519770b4a5c841f672770c6d362d1d5a2b0beb84647c2ed385f5e4c58bd32fa07d43ea6501fc442af4f0fbc1850601b62ed4a03a9e736c36ae7bc61cc28e2e58b5bd07308ebb8290a821ff00d91faf2853c160b35e2877313dff4b76c63399e10367dd4096905a20dd2cefc0ccd57dec5d554459ae28e7c933eacd1991b1b7c7d7c319c1dad7f094ff7038ba99d5fd84c45262da595e5ef418e8a2ba25a77fa5439b7eff02abb0ada41aac3dc91c2738f16df05f394c1a050e1e22b8f77656a6e27807f35ed699a8fba00c5b83c411183dc2de3babb3e22f12521223e377c52c3ca043cdaa3bbc556dc23f45a18e47611a17b260e2a4ed5ff7be29baeba8a09fe3139c6a1490ffc7a81af18612e70cb2963ed954aea749bc9c8fcc02cf1edc4298f0d4312c80f8e9e1fcf3a020a6b34bf8055649626378228cdd834c37cbf93c1cd23a71de34155e09789b95103a5fa0cf6dd4791a7920e4a456d005f972df4734cd859d1e3e34225e8e086abca84d1a91102350fae7c9f9980a6e99e6fee37475b3e0698f1a292aa5bfeafab4c41e1954e7ee005ac3e4aa53574e6040f1d8a869712a94557da1fb6c36a20b5d7c503ed2f78b71957735b901dc5d93eb8a72f88616d1f32da9e4a4e69192c3e06daeab9226f8f1c795c9d236a47f5fffdd20c387a93211a6d4fba831845fc6f7ff3b8c6febe836fc39a353746cdd73c26c6ae09d23c012a3566460fd145d4f459f94174677eb6f2cae005c7783124c724db3dee079e6b28177a845e961ba40290dfe197fc94c2bec20574cbc0aae9264293540dc7175c08820f358e74cfd0a4f4fc2d588e2e743b56dc46e4291a85f88b9d652bfdf410332f47e6bff6003b036ed42e136f58eeef9c61164b8635e2ee1546c45a2fc42865052a7784065e68c9423f3dacbbce88fb591178b29f0d1455f203cbc6ad3fa81cbaa36d27100bd52b2cbfa19f4fcdb43d95b406a5ffa4f46b0a995fbd7d549bf6f09d4975b4de0e86d8875ccdaca1a14e384b469c6e1aff7089ddf6cec63c709a483c7bb2fe9623a59d50d89e6c3e77f9f486106c457f7e081b90d24d74c25d2973c2e425170d3c03f2d442542c813c9f05f3ab7d7beba1a3a29dd680b777b3a355b3c6db56d10c9eaa71de7dcad965eaa492eb7f0cbdf85b035fb7c44f3e3386f581422a149816bff729939cafbcb580d2358f2e9d3ef09082931a09e0ee5f0545a15bde412ba1eb8b2aac343a86fbb9c4cfab0a5b285e8f62795190ac402fb5ace86c5388aba245bbf7daeed34ffe3b16e4366db5011acd6b08cf6bbd6ec811e923d4299bbb5bbf9134b0fb75553bd3a4dfefd1e60e636e5a9a61e64dcfd5d659c16b6a766766777d4a63b0bc8c2365d6e4c74432a91e1cb4100ddbb8091a1568e049f85d38254f2f9b2a1b651f33dc698a6f14461dffb479d03b4ae0bd559ea3cd090449794d6debdc002f55f2921d488dc380f0e4d6cb6037c0250c5a3fac8f141d4831dec5292145879af220cfc7551b66728056e3662c521d320d8bfb1e00afa56184fef46ba37d8542c88d4daf5672c73ebf3add7ed99e44e9b07110f3417816797f91410e9ff032b2779af5824e3309c5bb84d872c57f6df98398a48ed6052585b120a346b5c9d46eb99e3f488c90f0444a1ec616865c57b1ffe5c58fea4b37841ad16af4f9b3d60ef7c60858c2fd3835ddccd2030277cfe7c5048ccb15771a52f3313cc265d4371fe5ea66e523f29418c57a32ac0421533e154d6c0c42f63638ec86a88daf5f8762f39c5bcf75229dfa46c3464e29a39a35692264e6953c79f139f1000ec1b461597b657dbc94172cca86f32f72e7271b8e84257fc673aa26d02c8b84dd1b4de350b2cc1a17eb20898b30a7bbf83d1d272c596e7101ac404230f2bdf5f49b96cf6da8f7e0f276cceb08c326932d4aac2e7128d72acbcda1ea9a2c5d63c7fd003810e901ba864216f767a43bda6542e89abad997892fae27f66601b2a31a453b8e00b4e6d8e92b5e16670ff4e9d2baf7a3158b80ed84d521dfe8e09be794af1384bb2f719d10dbc15370b1d8bff5d48d117f4a0191d6f7ea0dfbaeddd6d67ac4ae26951e2ba20d0e1fcdbe01b6f47cff916c650b27b218ad55008eb32c406b293e957bea69729543822b8b7ff63a776aaa85b175a72b3dc66eba57b54bae789c5a79ee03ba2076b82c398a137580add8b67ca45f625bb28d2ea9079793302eeebd998d00ec17f3de85cec331386bfdc927cd4e4ddc2edcaf4da16665033c5f911b091580b55c17cc33b1bc061eb6fd7f4f2baa00467c7e6305ec256d537116b816ed46f0b641e3092adcc691036650319f2d52109529fd0b89ae244460732b8144684ea5a39657a931559f2990bd1bc1404eb09373d6c912c48608a6f4ef4f84910e7843c09e3c3e9581b32b6115919771c3883c3b99c9df5523448c62855927da275946690177080615316e835c86ba4f1d389507013fee5ff02c0f62e2b6664deda6a40645e5f188df3c66499fc0d919a568b18e2f961022b303477c7b4f72b0629f500337143c4593a31419706e09c3a2d43a0d0c53f81d3dc3bbdee69a6e34348cb34c07ec27e7c441cdc53a9f11bb9a1238030c20f03e8cb3cb3bac878dae7d9551bc6f1fbee5e4c255ba7500bcb05152f0ba5b58d60cfc08be233d0987d42b7a4752d89faf60b306cddb1346d4a0753bb956a9fdba9dddc3d46372bbf9f11479c3a018a82e4d69034be2fdfefd8704fb6dd0d681d030f00ea70aa7d66fc78afd3eeca1cd9acbf96e35b001fed20d23c6ce26e61cdf4899573eb42950a37552d973f6daeea3734b87b62eb5a0f3101d1d0d24e5cdcbd6d26990a60306c2173ee4e6d75762d58cbb321026525c2fb20a02d622f6b6160608e967e67209f47fa2c5dc0fce95eb0e7df5e3d1bb6ee8b52bc8cc07dfc765e23e453e7fcd81acc28597ca196f494d7d7088c6e90ace56f17f28f7a05082f0492da9f44fdf376a9775d49966b862963c6ac41540ba7e8a2e444d56ac9cd69c2ee76226bbfe7d7dfcb9be070b875ac03a9c4337d8c2476c9b4e4a3a233d1ed4a8d5f6b1c6af5902709f1b5b2365ea12dec8d7c114799a644758681d4d33a332582ce19ea306435c0db7517353e3bc135021efa817a16ba103ab434d25214a60c50c0f8c2d0a29f395c1dde8eee67a63d220eb91a621a36d478da970dbdf1843eb895a363a1f2bd528e83b2161ae9e02dccd8acf7381f46656f78a4b0a80b6789f2561a5a1312599fb5c87b7e9ab2705751b71516912ead2720afb599fe8f1378dd58917984995c3b36be91b5c5a3ec10cdc28a4bad3f35152bda993ed3b84f65f846da6d5e4bc4b33f28ab1fd30b1f7582004c752bab617bf883ad52239afe91915b28d0bc8b6f3690d34d8b89b4ae1870e766fc8f78d8d2afeafc568bd52e83a3b8a286584dd93ca7ea1e5cef6a85a4ca91a773061f2ce25307ed69d30136c76b001c1fa44b876ab28a720cadb0138d0df97103173057a2e2612a5aeb876de62ce03008d1d278c37d49c23a2b032bc10b79f3579d2b65490759200871f2101ea9d36c1620aa9c1f7ad9e99c5adc55396fde283078eaa36f766d85346f258be506d61fc3b482fe16f0273821739262c8a18008716e0be451ab85e462d86b7f3ac9a7457e23ac73ba5cfa97e769dbee5b983d47c40f15edcbb5c0893bbccaf296e37a9d50ae0b81f68f295701b9efb839c86c8aa832cf024f9971b4a13a4e192ac3836bd47c1b5da17cddff268626a9d789fa4c20a9a0c0f12686693864c960f8b4894d4c32dae8bf82122e53e473290c9611b27f18c1a5c7b28b64e76d864c612dec165c2859966242feb13a63fd38aa2ca18bbc86d524cc162c81bb64bd906c61cac247ec9b3267475a4f49b8b47382f2af799682c0182c0cd2490e42d8d05bb8f7036face7cb567a27a1403282187118752eedc3ad54f49f975c5a2bc8b22cb79e9af2b0599daf88f8525eaf7986c6714016dcb916820e750925dd6173eccbbc6de9f7013d3aea0ae0b412fae8890f18189adf1cd3efa23f68980d57cdb67e4b1a6150b34f81f64f2db21e44cc915c202da98360a6af6c1944fc5ade0c9e5996d382a02793b576a7372423758ae335260a91d358141dec2eb5b24711a0405cccec71a94541cb87db11da22504ee7c39f3ce2ea38be2a88ce8b11cccaabd11f9e9772d8439b1698b7d49d5ee7ad27ab83b5ed3ee620e8dc75d2357238efb76da4fa027fced43e0e30f64acaf02f1dd43bccfa68140ef02eea5459e9a1a4d880186339b3752f1aa8d1153ebf084f5db5791004fd2f66e61a03b4c1959dc338523254ea290c3ad6246a411a7ae553b0056c37e91bf7a4485ae5ee97e62421e06cd2df2787ae303121f0c6e7a581887e7fab622f4065f7656b2202db4cc25387b3fedcdb5dcc38c8afa47ebab105dae01d127fb662cf1b7b8e04b206eecc2f3c0446cf615a438aa805146fbf36ef463a6dd8c1b8d4abbd841be651100a8fcea3ab94f441426d7b6b5ce85ab887850ff34633a7977c70c4263b583a9bf6a57fd96b4ce215771176435feb1b076a869b3708f54416e6737933e8e673f990b6febe18f611bd0512e07cc7c801857f82583d60d2130478e1b70a5dd861ca04a0bcd1ae51a9815437238a062936d989b231413a5131d616c504126cd631a13b9e5d3bcd8202f0955618f1fe5512d349c368e9885c96e4f5a0fc2e8e9f90c45957f18992ef23e7a42c33c4d98dd6c81c36d7ae097e033ef6a1542e8f5247c530954ce84a821d5e86f418db3f2d0b5f3dbef1f0758e7150dc0ac0c70adc607167becdab23454892ab8a686a7830d0806d453ecd172d4fc2b8c65e62a37bda29f8be95f417d4df0d12a88dac6120007d566aed9c7a607e63df0c78a60187688ba5a75c0eea9710cdd82a98e385f0a9ce780895e8733382a0e13e917c594b1cc2688e747e63edc97b7dd5e9ef982ec98ef143c122a796ecaa84934976351e0cd69b13fd90628d980e417e4ead4d65652eab18567bceafee249fe791919baf9ac9c65ae1b094184e0ac19b62ae48343a22478745aeebe02891bb0fdb3baac4fa3591c65f9fcb7649a592320843084e6f49353be9be7f41db9b24ad307daab627e538af742067b9428764957b9e807e522c4b067cd39c9388514a47d9c627bfd1a68597b4189eb841ec4e9f9909a808dcdfd6766a4aa6c5b6468767161f559707bbe3b8a1bcbd43fc43805b2e80f888a7d6bf65fc141d38dddd6ada03029639c7eb2be06ee076f3cc46319fcb56ca2a8ade19013ae3043a37d9faabd41fa6563367ff153518dc5c2fd0c6bf993256c692af403c236c6474ceee3e5124430d72f4f3fdf91f2bf35bea7055fe587aa1c17cab8d71cf17fcf48b4447952e74e4f10815da398689f03d2668d82ec4ae513de9990876e6942215e33a7c94022f09959670a322f24e5a564e8d6c60813a430f278713da2bcea2e104649df4736f7b21e823b6086b390ece7425e5405c00010400000000000010000000000000000000000000000000000000000000000040000000000000000300000000000000040000000000000004000000000000000100000001000000000000001000000000000000

Security consideration

You will get different bytes when running the same command, this behavior is intendly designed to avoid Replay Attack. Sight Oracle will reject the same bytes input if someone extract from your request and submit the same bytes as their transaction input.

Submit encrypted value to Sight Oracle

Now that you have the bytes input, use it in Sight Oracle's SaveCiphertextRequestBuilder.

function newSaveCiphertextRequest(
        address requester,
        bytes calldata ciphertext, // Use it here
        uint8 ciphertextType,
        address callbackAddr,
        bytes4 callbackFunc
    )

SaveCiphertextRequestBuilder is deprecated and may remove in furture version, use RequestBuilder instead.

Or use it for following operations with RequestBuilder:

  • function saveEuint64Bytes(Request memory r, bytes memory euint64Bytes) internal pure returns (op) {
  • function saveEboolBytes(Request memory r, bytes memory eboolBytes) internal pure returns (op)
  • function saveEaddressBytes(Request memory r, bytes memory eaddressBytes) internal pure returns (op){

Last updated