{"info":{"_postman_id":"5cbdd696-0e74-48a8-b692-653f0c18cfa2","name":"Sun wallet microservice + Biconomy + Gnosis","description":"<html><head></head><body><p>With this micoservice SunWallet app users can do FREE transactions, send assets, swap and trade them.</p>\n<p>The microserviice use Biconomy for meta-transactions and Gnosis for smart contract wallet (SCW).</p>\n<p>Users can own only 1 SCW and the crypto assets should be hold on that SCW address. The sources of SCW is secure and forked from <a href=\"https://gnosis-safe.io/\">Gnosis</a>. Only the owner of SCW can manage assets.</p>\n<p>All public requests protected by Bearer authentication key.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"19609797","collectionId":"5cbdd696-0e74-48a8-b692-653f0c18cfa2","publishedId":"UVknsbBn","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-02-22T20:42:07.000Z"},"item":[{"name":"Create proxy contract (SCW)","id":"90257819-c16e-4c3b-9f6b-f51cd99c94f7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"bearer_auth_token"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"userWallet\": \"0x2fA6aB1abd2F0F4f1313a863590C27C60B7169E3\"\n}"},"url":"host_url/createContractWallet","description":"<p>Method for create SCW wallet for provided user, protected with bearer token auth.</p>\n<p>If method executed successfully it returns object.</p>\n<ul>\n<li>If user already owned a contract wallet, method will return an existing data</li>\n<li>Transaction status will be changed immidiatly after block confirmation</li>\n</ul>\n","urlObject":{"path":["createContractWallet"],"host":["host_url"],"query":[],"variable":[]}},"response":[{"id":"83857112-0e5d-42f0-ab0a-2d2f50d3ede4","name":"Create proxy contract (SCW)","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer bearer_auth_token","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"userWallet\": \"0x2fA6aB1abd2F0F4f1313a863590C27C60B7169E3\"\n}"},"url":"host_url/createContractWallet"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Etag","value":"W/\"bd-DtducP1ULyCHphw/D0XetAnj/JM\""},{"key":"Function-Execution-Id","value":"v7pden5rv5k5"},{"key":"X-Cloud-Trace-Context","value":"c65e0f58f277b7c8054963e895727236;o=1"},{"key":"Date","value":"Tue, 22 Feb 2022 20:36:44 GMT"},{"key":"Server","value":"Google Frontend"},{"key":"Content-Length","value":"189"},{"key":"Alt-Svc","value":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""}],"cookie":[],"responseTime":null,"body":"{\n    \"nonce\": \"0\",\n    \"status\": \"SUCCESS\",\n    \"contract\": \"0x166c455175279cd3bc67196c1182354f1ec49c28\",\n    \"creationTx\": \"0x82029d717b71ccc12b26ff1522a9c72461abe17894ba65d569b8e35ffa403892\",\n    \"whitelisted\": true\n}"}],"_postman_id":"90257819-c16e-4c3b-9f6b-f51cd99c94f7"},{"name":"Get user data","id":"9a7746ef-195a-4599-b8b2-07d082f04e5f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"bearer_auth_token"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"userWallet\": \"0x2fA6aB1abd2F0F4f1313a863590C27C60B7169E3\"\n}","options":{"raw":{"language":"json"}}},"url":"host_url/getUserData","description":"<p>Method returns user contract address, nonce and SCW creation transaction hash. Protected with bearer token auth.</p>\n<p>User SCW contract address is permanent, but nonce value will be updated after each meta-transaction (auto increment),</p>\n","urlObject":{"path":["getUserData"],"host":["host_url"],"query":[],"variable":[]}},"response":[{"id":"311cade4-5154-46b7-a736-1f57f09983b0","name":"Get user data","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","type":"text","value":"Bearer bearer_auth_token"}],"body":{"mode":"raw","raw":"{\n\t\"userWallet\": \"0x2fA6aB1abd2F0F4f1313a863590C27C60B7169E3\"\n}","options":{"raw":{"language":"json"}}},"url":"host_url/getUserData"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Etag","value":"W/\"bd-CnLRjfGJos4ThRqKPLZeecWtV5w\""},{"key":"Function-Execution-Id","value":"8hwtwrflwf8u"},{"key":"X-Cloud-Trace-Context","value":"4758209032ce5f18b5649be1a8602b75;o=1"},{"key":"Date","value":"Tue, 22 Feb 2022 20:17:08 GMT"},{"key":"Server","value":"Google Frontend"},{"key":"Content-Length","value":"189"},{"key":"Alt-Svc","value":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""}],"cookie":[],"responseTime":null,"body":"{\n    \"nonce\": \"0\",\n    \"status\": \"SUCCESS\",\n    \"contract\": \"0xc05288cE5Ba3673A80e757519526d88B84cA3a51\",\n    \"creationTx\": \"0xa55ed5a5a19576c8f2be9c8a30f069f8a746223374b2268d9b19e1ec7da70c94\",\n    \"whitelisted\": true\n}"}],"_postman_id":"9a7746ef-195a-4599-b8b2-07d082f04e5f"},{"name":"Get signature for execution","id":"6dad3875-31dc-4009-8c3e-1991bef0325e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"bearer_auth_token"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"userWallet\": \"0x2fA6aB1abd2F0F4f1313a863590C27C60B7169E3\",\n\t\"walletPrivateKey\": \"2316ba2f7ec2592669e83c0940c767a3238a59f0631fc7fe06b2a2b796153e23\",\n\t\"toAddress\": \"0x2ea96239E348E28C0A2EDf22aAAcC547C2EbcE55\",\n\t\"value\": \"0.1\",\n    \"data\": \"0x\"\n}"},"url":"host_url/getSignature","description":"<p>This method is temporary, and should be used for demonstration. After the release it should be removed!</p>\n<p>The endpoint does the logic, which should be implemented on frontend/mobile side later. User need to prepare and sign some data with private key, and send it to endpoint.</p>\n","urlObject":{"path":["getSignature"],"host":["host_url"],"query":[],"variable":[]}},"response":[{"id":"8baadc91-0bc5-415c-9911-e6df1e9bc149","name":"Get signature for execution","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer bearer_auth_token","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"userWallet\": \"0x2fA6aB1abd2F0F4f1313a863590C27C60B7169E3\",\n\t\"walletPrivateKey\": \"2316ba2f7ec2592669e83c0940c767a3238a59f0631fc7fe06b2a2b796153e23\",\n\t\"toAddress\": \"0x2ea96239E348E28C0A2EDf22aAAcC547C2EbcE55\",\n\t\"value\": \"0.1\",\n    \"data\": \"0x\"\n}"},"url":"host_url/getSignature"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Etag","value":"W/\"1d3-NFC46eX+ENBd+8htmp6Fvk1Ua3s\""},{"key":"Function-Execution-Id","value":"p9u05nyk10t3"},{"key":"X-Cloud-Trace-Context","value":"e7ce4e0384de678d55093ee8b4b917e9;o=1"},{"key":"Date","value":"Tue, 22 Feb 2022 20:35:14 GMT"},{"key":"Server","value":"Google Frontend"},{"key":"Content-Length","value":"467"},{"key":"Alt-Svc","value":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"0x6cbe988fc0e0c2ddc062670fe171a2ec89bc48676dbf5c2571a26301f1d64cf7\",\n    \"messageHash\": \"0xc5899a2c862b4f5bd8d0b64892006516b4adeecf4623e50a8d518fe88ee34f0f\",\n    \"v\": \"0x1b\",\n    \"r\": \"0x7652ef354faa27c69aa1be5108994c17a2e9bfa8e72eaf6b20f655a96f38f326\",\n    \"s\": \"0x68447288fbe9997a30c9ee5a720fb303d5aa1ce3284416a3933b996ff0086575\",\n    \"signature\": \"0x7652ef354faa27c69aa1be5108994c17a2e9bfa8e72eaf6b20f655a96f38f32668447288fbe9997a30c9ee5a720fb303d5aa1ce3284416a3933b996ff00865751b\"\n}"}],"_postman_id":"6dad3875-31dc-4009-8c3e-1991bef0325e"},{"name":"Execute meta transaction","id":"8ff1e985-b378-4be9-a616-00e88da4f112","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"bearer_auth_token"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"userWallet\": \"0x2fA6aB1abd2F0F4f1313a863590C27C60B7169E3\",\n\t\"destinationAddress\": \"0x2ea96239E348E28C0A2EDf22aAAcC547C2EbcE55\",\n\t\"value\": \"0.1\",\n    \"data\": \"0x\",\n\t\"signature\": {\n        \"message\": \"0x31dad30b2a2cc0b66527295f4cb280ca9387a99911ce861910fc02dabc7fd4c5\",\n        \"messageHash\": \"0xe67ab3fe5c58222077e318f4fe61e9d1eb00fbdca1cdc622321746763aefba94\",\n        \"v\": \"0x1c\",\n        \"r\": \"0x4afb7e1061bacc97121f167644756428559808e5ff624c960c390e671cdbc226\",\n        \"s\": \"0x6a39e47d40501e4832056328a7932d4eda6ab96745556474fb5ef848bbf07292\",\n        \"signature\": \"0x4afb7e1061bacc97121f167644756428559808e5ff624c960c390e671cdbc2266a39e47d40501e4832056328a7932d4eda6ab96745556474fb5ef848bbf072921c\"\n    }\n}"},"url":"host_url/executeMetaTx","description":"<p>Method for do meta-transactions, protected with bearer token auth.</p>\n<p>With this method users can transfer assets or call smart contract methods from SCW contract. </p>\n<p>The mobile/frontend should prepare special method hash and sign it with user private key.</p>\n<p>If request is success method returns the transaction hash.</p>\n","urlObject":{"path":["executeMetaTx"],"host":["host_url"],"query":[],"variable":[]}},"response":[{"id":"995d97b2-2cdb-4d8f-bc0c-fd7cfafd51b7","name":"Execute meta transaction","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","type":"text","value":"Bearer bearer_auth_token"}],"body":{"mode":"raw","raw":"{\n\t\"userWallet\": \"0x2fA6aB1abd2F0F4f1313a863590C27C60B7169E3\",\n\t\"destinationAddress\": \"0x2ea96239E348E28C0A2EDf22aAAcC547C2EbcE55\",\n\t\"value\": \"0.1\",\n    \"data\": \"0x\",\n\t\"signature\": {\n        \"message\": \"0x31dad30b2a2cc0b66527295f4cb280ca9387a99911ce861910fc02dabc7fd4c5\",\n        \"messageHash\": \"0xe67ab3fe5c58222077e318f4fe61e9d1eb00fbdca1cdc622321746763aefba94\",\n        \"v\": \"0x1c\",\n        \"r\": \"0x4afb7e1061bacc97121f167644756428559808e5ff624c960c390e671cdbc226\",\n        \"s\": \"0x6a39e47d40501e4832056328a7932d4eda6ab96745556474fb5ef848bbf07292\",\n        \"signature\": \"0x4afb7e1061bacc97121f167644756428559808e5ff624c960c390e671cdbc2266a39e47d40501e4832056328a7932d4eda6ab96745556474fb5ef848bbf072921c\"\n    }\n}"},"url":"host_url/executeMetaTx"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Etag","value":"W/\"54-OPpPHYTqRRDOIqJLsnXWMJio3fs\""},{"key":"Function-Execution-Id","value":"hik7ojwqdrz0"},{"key":"X-Cloud-Trace-Context","value":"e952132e0ff49eefc166c19692670c9c;o=1"},{"key":"Date","value":"Tue, 22 Feb 2022 20:39:03 GMT"},{"key":"Server","value":"Google Frontend"},{"key":"Content-Length","value":"84"},{"key":"Alt-Svc","value":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""}],"cookie":[],"responseTime":null,"body":"{\n    \"transaction\": \"0xeb9d4dbac5ea84e1c4dcf00c975ee54592396537c78634a579db6fbc3a6b671b\"\n}"}],"_postman_id":"8ff1e985-b378-4be9-a616-00e88da4f112"}],"event":[{"listen":"prerequest","script":{"id":"93290e03-9828-4ba6-bbd0-01416fbd4846","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"c73175ac-9943-4304-a523-f6d3f069b971","type":"text/javascript","exec":[""]}}],"variable":[{"id":"bedbeb3d-2966-4498-b1ff-b9e0ef6552c4","key":"BEARER","value":"bearer_auth_token"},{"id":"708c25c6-b717-45e7-bc20-b5d31561c624","key":"HOST","value":"host_url"},{"id":"9b969b5e-5b89-43a6-bed6-1343280584a2","key":"DEV_HOST","value":"dev_host_url"}]}