├── .eslintrc.cjs ├── .github └── workflows │ └── build.yml ├── .gitignore ├── .prettierignore ├── .prettierrc ├── .rustfmt.toml ├── .sqlx ├── query-05bdd19eb31d4052f22f55021108733659fa1b636259c3aa36e10a823404c5fa.json ├── query-05c5b5fb801065c07a336435c72c318e7cd5ccdfde04660ea9d8e4de00cbeafd.json ├── query-06597c3a99e3ac6448ef9ab5f46f7e80b9e84294af7b626712e4f13a7f23468b.json ├── query-06802a4efba6dc3e16e65769f739dd1506bb3ac5b040e71c70a6f929e6a49f44.json ├── query-08603dd734a2434722e2243d61a44577d5eb89f5d546db3b7f87b37bd420737d.json ├── query-09f846328374776c4980a0f6ca31b29fbce2044d7601c642c88a6da5b131e4af.json ├── query-0a154eb3d84e9224d7f88acde6a2ecfa0cb47a5977f9dd9434247117ebc7a3ca.json ├── query-0a55a34cdc4bd0cb4c0514ab938f061de3ceb1ac6b1c0dd4de92149ed2c4494a.json ├── query-0bd50a041814da8532dde48fd00f056204957e615443d30e0c1ede98af4e5519.json ├── query-0e221ba6a44bdd687317f09e1003803d8c3e38cb0101e01af1ed59bd7f64e078.json ├── query-0fb39ae38c33ccebf86306bbd284c6422043c4cc92fbe1eb5779b4a3449002c9.json ├── query-10e105b51b9a1c4a9a92bb85b0d1c1ea21f7e636299e33d295c4d08bcc78cdac.json ├── query-128ef3d7d903189eea35f141e1fa295f7116bbc3674f64a2ae680aef0fa33256.json ├── query-14658cf99ae1c0de7ee9ba9f20b2487215a1824d255f5a1bfcf1021ef4ad3bee.json ├── query-1697370a7e61f088e103f2d8e1977e9ac441d499a1557331b4e29ace0843c08f.json ├── query-16f87160e00064a9692f32cf5afa3bb56b2b9d44dddafba6bdbcdc24a40cfb6a.json ├── query-18d3d050762544ca73050ff24bec4dddf34afffa9ab95e17eaebf2eac7cc1ca6.json ├── query-193aa911a0d0a4df1258102a595ba45a144f738dfc5896eb8db568d2f5794168.json ├── query-1f02b69aed85e466920cf1890d478d481723d70c83c4370f4c528a574a69e7eb.json ├── query-20382f9dec9385edf45692693fc58023d693b345002efdeb8ee9ba50a44e3f59.json ├── query-2038867d267903ab3730dee28abc3f09b6c88adda86af655522a11be2ce1e172.json ├── query-20505bc0166a86dc2be61d1ce71251533e25a0291ce0f05f4f68c70cb6daba94.json ├── query-211edf13476a2c9e6bfb5d3b026c03ce433aa3e425e0ca136766591d10497281.json ├── query-23e9f0827989fb19576fb9bd37cd797f770c0126f4b0c9ee86c7c39a78529497.json ├── query-24ea4bd05a6542302f7baa5a41b78acde5237581748cdea39893cc4ae99b1998.json ├── query-2698bed1b4a0d3d753b8357d3debdaf0b4f0aed18e288f55c7e0963f187e1500.json ├── query-26f35685c520800fcac9aa39af5eda01d241729c617dcefb200e4490bafb75ef.json ├── query-275b72aec6c3642621c64403265debc939d2d2e4c3fc788ce2a492eb5c2840d6.json ├── query-2b20bc5b625d46f0cf5b886b229fcf4caa0fa983bb207521dc91fc523c0eedb6.json ├── query-30a898b6a469141ebdc0093536dd8003235153dcfba83e47d8b35a7888a0fc66.json ├── query-30ebf1aa19c50530c019d217be1e5647fc77980c79dce94edc1aa5771b5b725f.json ├── query-32da3c0d8d84766a57e4b992d4ff4767500966b7e5d13ec385dca0028e0cf7fa.json ├── query-34ac3069ef637b91e7bc06b1dc9b779cb34a573befc9027418d4791fa381375d.json ├── query-37bd891013a2e43f4daaf084b0b21f535e373a878e2a8acc8a15e17cf66e1dea.json ├── query-38e31984cf599af11b261493d8196aa6c9efc623610bdbc841b944588c10cf04.json ├── query-3b048718fa92886636e58a225c03d29d0fc87f8187bf2c856aed6e324cebbc73.json ├── query-3b1eab15a2414f6edb8a5ea98a4e78f4145959c20b1854ce867af247a509327f.json ├── query-47d39211fec4faae5520769cb47b3f6f1e0e8f106c1d5b4423abb09544a55040.json ├── query-4a11391d34af85600ef2df66d5ac03ea1b14e6753763c02c23ca879d08bf71b7.json ├── query-4b49177ead33e2c1ade773c28a84c10f05d690f615fa9d91b90329c86d8a38a5.json ├── query-4d0c70f825bfd512daa0b520d2d4e1a99f5cd363ffaafd9b79306ad9e131f2ab.json ├── query-4e4f8169ea7bb563413fc740092fc0441bff904d4220a8030e95479624801027.json ├── query-4e57a9bc7318609e6c2b2fe3130f64350fe914edea4a35d21dbf77bd687c1eb4.json ├── query-4fc797762589a9e2e86965a8d92edd9110a65bfacd3008d28e0e9440b1f65301.json ├── query-4feca15039a86c86f18e0019ebe51cab01b0552f3465c4b80ec24280d8ed50ca.json ├── query-5023da5b532e946c8e7b13448d2ff5f92d068bce71e153eebacdaebfe310420b.json ├── query-52c521c4bb43566e5af15059e685f26111fbef0d32183bb1fdce95805dea8d33.json ├── query-54bc4e8d02f738e808a018731322fc235b8b5b14e6243900d1673089f12c2507.json ├── query-56cf5d987d1c176bb5254b21c7d3ef5f293d117434fdf14fe6646afce74e77d8.json ├── query-579cf65be1ff023aca72dfcd60ebd3883e75bb092b4ac965411f24fa4a3b96d2.json ├── query-58a5fc4e0127de1f53d3071b1d7597ef0088d86a2fa00036dc8d8f0eefc5f156.json ├── query-593ff26761c8cc24690c2bfefdc08703daf515f8da64299a1f82df5e2ca609c4.json ├── query-59d61d8b1794878c7acbcc45c304b7943277fdf5f4263e5827a3b2b4255f468e.json ├── query-5e339e5d8783b0323d4fbb402826a14c2587b27426635e68942a5526a6a00b8c.json ├── query-5e37c04f21a27b0fc6d2f9601c3431b27088d9184f057d65ab3905f871f75f45.json ├── query-64b3d98ba64e09e6a5c1b91dbea0a8de088736f910c7e6febb3884691323c6b0.json ├── query-65c223a91702ea7b5e4e4483f1dd9ae3f3f7f2c42a7776b6ada4e6f51dd25fb6.json ├── query-6845c1ccfd21971b75aeed84b8b65ca9044f8c312bedeff84f7b43a7d8828ca6.json ├── query-6c9af1c832bcead88d180b884b4bf8301dff3615197f78ecbf238529030c5930.json ├── query-6d70a25c3dc7e5d3507a28d5394bb5041032fd39983269421d9884d43259314c.json ├── query-6dcfb331c63266208f3d1a06bc0641c70f6145fc77d12419f4bb495067d11081.json ├── query-6fe095fd12b12a8223963f2569f59940a39d9665aedafdfc781b277f1e43a1ec.json ├── query-704b7ef0f010994311ed21c209a166f7ea91fd21969cf1b9e8d095c51b1cd675.json ├── query-72c9608d6e6a3deefc13e74e367861d96ec5e166b3375a365f6938a43aff5c11.json ├── query-76438520a51fa88577083a3afbb93c9228c8e9d3599ef18ac27b3eb21fe62493.json ├── query-7ac44bd2934972682709ad97f7f01827988910b5ec9e7a0cab753c8f7d7fc0a9.json ├── query-7ec2a8e891186eceea5d05cacf13fa2645c556524114b07890411811ef6f375c.json ├── query-8006fbdcf0e72b03dfd11c7d5a4a63aaa446a546284fcc67a70106303d8e1829.json ├── query-808635aff0ab3dd13109fec8dbac511d2f781525bfa22dd83617e512e0c0efbb.json ├── query-82e25960cba013361d6f302dbf318841dd4c45ebf343d91d51eb82f425dcccc3.json ├── query-8a1d2035972caef23b9812e76a6ab707de72cab08ef668505ad13096532a058a.json ├── query-8a728911b3877476b9649f890645c5b658d377a98d7c6fe8952fd6c9f7da6d84.json ├── query-8ad96df6ec8bead1764dfb3e85f28c608fe60cddcfbfe56566b631763ac7bae5.json ├── query-8ed50206e026ccd548134de70e7cdeb02e95f99befdc94c3db861c86d0a2827e.json ├── query-955b4fba4689c0ae0a5eb46631fdc38ed92ac74d690c3f5a70a1fb94d9164a89.json ├── query-95658e1a150b0c39be8a3061a65d4224218de0770010d2548803586389e0daaf.json ├── query-957be4a61c0438d1ea008fbf9288f755bdb7b31770078f6260fcd13fc81a3364.json ├── query-95cd0c18c584c6bfa4e327906d0711a8dbb63d744e569f44e52e0cd9686ef3ea.json ├── query-9738b036011c30ae2d1417ba38476c60e55e3debc90ea7205d08f182865aa980.json ├── query-9919b58097851e0ba213cddd61673d78156251d9ee5475f1fab50696139c4997.json ├── query-99ccce96cc2ec334724a1ff115c4f09114d37e70b84c3c1b2277c58ffe01adfc.json ├── query-99f82770337e8817fc98076f2c7a942f70b2c808b990078a0afedb589da24298.json ├── query-9b57663e0de9a8296a221242ff363e9a7d8e503afacc87df9e340f0042a86b86.json ├── query-a19602191b734f77355f83d6ba469251e360f743ad338cf36706d1689d74c5b4.json ├── query-a1dcbfe54b8cbdfd3b8760ca225c168eb04d423fccd6d0e3d408d0dc733fab34.json ├── query-a21166c21fa64a3bc44aeda9035c5759059d5543076eb901bd2ae443d9c89f3a.json ├── query-a27a932fd61aff027c2416fa86fd625bf7ce1a7ab5d0bf254df504b8708893c9.json ├── query-a491d525db244a1d652c603b177ab5a798f65477480750946ae6b982bac32ddc.json ├── query-a93526d49ab50f772b1c359d3ab88ef45570143ed28f265d76c6e17efdd12dce.json ├── query-a9820412ca803927e7d195db8d1f90ce25c5a99870e6a3a248cb1cecd912cd23.json ├── query-ac56599044f381115785e659ed4a52d74dc2502e7d3f73539b805bc77f38604a.json ├── query-ae767c36d341dac05bcc53e3bbae85358661c8c3c8c285074d1bbee18e3f8250.json ├── query-b1107c7179c86c248b75414ee0bbb457126896eedd6ebd925203c4b6df464976.json ├── query-b149fb8c13040be35c66ad83a26ff681cb0482e08e99b214d199a36a2c570859.json ├── query-b2c427e39098073050e4a92c94492de21f1a89a47bc0d1e5af7094bab5230a68.json ├── query-b4ad9892410265bb0a06e51d8de8eb35e1c2bcfb1a276f633cf2493f2038231f.json ├── query-baf4a9108bf169fcbfa69969a4dc9b94265f7d71abd1646ce839e8e7941a2a90.json ├── query-bcd575c48884cbc133f407af02fb963d47a8ef0326e3dbb5dc8ab5654d1f392c.json ├── query-be2448253ba62dbb2b57d24f7347ba0924b3015a31108cfc8d4a9c3d494c192c.json ├── query-be4915e1e47971f74f9972e4b78fc645cb9cfc8d6d14d817ff09738b78f38524.json ├── query-c28c5534fa54f929c81d02b31276dfb5d621da40c7adc621a055e9b72d4dae30.json ├── query-c3eda0483d42cf1dc0ab7ea0fc8712469e66b6c4f7661f81c44c278d8ef48841.json ├── query-c4a5ecd631de42f851bf90100d8f62de5b0181d60dda8670065ad8702ba13aba.json ├── query-c4dac44b028c930fbf91d0459a8ba23c5d97ac61b9bc649fe7fa2f4881a2ded7.json ├── query-c705ffec23bfb844c9b1032ae37d10f84bb89461e4acbeaadde7230943b2576b.json ├── query-c7e2c303ecfe666535e9a21e0d8e64103d4fe702e201c61ba2c5d5453fb8843c.json ├── query-cc24879f9012f1e056cc0fcfc664437aee6a72b858918c0ca70776ef36b50f33.json ├── query-ccdbb66c8c90b0117b5919a92c2785d7570b967a9a3a266163809a241308415d.json ├── query-ce2df892fe8381ec398f0b97741d36faf3c00c70aae47ec3818462e29a4e400a.json ├── query-d00ab63cf624ef6b712c93e3a30442776c696ad3da620627fd2db2e05d6ade3a.json ├── query-d033d94daf4703a65deb9d902aa3014828efe2982d8631aabcaf2508a345216c.json ├── query-d2de3c63e1eb71899f0635182fe94ea68e9fbe9caa5bf25c8873c3e82262ade5.json ├── query-d2defd73743b149b96d3e5e9597f433128d7f5144e30c4b5371e0a87dd5caabf.json ├── query-d42c88a6e6ae43215089b798e6c021e03bf58c55439f7e3bead0d8aa3db18863.json ├── query-d5d05aafad60309b27bb7e7ac9392b8c2e486aa26262d82f2c0ce89fdd19d70b.json ├── query-d64cd2cc9b3770abe5856ed378d407a274821528b71c61ae275bcc4fc821eddf.json ├── query-d8df76631005b43bc5870a2337d8e1d44beaab6b0f6f9d0744f449967342b517.json ├── query-da4555012028d63d9d53a85c6247f0cc8eefbd24c6091ec6d465f52da3490202.json ├── query-dbfe6794b0d552111c01cec93995a4af753cbee36b430767e372debb5df15ce4.json ├── query-ddb15714a57d0084e6766e94b28c9090812dc6ba093d364b0732bc2f8e348e83.json ├── query-ddb6fea0a5725460382c09bf61fff370567e194f16fe55aae3059a98bccd28e3.json ├── query-de732b1577723b588fc9b5855074acbb44e2eb40b909da5316600bc8de74569a.json ├── query-de8da54c8ad83b7d81c49b1866d87d733ee46365df08154d151eee1e97b95381.json ├── query-e01303c64eddb3a9064f553abec45c7447299857efa935e9109b102ad6d59c27.json ├── query-e0db9e9d4087d424a9ac831f673f622bd569b117ba045f65e3afe29dc95cb82c.json ├── query-e402dbc527157d8d32ee0a0093e2f1c3b5f2f0e95a392b57752bae69421f0514.json ├── query-e531b06fc1144b65d9c3821b89d8ec5a95a7e12c74636270d37e45afd9c96f32.json ├── query-e575ae62f524a270ef62da4ace6b8e3275484860cdc8e70ccd97b13061230f9e.json ├── query-e87cae330e1ce739c1ddf2cdbf3b5537719edeec73b4d9b10f85b913cff8a03a.json ├── query-ea4bb56089373de61b9d5e4f7865c1090b0f684567d1e4de391373d3b36faa9d.json ├── query-ecdabf3ddfb2b9e7ddaee36c57cee4818b113faad1fa6169e486a7a1bc1be4da.json ├── query-ee307ddbdd1ededf7d89140b631763945ae6ce871d40d7c6f627379ea7c80e14.json ├── query-f359ce154cf02af67d1de36d43fe0d875561ec8f7fa77d81455ade2dd12305c0.json ├── query-f78c569713a5c185a26f6e154881dd2b970bc97c12285e92f638916f3f7270bb.json ├── query-f9a4af9ab64ff0d5534dcacd98c14389ad37bb8163b360f4926d7177749ca69d.json ├── query-fbf2bab0983da7407305d09a38f70ee19845f21d3ae0b8281ce059a98a49fced.json ├── query-fe0f5937a4656a93de70df4db1c8e1647c1023b3132f913d287097337e7df483.json ├── query-fe6fa6692a17c1f93c883c4ededcf7235705166af82c6b5d5ea8863f9a3846d4.json ├── query-ffeb193a66da6b7d218b6e21353dcf3854a56af2ae3bb1d31a5334db682b7471.json └── query-fffa560e5861900542cef64dbe9be940485eea480762caf4e602732f9c5bfc73.json ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── components.json ├── crates ├── sage-api │ ├── Cargo.toml │ ├── endpoints-tauri.json │ ├── endpoints.json │ ├── macro │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ └── src │ │ ├── events.rs │ │ ├── lib.rs │ │ ├── records.rs │ │ ├── records │ │ ├── cat.rs │ │ ├── coin.rs │ │ ├── derivation.rs │ │ ├── did.rs │ │ ├── nft.rs │ │ ├── nft_collection.rs │ │ ├── offer.rs │ │ ├── offer_summary.rs │ │ ├── peer.rs │ │ ├── pending_transaction.rs │ │ ├── transaction.rs │ │ └── transaction_summary.rs │ │ ├── requests.rs │ │ ├── requests │ │ ├── actions.rs │ │ ├── data.rs │ │ ├── keys.rs │ │ ├── offers.rs │ │ ├── settings.rs │ │ ├── transactions.rs │ │ └── wallet_connect.rs │ │ ├── types.rs │ │ └── types │ │ ├── address_kind.rs │ │ ├── amount.rs │ │ ├── asset_kind.rs │ │ ├── error_kind.rs │ │ ├── key_info.rs │ │ └── unit.rs ├── sage-assets │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ ├── nfts.rs │ │ └── nfts │ │ ├── chip0007_metadata.rs │ │ ├── fetch_nft_uri.rs │ │ └── thumbnail.rs ├── sage-cli │ ├── Cargo.toml │ └── src │ │ ├── main.rs │ │ └── rpc.rs ├── sage-client │ ├── Cargo.toml │ └── src │ │ ├── error.rs │ │ └── lib.rs ├── sage-config │ ├── Cargo.toml │ └── src │ │ ├── config.rs │ │ ├── lib.rs │ │ ├── network.rs │ │ ├── old.rs │ │ └── wallet.rs ├── sage-database │ ├── Cargo.toml │ └── src │ │ ├── blockinfo.rs │ │ ├── coin_states.rs │ │ ├── derivations.rs │ │ ├── lib.rs │ │ ├── offers.rs │ │ ├── peaks.rs │ │ ├── primitives.rs │ │ ├── primitives │ │ ├── cats.rs │ │ ├── dids.rs │ │ ├── nfts.rs │ │ └── xch.rs │ │ ├── rows.rs │ │ ├── rows │ │ ├── cat.rs │ │ ├── cat_coin.rs │ │ ├── coin_state.rs │ │ ├── collection.rs │ │ ├── derivation.rs │ │ ├── did.rs │ │ ├── did_coin.rs │ │ ├── nft.rs │ │ ├── nft_coin.rs │ │ └── offer.rs │ │ ├── transactions.rs │ │ └── utils.rs ├── sage-keychain │ ├── Cargo.toml │ └── src │ │ ├── encrypt.rs │ │ ├── error.rs │ │ ├── key_data.rs │ │ ├── keychain.rs │ │ └── lib.rs ├── sage-rpc │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ └── tls.rs ├── sage-wallet │ ├── Cargo.toml │ └── src │ │ ├── child_kind.rs │ │ ├── coin_kind.rs │ │ ├── database.rs │ │ ├── error.rs │ │ ├── lib.rs │ │ ├── queues.rs │ │ ├── queues │ │ ├── blocktime_queue.rs │ │ ├── cat_queue.rs │ │ ├── nft_uri_queue.rs │ │ ├── offer_queue.rs │ │ ├── puzzle_queue.rs │ │ └── transaction_queue.rs │ │ ├── sync_manager.rs │ │ ├── sync_manager │ │ ├── dns.rs │ │ ├── options.rs │ │ ├── peer_discovery.rs │ │ ├── peer_state.rs │ │ ├── sync_command.rs │ │ ├── sync_event.rs │ │ └── wallet_sync.rs │ │ ├── test.rs │ │ ├── transaction.rs │ │ ├── utils.rs │ │ ├── utils │ │ ├── fetch_nft_did.rs │ │ ├── fetch_nft_offer_details.rs │ │ ├── offchain_metadata.rs │ │ └── submit.rs │ │ ├── wallet.rs │ │ ├── wallet │ │ ├── cat_coin_management.rs │ │ ├── cat_spends.rs │ │ ├── cats.rs │ │ ├── coin_selection.rs │ │ ├── derivations.rs │ │ ├── did_assign.rs │ │ ├── dids.rs │ │ ├── memos.rs │ │ ├── multi_send.rs │ │ ├── nfts.rs │ │ ├── offer.rs │ │ ├── offer │ │ │ ├── aggregate_offer.rs │ │ │ ├── cancel_offer.rs │ │ │ ├── lock_assets.rs │ │ │ ├── make_offer.rs │ │ │ ├── offer_coins.rs │ │ │ ├── parse_offer.rs │ │ │ ├── payments.rs │ │ │ ├── royalties.rs │ │ │ ├── take_offer.rs │ │ │ └── unlock_assets.rs │ │ ├── p2_coin_management.rs │ │ ├── p2_send.rs │ │ ├── p2_spends.rs │ │ └── signing.rs │ │ └── wallet_peer.rs └── sage │ ├── Cargo.toml │ └── src │ ├── endpoints.rs │ ├── endpoints │ ├── actions.rs │ ├── data.rs │ ├── keys.rs │ ├── offers.rs │ ├── settings.rs │ ├── transactions.rs │ └── wallet_connect.rs │ ├── error.rs │ ├── lib.rs │ ├── peers.rs │ ├── sage.rs │ ├── utils.rs │ └── utils │ ├── coins.rs │ ├── confirmation.rs │ ├── offer_status.rs │ ├── offer_summary.rs │ ├── parse.rs │ └── spends.rs ├── index.html ├── lingui.config.js ├── migrations ├── 0001_setup.sql ├── 0002_offers.sql ├── 0003_offer_fix.sql ├── 0004_transactions.sql ├── 0005_nft_hash.sql ├── 0006_nft_search_indices.sql ├── 0007_owner_did_indices.sql ├── 0008_duplicate_search_fix.sql ├── 0009_rust_migrations.sql ├── 0010_blockinfo.sql ├── 0011_thumbnails.sql ├── 0012_drop_fts_tables.sql ├── 0013_nft_edition.sql └── 0014_nft_edition_indexes.sql ├── package.json ├── pnpm-lock.yaml ├── postcss.config.js ├── rust-toolchain.toml ├── src-tauri ├── .gitignore ├── Cargo.toml ├── build.rs ├── capabilities │ ├── default.json │ ├── desktop.json │ └── mobile.json ├── gen │ ├── android │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── app │ │ │ ├── .gitignore │ │ │ ├── build.gradle.kts │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── rigidnetwork │ │ │ │ │ └── sage │ │ │ │ │ └── MainActivity.kt │ │ │ │ └── res │ │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ ├── drawable │ │ │ │ └── ic_launcher_background.xml │ │ │ │ ├── ic_launcher-web.png │ │ │ │ ├── layout │ │ │ │ └── activity_main.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-ldpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── playstore-icon.png │ │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ ├── strings.xml │ │ │ │ └── themes.xml │ │ │ │ └── xml │ │ │ │ └── file_paths.xml │ │ ├── build.gradle.kts │ │ ├── buildSrc │ │ │ ├── build.gradle.kts │ │ │ └── src │ │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── rigidnetwork │ │ │ │ └── sage │ │ │ │ └── kotlin │ │ │ │ ├── BuildTask.kt │ │ │ │ └── RustPlugin.kt │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ └── apple │ │ ├── .gitignore │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── AppIcon-20x20@1x.png │ │ │ ├── AppIcon-20x20@2x-1.png │ │ │ ├── AppIcon-20x20@2x.png │ │ │ ├── AppIcon-20x20@3x.png │ │ │ ├── AppIcon-29x29@1x.png │ │ │ ├── AppIcon-29x29@2x-1.png │ │ │ ├── AppIcon-29x29@2x.png │ │ │ ├── AppIcon-29x29@3x.png │ │ │ ├── AppIcon-40x40@1x.png │ │ │ ├── AppIcon-40x40@2x-1.png │ │ │ ├── AppIcon-40x40@2x.png │ │ │ ├── AppIcon-40x40@3x.png │ │ │ ├── AppIcon-512@2x.png │ │ │ ├── AppIcon-60x60@2x.png │ │ │ ├── AppIcon-60x60@3x.png │ │ │ ├── AppIcon-76x76@1x.png │ │ │ ├── AppIcon-76x76@2x.png │ │ │ ├── AppIcon-83.5x83.5@2x.png │ │ │ └── Contents.json │ │ └── Contents.json │ │ ├── ExportOptions.plist │ │ ├── LaunchScreen.storyboard │ │ ├── Podfile │ │ ├── Sources │ │ └── sage-tauri │ │ │ ├── bindings │ │ │ └── bindings.h │ │ │ └── main.mm │ │ ├── project.yml │ │ ├── sage-tauri.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── sage-tauri_iOS.xcscheme │ │ └── sage-tauri_iOS │ │ ├── Info.plist │ │ └── sage-tauri_iOS.entitlements ├── icons │ ├── 128x128.png │ ├── 128x128@2x.png │ ├── 32x32.png │ ├── Square107x107Logo.png │ ├── Square142x142Logo.png │ ├── Square150x150Logo.png │ ├── Square284x284Logo.png │ ├── Square30x30Logo.png │ ├── Square310x310Logo.png │ ├── Square44x44Logo.png │ ├── Square71x71Logo.png │ ├── Square89x89Logo.png │ ├── StoreLogo.png │ ├── icon.icns │ ├── icon.ico │ └── icon.png ├── src │ ├── app_state.rs │ ├── commands.rs │ ├── error.rs │ ├── lib.rs │ └── main.rs └── tauri.conf.json ├── src ├── App.tsx ├── bindings.ts ├── boxes.png ├── boxes.svg ├── components │ ├── AddressList.tsx │ ├── AdvancedTransactionSummary.tsx │ ├── AmountCell.tsx │ ├── Assets.tsx │ ├── AssignNftDialog.tsx │ ├── CardSizeToggle.tsx │ ├── CoinList.tsx │ ├── CoinsCard.tsx │ ├── ConfirmationDialog.tsx │ ├── Container.tsx │ ├── CopyBox.tsx │ ├── CopyButton.tsx │ ├── FeeOnlyDialog.tsx │ ├── FormattedAddress.tsx │ ├── Header.tsx │ ├── Layout.tsx │ ├── Loading.tsx │ ├── MarketplaceCard.tsx │ ├── MultiSelectActions.tsx │ ├── Nav.tsx │ ├── NftCard.tsx │ ├── NftCardList.tsx │ ├── NftGroupCard.tsx │ ├── NftOptions.tsx │ ├── NftPageTitle.tsx │ ├── NumberFormat.tsx │ ├── OfferCard.tsx │ ├── OfferRowCard.tsx │ ├── OfferSummaryCard.tsx │ ├── Pagination.tsx │ ├── PasteInput.tsx │ ├── QRCodeDialog.tsx │ ├── ReceiveAddress.tsx │ ├── SafeAreaView.tsx │ ├── SimplePagination.tsx │ ├── StyledQrCode.tsx │ ├── TokenCard.tsx │ ├── TokenColumns.tsx │ ├── TokenGridView.tsx │ ├── TokenListView.tsx │ ├── TokenOptions.tsx │ ├── TransactionColumns.tsx │ ├── TransactionListView.tsx │ ├── TransactionOptions.tsx │ ├── TransferDialog.tsx │ ├── ViewToggle.tsx │ ├── confirmations │ │ ├── AddUrlConfirmation.tsx │ │ ├── CancelOfferConfirmation.tsx │ │ ├── ConfirmationAlert.tsx │ │ ├── ConfirmationCard.tsx │ │ ├── CreateProfileConfirmation.tsx │ │ ├── DidConfirmation.tsx │ │ ├── NftConfirmation.tsx │ │ ├── TakeOfferConfirmation.tsx │ │ └── TokenConfirmation.tsx │ ├── dialogs │ │ ├── CancelOfferDialog.tsx │ │ ├── DeleteOfferDialog.tsx │ │ ├── MakeOfferConfirmationDialog.tsx │ │ ├── NfcScanDialog.tsx │ │ ├── OfferCreationProgressDialog.tsx │ │ ├── ResyncDialog.tsx │ │ └── ViewOfferDialog.tsx │ ├── selectors │ │ ├── AssetSelector.tsx │ │ ├── DropdownSelector.tsx │ │ ├── NftSelector.tsx │ │ └── TokenSelector.tsx │ └── ui │ │ ├── alert.tsx │ │ ├── badge.tsx │ │ ├── button.tsx │ │ ├── card.tsx │ │ ├── checkbox.tsx │ │ ├── data-table-column-header.tsx │ │ ├── data-table.tsx │ │ ├── dialog.tsx │ │ ├── dropdown-menu.tsx │ │ ├── form.tsx │ │ ├── input.tsx │ │ ├── label.tsx │ │ ├── masked-input.tsx │ │ ├── popover.tsx │ │ ├── scroll-area.tsx │ │ ├── select.tsx │ │ ├── separator.tsx │ │ ├── sheet.tsx │ │ ├── skeleton.tsx │ │ ├── switch.tsx │ │ ├── table.tsx │ │ ├── tabs.tsx │ │ ├── textarea.tsx │ │ └── tooltip.tsx ├── contexts │ ├── BiometricContext.tsx │ ├── DarkModeContext.tsx │ ├── ErrorContext.tsx │ ├── LanguageContext.tsx │ ├── PeerContext.tsx │ ├── PriceContext.tsx │ ├── SafeAreaContext.tsx │ ├── WalletConnectContext.tsx │ └── WalletContext.tsx ├── hooks │ ├── useBiometric.ts │ ├── useDebounce.ts │ ├── useDefaultFee.ts │ ├── useDefaultOfferExpiry.ts │ ├── useDerivationState.ts │ ├── useDids.ts │ ├── useErrors.ts │ ├── useInitialization.ts │ ├── useIntersectionObserver.ts │ ├── useLongPress.ts │ ├── useNftData.ts │ ├── useNftParams.ts │ ├── useOfferProcessor.ts │ ├── useOfferStateWithDefault.ts │ ├── usePeers.ts │ ├── usePrices.ts │ ├── useScannerOrClipboard.ts │ ├── useTokenParams.ts │ ├── useTokenState.ts │ ├── useTransactionsParams.ts │ └── useWalletConnect.ts ├── i18n.ts ├── icon-dark.png ├── icon-light.png ├── images │ ├── invalid.png │ ├── mintgarden-logo.svg │ └── missing.png ├── index.css ├── lib │ ├── exportNfts.ts │ ├── exportTokens.ts │ ├── exportTransactions.ts │ ├── formTypes.ts │ ├── marketplaces.ts │ ├── nftUri.ts │ ├── offerData.ts │ ├── offerUpload.ts │ └── utils.ts ├── locales │ ├── de-DE │ │ └── messages.po │ ├── en-US │ │ └── messages.po │ ├── es-MX │ │ └── messages.po │ └── zh-CN │ │ └── messages.po ├── main.tsx ├── pages │ ├── Addresses.tsx │ ├── CollectionMetaData.tsx │ ├── CreateProfile.tsx │ ├── CreateWallet.tsx │ ├── DidList.tsx │ ├── ImportWallet.tsx │ ├── IssueToken.tsx │ ├── Login.tsx │ ├── MakeOffer.tsx │ ├── MintNft.tsx │ ├── Nft.tsx │ ├── NftList.tsx │ ├── Offers.tsx │ ├── PeerList.tsx │ ├── QrScanner.tsx │ ├── Send.tsx │ ├── Settings.tsx │ ├── Token.tsx │ ├── TokenList.tsx │ ├── Transaction.tsx │ ├── Transactions.tsx │ ├── ViewOffer.tsx │ ├── ViewSavedOffer.tsx │ └── Wallet.tsx ├── setup.ts ├── state.ts ├── types │ └── TokenViewProps.ts ├── validation.tsx ├── vite-env.d.ts └── walletconnect │ ├── commands.ts │ ├── commands │ ├── chip0002.ts │ ├── high-level.ts │ └── offers.ts │ └── handler.ts ├── tailwind.config.js ├── tauri-plugin-sage ├── .gitignore ├── Cargo.toml ├── README.md ├── android │ ├── .gitignore │ ├── build.gradle.kts │ ├── proguard-rules.pro │ ├── settings.gradle │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── SageInstrumentedTest.kt │ │ ├── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── SagePlugin.kt │ │ └── test │ │ └── java │ │ └── SageUnitTest.kt ├── build.rs ├── dist-js │ ├── index.cjs │ ├── index.d.ts │ └── index.js ├── guest-js │ └── index.ts ├── ios │ ├── .gitignore │ ├── Package.swift │ ├── README.md │ ├── Sources │ │ └── SagePlugin.swift │ └── Tests │ │ └── PluginTests │ │ └── PluginTests.swift ├── package.json ├── permissions │ ├── autogenerated │ │ ├── commands │ │ │ ├── get_ndef_payloads.toml │ │ │ └── is_ndef_available.toml │ │ └── reference.md │ ├── default.toml │ └── schemas │ │ └── schema.json ├── pnpm-lock.yaml ├── rollup.config.js ├── src │ ├── commands.rs │ ├── desktop.rs │ ├── error.rs │ ├── lib.rs │ ├── mobile.rs │ └── models.rs └── tsconfig.json ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:@typescript-eslint/recommended', 7 | 'plugin:react-hooks/recommended', 8 | 'plugin:lingui/recommended', 9 | ], 10 | ignorePatterns: ['dist', '.eslintrc.cjs'], 11 | parser: '@typescript-eslint/parser', 12 | plugins: ['react-refresh'], 13 | rules: { 14 | 'react-refresh/only-export-components': [ 15 | 'warn', 16 | { allowConstantExport: true }, 17 | ], 18 | '@typescript-eslint/no-explicit-any': 'off', 19 | '@typescript-eslint/no-unused-vars': 'off', 20 | }, 21 | }; 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | 26 | # Rust 27 | target 28 | /.env 29 | /test.sqlite* 30 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | pnpm-lock.yaml 2 | src-tauri/target 3 | src-tauri/gen 4 | .sqlx/ 5 | src/bindings.ts 6 | tauri-plugin-sage/permissions 7 | tauri-plugin-sage/dist-js 8 | tauri-plugin-sage/ios 9 | tauri-plugin-sage/android 10 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 2, 3 | "useTabs": false, 4 | "singleQuote": true, 5 | "jsxSingleQuote": true, 6 | "trailingComma": "all" 7 | } 8 | -------------------------------------------------------------------------------- /.rustfmt.toml: -------------------------------------------------------------------------------- 1 | edition = "2021" 2 | -------------------------------------------------------------------------------- /.sqlx/query-05c5b5fb801065c07a336435c72c318e7cd5ccdfde04660ea9d8e4de00cbeafd.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `coin_states`.`coin_id`\n FROM `coin_states` INDEXED BY `coin_spent`\n INNER JOIN `cat_coins` ON `coin_states`.`coin_id` = `cat_coins`.`coin_id`\n WHERE `spent_height` IS NULL\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "coin_id", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "05c5b5fb801065c07a336435c72c318e7cd5ccdfde04660ea9d8e4de00cbeafd" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-06802a4efba6dc3e16e65769f739dd1506bb3ac5b040e71c70a6f929e6a49f44.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `launcher_id`, `coin_id`, `name`, `is_owned`, `visible`, `created_height`\n FROM `dids`\n WHERE `coin_id` = ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "launcher_id", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | }, 11 | { 12 | "name": "coin_id", 13 | "ordinal": 1, 14 | "type_info": "Blob" 15 | }, 16 | { 17 | "name": "name", 18 | "ordinal": 2, 19 | "type_info": "Text" 20 | }, 21 | { 22 | "name": "is_owned", 23 | "ordinal": 3, 24 | "type_info": "Bool" 25 | }, 26 | { 27 | "name": "visible", 28 | "ordinal": 4, 29 | "type_info": "Bool" 30 | }, 31 | { 32 | "name": "created_height", 33 | "ordinal": 5, 34 | "type_info": "Integer" 35 | } 36 | ], 37 | "parameters": { 38 | "Right": 1 39 | }, 40 | "nullable": [ 41 | false, 42 | false, 43 | true, 44 | false, 45 | false, 46 | true 47 | ] 48 | }, 49 | "hash": "06802a4efba6dc3e16e65769f739dd1506bb3ac5b040e71c70a6f929e6a49f44" 50 | } 51 | -------------------------------------------------------------------------------- /.sqlx/query-08603dd734a2434722e2243d61a44577d5eb89f5d546db3b7f87b37bd420737d.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `unix_time`\n FROM `blockinfo`\n WHERE `height` = ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "unix_time", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "08603dd734a2434722e2243d61a44577d5eb89f5d546db3b7f87b37bd420737d" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-0a154eb3d84e9224d7f88acde6a2ecfa0cb47a5977f9dd9434247117ebc7a3ca.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT MAX(`index`) AS `max_index`\n FROM `derivations`\n WHERE EXISTS (\n SELECT 1 FROM `coin_states`\n WHERE `puzzle_hash` = `p2_puzzle_hash`\n OR `hint` = `p2_puzzle_hash`\n )\n AND `hardened` = ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "max_index", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | true 17 | ] 18 | }, 19 | "hash": "0a154eb3d84e9224d7f88acde6a2ecfa0cb47a5977f9dd9434247117ebc7a3ca" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-0a55a34cdc4bd0cb4c0514ab938f061de3ceb1ac6b1c0dd4de92149ed2c4494a.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `coin_states`.`amount` FROM `coin_states` INDEXED BY `coin_spent`\n INNER JOIN `cat_coins` ON `coin_states`.`coin_id` = `cat_coins`.`coin_id`\n LEFT JOIN `transaction_spends` ON `coin_states`.`coin_id` = `transaction_spends`.`coin_id`\n WHERE `coin_states`.`spent_height` IS NULL\n AND `cat_coins`.`asset_id` = ?\n AND `transaction_spends`.`coin_id` IS NULL\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "amount", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "0a55a34cdc4bd0cb4c0514ab938f061de3ceb1ac6b1c0dd4de92149ed2c4494a" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-0bd50a041814da8532dde48fd00f056204957e615443d30e0c1ede98af4e5519.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "INSERT OR IGNORE INTO `offered_coins` (`offer_id`, `coin_id`) VALUES (?, ?)", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 2 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "0bd50a041814da8532dde48fd00f056204957e615443d30e0c1ede98af4e5519" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-0e221ba6a44bdd687317f09e1003803d8c3e38cb0101e01af1ed59bd7f64e078.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "DELETE FROM `derivations` WHERE `hardened` = 0", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 0 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "0e221ba6a44bdd687317f09e1003803d8c3e38cb0101e01af1ed59bd7f64e078" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-10e105b51b9a1c4a9a92bb85b0d1c1ea21f7e636299e33d295c4d08bcc78cdac.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT `collection_id` FROM `collections`", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "collection_id", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "10e105b51b9a1c4a9a92bb85b0d1c1ea21f7e636299e33d295c4d08bcc78cdac" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-128ef3d7d903189eea35f141e1fa295f7116bbc3674f64a2ae680aef0fa33256.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `asset_id` FROM `cats` WHERE `fetched` = 0\n LIMIT 1\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "asset_id", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "128ef3d7d903189eea35f141e1fa295f7116bbc3674f64a2ae680aef0fa33256" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-14658cf99ae1c0de7ee9ba9f20b2487215a1824d255f5a1bfcf1021ef4ad3bee.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT COUNT(*) as count\n FROM coin_states\n INNER JOIN `cat_coins` ON `coin_states`.`coin_id` = `cat_coins`.`coin_id`\n LEFT JOIN transaction_spends ON transaction_spends.coin_id = coin_states.coin_id\n WHERE 1=1 \n AND `cat_coins`.`asset_id` = ?\n AND created_height IS NOT NULL\n AND spent_height IS NULL\n AND coin_states.transaction_id IS NULL\n AND transaction_spends.coin_id IS NULL\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "count", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "14658cf99ae1c0de7ee9ba9f20b2487215a1824d255f5a1bfcf1021ef4ad3bee" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-1697370a7e61f088e103f2d8e1977e9ac441d499a1557331b4e29ace0843c08f.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n UPDATE `coin_states`\n SET `created_height` = ?, `spent_height` = ?, `transaction_id` = ?\n WHERE `coin_id` = ?\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 4 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "1697370a7e61f088e103f2d8e1977e9ac441d499a1557331b4e29ace0843c08f" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-16f87160e00064a9692f32cf5afa3bb56b2b9d44dddafba6bdbcdc24a40cfb6a.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT `metadata_hash` FROM `nft_coins` WHERE `launcher_id` = ?", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "metadata_hash", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | true 17 | ] 18 | }, 19 | "hash": "16f87160e00064a9692f32cf5afa3bb56b2b9d44dddafba6bdbcdc24a40cfb6a" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-18d3d050762544ca73050ff24bec4dddf34afffa9ab95e17eaebf2eac7cc1ca6.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n INSERT OR IGNORE INTO `cat_coins` (\n `coin_id`,\n `parent_parent_coin_id`,\n `parent_inner_puzzle_hash`,\n `parent_amount`,\n `p2_puzzle_hash`,\n `asset_id`\n )\n VALUES (?, ?, ?, ?, ?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 6 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "18d3d050762544ca73050ff24bec4dddf34afffa9ab95e17eaebf2eac7cc1ca6" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-193aa911a0d0a4df1258102a595ba45a144f738dfc5896eb8db568d2f5794168.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n INSERT OR IGNORE INTO `coin_states` (\n `coin_id`,\n `parent_coin_id`,\n `puzzle_hash`,\n `amount`,\n `created_height`,\n `spent_height`,\n `synced`,\n `transaction_id`\n )\n VALUES (?, ?, ?, ?, ?, ?, ?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 8 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "193aa911a0d0a4df1258102a595ba45a144f738dfc5896eb8db568d2f5794168" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-2038867d267903ab3730dee28abc3f09b6c88adda86af655522a11be2ce1e172.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `offered_coins`.`offer_id` FROM `offered_coins`\n INNER JOIN `offers` ON `offered_coins`.`offer_id` = `offers`.`offer_id`\n WHERE `coin_id` = ? AND `offers`.`status` = 0\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "offer_id", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "2038867d267903ab3730dee28abc3f09b6c88adda86af655522a11be2ce1e172" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-20505bc0166a86dc2be61d1ce71251533e25a0291ce0f05f4f68c70cb6daba94.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n INSERT OR IGNORE INTO `cats` (\n `asset_id`,\n `name`,\n `ticker`,\n `description`,\n `icon`,\n `visible`,\n `fetched`\n ) VALUES (?, ?, ?, ?, ?, ?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 7 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "20505bc0166a86dc2be61d1ce71251533e25a0291ce0f05f4f68c70cb6daba94" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-211edf13476a2c9e6bfb5d3b026c03ce433aa3e425e0ca136766591d10497281.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "DELETE FROM `derivations` WHERE `hardened` = 1", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 0 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "211edf13476a2c9e6bfb5d3b026c03ce433aa3e425e0ca136766591d10497281" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-23e9f0827989fb19576fb9bd37cd797f770c0126f4b0c9ee86c7c39a78529497.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `synthetic_key`\n FROM `derivations`\n WHERE `p2_puzzle_hash` = ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "synthetic_key", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "23e9f0827989fb19576fb9bd37cd797f770c0126f4b0c9ee86c7c39a78529497" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-24ea4bd05a6542302f7baa5a41b78acde5237581748cdea39893cc4ae99b1998.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n UPDATE `collections` SET\n `collection_id` = ?,\n `did_id` = ?,\n `metadata_collection_id` = ?,\n `visible` = ?,\n `name` = ?,\n `icon` = ?\n WHERE `collection_id` = ?\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 7 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "24ea4bd05a6542302f7baa5a41b78acde5237581748cdea39893cc4ae99b1998" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-26f35685c520800fcac9aa39af5eda01d241729c617dcefb200e4490bafb75ef.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n UPDATE `coin_states` SET `synced` = 1, `hint` = ?, `kind` = ? WHERE `coin_id` = ?\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 3 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "26f35685c520800fcac9aa39af5eda01d241729c617dcefb200e4490bafb75ef" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-275b72aec6c3642621c64403265debc939d2d2e4c3fc788ce2a492eb5c2840d6.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `name` FROM `future_did_names`\n WHERE `launcher_id` = ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "name", 8 | "ordinal": 0, 9 | "type_info": "Text" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "275b72aec6c3642621c64403265debc939d2d2e4c3fc788ce2a492eb5c2840d6" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-2b20bc5b625d46f0cf5b886b229fcf4caa0fa983bb207521dc91fc523c0eedb6.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "REPLACE INTO `nft_data` (`hash`, `data`, `mime_type`, `hash_matches`) VALUES (?, ?, ?, ?)", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 4 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "2b20bc5b625d46f0cf5b886b229fcf4caa0fa983bb207521dc91fc523c0eedb6" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-30a898b6a469141ebdc0093536dd8003235153dcfba83e47d8b35a7888a0fc66.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT COUNT(*) AS `synced`\n FROM `coin_states`\n WHERE `synced` = 1\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "synced", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "30a898b6a469141ebdc0093536dd8003235153dcfba83e47d8b35a7888a0fc66" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-30ebf1aa19c50530c019d217be1e5647fc77980c79dce94edc1aa5771b5b725f.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT `version` FROM `rust_migrations` LIMIT 1", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "version", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "30ebf1aa19c50530c019d217be1e5647fc77980c79dce94edc1aa5771b5b725f" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-32da3c0d8d84766a57e4b992d4ff4767500966b7e5d13ec385dca0028e0cf7fa.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT\n `transaction_id`,\n `aggregated_signature`\n FROM `transactions`\n WHERE `submitted_at` IS NULL OR `submitted_at` <= ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "transaction_id", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | }, 11 | { 12 | "name": "aggregated_signature", 13 | "ordinal": 1, 14 | "type_info": "Blob" 15 | } 16 | ], 17 | "parameters": { 18 | "Right": 1 19 | }, 20 | "nullable": [ 21 | false, 22 | false 23 | ] 24 | }, 25 | "hash": "32da3c0d8d84766a57e4b992d4ff4767500966b7e5d13ec385dca0028e0cf7fa" 26 | } 27 | -------------------------------------------------------------------------------- /.sqlx/query-34ac3069ef637b91e7bc06b1dc9b779cb34a573befc9027418d4791fa381375d.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `p2_puzzle_hash`\n FROM `derivations`\n ORDER BY `index` ASC, `hardened` ASC\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "p2_puzzle_hash", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "34ac3069ef637b91e7bc06b1dc9b779cb34a573befc9027418d4791fa381375d" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-37bd891013a2e43f4daaf084b0b21f535e373a878e2a8acc8a15e17cf66e1dea.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n INSERT INTO `offer_nfts` (\n `offer_id`, `requested`, `launcher_id`,\n `royalty_puzzle_hash`, `royalty_ten_thousandths`,\n `name`, `thumbnail`, `thumbnail_mime_type`\n )\n VALUES (?, ?, ?, ?, ?, ?, ?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 8 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "37bd891013a2e43f4daaf084b0b21f535e373a878e2a8acc8a15e17cf66e1dea" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-38e31984cf599af11b261493d8196aa6c9efc623610bdbc841b944588c10cf04.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n DELETE FROM `coin_states`;\n DELETE FROM `transactions`;\n DELETE FROM `peaks`;\n DELETE FROM `cats`;\n DELETE FROM `future_did_names`;\n DELETE FROM `collections`;\n DELETE FROM `nft_data`;\n DELETE FROM `nft_uris`;\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 0 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "38e31984cf599af11b261493d8196aa6c9efc623610bdbc841b944588c10cf04" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-3b1eab15a2414f6edb8a5ea98a4e78f4145959c20b1854ce867af247a509327f.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT DISTINCT `created_height`\n FROM `coin_states`\n WHERE `created_unixtime` IS NULL\n AND `created_height` IS NOT NULL\n ORDER BY `created_height` DESC \n LIMIT ?;\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "created_height", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | true 17 | ] 18 | }, 19 | "hash": "3b1eab15a2414f6edb8a5ea98a4e78f4145959c20b1854ce867af247a509327f" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-47d39211fec4faae5520769cb47b3f6f1e0e8f106c1d5b4423abb09544a55040.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT `hash`, `uri` FROM `nft_uris` WHERE `checked` = 0 LIMIT ?", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "hash", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | }, 11 | { 12 | "name": "uri", 13 | "ordinal": 1, 14 | "type_info": "Text" 15 | } 16 | ], 17 | "parameters": { 18 | "Right": 1 19 | }, 20 | "nullable": [ 21 | false, 22 | false 23 | ] 24 | }, 25 | "hash": "47d39211fec4faae5520769cb47b3f6f1e0e8f106c1d5b4423abb09544a55040" 26 | } 27 | -------------------------------------------------------------------------------- /.sqlx/query-4a11391d34af85600ef2df66d5ac03ea1b14e6753763c02c23ca879d08bf71b7.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT COUNT(*) AS `count` FROM `derivations` WHERE `p2_puzzle_hash` = ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "count", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "4a11391d34af85600ef2df66d5ac03ea1b14e6753763c02c23ca879d08bf71b7" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-4d0c70f825bfd512daa0b520d2d4e1a99f5cd363ffaafd9b79306ad9e131f2ab.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n INSERT OR IGNORE INTO `blockinfo` (\n `height`,\n `unix_time`\n )\n VALUES (?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 2 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "4d0c70f825bfd512daa0b520d2d4e1a99f5cd363ffaafd9b79306ad9e131f2ab" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-4e57a9bc7318609e6c2b2fe3130f64350fe914edea4a35d21dbf77bd687c1eb4.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n REPLACE INTO `dids` (\n `launcher_id`,\n `coin_id`,\n `name`,\n `is_owned`,\n `visible`,\n `created_height`\n )\n VALUES (?, ?, ?, ?, ?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 6 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "4e57a9bc7318609e6c2b2fe3130f64350fe914edea4a35d21dbf77bd687c1eb4" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-4fc797762589a9e2e86965a8d92edd9110a65bfacd3008d28e0e9440b1f65301.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "UPDATE `coin_states` SET `synced` = 0 WHERE `coin_id` = ?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 1 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "4fc797762589a9e2e86965a8d92edd9110a65bfacd3008d28e0e9440b1f65301" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-5023da5b532e946c8e7b13448d2ff5f92d068bce71e153eebacdaebfe310420b.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "UPDATE `dids` SET `is_owned` = 0 WHERE `coin_id` = ?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 1 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "5023da5b532e946c8e7b13448d2ff5f92d068bce71e153eebacdaebfe310420b" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-52c521c4bb43566e5af15059e685f26111fbef0d32183bb1fdce95805dea8d33.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "UPDATE `nfts` SET `is_owned` = 0 WHERE `coin_id` = ?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 1 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "52c521c4bb43566e5af15059e685f26111fbef0d32183bb1fdce95805dea8d33" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-56cf5d987d1c176bb5254b21c7d3ef5f293d117434fdf14fe6646afce74e77d8.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n INSERT INTO `transaction_spends` (\n `coin_id`,\n `index`,\n `transaction_id`,\n `parent_coin_id`,\n `puzzle_hash`,\n `amount`,\n `puzzle_reveal`,\n `solution`\n )\n VALUES (?, ?, ?, ?, ?, ?, ?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 8 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "56cf5d987d1c176bb5254b21c7d3ef5f293d117434fdf14fe6646afce74e77d8" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-579cf65be1ff023aca72dfcd60ebd3883e75bb092b4ac965411f24fa4a3b96d2.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n INSERT INTO `transactions` (\n `transaction_id`,\n `aggregated_signature`,\n `fee`\n )\n VALUES (?, ?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 3 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "579cf65be1ff023aca72dfcd60ebd3883e75bb092b4ac965411f24fa4a3b96d2" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-58a5fc4e0127de1f53d3071b1d7597ef0088d86a2fa00036dc8d8f0eefc5f156.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT `name` FROM `collections` WHERE `collection_id` = ?", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "name", 8 | "ordinal": 0, 9 | "type_info": "Text" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | true 17 | ] 18 | }, 19 | "hash": "58a5fc4e0127de1f53d3071b1d7597ef0088d86a2fa00036dc8d8f0eefc5f156" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-593ff26761c8cc24690c2bfefdc08703daf515f8da64299a1f82df5e2ca609c4.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT DISTINCT `spent_height`\n FROM `coin_states`\n WHERE `spent_unixtime` IS NULL\n AND `spent_height` IS NOT NULL\n ORDER BY `spent_height` DESC \n LIMIT ?;\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "spent_height", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | true 17 | ] 18 | }, 19 | "hash": "593ff26761c8cc24690c2bfefdc08703daf515f8da64299a1f82df5e2ca609c4" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-5e339e5d8783b0323d4fbb402826a14c2587b27426635e68942a5526a6a00b8c.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "REPLACE INTO `nft_thumbnails` (`hash`, `icon`, `thumbnail`) VALUES (?, ?, ?)", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 3 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "5e339e5d8783b0323d4fbb402826a14c2587b27426635e68942a5526a6a00b8c" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-5e37c04f21a27b0fc6d2f9601c3431b27088d9184f057d65ab3905f871f75f45.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n REPLACE INTO `cats` (\n `asset_id`,\n `name`,\n `ticker`,\n `description`,\n `icon`,\n `visible`,\n `fetched`\n ) VALUES (?, ?, ?, ?, ?, ?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 7 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "5e37c04f21a27b0fc6d2f9601c3431b27088d9184f057d65ab3905f871f75f45" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-64b3d98ba64e09e6a5c1b91dbea0a8de088736f910c7e6febb3884691323c6b0.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n INSERT OR IGNORE INTO `offers` (\n `offer_id`, `encoded_offer`, `expiration_height`,\n `expiration_timestamp`, `fee`, `status`, `inserted_timestamp`\n )\n VALUES (?, ?, ?, ?, ?, ?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 7 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "64b3d98ba64e09e6a5c1b91dbea0a8de088736f910c7e6febb3884691323c6b0" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-6845c1ccfd21971b75aeed84b8b65ca9044f8c312bedeff84f7b43a7d8828ca6.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n REPLACE INTO `future_did_names` (`launcher_id`, `name`)\n VALUES (?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 2 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "6845c1ccfd21971b75aeed84b8b65ca9044f8c312bedeff84f7b43a7d8828ca6" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-6c9af1c832bcead88d180b884b4bf8301dff3615197f78ecbf238529030c5930.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n DELETE FROM `coin_states`\n WHERE `coin_id` = ?\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 1 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "6c9af1c832bcead88d180b884b4bf8301dff3615197f78ecbf238529030c5930" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-6d70a25c3dc7e5d3507a28d5394bb5041032fd39983269421d9884d43259314c.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `collection_id`, `did_id`, `metadata_collection_id`, `visible`, `name`, `icon`\n FROM `collections` WHERE `collection_id` = ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "collection_id", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | }, 11 | { 12 | "name": "did_id", 13 | "ordinal": 1, 14 | "type_info": "Blob" 15 | }, 16 | { 17 | "name": "metadata_collection_id", 18 | "ordinal": 2, 19 | "type_info": "Text" 20 | }, 21 | { 22 | "name": "visible", 23 | "ordinal": 3, 24 | "type_info": "Bool" 25 | }, 26 | { 27 | "name": "name", 28 | "ordinal": 4, 29 | "type_info": "Text" 30 | }, 31 | { 32 | "name": "icon", 33 | "ordinal": 5, 34 | "type_info": "Text" 35 | } 36 | ], 37 | "parameters": { 38 | "Right": 1 39 | }, 40 | "nullable": [ 41 | false, 42 | false, 43 | false, 44 | false, 45 | true, 46 | true 47 | ] 48 | }, 49 | "hash": "6d70a25c3dc7e5d3507a28d5394bb5041032fd39983269421d9884d43259314c" 50 | } 51 | -------------------------------------------------------------------------------- /.sqlx/query-6fe095fd12b12a8223963f2569f59940a39d9665aedafdfc781b277f1e43a1ec.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "UPDATE `nfts` SET `created_height` = ? WHERE `coin_id` = ?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 2 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "6fe095fd12b12a8223963f2569f59940a39d9665aedafdfc781b277f1e43a1ec" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-704b7ef0f010994311ed21c209a166f7ea91fd21969cf1b9e8d095c51b1cd675.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT `license_hash` FROM `nft_coins` WHERE `launcher_id` = ?", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "license_hash", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | true 17 | ] 18 | }, 19 | "hash": "704b7ef0f010994311ed21c209a166f7ea91fd21969cf1b9e8d095c51b1cd675" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-72c9608d6e6a3deefc13e74e367861d96ec5e166b3375a365f6938a43aff5c11.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `index`, `hardened`\n FROM `derivations`\n WHERE `synthetic_key` = ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "index", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | }, 11 | { 12 | "name": "hardened", 13 | "ordinal": 1, 14 | "type_info": "Bool" 15 | } 16 | ], 17 | "parameters": { 18 | "Right": 1 19 | }, 20 | "nullable": [ 21 | false, 22 | false 23 | ] 24 | }, 25 | "hash": "72c9608d6e6a3deefc13e74e367861d96ec5e166b3375a365f6938a43aff5c11" 26 | } 27 | -------------------------------------------------------------------------------- /.sqlx/query-76438520a51fa88577083a3afbb93c9228c8e9d3599ef18ac27b3eb21fe62493.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `launcher_id`, `coin_id`, `name`, `is_owned`, `visible`, `created_height`\n FROM `dids`\n WHERE `launcher_id` = ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "launcher_id", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | }, 11 | { 12 | "name": "coin_id", 13 | "ordinal": 1, 14 | "type_info": "Blob" 15 | }, 16 | { 17 | "name": "name", 18 | "ordinal": 2, 19 | "type_info": "Text" 20 | }, 21 | { 22 | "name": "is_owned", 23 | "ordinal": 3, 24 | "type_info": "Bool" 25 | }, 26 | { 27 | "name": "visible", 28 | "ordinal": 4, 29 | "type_info": "Bool" 30 | }, 31 | { 32 | "name": "created_height", 33 | "ordinal": 5, 34 | "type_info": "Integer" 35 | } 36 | ], 37 | "parameters": { 38 | "Right": 1 39 | }, 40 | "nullable": [ 41 | false, 42 | false, 43 | true, 44 | false, 45 | false, 46 | true 47 | ] 48 | }, 49 | "hash": "76438520a51fa88577083a3afbb93c9228c8e9d3599ef18ac27b3eb21fe62493" 50 | } 51 | -------------------------------------------------------------------------------- /.sqlx/query-7ac44bd2934972682709ad97f7f01827988910b5ec9e7a0cab753c8f7d7fc0a9.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n INSERT OR IGNORE INTO `did_coins` (\n `coin_id`,\n `parent_parent_coin_id`,\n `parent_inner_puzzle_hash`,\n `parent_amount`,\n `launcher_id`,\n `recovery_list_hash`,\n `num_verifications_required`,\n `metadata`,\n `p2_puzzle_hash`\n )\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 9 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "7ac44bd2934972682709ad97f7f01827988910b5ec9e7a0cab753c8f7d7fc0a9" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-8006fbdcf0e72b03dfd11c7d5a4a63aaa446a546284fcc67a70106303d8e1829.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT `data_hash` FROM `nft_coins` WHERE `launcher_id` = ?", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "data_hash", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | true 17 | ] 18 | }, 19 | "hash": "8006fbdcf0e72b03dfd11c7d5a4a63aaa446a546284fcc67a70106303d8e1829" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-808635aff0ab3dd13109fec8dbac511d2f781525bfa22dd83617e512e0c0efbb.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "UPDATE `rust_migrations` SET `version` = ?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 1 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "808635aff0ab3dd13109fec8dbac511d2f781525bfa22dd83617e512e0c0efbb" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-8a1d2035972caef23b9812e76a6ab707de72cab08ef668505ad13096532a058a.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "DELETE FROM `blockinfo`", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 0 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "8a1d2035972caef23b9812e76a6ab707de72cab08ef668505ad13096532a058a" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-8a728911b3877476b9649f890645c5b658d377a98d7c6fe8952fd6c9f7da6d84.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT\n `transaction_id`,\n `fee`,\n `submitted_at`\n FROM `transactions`\n ORDER BY `submitted_at` DESC, `transaction_id` ASC\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "transaction_id", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | }, 11 | { 12 | "name": "fee", 13 | "ordinal": 1, 14 | "type_info": "Blob" 15 | }, 16 | { 17 | "name": "submitted_at", 18 | "ordinal": 2, 19 | "type_info": "Integer" 20 | } 21 | ], 22 | "parameters": { 23 | "Right": 0 24 | }, 25 | "nullable": [ 26 | false, 27 | false, 28 | true 29 | ] 30 | }, 31 | "hash": "8a728911b3877476b9649f890645c5b658d377a98d7c6fe8952fd6c9f7da6d84" 32 | } 33 | -------------------------------------------------------------------------------- /.sqlx/query-95658e1a150b0c39be8a3061a65d4224218de0770010d2548803586389e0daaf.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT * FROM `offer_xch` WHERE `offer_id` = ?", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "offer_id", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | }, 11 | { 12 | "name": "requested", 13 | "ordinal": 1, 14 | "type_info": "Bool" 15 | }, 16 | { 17 | "name": "amount", 18 | "ordinal": 2, 19 | "type_info": "Blob" 20 | }, 21 | { 22 | "name": "royalty", 23 | "ordinal": 3, 24 | "type_info": "Blob" 25 | } 26 | ], 27 | "parameters": { 28 | "Right": 1 29 | }, 30 | "nullable": [ 31 | false, 32 | false, 33 | false, 34 | false 35 | ] 36 | }, 37 | "hash": "95658e1a150b0c39be8a3061a65d4224218de0770010d2548803586389e0daaf" 38 | } 39 | -------------------------------------------------------------------------------- /.sqlx/query-957be4a61c0438d1ea008fbf9288f755bdb7b31770078f6260fcd13fc81a3364.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `height`, `header_hash`\n FROM `peaks`\n ORDER BY `height` DESC\n LIMIT 1\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "height", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | }, 11 | { 12 | "name": "header_hash", 13 | "ordinal": 1, 14 | "type_info": "Blob" 15 | } 16 | ], 17 | "parameters": { 18 | "Right": 0 19 | }, 20 | "nullable": [ 21 | false, 22 | false 23 | ] 24 | }, 25 | "hash": "957be4a61c0438d1ea008fbf9288f755bdb7b31770078f6260fcd13fc81a3364" 26 | } 27 | -------------------------------------------------------------------------------- /.sqlx/query-9738b036011c30ae2d1417ba38476c60e55e3debc90ea7205d08f182865aa980.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n UPDATE `coin_states`\n SET `transaction_id` = NULL\n WHERE `coin_id` = ?\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 1 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "9738b036011c30ae2d1417ba38476c60e55e3debc90ea7205d08f182865aa980" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-9919b58097851e0ba213cddd61673d78156251d9ee5475f1fab50696139c4997.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n DELETE FROM `transactions`\n WHERE `transaction_id` = ?\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 1 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "9919b58097851e0ba213cddd61673d78156251d9ee5475f1fab50696139c4997" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-99f82770337e8817fc98076f2c7a942f70b2c808b990078a0afedb589da24298.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n UPDATE `transactions`\n SET `submitted_at` = ?\n WHERE `transaction_id` = ?\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 2 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "99f82770337e8817fc98076f2c7a942f70b2c808b990078a0afedb589da24298" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-a1dcbfe54b8cbdfd3b8760ca225c168eb04d423fccd6d0e3d408d0dc733fab34.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "DELETE FROM `offers` WHERE `offer_id` = ?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 1 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "a1dcbfe54b8cbdfd3b8760ca225c168eb04d423fccd6d0e3d408d0dc733fab34" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-a21166c21fa64a3bc44aeda9035c5759059d5543076eb901bd2ae443d9c89f3a.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "DELETE FROM `nft_data` WHERE `hash` = ?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 1 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "a21166c21fa64a3bc44aeda9035c5759059d5543076eb901bd2ae443d9c89f3a" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-a27a932fd61aff027c2416fa86fd625bf7ce1a7ab5d0bf254df504b8708893c9.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `coin_states`.`coin_id`\n FROM `coin_states` INDEXED BY `coin_spent`\n INNER JOIN `nft_coins` ON `coin_states`.`coin_id` = `nft_coins`.`coin_id`\n WHERE `spent_height` IS NULL\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "coin_id", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "a27a932fd61aff027c2416fa86fd625bf7ce1a7ab5d0bf254df504b8708893c9" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-a491d525db244a1d652c603b177ab5a798f65477480750946ae6b982bac32ddc.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "UPDATE `offers` SET `status` = ? WHERE `offer_id` = ?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 2 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "a491d525db244a1d652c603b177ab5a798f65477480750946ae6b982bac32ddc" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-a93526d49ab50f772b1c359d3ab88ef45570143ed28f265d76c6e17efdd12dce.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n INSERT INTO `offer_cats` (\n `offer_id`, `requested`, `asset_id`,\n `amount`, `royalty`, `name`, `ticker`, `icon`\n )\n VALUES (?, ?, ?, ?, ?, ?, ?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 8 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "a93526d49ab50f772b1c359d3ab88ef45570143ed28f265d76c6e17efdd12dce" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-a9820412ca803927e7d195db8d1f90ce25c5a99870e6a3a248cb1cecd912cd23.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `transaction_id`\n FROM `transaction_spends`\n WHERE `coin_id` = ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "transaction_id", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "a9820412ca803927e7d195db8d1f90ce25c5a99870e6a3a248cb1cecd912cd23" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-ac56599044f381115785e659ed4a52d74dc2502e7d3f73539b805bc77f38604a.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "REPLACE INTO `nfts` (\n `launcher_id`,\n `coin_id`,\n `collection_id`,\n `minter_did`,\n `owner_did`,\n `visible`,\n `sensitive_content`,\n `name`,\n `is_owned`,\n `created_height`,\n `metadata_hash`,\n `edition_number`,\n `edition_total`\n ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 13 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "ac56599044f381115785e659ed4a52d74dc2502e7d3f73539b805bc77f38604a" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-ae767c36d341dac05bcc53e3bbae85358661c8c3c8c285074d1bbee18e3f8250.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "DELETE FROM `nft_thumbnails` WHERE `hash` = ?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 1 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "ae767c36d341dac05bcc53e3bbae85358661c8c3c8c285074d1bbee18e3f8250" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-b1107c7179c86c248b75414ee0bbb457126896eedd6ebd925203c4b6df464976.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `p2_puzzle_hash`\n FROM `derivations`\n WHERE `index` = ?\n AND `hardened` = ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "p2_puzzle_hash", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 2 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "b1107c7179c86c248b75414ee0bbb457126896eedd6ebd925203c4b6df464976" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-b149fb8c13040be35c66ad83a26ff681cb0482e08e99b214d199a36a2c570859.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "UPDATE `collections` SET `collection_id` = ? WHERE `collection_id` = ?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 2 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "b149fb8c13040be35c66ad83a26ff681cb0482e08e99b214d199a36a2c570859" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-b2c427e39098073050e4a92c94492de21f1a89a47bc0d1e5af7094bab5230a68.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT `icon` FROM `nft_thumbnails` WHERE `hash` = ?", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "icon", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "b2c427e39098073050e4a92c94492de21f1a89a47bc0d1e5af7094bab5230a68" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-b4ad9892410265bb0a06e51d8de8eb35e1c2bcfb1a276f633cf2493f2038231f.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT COUNT(*) FROM collections", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "COUNT(*)", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "b4ad9892410265bb0a06e51d8de8eb35e1c2bcfb1a276f633cf2493f2038231f" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-baf4a9108bf169fcbfa69969a4dc9b94265f7d71abd1646ce839e8e7941a2a90.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n UPDATE OR IGNORE `coin_states`\n SET `spent_unixtime` = ?\n WHERE `spent_height` = ?\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 2 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "baf4a9108bf169fcbfa69969a4dc9b94265f7d71abd1646ce839e8e7941a2a90" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-bcd575c48884cbc133f407af02fb963d47a8ef0326e3dbb5dc8ab5654d1f392c.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n INSERT OR IGNORE INTO `nft_coins` (\n `coin_id`,\n `parent_parent_coin_id`,\n `parent_inner_puzzle_hash`,\n `parent_amount`,\n `launcher_id`,\n `metadata`,\n `metadata_updater_puzzle_hash`,\n `current_owner`,\n `royalty_puzzle_hash`,\n `royalty_ten_thousandths`,\n `p2_puzzle_hash`,\n `data_hash`,\n `metadata_hash`,\n `license_hash`\n )\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 14 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "bcd575c48884cbc133f407af02fb963d47a8ef0326e3dbb5dc8ab5654d1f392c" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-be2448253ba62dbb2b57d24f7347ba0924b3015a31108cfc8d4a9c3d494c192c.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "UPDATE `nfts` SET `visible` = ? WHERE `launcher_id` = ?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 2 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "be2448253ba62dbb2b57d24f7347ba0924b3015a31108cfc8d4a9c3d494c192c" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-be4915e1e47971f74f9972e4b78fc645cb9cfc8d6d14d817ff09738b78f38524.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `coin_states`.`coin_id`\n FROM `coin_states` INDEXED BY `coin_spent`\n INNER JOIN `did_coins` ON `coin_states`.`coin_id` = `did_coins`.`coin_id`\n WHERE `spent_height` IS NULL\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "coin_id", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "be4915e1e47971f74f9972e4b78fc645cb9cfc8d6d14d817ff09738b78f38524" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-c28c5534fa54f929c81d02b31276dfb5d621da40c7adc621a055e9b72d4dae30.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n WITH distinct_dids AS (\n SELECT DISTINCT minter_did \n FROM nfts \n WHERE minter_did IS NOT NULL\n )\n SELECT \n minter_did,\n COUNT(*) OVER() AS total_count\n FROM distinct_dids\n LIMIT ? OFFSET ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "minter_did", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | }, 11 | { 12 | "name": "total_count", 13 | "ordinal": 1, 14 | "type_info": "Integer" 15 | } 16 | ], 17 | "parameters": { 18 | "Right": 2 19 | }, 20 | "nullable": [ 21 | true, 22 | false 23 | ] 24 | }, 25 | "hash": "c28c5534fa54f929c81d02b31276dfb5d621da40c7adc621a055e9b72d4dae30" 26 | } 27 | -------------------------------------------------------------------------------- /.sqlx/query-c3eda0483d42cf1dc0ab7ea0fc8712469e66b6c4f7661f81c44c278d8ef48841.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `coin_states`.`amount` FROM `coin_states` INDEXED BY `coin_kind_spent`\n LEFT JOIN `transaction_spends` ON `coin_states`.`coin_id` = `transaction_spends`.`coin_id`\n WHERE `coin_states`.`spent_height` IS NULL\n AND `transaction_spends`.`coin_id` IS NULL\n AND `kind` = 1\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "amount", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "c3eda0483d42cf1dc0ab7ea0fc8712469e66b6c4f7661f81c44c278d8ef48841" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-c4a5ecd631de42f851bf90100d8f62de5b0181d60dda8670065ad8702ba13aba.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "UPDATE `collections` SET `visible` = ? WHERE `collection_id` = ?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 2 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "c4a5ecd631de42f851bf90100d8f62de5b0181d60dda8670065ad8702ba13aba" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-c705ffec23bfb844c9b1032ae37d10f84bb89461e4acbeaadde7230943b2576b.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT COUNT(*) AS `total`\n FROM `coin_states`\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "total", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "c705ffec23bfb844c9b1032ae37d10f84bb89461e4acbeaadde7230943b2576b" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-cc24879f9012f1e056cc0fcfc664437aee6a72b858918c0ca70776ef36b50f33.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT COUNT(*) FROM collections WHERE visible = 1", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "COUNT(*)", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "cc24879f9012f1e056cc0fcfc664437aee6a72b858918c0ca70776ef36b50f33" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-ccdbb66c8c90b0117b5919a92c2785d7570b967a9a3a266163809a241308415d.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n REPLACE INTO `peaks` (`height`, `header_hash`)\n VALUES (?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 2 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "ccdbb66c8c90b0117b5919a92c2785d7570b967a9a3a266163809a241308415d" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-ce2df892fe8381ec398f0b97741d36faf3c00c70aae47ec3818462e29a4e400a.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n INSERT OR IGNORE INTO `collections` (\n `collection_id`,\n `did_id`,\n `metadata_collection_id`,\n `visible`,\n `name`,\n `icon`\n )\n VALUES (?, ?, ?, ?, ?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 6 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "ce2df892fe8381ec398f0b97741d36faf3c00c70aae47ec3818462e29a4e400a" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-d00ab63cf624ef6b712c93e3a30442776c696ad3da620627fd2db2e05d6ade3a.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n INSERT OR IGNORE INTO `derivations` (`p2_puzzle_hash`, `index`, `hardened`, `synthetic_key`)\n VALUES (?, ?, ?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 4 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "d00ab63cf624ef6b712c93e3a30442776c696ad3da620627fd2db2e05d6ade3a" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-d033d94daf4703a65deb9d902aa3014828efe2982d8631aabcaf2508a345216c.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "UPDATE `nft_uris` SET `checked` = 0 WHERE `uri` = ?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 1 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "d033d94daf4703a65deb9d902aa3014828efe2982d8631aabcaf2508a345216c" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-d2de3c63e1eb71899f0635182fe94ea68e9fbe9caa5bf25c8873c3e82262ade5.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `kind`\n FROM `coin_states`\n WHERE `coin_id` = ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "kind", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "d2de3c63e1eb71899f0635182fe94ea68e9fbe9caa5bf25c8873c3e82262ade5" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-d2defd73743b149b96d3e5e9597f433128d7f5144e30c4b5371e0a87dd5caabf.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n UPDATE `cats` SET `fetched` = 0 WHERE `asset_id` = ?\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 1 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "d2defd73743b149b96d3e5e9597f433128d7f5144e30c4b5371e0a87dd5caabf" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-d42c88a6e6ae43215089b798e6c021e03bf58c55439f7e3bead0d8aa3db18863.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "INSERT OR IGNORE INTO `nft_uris` (`hash`, `uri`, `checked`, `hash_matches`) VALUES (?, ?, ?, ?)", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 4 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "d42c88a6e6ae43215089b798e6c021e03bf58c55439f7e3bead0d8aa3db18863" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-d5d05aafad60309b27bb7e7ac9392b8c2e486aa26262d82f2c0ce89fdd19d70b.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n UPDATE OR IGNORE `coin_states`\n SET `created_unixtime` = ?\n WHERE `created_height` = ?\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 2 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "d5d05aafad60309b27bb7e7ac9392b8c2e486aa26262d82f2c0ce89fdd19d70b" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-d64cd2cc9b3770abe5856ed378d407a274821528b71c61ae275bcc4fc821eddf.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT COUNT(*) AS `count` FROM `nft_uris`", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "count", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "d64cd2cc9b3770abe5856ed378d407a274821528b71c61ae275bcc4fc821eddf" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-da4555012028d63d9d53a85c6247f0cc8eefbd24c6091ec6d465f52da3490202.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "UPDATE `nfts` SET `collection_id` = ? WHERE `collection_id` = ?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 2 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "da4555012028d63d9d53a85c6247f0cc8eefbd24c6091ec6d465f52da3490202" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-ddb15714a57d0084e6766e94b28c9090812dc6ba093d364b0732bc2f8e348e83.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT COUNT(*) as count\n FROM coin_states\n LEFT JOIN transaction_spends ON transaction_spends.coin_id = coin_states.coin_id\n WHERE 1=1 \n AND created_height IS NOT NULL\n AND spent_height IS NULL\n AND coin_states.transaction_id IS NULL\n AND transaction_spends.coin_id IS NULL\n AND `kind` = 1\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "count", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "ddb15714a57d0084e6766e94b28c9090812dc6ba093d364b0732bc2f8e348e83" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-ddb6fea0a5725460382c09bf61fff370567e194f16fe55aae3059a98bccd28e3.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n UPDATE `coin_states` SET `kind` = 1 WHERE `coin_id` = ?\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 1 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "ddb6fea0a5725460382c09bf61fff370567e194f16fe55aae3059a98bccd28e3" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-de732b1577723b588fc9b5855074acbb44e2eb40b909da5316600bc8de74569a.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT\n `parent_coin_id`,\n `puzzle_hash`,\n `amount`,\n `puzzle_reveal`,\n `solution`\n FROM `transaction_spends` INDEXED BY `indexed_spend`\n WHERE `transaction_id` = ?\n ORDER BY `index` ASC\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "parent_coin_id", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | }, 11 | { 12 | "name": "puzzle_hash", 13 | "ordinal": 1, 14 | "type_info": "Blob" 15 | }, 16 | { 17 | "name": "amount", 18 | "ordinal": 2, 19 | "type_info": "Blob" 20 | }, 21 | { 22 | "name": "puzzle_reveal", 23 | "ordinal": 3, 24 | "type_info": "Blob" 25 | }, 26 | { 27 | "name": "solution", 28 | "ordinal": 4, 29 | "type_info": "Blob" 30 | } 31 | ], 32 | "parameters": { 33 | "Right": 1 34 | }, 35 | "nullable": [ 36 | false, 37 | false, 38 | false, 39 | false, 40 | false 41 | ] 42 | }, 43 | "hash": "de732b1577723b588fc9b5855074acbb44e2eb40b909da5316600bc8de74569a" 44 | } 45 | -------------------------------------------------------------------------------- /.sqlx/query-de8da54c8ad83b7d81c49b1866d87d733ee46365df08154d151eee1e97b95381.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "DELETE FROM `offers`", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 0 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "de8da54c8ad83b7d81c49b1866d87d733ee46365df08154d151eee1e97b95381" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-e0db9e9d4087d424a9ac831f673f622bd569b117ba045f65e3afe29dc95cb82c.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n UPDATE `coin_states`\n SET `transaction_id` = NULL\n WHERE `transaction_id` = ?\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 1 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "e0db9e9d4087d424a9ac831f673f622bd569b117ba045f65e3afe29dc95cb82c" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-e402dbc527157d8d32ee0a0093e2f1c3b5f2f0e95a392b57752bae69421f0514.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT `data`, `mime_type`, `hash_matches` FROM `nft_data` WHERE `hash` = ?", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "data", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | }, 11 | { 12 | "name": "mime_type", 13 | "ordinal": 1, 14 | "type_info": "Text" 15 | }, 16 | { 17 | "name": "hash_matches", 18 | "ordinal": 2, 19 | "type_info": "Bool" 20 | } 21 | ], 22 | "parameters": { 23 | "Right": 1 24 | }, 25 | "nullable": [ 26 | false, 27 | false, 28 | false 29 | ] 30 | }, 31 | "hash": "e402dbc527157d8d32ee0a0093e2f1c3b5f2f0e95a392b57752bae69421f0514" 32 | } 33 | -------------------------------------------------------------------------------- /.sqlx/query-e531b06fc1144b65d9c3821b89d8ec5a95a7e12c74636270d37e45afd9c96f32.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT COUNT(*) AS `count`\n FROM `coin_states`\n LEFT JOIN `transaction_spends` ON `coin_states`.`coin_id` = `transaction_spends`.`coin_id`\n LEFT JOIN `offered_coins` ON `coin_states`.`coin_id` = `offered_coins`.`coin_id`\n LEFT JOIN `offers` ON `offered_coins`.`offer_id` = `offers`.`offer_id`\n WHERE `coin_states`.`coin_id` = ?\n AND (`offers`.`offer_id` IS NULL OR `offers`.`status` > 0)\n AND `coin_states`.`transaction_id` IS NULL\n AND `transaction_spends`.`transaction_id` IS NULL\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "count", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "e531b06fc1144b65d9c3821b89d8ec5a95a7e12c74636270d37e45afd9c96f32" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-e87cae330e1ce739c1ddf2cdbf3b5537719edeec73b4d9b10f85b913cff8a03a.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `coin_id` FROM `transaction_spends` WHERE `transaction_id` = ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "coin_id", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "e87cae330e1ce739c1ddf2cdbf3b5537719edeec73b4d9b10f85b913cff8a03a" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-ea4bb56089373de61b9d5e4f7865c1090b0f684567d1e4de391373d3b36faa9d.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n INSERT INTO `offer_xch` (\n `offer_id`, `requested`, `amount`, `royalty`\n )\n VALUES (?, ?, ?, ?)\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 4 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "ea4bb56089373de61b9d5e4f7865c1090b0f684567d1e4de391373d3b36faa9d" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-ecdabf3ddfb2b9e7ddaee36c57cee4818b113faad1fa6169e486a7a1bc1be4da.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT `name`\n FROM `dids`\n WHERE `launcher_id` = ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "name", 8 | "ordinal": 0, 9 | "type_info": "Text" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | true 17 | ] 18 | }, 19 | "hash": "ecdabf3ddfb2b9e7ddaee36c57cee4818b113faad1fa6169e486a7a1bc1be4da" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-ee307ddbdd1ededf7d89140b631763945ae6ce871d40d7c6f627379ea7c80e14.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "UPDATE `dids` SET `created_height` = ? WHERE `coin_id` = ?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 2 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "ee307ddbdd1ededf7d89140b631763945ae6ce871d40d7c6f627379ea7c80e14" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-f359ce154cf02af67d1de36d43fe0d875561ec8f7fa77d81455ade2dd12305c0.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT COUNT(*) AS `count` FROM `nft_uris` WHERE `checked` = 1", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "count", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 0 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "f359ce154cf02af67d1de36d43fe0d875561ec8f7fa77d81455ade2dd12305c0" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-f9a4af9ab64ff0d5534dcacd98c14389ad37bb8163b360f4926d7177749ca69d.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "SELECT `thumbnail` FROM `nft_thumbnails` WHERE `hash` = ?", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "thumbnail", 8 | "ordinal": 0, 9 | "type_info": "Blob" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | false 17 | ] 18 | }, 19 | "hash": "f9a4af9ab64ff0d5534dcacd98c14389ad37bb8163b360f4926d7177749ca69d" 20 | } 21 | -------------------------------------------------------------------------------- /.sqlx/query-fe6fa6692a17c1f93c883c4ededcf7235705166af82c6b5d5ea8863f9a3846d4.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "UPDATE `nft_uris` SET `checked` = 1, `hash_matches` = ? WHERE `hash` = ? AND `uri` = ?", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 3 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "fe6fa6692a17c1f93c883c4ededcf7235705166af82c6b5d5ea8863f9a3846d4" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-ffeb193a66da6b7d218b6e21353dcf3854a56af2ae3bb1d31a5334db682b7471.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n DELETE FROM `future_did_names` WHERE `launcher_id` = ?\n ", 4 | "describe": { 5 | "columns": [], 6 | "parameters": { 7 | "Right": 1 8 | }, 9 | "nullable": [] 10 | }, 11 | "hash": "ffeb193a66da6b7d218b6e21353dcf3854a56af2ae3bb1d31a5334db682b7471" 12 | } 13 | -------------------------------------------------------------------------------- /.sqlx/query-fffa560e5861900542cef64dbe9be940485eea480762caf4e602732f9c5bfc73.json: -------------------------------------------------------------------------------- 1 | { 2 | "db_name": "SQLite", 3 | "query": "\n SELECT MAX(`index`) AS `max_index`\n FROM `derivations`\n WHERE `hardened` = ?\n ", 4 | "describe": { 5 | "columns": [ 6 | { 7 | "name": "max_index", 8 | "ordinal": 0, 9 | "type_info": "Integer" 10 | } 11 | ], 12 | "parameters": { 13 | "Right": 1 14 | }, 15 | "nullable": [ 16 | true 17 | ] 18 | }, 19 | "hash": "fffa560e5861900542cef64dbe9be940485eea480762caf4e602732f9c5bfc73" 20 | } 21 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "src/index.css", 9 | "baseColor": "neutral", 10 | "cssVariables": false, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /crates/sage-api/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sage-api" 3 | version = "0.10.3" 4 | edition = "2021" 5 | license = "Apache-2.0" 6 | description = "API definitions for the Sage wallet." 7 | authors = ["Rigidity "] 8 | homepage = "https://github.com/rigidity/sage" 9 | repository = "https://github.com/rigidity/sage" 10 | readme = { workspace = true } 11 | keywords = { workspace = true } 12 | categories = { workspace = true } 13 | 14 | [lints] 15 | workspace = true 16 | 17 | [features] 18 | tauri = ["dep:tauri-specta", "dep:specta"] 19 | 20 | [dependencies] 21 | sage-config = { workspace = true } 22 | serde = { workspace = true, features = ["derive"] } 23 | tauri-specta = { workspace = true, features = ["derive"], optional = true } 24 | specta = { workspace = true, features = ["derive", "bigdecimal"], optional = true } 25 | once_cell = { workspace = true } 26 | indexmap = { workspace = true, features = ["serde"] } 27 | -------------------------------------------------------------------------------- /crates/sage-api/endpoints-tauri.json: -------------------------------------------------------------------------------- 1 | { 2 | "filter_unlocked_coins": true, 3 | "get_asset_coins": true, 4 | "sign_message_with_public_key": true, 5 | "sign_message_by_address": true, 6 | "send_transaction_immediately": true 7 | } 8 | -------------------------------------------------------------------------------- /crates/sage-api/macro/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sage-api-macro" 3 | version = "0.10.3" 4 | edition = "2021" 5 | license = "Apache-2.0" 6 | description = "A macro for implementing things for each of the Sage API endpoints." 7 | authors = ["Rigidity "] 8 | homepage = "https://github.com/rigidity/sage" 9 | repository = "https://github.com/rigidity/sage" 10 | readme = { workspace = true } 11 | keywords = { workspace = true } 12 | categories = { workspace = true } 13 | 14 | [lints] 15 | workspace = true 16 | 17 | [lib] 18 | proc-macro = true 19 | 20 | [dependencies] 21 | quote = { workspace = true } 22 | convert_case = { workspace = true } 23 | serde_json = { workspace = true } 24 | indexmap = { workspace = true, features = ["serde"] } 25 | proc-macro2 = { workspace = true } 26 | -------------------------------------------------------------------------------- /crates/sage-api/src/events.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Debug, Clone, Serialize, Deserialize)] 4 | #[cfg_attr(feature = "tauri", derive(specta::Type, tauri_specta::Event))] 5 | #[serde(tag = "type", rename_all = "snake_case")] 6 | pub enum SyncEvent { 7 | Start { ip: String }, 8 | Stop, 9 | Subscribed, 10 | Derivation, 11 | CoinState, 12 | PuzzleBatchSynced, 13 | CatInfo, 14 | DidInfo, 15 | NftData, 16 | } 17 | -------------------------------------------------------------------------------- /crates/sage-api/src/lib.rs: -------------------------------------------------------------------------------- 1 | mod events; 2 | mod records; 3 | mod requests; 4 | mod types; 5 | 6 | pub use events::*; 7 | pub use records::*; 8 | pub use requests::*; 9 | pub use types::*; 10 | -------------------------------------------------------------------------------- /crates/sage-api/src/records.rs: -------------------------------------------------------------------------------- 1 | mod cat; 2 | mod coin; 3 | mod derivation; 4 | mod did; 5 | mod nft; 6 | mod nft_collection; 7 | mod offer; 8 | mod offer_summary; 9 | mod peer; 10 | mod pending_transaction; 11 | mod transaction; 12 | mod transaction_summary; 13 | 14 | pub use cat::*; 15 | pub use coin::*; 16 | pub use derivation::*; 17 | pub use did::*; 18 | pub use nft::*; 19 | pub use nft_collection::*; 20 | pub use offer::*; 21 | pub use offer_summary::*; 22 | pub use peer::*; 23 | pub use pending_transaction::*; 24 | pub use transaction::*; 25 | pub use transaction_summary::*; 26 | -------------------------------------------------------------------------------- /crates/sage-api/src/records/cat.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | use crate::Amount; 4 | 5 | #[derive(Debug, Clone, Serialize, Deserialize)] 6 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 7 | pub struct CatRecord { 8 | pub asset_id: String, 9 | pub name: Option, 10 | pub ticker: Option, 11 | pub description: Option, 12 | pub icon_url: Option, 13 | pub visible: bool, 14 | pub balance: Amount, 15 | } 16 | -------------------------------------------------------------------------------- /crates/sage-api/src/records/coin.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | use crate::Amount; 4 | 5 | #[derive(Debug, Clone, Serialize, Deserialize)] 6 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 7 | pub struct CoinRecord { 8 | pub coin_id: String, 9 | pub address: String, 10 | pub amount: Amount, 11 | pub created_height: Option, 12 | pub spent_height: Option, 13 | pub create_transaction_id: Option, 14 | pub spend_transaction_id: Option, 15 | pub offer_id: Option, 16 | pub spent_timestamp: Option, 17 | pub created_timestamp: Option, 18 | } 19 | -------------------------------------------------------------------------------- /crates/sage-api/src/records/derivation.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Debug, Clone, Serialize, Deserialize)] 4 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 5 | pub struct DerivationRecord { 6 | pub index: u32, 7 | pub public_key: String, 8 | pub address: String, 9 | } 10 | -------------------------------------------------------------------------------- /crates/sage-api/src/records/did.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | use crate::Amount; 4 | 5 | #[derive(Debug, Clone, Serialize, Deserialize)] 6 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 7 | pub struct DidRecord { 8 | pub launcher_id: String, 9 | pub name: Option, 10 | pub visible: bool, 11 | pub coin_id: String, 12 | pub address: String, 13 | pub amount: Amount, 14 | pub recovery_hash: Option, 15 | pub created_height: Option, 16 | pub create_transaction_id: Option, 17 | } 18 | -------------------------------------------------------------------------------- /crates/sage-api/src/records/nft_collection.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Debug, Clone, Serialize, Deserialize)] 4 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 5 | pub struct NftCollectionRecord { 6 | pub collection_id: String, 7 | pub did_id: String, 8 | pub metadata_collection_id: String, 9 | pub visible: bool, 10 | pub name: Option, 11 | pub icon: Option, 12 | } 13 | -------------------------------------------------------------------------------- /crates/sage-api/src/records/offer.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | use super::OfferSummary; 4 | 5 | #[derive(Debug, Clone, Serialize, Deserialize)] 6 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 7 | pub struct OfferRecord { 8 | pub offer_id: String, 9 | pub offer: String, 10 | pub status: OfferRecordStatus, 11 | pub creation_date: String, 12 | pub summary: OfferSummary, 13 | } 14 | 15 | #[derive(Debug, Clone, Copy, Serialize, Deserialize)] 16 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 17 | #[serde(rename_all = "snake_case")] 18 | pub enum OfferRecordStatus { 19 | Active = 0, 20 | Completed = 1, 21 | Cancelled = 2, 22 | Expired = 3, 23 | } 24 | -------------------------------------------------------------------------------- /crates/sage-api/src/records/peer.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Debug, Clone, Serialize, Deserialize)] 4 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 5 | pub struct PeerRecord { 6 | pub ip_addr: String, 7 | pub port: u16, 8 | pub peak_height: u32, 9 | pub user_managed: bool, 10 | } 11 | -------------------------------------------------------------------------------- /crates/sage-api/src/records/pending_transaction.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | use crate::Amount; 4 | 5 | #[derive(Debug, Clone, Serialize, Deserialize)] 6 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 7 | pub struct PendingTransactionRecord { 8 | pub transaction_id: String, 9 | pub fee: Amount, 10 | pub submitted_at: Option, 11 | } 12 | -------------------------------------------------------------------------------- /crates/sage-api/src/records/transaction.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | use crate::{AddressKind, Amount, AssetKind}; 4 | 5 | #[derive(Debug, Clone, Serialize, Deserialize)] 6 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 7 | pub struct TransactionRecord { 8 | pub height: u32, 9 | pub timestamp: Option, 10 | pub spent: Vec, 11 | pub created: Vec, 12 | } 13 | 14 | #[derive(Debug, Clone, Serialize, Deserialize)] 15 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 16 | pub struct TransactionCoin { 17 | pub coin_id: String, 18 | pub amount: Amount, 19 | pub address: Option, 20 | pub address_kind: AddressKind, 21 | #[serde(flatten)] 22 | pub kind: AssetKind, 23 | } 24 | -------------------------------------------------------------------------------- /crates/sage-api/src/requests.rs: -------------------------------------------------------------------------------- 1 | mod actions; 2 | mod data; 3 | mod keys; 4 | mod offers; 5 | mod settings; 6 | mod transactions; 7 | 8 | pub use actions::*; 9 | pub use data::*; 10 | pub use keys::*; 11 | pub use offers::*; 12 | pub use settings::*; 13 | pub use transactions::*; 14 | 15 | pub mod wallet_connect; 16 | -------------------------------------------------------------------------------- /crates/sage-api/src/types.rs: -------------------------------------------------------------------------------- 1 | mod address_kind; 2 | mod amount; 3 | mod asset_kind; 4 | mod error_kind; 5 | mod key_info; 6 | mod unit; 7 | 8 | pub use address_kind::*; 9 | pub use amount::*; 10 | pub use asset_kind::*; 11 | pub use error_kind::*; 12 | pub use key_info::*; 13 | pub use unit::*; 14 | -------------------------------------------------------------------------------- /crates/sage-api/src/types/address_kind.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] 4 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 5 | #[serde(rename_all = "snake_case")] 6 | pub enum AddressKind { 7 | Own, 8 | Burn, 9 | Launcher, 10 | Offer, 11 | External, 12 | Unknown, 13 | } 14 | -------------------------------------------------------------------------------- /crates/sage-api/src/types/asset_kind.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Debug, Clone, Serialize, Deserialize)] 4 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 5 | #[serde(tag = "type", rename_all = "snake_case")] 6 | pub enum AssetKind { 7 | Unknown, 8 | Xch, 9 | Launcher, 10 | Cat { 11 | asset_id: String, 12 | name: Option, 13 | ticker: Option, 14 | icon_url: Option, 15 | }, 16 | Did { 17 | launcher_id: String, 18 | name: Option, 19 | }, 20 | Nft { 21 | launcher_id: String, 22 | icon: Option, 23 | name: Option, 24 | }, 25 | } 26 | -------------------------------------------------------------------------------- /crates/sage-api/src/types/error_kind.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Debug, Clone, Copy, Serialize, Deserialize)] 4 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 5 | #[serde(rename_all = "snake_case")] 6 | pub enum ErrorKind { 7 | Wallet, 8 | Api, 9 | NotFound, 10 | Unauthorized, 11 | Internal, 12 | DatabaseMigration, 13 | Nfc, 14 | } 15 | -------------------------------------------------------------------------------- /crates/sage-api/src/types/key_info.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | 3 | #[derive(Debug, Clone, Serialize, Deserialize)] 4 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 5 | pub struct KeyInfo { 6 | pub name: String, 7 | pub fingerprint: u32, 8 | pub public_key: String, 9 | pub kind: KeyKind, 10 | pub has_secrets: bool, 11 | pub network_id: String, 12 | } 13 | 14 | #[derive(Debug, Clone, Copy, Serialize, Deserialize)] 15 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 16 | #[serde(rename_all = "snake_case")] 17 | pub enum KeyKind { 18 | Bls, 19 | } 20 | 21 | #[derive(Debug, Clone, Serialize, Deserialize)] 22 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 23 | pub struct SecretKeyInfo { 24 | pub mnemonic: Option, 25 | pub secret_key: String, 26 | } 27 | -------------------------------------------------------------------------------- /crates/sage-api/src/types/unit.rs: -------------------------------------------------------------------------------- 1 | use once_cell::sync::Lazy; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] 5 | #[cfg_attr(feature = "tauri", derive(specta::Type))] 6 | pub struct Unit { 7 | pub ticker: String, 8 | pub decimals: u8, 9 | } 10 | 11 | impl Unit { 12 | pub fn cat(ticker: String) -> Self { 13 | Self { 14 | ticker, 15 | decimals: 3, 16 | } 17 | } 18 | } 19 | 20 | pub static XCH: Lazy = Lazy::new(|| Unit { 21 | ticker: "XCH".to_string(), 22 | decimals: 12, 23 | }); 24 | 25 | pub static TXCH: Lazy = Lazy::new(|| Unit { 26 | ticker: "TXCH".to_string(), 27 | decimals: 12, 28 | }); 29 | 30 | pub static MOJOS: Lazy = Lazy::new(|| Unit { 31 | ticker: "Mojos".to_string(), 32 | decimals: 0, 33 | }); 34 | -------------------------------------------------------------------------------- /crates/sage-assets/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sage-assets" 3 | version = "0.10.3" 4 | edition = "2021" 5 | license = "Apache-2.0" 6 | description = "Fetches non-critical data from various APIs for use in Sage wallet." 7 | authors = ["Rigidity "] 8 | homepage = "https://github.com/rigidity/sage" 9 | repository = "https://github.com/rigidity/sage" 10 | readme = { workspace = true } 11 | keywords = { workspace = true } 12 | categories = { workspace = true } 13 | 14 | [lints] 15 | workspace = true 16 | 17 | [dependencies] 18 | chia = { workspace = true } 19 | serde = { workspace = true, features = ["derive"] } 20 | serde_json = { workspace = true } 21 | num-bigint = { workspace = true, features = ["serde"] } 22 | reqwest = { workspace = true } 23 | futures-lite = { workspace = true } 24 | futures-util = { workspace = true } 25 | thiserror = { workspace = true } 26 | tracing = { workspace = true } 27 | mime-sniffer = { workspace = true } 28 | image = { workspace = true } 29 | webp = { workspace = true } 30 | tokio = { workspace = true, features = ["sync"] } 31 | -------------------------------------------------------------------------------- /crates/sage-assets/src/lib.rs: -------------------------------------------------------------------------------- 1 | mod nfts; 2 | 3 | pub use nfts::*; 4 | -------------------------------------------------------------------------------- /crates/sage-assets/src/nfts.rs: -------------------------------------------------------------------------------- 1 | mod chip0007_metadata; 2 | mod fetch_nft_uri; 3 | mod thumbnail; 4 | 5 | pub use chip0007_metadata::*; 6 | pub use fetch_nft_uri::*; 7 | pub use thumbnail::*; 8 | -------------------------------------------------------------------------------- /crates/sage-cli/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sage-cli" 3 | version = "0.10.3" 4 | edition = "2021" 5 | license = "Apache-2.0" 6 | description = "A CLI and RPC for Sage wallet." 7 | authors = ["Rigidity "] 8 | homepage = "https://github.com/rigidity/sage" 9 | repository = "https://github.com/rigidity/sage" 10 | readme = { workspace = true } 11 | keywords = { workspace = true } 12 | categories = { workspace = true } 13 | 14 | [lints] 15 | workspace = true 16 | 17 | [[bin]] 18 | name = "sage" 19 | path = "src/main.rs" 20 | 21 | [dependencies] 22 | sage = { workspace = true } 23 | sage-api = { workspace = true } 24 | sage-api-macro = { workspace = true } 25 | sage-rpc = { workspace = true } 26 | sage-client = { workspace = true } 27 | dirs = { workspace = true } 28 | tokio = { workspace = true, features = ["full"] } 29 | anyhow = { workspace = true } 30 | serde = { workspace = true } 31 | serde_json = { workspace = true } 32 | rustls = { workspace = true } 33 | clap = { workspace = true, features = ["derive"] } 34 | -------------------------------------------------------------------------------- /crates/sage-cli/src/main.rs: -------------------------------------------------------------------------------- 1 | mod rpc; 2 | 3 | use anyhow::Result; 4 | use clap::Parser; 5 | use rpc::RpcCommand; 6 | use rustls::crypto::aws_lc_rs::default_provider; 7 | 8 | #[derive(Debug, Parser)] 9 | struct Args { 10 | #[clap(subcommand)] 11 | command: Command, 12 | } 13 | 14 | #[derive(Debug, Parser)] 15 | enum Command { 16 | Rpc { 17 | #[clap(subcommand)] 18 | command: RpcCommand, 19 | }, 20 | } 21 | 22 | #[tokio::main] 23 | async fn main() -> Result<()> { 24 | default_provider() 25 | .install_default() 26 | .expect("could not install AWS LC provider"); 27 | 28 | let args = Args::parse(); 29 | 30 | let path = dirs::data_dir() 31 | .expect("could not get data directory") 32 | .join("com.rigidnetwork.sage"); 33 | 34 | match args.command { 35 | Command::Rpc { command } => command.handle(path).await?, 36 | } 37 | 38 | Ok(()) 39 | } 40 | -------------------------------------------------------------------------------- /crates/sage-client/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sage-client" 3 | version = "0.10.3" 4 | edition = "2021" 5 | license = "Apache-2.0" 6 | description = "An RPC client for Sage wallet." 7 | authors = ["Rigidity "] 8 | homepage = "https://github.com/rigidity/sage" 9 | repository = "https://github.com/rigidity/sage" 10 | readme = { workspace = true } 11 | keywords = { workspace = true } 12 | categories = { workspace = true } 13 | 14 | [lints] 15 | workspace = true 16 | 17 | [dependencies] 18 | sage-api = { workspace = true } 19 | sage-api-macro = { workspace = true } 20 | sage-config = { workspace = true } 21 | dirs = { workspace = true } 22 | serde = { workspace = true } 23 | serde_json = { workspace = true } 24 | reqwest = { workspace = true, features = ["http2", "rustls-tls-webpki-roots", "json"] } 25 | toml = { workspace = true } 26 | thiserror = { workspace = true } 27 | -------------------------------------------------------------------------------- /crates/sage-client/src/error.rs: -------------------------------------------------------------------------------- 1 | use std::{io, net::AddrParseError}; 2 | 3 | use reqwest::StatusCode; 4 | use thiserror::Error; 5 | 6 | #[derive(Debug, Error)] 7 | pub enum SageRpcError { 8 | #[error("Reqwest error: {0}")] 9 | Reqwest(#[from] reqwest::Error), 10 | 11 | #[error("JSON error: {0}")] 12 | Json(#[from] serde_json::Error), 13 | 14 | #[error("Config error: {0}")] 15 | Config(#[from] toml::de::Error), 16 | 17 | #[error("API error {0}: {1}")] 18 | Api(StatusCode, String), 19 | 20 | #[error("IO error: {0}")] 21 | Io(#[from] io::Error), 22 | 23 | #[error("Invalid path")] 24 | InvalidPath, 25 | 26 | #[error("Address parse error: {0}")] 27 | AddrParse(#[from] AddrParseError), 28 | 29 | #[error("Missing data directory")] 30 | MissingDataDir, 31 | } 32 | -------------------------------------------------------------------------------- /crates/sage-config/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sage-config" 3 | version = "0.10.3" 4 | edition = "2021" 5 | license = "Apache-2.0" 6 | description = "Configuration for the Sage wallet." 7 | authors = ["Rigidity "] 8 | homepage = "https://github.com/rigidity/sage" 9 | repository = "https://github.com/rigidity/sage" 10 | readme = { workspace = true } 11 | keywords = { workspace = true } 12 | categories = { workspace = true } 13 | 14 | [lints] 15 | workspace = true 16 | 17 | [dependencies] 18 | chia-wallet-sdk = { workspace = true } 19 | chia = { workspace = true } 20 | serde = { workspace = true, features = ["derive"] } 21 | serde_with = { workspace = true, features = ["hex"] } 22 | indexmap = { workspace = true, features = ["serde"] } 23 | specta = { workspace = true, features = ["derive", "indexmap"] } 24 | hex = { workspace = true } 25 | once_cell = { workspace = true } 26 | 27 | [dev-dependencies] 28 | expect-test = { workspace = true } 29 | toml = { workspace = true, features = ["preserve_order"] } 30 | serde_json = { workspace = true } 31 | -------------------------------------------------------------------------------- /crates/sage-config/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::needless_raw_string_hashes)] 2 | 3 | mod config; 4 | mod network; 5 | mod old; 6 | mod wallet; 7 | 8 | pub use config::*; 9 | pub use network::*; 10 | pub use old::*; 11 | pub use wallet::*; 12 | -------------------------------------------------------------------------------- /crates/sage-database/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sage-database" 3 | version = "0.10.3" 4 | edition = "2021" 5 | license = "Apache-2.0" 6 | description = "The SQLite database for Sage." 7 | authors = ["Rigidity "] 8 | homepage = "https://github.com/rigidity/sage" 9 | repository = "https://github.com/rigidity/sage" 10 | readme = { workspace = true } 11 | keywords = { workspace = true } 12 | categories = { workspace = true } 13 | 14 | [lints] 15 | workspace = true 16 | 17 | [dependencies] 18 | chia = { workspace = true } 19 | chia-wallet-sdk = { workspace = true } 20 | sqlx = { workspace = true, features = ["sqlite"] } 21 | thiserror = { workspace = true } 22 | hex = { workspace = true } 23 | tracing = { workspace = true } 24 | -------------------------------------------------------------------------------- /crates/sage-database/src/primitives.rs: -------------------------------------------------------------------------------- 1 | mod cats; 2 | mod dids; 3 | mod nfts; 4 | mod xch; 5 | 6 | pub use cats::*; 7 | pub use nfts::*; 8 | -------------------------------------------------------------------------------- /crates/sage-database/src/rows.rs: -------------------------------------------------------------------------------- 1 | mod cat; 2 | mod cat_coin; 3 | mod coin_state; 4 | mod collection; 5 | mod derivation; 6 | mod did; 7 | mod did_coin; 8 | mod nft; 9 | mod nft_coin; 10 | mod offer; 11 | 12 | pub use cat::*; 13 | pub use cat_coin::*; 14 | pub use coin_state::*; 15 | pub use collection::*; 16 | pub use derivation::*; 17 | pub use did::*; 18 | pub use did_coin::*; 19 | pub use nft::*; 20 | pub(crate) use nft_coin::*; 21 | pub use offer::*; 22 | 23 | use crate::DatabaseError; 24 | 25 | pub(crate) trait IntoRow { 26 | type Row; 27 | 28 | fn into_row(self) -> Result; 29 | } 30 | 31 | pub(crate) fn into_row(t: T) -> Result { 32 | t.into_row() 33 | } 34 | -------------------------------------------------------------------------------- /crates/sage-database/src/rows/cat.rs: -------------------------------------------------------------------------------- 1 | use chia::protocol::Bytes32; 2 | 3 | use crate::{to_bytes32, DatabaseError}; 4 | 5 | use super::IntoRow; 6 | 7 | pub(crate) struct CatSql { 8 | pub asset_id: Vec, 9 | pub name: Option, 10 | pub ticker: Option, 11 | pub description: Option, 12 | pub icon: Option, 13 | pub visible: bool, 14 | pub fetched: bool, 15 | } 16 | 17 | #[derive(Debug, Clone)] 18 | pub struct CatRow { 19 | pub asset_id: Bytes32, 20 | pub name: Option, 21 | pub ticker: Option, 22 | pub description: Option, 23 | pub icon: Option, 24 | pub visible: bool, 25 | pub fetched: bool, 26 | } 27 | 28 | impl IntoRow for CatSql { 29 | type Row = CatRow; 30 | 31 | fn into_row(self) -> Result { 32 | Ok(CatRow { 33 | asset_id: to_bytes32(&self.asset_id)?, 34 | name: self.name.clone(), 35 | ticker: self.ticker.clone(), 36 | description: self.description.clone(), 37 | icon: self.icon.clone(), 38 | visible: self.visible, 39 | fetched: self.fetched, 40 | }) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /crates/sage-database/src/rows/collection.rs: -------------------------------------------------------------------------------- 1 | use chia::protocol::Bytes32; 2 | 3 | use crate::{to_bytes32, DatabaseError}; 4 | 5 | use super::IntoRow; 6 | 7 | pub(crate) struct CollectionSql { 8 | pub collection_id: Vec, 9 | pub did_id: Vec, 10 | pub metadata_collection_id: String, 11 | pub visible: bool, 12 | pub name: Option, 13 | pub icon: Option, 14 | } 15 | 16 | #[derive(Debug, Clone)] 17 | pub struct CollectionRow { 18 | pub collection_id: Bytes32, 19 | pub did_id: Bytes32, 20 | pub metadata_collection_id: String, 21 | pub visible: bool, 22 | pub name: Option, 23 | pub icon: Option, 24 | } 25 | 26 | impl IntoRow for CollectionSql { 27 | type Row = CollectionRow; 28 | 29 | fn into_row(self) -> Result { 30 | Ok(CollectionRow { 31 | collection_id: to_bytes32(&self.collection_id)?, 32 | did_id: to_bytes32(&self.did_id)?, 33 | metadata_collection_id: self.metadata_collection_id.clone(), 34 | visible: self.visible, 35 | name: self.name.clone(), 36 | icon: self.icon.clone(), 37 | }) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /crates/sage-database/src/rows/derivation.rs: -------------------------------------------------------------------------------- 1 | use chia::{bls::PublicKey, protocol::Bytes32}; 2 | 3 | use crate::{to_bytes, to_bytes32, DatabaseError}; 4 | 5 | use super::IntoRow; 6 | 7 | pub(crate) struct DerivationSql { 8 | pub p2_puzzle_hash: Vec, 9 | pub index: i64, 10 | pub hardened: bool, 11 | pub synthetic_key: Vec, 12 | } 13 | 14 | #[derive(Debug, Clone, Copy)] 15 | pub struct DerivationRow { 16 | pub p2_puzzle_hash: Bytes32, 17 | pub index: u32, 18 | pub hardened: bool, 19 | pub synthetic_key: PublicKey, 20 | } 21 | 22 | impl IntoRow for DerivationSql { 23 | type Row = DerivationRow; 24 | 25 | fn into_row(self) -> Result { 26 | Ok(DerivationRow { 27 | p2_puzzle_hash: to_bytes32(&self.p2_puzzle_hash)?, 28 | index: self.index.try_into()?, 29 | hardened: self.hardened, 30 | synthetic_key: PublicKey::from_bytes(&to_bytes(&self.synthetic_key)?)?, 31 | }) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /crates/sage-database/src/rows/did.rs: -------------------------------------------------------------------------------- 1 | use chia::protocol::Bytes32; 2 | 3 | use crate::{to_bytes32, DatabaseError}; 4 | 5 | use super::IntoRow; 6 | 7 | pub(crate) struct DidSql { 8 | pub launcher_id: Vec, 9 | pub coin_id: Vec, 10 | pub name: Option, 11 | pub visible: bool, 12 | pub is_owned: bool, 13 | pub created_height: Option, 14 | } 15 | 16 | #[derive(Debug, Clone)] 17 | pub struct DidRow { 18 | pub launcher_id: Bytes32, 19 | pub coin_id: Bytes32, 20 | pub name: Option, 21 | pub is_owned: bool, 22 | pub visible: bool, 23 | pub created_height: Option, 24 | } 25 | 26 | impl IntoRow for DidSql { 27 | type Row = DidRow; 28 | 29 | fn into_row(self) -> Result { 30 | Ok(DidRow { 31 | launcher_id: to_bytes32(&self.launcher_id)?, 32 | coin_id: to_bytes32(&self.coin_id)?, 33 | name: self.name, 34 | is_owned: self.is_owned, 35 | visible: self.visible, 36 | created_height: self.created_height.map(TryInto::try_into).transpose()?, 37 | }) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /crates/sage-database/src/utils.rs: -------------------------------------------------------------------------------- 1 | use chia::protocol::Bytes32; 2 | 3 | use crate::{DatabaseError, Result}; 4 | 5 | pub fn to_bytes(slice: &[u8]) -> Result<[u8; N]> { 6 | slice 7 | .try_into() 8 | .map_err(|_| DatabaseError::InvalidLength(slice.len(), N)) 9 | } 10 | 11 | pub fn to_bytes32(slice: &[u8]) -> Result { 12 | to_bytes(slice).map(Bytes32::new) 13 | } 14 | 15 | pub fn to_u64(slice: &[u8]) -> Result { 16 | Ok(u64::from_be_bytes(to_bytes::<8>(slice)?)) 17 | } 18 | -------------------------------------------------------------------------------- /crates/sage-keychain/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sage-keychain" 3 | version = "0.10.3" 4 | edition = "2021" 5 | license = "Apache-2.0" 6 | description = "A simple password based keychain implementation for Sage." 7 | authors = ["Rigidity "] 8 | homepage = "https://github.com/rigidity/sage" 9 | repository = "https://github.com/rigidity/sage" 10 | readme = { workspace = true } 11 | keywords = { workspace = true } 12 | categories = { workspace = true } 13 | 14 | [lints] 15 | workspace = true 16 | 17 | [dependencies] 18 | chia = { workspace = true } 19 | bip39 = { workspace = true } 20 | thiserror = { workspace = true } 21 | serde = { workspace = true, features = ["derive"] } 22 | serde_with = { workspace = true, features = ["hex"] } 23 | bincode = { workspace = true } 24 | aes-gcm = { workspace = true } 25 | rand = { workspace = true } 26 | rand_chacha = { workspace = true } 27 | argon2 = { workspace = true } 28 | -------------------------------------------------------------------------------- /crates/sage-keychain/src/error.rs: -------------------------------------------------------------------------------- 1 | use thiserror::Error; 2 | 3 | #[derive(Debug, Error)] 4 | pub enum KeychainError { 5 | #[error("Encoding error: {0}")] 6 | Bincode(#[from] bincode::Error), 7 | 8 | #[error("Argon2 error: {0}")] 9 | Argon2(argon2::Error), 10 | 11 | #[error("BLS error: {0}")] 12 | Bls(#[from] chia::bls::Error), 13 | 14 | #[error("BIP39 error: {0}")] 15 | Bip39(#[from] bip39::Error), 16 | 17 | #[error("Could not encrypt key data")] 18 | Encrypt, 19 | 20 | #[error("Could not decrypt key data")] 21 | Decrypt, 22 | 23 | #[error("Key already exists")] 24 | KeyExists, 25 | } 26 | -------------------------------------------------------------------------------- /crates/sage-keychain/src/key_data.rs: -------------------------------------------------------------------------------- 1 | use serde::{Deserialize, Serialize}; 2 | use serde_with::{serde_as, Bytes}; 3 | 4 | use crate::encrypt::Encrypted; 5 | 6 | #[serde_as] 7 | #[derive(Debug, Clone, Serialize, Deserialize)] 8 | #[repr(u8)] 9 | pub enum KeyData { 10 | Public { 11 | #[serde_as(as = "Bytes")] 12 | master_pk: [u8; 48], 13 | }, 14 | Secret { 15 | #[serde_as(as = "Bytes")] 16 | master_pk: [u8; 48], 17 | entropy: bool, 18 | encrypted: Encrypted, 19 | }, 20 | } 21 | 22 | #[serde_as] 23 | #[derive(Debug, Clone, Serialize, Deserialize)] 24 | pub struct SecretKeyData(#[serde_as(as = "Bytes")] pub Vec); 25 | -------------------------------------------------------------------------------- /crates/sage-keychain/src/lib.rs: -------------------------------------------------------------------------------- 1 | mod encrypt; 2 | mod error; 3 | mod key_data; 4 | mod keychain; 5 | 6 | pub use error::*; 7 | pub use keychain::*; 8 | -------------------------------------------------------------------------------- /crates/sage-rpc/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sage-rpc" 3 | version = "0.10.3" 4 | edition = "2021" 5 | license = "Apache-2.0" 6 | description = "An RPC server for Sage wallet." 7 | authors = ["Rigidity "] 8 | homepage = "https://github.com/rigidity/sage" 9 | repository = "https://github.com/rigidity/sage" 10 | readme = { workspace = true } 11 | keywords = { workspace = true } 12 | categories = { workspace = true } 13 | 14 | [lints] 15 | workspace = true 16 | 17 | [dependencies] 18 | sage = { workspace = true } 19 | sage-api = { workspace = true } 20 | sage-api-macro = { workspace = true } 21 | axum = { workspace = true } 22 | axum-server = { workspace = true, features = ["tls-rustls"] } 23 | tokio = { workspace = true, features = ["full"] } 24 | anyhow = { workspace = true } 25 | tracing = { workspace = true } 26 | serde = { workspace = true } 27 | rustls = { workspace = true } 28 | rustls-pemfile = { workspace = true } 29 | -------------------------------------------------------------------------------- /crates/sage-wallet/src/lib.rs: -------------------------------------------------------------------------------- 1 | mod child_kind; 2 | mod coin_kind; 3 | mod database; 4 | mod error; 5 | mod queues; 6 | mod sync_manager; 7 | mod transaction; 8 | mod utils; 9 | mod wallet; 10 | mod wallet_peer; 11 | 12 | pub use child_kind::*; 13 | pub use coin_kind::*; 14 | pub use database::*; 15 | pub use error::*; 16 | pub use queues::*; 17 | pub use sync_manager::*; 18 | pub use transaction::*; 19 | pub use utils::*; 20 | pub use wallet::*; 21 | pub use wallet_peer::*; 22 | 23 | #[cfg(test)] 24 | mod test; 25 | 26 | #[cfg(test)] 27 | pub use test::*; 28 | -------------------------------------------------------------------------------- /crates/sage-wallet/src/queues.rs: -------------------------------------------------------------------------------- 1 | mod blocktime_queue; 2 | mod cat_queue; 3 | mod nft_uri_queue; 4 | mod offer_queue; 5 | mod puzzle_queue; 6 | mod transaction_queue; 7 | 8 | pub use blocktime_queue::*; 9 | pub use cat_queue::*; 10 | pub use nft_uri_queue::*; 11 | pub use offer_queue::*; 12 | pub use puzzle_queue::*; 13 | pub use transaction_queue::*; 14 | -------------------------------------------------------------------------------- /crates/sage-wallet/src/sync_manager/sync_command.rs: -------------------------------------------------------------------------------- 1 | use std::{net::IpAddr, sync::Arc}; 2 | 3 | use chia::protocol::{Bytes32, Message}; 4 | use sage_config::Network; 5 | 6 | use crate::Wallet; 7 | 8 | #[derive(Debug)] 9 | pub enum SyncCommand { 10 | SwitchWallet { wallet: Option> }, 11 | SwitchNetwork(Network), 12 | HandleMessage { ip: IpAddr, message: Message }, 13 | ConnectPeer { ip: IpAddr, user_managed: bool }, 14 | SubscribeCoins { coin_ids: Vec }, 15 | SubscribePuzzles { puzzle_hashes: Vec }, 16 | ConnectionClosed(IpAddr), 17 | SetTargetPeers(usize), 18 | SetDiscoverPeers(bool), 19 | } 20 | -------------------------------------------------------------------------------- /crates/sage-wallet/src/sync_manager/sync_event.rs: -------------------------------------------------------------------------------- 1 | use std::net::IpAddr; 2 | 3 | use chia::protocol::Bytes32; 4 | use sage_database::OfferStatus; 5 | 6 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] 7 | pub enum SyncEvent { 8 | Start(IpAddr), 9 | Stop, 10 | Subscribed, 11 | DerivationIndex { 12 | next_index: u32, 13 | }, 14 | CoinsUpdated, 15 | TransactionUpdated { 16 | transaction_id: Bytes32, 17 | }, 18 | TransactionEnded { 19 | transaction_id: Bytes32, 20 | success: bool, 21 | }, 22 | OfferUpdated { 23 | offer_id: Bytes32, 24 | status: OfferStatus, 25 | }, 26 | PuzzleBatchSynced, 27 | CatInfo, 28 | DidInfo, 29 | NftData, 30 | } 31 | -------------------------------------------------------------------------------- /crates/sage-wallet/src/utils.rs: -------------------------------------------------------------------------------- 1 | mod fetch_nft_did; 2 | mod fetch_nft_offer_details; 3 | mod offchain_metadata; 4 | mod submit; 5 | 6 | pub use fetch_nft_did::*; 7 | pub use fetch_nft_offer_details::*; 8 | pub use offchain_metadata::*; 9 | pub use submit::*; 10 | -------------------------------------------------------------------------------- /crates/sage-wallet/src/wallet.rs: -------------------------------------------------------------------------------- 1 | use chia::{bls::PublicKey, protocol::Bytes32}; 2 | use sage_database::Database; 3 | 4 | mod cat_coin_management; 5 | mod cat_spends; 6 | mod cats; 7 | mod coin_selection; 8 | mod derivations; 9 | mod did_assign; 10 | mod dids; 11 | mod memos; 12 | mod multi_send; 13 | mod nfts; 14 | mod offer; 15 | mod p2_coin_management; 16 | mod p2_send; 17 | mod p2_spends; 18 | mod signing; 19 | 20 | pub use multi_send::*; 21 | pub use nfts::*; 22 | pub use offer::*; 23 | 24 | #[derive(Debug)] 25 | pub struct Wallet { 26 | pub db: Database, 27 | pub fingerprint: u32, 28 | pub intermediate_pk: PublicKey, 29 | pub genesis_challenge: Bytes32, 30 | } 31 | 32 | impl Wallet { 33 | pub fn new( 34 | db: Database, 35 | fingerprint: u32, 36 | intermediate_pk: PublicKey, 37 | genesis_challenge: Bytes32, 38 | ) -> Self { 39 | Self { 40 | db, 41 | fingerprint, 42 | intermediate_pk, 43 | genesis_challenge, 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /crates/sage-wallet/src/wallet/cat_spends.rs: -------------------------------------------------------------------------------- 1 | use chia_wallet_sdk::{ 2 | driver::{Cat, CatSpend, SpendContext, SpendWithConditions, StandardLayer}, 3 | types::Conditions, 4 | }; 5 | 6 | use crate::WalletError; 7 | 8 | use super::Wallet; 9 | 10 | impl Wallet { 11 | /// Spends the CATs with the given conditions. No outputs are created automatically. 12 | pub(crate) async fn spend_cat_coins( 13 | &self, 14 | ctx: &mut SpendContext, 15 | cats: impl Iterator, 16 | ) -> Result<(), WalletError> { 17 | let mut cat_spends = Vec::new(); 18 | 19 | for (cat, conditions) in cats { 20 | // We need to figure out what the synthetic public key is for this CAT coin. 21 | let synthetic_key = self.db.synthetic_key(cat.p2_puzzle_hash).await?; 22 | 23 | // Create the standard p2 layer for the key. 24 | let p2 = StandardLayer::new(synthetic_key); 25 | 26 | // Spend the CAT with the given conditions. 27 | cat_spends.push(CatSpend::new( 28 | cat, 29 | p2.spend_with_conditions(ctx, conditions)?, 30 | )); 31 | } 32 | 33 | Cat::spend_all(ctx, &cat_spends)?; 34 | 35 | Ok(()) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /crates/sage-wallet/src/wallet/memos.rs: -------------------------------------------------------------------------------- 1 | use chia::protocol::{Bytes, Bytes32}; 2 | use chia_wallet_sdk::{driver::SpendContext, prelude::Memos}; 3 | 4 | use crate::WalletError; 5 | 6 | pub fn calculate_memos( 7 | ctx: &mut SpendContext, 8 | p2_puzzle_hash: Bytes32, 9 | include_hint: bool, 10 | memos: Option>, 11 | ) -> Result, WalletError> { 12 | let mut result = None; 13 | 14 | if include_hint { 15 | result = Some(vec![p2_puzzle_hash.into()]); 16 | } 17 | 18 | if let Some(memos) = memos { 19 | if let Some(result) = result.as_mut() { 20 | result.extend(memos); 21 | } else { 22 | result = Some(memos); 23 | } 24 | } 25 | 26 | Ok(if let Some(result) = result { 27 | Some(ctx.memos(&result)?) 28 | } else { 29 | None 30 | }) 31 | } 32 | -------------------------------------------------------------------------------- /crates/sage-wallet/src/wallet/offer/aggregate_offer.rs: -------------------------------------------------------------------------------- 1 | use chia::{ 2 | bls::Signature, 3 | protocol::{Bytes32, SpendBundle}, 4 | }; 5 | use chia_wallet_sdk::driver::Offer; 6 | 7 | pub fn sort_offer(offer: Offer) -> Offer { 8 | let spend_bundle: SpendBundle = offer.into(); 9 | 10 | let mut offered_coin_spends = Vec::new(); 11 | let mut requested_coin_spends = Vec::new(); 12 | 13 | for coin_spend in spend_bundle.coin_spends { 14 | if coin_spend.coin.parent_coin_info == Bytes32::default() { 15 | requested_coin_spends.push(coin_spend); 16 | } else { 17 | offered_coin_spends.push(coin_spend); 18 | } 19 | } 20 | 21 | Offer::new(SpendBundle::new( 22 | [requested_coin_spends, offered_coin_spends].concat(), 23 | spend_bundle.aggregated_signature, 24 | )) 25 | } 26 | 27 | pub fn aggregate_offers(offers: Vec) -> Offer { 28 | let mut aggregate = SpendBundle::new(Vec::new(), Signature::default()); 29 | 30 | for offer in offers { 31 | let spend_bundle: SpendBundle = offer.into(); 32 | aggregate.coin_spends.extend(spend_bundle.coin_spends); 33 | aggregate.aggregated_signature += &spend_bundle.aggregated_signature; 34 | } 35 | 36 | sort_offer(Offer::new(aggregate)) 37 | } 38 | -------------------------------------------------------------------------------- /crates/sage/src/endpoints.rs: -------------------------------------------------------------------------------- 1 | mod actions; 2 | mod data; 3 | mod keys; 4 | mod offers; 5 | mod settings; 6 | mod transactions; 7 | mod wallet_connect; 8 | -------------------------------------------------------------------------------- /crates/sage/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::needless_pass_by_value)] 2 | 3 | mod endpoints; 4 | mod error; 5 | mod peers; 6 | mod sage; 7 | mod utils; 8 | 9 | pub use error::*; 10 | pub use sage::*; 11 | 12 | pub(crate) use utils::*; 13 | -------------------------------------------------------------------------------- /crates/sage/src/peers.rs: -------------------------------------------------------------------------------- 1 | use std::{ 2 | collections::{HashMap, HashSet}, 3 | net::IpAddr, 4 | }; 5 | 6 | use serde::{Deserialize, Serialize}; 7 | 8 | #[derive(Debug, Default, Clone, Serialize, Deserialize)] 9 | pub struct Peers { 10 | pub connections: HashSet, 11 | pub user_managed: HashSet, 12 | pub banned: HashMap, 13 | } 14 | 15 | impl Peers { 16 | pub fn to_bytes(&self) -> bincode::Result> { 17 | bincode::serialize(self) 18 | } 19 | 20 | pub fn from_bytes(bytes: &[u8]) -> bincode::Result { 21 | bincode::deserialize(bytes) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /crates/sage/src/utils.rs: -------------------------------------------------------------------------------- 1 | mod coins; 2 | mod confirmation; 3 | mod offer_status; 4 | mod offer_summary; 5 | mod parse; 6 | mod spends; 7 | 8 | pub use coins::*; 9 | pub use confirmation::*; 10 | pub use offer_status::*; 11 | pub use parse::*; 12 | 13 | use crate::Error; 14 | use chia::protocol::Bytes32; 15 | 16 | pub fn to_bytes(slice: &[u8]) -> Result<[u8; N], Error> { 17 | slice 18 | .try_into() 19 | .map_err(|_| Error::Database(sage_database::DatabaseError::InvalidLength(slice.len(), N))) 20 | } 21 | 22 | pub fn to_bytes32(slice: &[u8]) -> Result { 23 | to_bytes(slice).map(Bytes32::new) 24 | } 25 | 26 | pub fn to_u64(slice: &[u8]) -> Result { 27 | Ok(u64::from_be_bytes(to_bytes::<8>(slice)?)) 28 | } 29 | 30 | pub fn to_bytes32_opt(bytes: Option>) -> Option { 31 | bytes.map(|b| to_bytes32(&b).unwrap_or_default()) 32 | } 33 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | Sage 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /lingui.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from '@lingui/cli'; 2 | import { formatter } from '@lingui/format-po'; 3 | 4 | export default defineConfig({ 5 | sourceLocale: 'en-US', 6 | locales: ['en-US', 'de-DE', 'zh-CN', 'es-MX'], 7 | format: formatter({ printPlaceholdersInComments: false }), 8 | 9 | catalogs: [ 10 | { 11 | path: './src/locales/{locale}/messages', 12 | include: ['src'], 13 | }, 14 | ], 15 | }); 16 | -------------------------------------------------------------------------------- /migrations/0004_transactions.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `coin_states` ADD COLUMN `kind` INTEGER NOT NULL DEFAULT 0; 2 | CREATE INDEX `coin_kind` ON `coin_states` (`kind`); 3 | CREATE INDEX `coin_kind_spent` ON `coin_states` (`kind`, `spent_height` ASC); 4 | 5 | UPDATE `coin_states` SET `kind` = 1 WHERE `coin_id` IN (SELECT `coin_id` FROM `p2_coins`); 6 | DROP TABLE `p2_coins`; 7 | 8 | UPDATE `coin_states` SET `kind` = 2 WHERE `coin_id` IN (SELECT `coin_id` FROM `cat_coins`); 9 | UPDATE `coin_states` SET `kind` = 3 WHERE `coin_id` IN (SELECT `coin_id` FROM `nft_coins`); 10 | UPDATE `coin_states` SET `kind` = 4 WHERE `coin_id` IN (SELECT `coin_id` FROM `did_coins`); 11 | -------------------------------------------------------------------------------- /migrations/0005_nft_hash.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `nft_uris` ADD COLUMN `hash_matches` BOOLEAN; 2 | 3 | UPDATE `nft_uris` SET `hash_matches` = 1; 4 | 5 | ALTER TABLE `nft_data` ADD COLUMN `hash_matches` BOOLEAN NOT NULL DEFAULT 1; 6 | -------------------------------------------------------------------------------- /migrations/0007_owner_did_indices.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX `nft_did_name`; 2 | DROP INDEX `nft_did_recent`; 3 | 4 | CREATE INDEX `nft_minter_did_name` ON `nfts` ( 5 | `is_owned`, 6 | `minter_did`, 7 | `visible` DESC, 8 | `is_pending` DESC, 9 | `is_named` DESC, 10 | `name` ASC, 11 | `launcher_id` ASC 12 | ); 13 | 14 | CREATE INDEX `nft_minter_did_recent` ON `nfts` ( 15 | `is_owned`, 16 | `minter_did`, 17 | `visible` DESC, 18 | `is_pending` DESC, 19 | `created_height` DESC, 20 | `launcher_id` ASC 21 | ); 22 | 23 | CREATE INDEX `nft_owner_did_name` ON `nfts` ( 24 | `is_owned`, 25 | `owner_did`, 26 | `visible` DESC, 27 | `is_pending` DESC, 28 | `is_named` DESC, 29 | `name` ASC, 30 | `launcher_id` ASC 31 | ); 32 | 33 | CREATE INDEX `nft_owner_did_recent` ON `nfts` ( 34 | `is_owned`, 35 | `owner_did`, 36 | `visible` DESC, 37 | `is_pending` DESC, 38 | `created_height` DESC, 39 | `launcher_id` ASC 40 | ); 41 | -------------------------------------------------------------------------------- /migrations/0009_rust_migrations.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `rust_migrations` ( 2 | `version` INTEGER PRIMARY KEY 3 | ); 4 | 5 | INSERT INTO `rust_migrations` (`version`) VALUES (0); 6 | -------------------------------------------------------------------------------- /migrations/0010_blockinfo.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `blockinfo` ( 2 | `height` INTEGER NOT NULL PRIMARY KEY, 3 | `unix_time` BIGINT NOT NULL 4 | ); 5 | 6 | CREATE INDEX `blockinfo_index` ON `blockinfo` (`height`); 7 | 8 | ALTER TABLE `coin_states` ADD COLUMN `spent_unixtime` BIGINT; 9 | ALTER TABLE `coin_states` ADD COLUMN `created_unixtime` BIGINT; 10 | -------------------------------------------------------------------------------- /migrations/0011_thumbnails.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `nft_thumbnails` ( 2 | `hash` BLOB NOT NULL PRIMARY KEY, 3 | `icon` BLOB NOT NULL, 4 | `thumbnail` BLOB NOT NULL 5 | ); 6 | 7 | DELETE FROM `nft_data`; 8 | UPDATE `nft_uris` SET `checked` = 0; 9 | -------------------------------------------------------------------------------- /migrations/0012_drop_fts_tables.sql: -------------------------------------------------------------------------------- 1 | -- Drop triggers first to prevent any issues during table deletion 2 | DROP TRIGGER IF EXISTS nfts_ai; 3 | DROP TRIGGER IF EXISTS nfts_ad; 4 | DROP TRIGGER IF EXISTS nfts_au; 5 | 6 | -- Drop the FTS virtual table and its shadow tables 7 | DROP TABLE IF EXISTS nft_name_fts; 8 | -------------------------------------------------------------------------------- /migrations/0013_nft_edition.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `nfts` ADD COLUMN `edition_number` INTEGER; 2 | ALTER TABLE `nfts` ADD COLUMN `edition_total` INTEGER; -------------------------------------------------------------------------------- /migrations/0014_nft_edition_indexes.sql: -------------------------------------------------------------------------------- 1 | -- Update existing name-based indexes to include edition_number for better sorting 2 | 3 | -- Drop existing name-based indexes 4 | DROP INDEX IF EXISTS `nft_name`; 5 | DROP INDEX IF EXISTS `nft_col_name`; 6 | DROP INDEX IF EXISTS `nft_minter_did_name`; 7 | DROP INDEX IF EXISTS `nft_owner_did_name`; 8 | 9 | -- Recreate them with edition_number included 10 | CREATE INDEX `nft_name` ON `nfts` (`is_owned`, `visible` DESC, `is_pending` DESC, `is_named` DESC, `name` ASC, `edition_number` ASC, `launcher_id` ASC); 11 | CREATE INDEX `nft_col_name` ON `nfts` (`is_owned`, `collection_id`, `visible` DESC, `is_pending` DESC, `is_named` DESC, `name` ASC, `edition_number` ASC, `launcher_id` ASC); 12 | CREATE INDEX `nft_minter_did_name` ON `nfts` ( 13 | `is_owned`, 14 | `minter_did`, 15 | `visible` DESC, 16 | `is_pending` DESC, 17 | `is_named` DESC, 18 | `name` ASC, 19 | `edition_number` ASC, 20 | `launcher_id` ASC 21 | ); 22 | CREATE INDEX `nft_owner_did_name` ON `nfts` ( 23 | `is_owned`, 24 | `owner_did`, 25 | `visible` DESC, 26 | `is_pending` DESC, 27 | `is_named` DESC, 28 | `name` ASC, 29 | `edition_number` ASC, 30 | `launcher_id` ASC 31 | ); -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "1.85.0" 3 | components = ["rustfmt", "clippy"] 4 | -------------------------------------------------------------------------------- /src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | /gen/schemas 2 | -------------------------------------------------------------------------------- /src-tauri/capabilities/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../gen/schemas/desktop-schema.json", 3 | "identifier": "default", 4 | "description": "enables the default permissions", 5 | "windows": ["main"], 6 | "permissions": [ 7 | "core:path:default", 8 | "core:event:default", 9 | "core:window:default", 10 | "core:webview:default", 11 | "core:app:default", 12 | "core:resources:default", 13 | "core:image:default", 14 | "clipboard-manager:default", 15 | "clipboard-manager:allow-write-text", 16 | "clipboard-manager:allow-read-text", 17 | "opener:default" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /src-tauri/capabilities/desktop.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../gen/schemas/desktop-schema.json", 3 | "identifier": "desktop-capability", 4 | "platforms": ["macOS", "windows", "linux"], 5 | "windows": ["main"], 6 | "permissions": [ 7 | "window-state:default", 8 | "core:menu:default", 9 | "core:tray:default", 10 | "core:window:allow-request-user-attention", 11 | "fs:allow-write-text-file", 12 | "dialog:default" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /src-tauri/capabilities/mobile.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../gen/schemas/mobile-schema.json", 3 | "identifier": "mobile-capability", 4 | "windows": ["main"], 5 | "platforms": ["android", "iOS"], 6 | "permissions": [ 7 | "safe-area-insets:default", 8 | "barcode-scanner:default", 9 | "biometric:default", 10 | "sage:default" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src-tauri/gen/android/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = false 12 | insert_final_newline = false -------------------------------------------------------------------------------- /src-tauri/gen/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | key.properties 17 | keystore.properties 18 | 19 | /.tauri 20 | /tauri.settings.gradle 21 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /src/main/java/com/rigidnetwork/sage/generated 2 | /src/main/jniLibs/**/*.so 3 | /src/main/assets/tauri.conf.json 4 | /tauri.build.gradle.kts 5 | /proguard-tauri.pro 6 | /tauri.properties -------------------------------------------------------------------------------- /src-tauri/gen/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/java/com/rigidnetwork/sage/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.rigidnetwork.sage 2 | 3 | import android.os.Bundle 4 | import androidx.activity.enableEdgeToEdge 5 | import androidx.core.view.ViewCompat 6 | import androidx.core.view.WindowInsetsCompat 7 | import androidx.core.view.updatePadding 8 | 9 | class MainActivity : TauriActivity() { 10 | override fun onCreate(savedInstanceState: Bundle?) { 11 | enableEdgeToEdge() 12 | super.onCreate(savedInstanceState) 13 | } 14 | } -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/ic_launcher-web.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/mipmap-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/playstore-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/app/src/main/res/playstore-icon.png -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #4cb07e 4 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Sage 3 | Sage 4 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /src-tauri/gen/android/app/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src-tauri/gen/android/build.gradle.kts: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | dependencies { 7 | classpath("com.android.tools.build:gradle:8.5.1") 8 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25") 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | mavenCentral() 16 | } 17 | } 18 | 19 | tasks.register("clean").configure { 20 | delete("build") 21 | } 22 | 23 | -------------------------------------------------------------------------------- /src-tauri/gen/android/buildSrc/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `kotlin-dsl` 3 | } 4 | 5 | gradlePlugin { 6 | plugins { 7 | create("pluginsForCoolKids") { 8 | id = "rust" 9 | implementationClass = "RustPlugin" 10 | } 11 | } 12 | } 13 | 14 | repositories { 15 | google() 16 | mavenCentral() 17 | } 18 | 19 | dependencies { 20 | compileOnly(gradleApi()) 21 | implementation("com.android.tools.build:gradle:8.5.1") 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue May 10 19:22:52 CST 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /src-tauri/gen/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | apply from: 'tauri.settings.gradle' 4 | -------------------------------------------------------------------------------- /src-tauri/gen/apple/.gitignore: -------------------------------------------------------------------------------- 1 | xcuserdata/ 2 | build/ 3 | Externals/ 4 | -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png -------------------------------------------------------------------------------- /src-tauri/gen/apple/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /src-tauri/gen/apple/ExportOptions.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | method 6 | debugging 7 | 8 | 9 | -------------------------------------------------------------------------------- /src-tauri/gen/apple/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | 3 | target 'sage-tauri_iOS' do 4 | platform :ios, '13.0' 5 | # Pods for sage-tauri_iOS 6 | end 7 | 8 | target 'sage-tauri_macOS' do 9 | platform :osx, '11.0' 10 | # Pods for sage-tauri_macOS 11 | end 12 | 13 | # Delete the deployment target for iOS and macOS, causing it to be inherited from the Podfile 14 | post_install do |installer| 15 | installer.pods_project.targets.each do |target| 16 | target.build_configurations.each do |config| 17 | config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' 18 | config.build_settings.delete 'MACOSX_DEPLOYMENT_TARGET' 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /src-tauri/gen/apple/Sources/sage-tauri/bindings/bindings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace ffi { 4 | extern "C" { 5 | void start_app(); 6 | } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /src-tauri/gen/apple/Sources/sage-tauri/main.mm: -------------------------------------------------------------------------------- 1 | #include "bindings/bindings.h" 2 | 3 | int main(int argc, char * argv[]) { 4 | ffi::start_app(); 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /src-tauri/gen/apple/sage-tauri.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src-tauri/gen/apple/sage-tauri.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | DisableBuildSystemDeprecationDiagnostic 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src-tauri/gen/apple/sage-tauri_iOS/sage-tauri_iOS.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.nfc.readersession.formats 6 | 7 | TAG 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /src-tauri/src/error.rs: -------------------------------------------------------------------------------- 1 | use std::fmt; 2 | 3 | use sage_api::ErrorKind; 4 | use serde::{Deserialize, Serialize}; 5 | use specta::Type; 6 | 7 | #[derive(Debug, Clone, Serialize, Deserialize, Type)] 8 | pub struct Error { 9 | pub kind: ErrorKind, 10 | pub reason: String, 11 | } 12 | 13 | impl From for Error { 14 | fn from(error: sage::Error) -> Self { 15 | Self { 16 | kind: error.kind(), 17 | reason: error.to_string(), 18 | } 19 | } 20 | } 21 | 22 | impl fmt::Display for Error { 23 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 24 | write!(f, "{}", self.reason) 25 | } 26 | } 27 | 28 | impl From for Error { 29 | fn from(error: reqwest::Error) -> Self { 30 | Self { 31 | kind: ErrorKind::Internal, 32 | reason: error.to_string(), 33 | } 34 | } 35 | } 36 | 37 | impl std::error::Error for Error {} 38 | 39 | pub type Result = std::result::Result; 40 | -------------------------------------------------------------------------------- /src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | 4 | fn main() { 5 | sage_lib::run(); 6 | } 7 | -------------------------------------------------------------------------------- /src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "productName": "Sage", 3 | "version": "0.10.3", 4 | "identifier": "com.rigidnetwork.sage", 5 | "build": { 6 | "frontendDist": "../dist", 7 | "devUrl": "http://localhost:1420", 8 | "beforeDevCommand": "pnpm run dev", 9 | "beforeBuildCommand": "pnpm run build" 10 | }, 11 | "app": { 12 | "windows": [ 13 | { 14 | "title": "Sage", 15 | "width": 1150, 16 | "height": 750, 17 | "resizable": true, 18 | "maximized": false, 19 | "visible": true 20 | } 21 | ], 22 | "security": { 23 | "csp": null 24 | } 25 | }, 26 | "bundle": { 27 | "active": true, 28 | "targets": "all", 29 | "icon": [ 30 | "icons/32x32.png", 31 | "icons/128x128.png", 32 | "icons/128x128@2x.png", 33 | "icons/icon.icns", 34 | "icons/icon.ico" 35 | ], 36 | "iOS": { 37 | "developmentTeam": "NQJQRYZZG3" 38 | } 39 | }, 40 | "$schema": "../node_modules/@tauri-apps/cli/config.schema.json" 41 | } 42 | -------------------------------------------------------------------------------- /src/boxes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xch-dev/sage/b2b919c0cebf42d23ceb2ab89f873077636ba5c8/src/boxes.png -------------------------------------------------------------------------------- /src/boxes.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/CardSizeToggle.tsx: -------------------------------------------------------------------------------- 1 | import { Button } from '@/components/ui/button'; 2 | import { CardSize } from '@/hooks/useNftParams'; 3 | import { t } from '@lingui/core/macro'; 4 | import { Maximize2, Minimize2 } from 'lucide-react'; 5 | 6 | interface CardSizeToggleProps { 7 | size: CardSize; 8 | onChange: (size: CardSize) => void; 9 | } 10 | 11 | export function CardSizeToggle({ size, onChange }: CardSizeToggleProps) { 12 | return ( 13 | 36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /src/components/Container.tsx: -------------------------------------------------------------------------------- 1 | import { PropsWithChildren } from 'react'; 2 | 3 | export default function Container( 4 | props: PropsWithChildren<{ className?: string; style?: React.CSSProperties }>, 5 | ) { 6 | return ( 7 |
11 | {props.children} 12 |
13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /src/components/CopyButton.tsx: -------------------------------------------------------------------------------- 1 | import { writeText } from '@tauri-apps/plugin-clipboard-manager'; 2 | import { CopyCheckIcon, CopyIcon } from 'lucide-react'; 3 | import { useState } from 'react'; 4 | import { Button } from './ui/button'; 5 | 6 | interface CopyButtonProps { 7 | value: string; 8 | className?: string; 9 | onCopy?: () => void; 10 | } 11 | 12 | export function CopyButton({ value, className, onCopy }: CopyButtonProps) { 13 | const [copied, setCopied] = useState(false); 14 | 15 | const copyAddress = () => { 16 | writeText(value); 17 | 18 | setCopied(true); 19 | setTimeout(() => setCopied(false), 2000); 20 | onCopy?.(); 21 | }; 22 | 23 | return ( 24 | 36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /src/components/Loading.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from '@/lib/utils'; 2 | import { Loader2 } from 'lucide-react'; 3 | 4 | interface LoadingProps extends React.HTMLAttributes { 5 | size?: number; 6 | text?: string; 7 | } 8 | 9 | export function Loading({ 10 | size = 24, 11 | text, 12 | className, 13 | ...props 14 | }: LoadingProps) { 15 | return ( 16 |
23 | 24 | {text &&

{text}

} 25 |
26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /src/components/NumberFormat.tsx: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | import { NumberFormatProps, formatNumber } from '../i18n'; 3 | 4 | export function NumberFormat({ 5 | value, 6 | style = 'decimal', 7 | currency, 8 | minimumFractionDigits, 9 | maximumFractionDigits, 10 | }: NumberFormatProps) { 11 | try { 12 | const formatted = formatNumber({ 13 | value, 14 | style, 15 | currency, 16 | minimumFractionDigits, 17 | maximumFractionDigits, 18 | }); 19 | if (!formatted && formatted !== '0') return null; 20 | return <>{formatted}; 21 | } catch (e) { 22 | // Fallback if formatting fails 23 | if (value instanceof BigNumber) { 24 | return <>{value.toFixed()}; 25 | } 26 | return <>{value?.toString() || ''}; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/components/SafeAreaView.tsx: -------------------------------------------------------------------------------- 1 | import { useInsets } from '@/contexts/SafeAreaContext'; 2 | import { PropsWithChildren } from 'react'; 3 | 4 | export default function SafeAreaView(props: PropsWithChildren) { 5 | const insets = useInsets(); 6 | 7 | return ( 8 |
18 | {props.children} 19 |
20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /src/components/ViewToggle.tsx: -------------------------------------------------------------------------------- 1 | import { Button } from '@/components/ui/button'; 2 | import { t } from '@lingui/core/macro'; 3 | import { LayoutGrid, List as ListIcon } from 'lucide-react'; 4 | 5 | type ViewMode = 'grid' | 'list'; 6 | 7 | interface ViewToggleProps { 8 | view: ViewMode; 9 | onChange: (view: ViewMode) => void; 10 | } 11 | 12 | export function ViewToggle({ view, onChange }: ViewToggleProps) { 13 | return ( 14 | 26 | ); 27 | } 28 | 29 | export type { ViewMode }; 30 | -------------------------------------------------------------------------------- /src/components/confirmations/ConfirmationCard.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode } from 'react'; 2 | 3 | interface ConfirmationCardProps { 4 | icon?: ReactNode; 5 | title?: ReactNode; 6 | children: ReactNode; 7 | className?: string; 8 | } 9 | 10 | export function ConfirmationCard({ 11 | icon, 12 | title, 13 | children, 14 | className = '', 15 | }: ConfirmationCardProps) { 16 | return ( 17 |
20 | {icon && ( 21 |
22 | {icon} 23 |
24 | )} 25 |
26 | {title &&
{title}
} 27 | {children} 28 |
29 |
30 | ); 31 | } 32 | -------------------------------------------------------------------------------- /src/components/confirmations/CreateProfileConfirmation.tsx: -------------------------------------------------------------------------------- 1 | import { Trans } from '@lingui/react/macro'; 2 | import { UserRoundPlus } from 'lucide-react'; 3 | import { ConfirmationAlert } from './ConfirmationAlert'; 4 | import { ConfirmationCard } from './ConfirmationCard'; 5 | 6 | interface CreateProfileConfirmationProps { 7 | name: string; 8 | } 9 | 10 | export function CreateProfileConfirmation({ 11 | name, 12 | }: CreateProfileConfirmationProps) { 13 | return ( 14 |
15 | Profile Creation} 18 | variant='info' 19 | > 20 | 21 | You are creating a new profile. This will generate a decentralized 22 | identifier (DID) that can be used to associate NFTs and other digital 23 | assets with your identity. 24 | 25 | 26 | 27 | } 29 | title={name} 30 | > 31 |
32 | This profile will be created on the blockchain. 33 |
34 |
35 |
36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /src/components/dialogs/NfcScanDialog.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | Dialog, 3 | DialogContent, 4 | DialogDescription, 5 | DialogHeader, 6 | DialogTitle, 7 | } from '@/components/ui/dialog'; 8 | import { Trans } from '@lingui/react/macro'; 9 | 10 | interface NfcScanDialogProps { 11 | open: boolean; 12 | onOpenChange: (open: boolean) => void; 13 | } 14 | 15 | export function NfcScanDialog({ open, onOpenChange }: NfcScanDialogProps) { 16 | return ( 17 | 18 | 19 | 20 | Scan an NFC tag 21 | 22 | Place the NFC tag near your device to scan it. 23 | 24 | 25 | 26 | 27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /src/components/ui/checkbox.tsx: -------------------------------------------------------------------------------- 1 | import * as CheckboxPrimitive from '@radix-ui/react-checkbox'; 2 | import { CheckIcon } from '@radix-ui/react-icons'; 3 | import * as React from 'react'; 4 | 5 | import { cn } from '@/lib/utils'; 6 | 7 | const Checkbox = React.forwardRef< 8 | React.ElementRef, 9 | React.ComponentPropsWithoutRef 10 | >(({ className, ...props }, ref) => ( 11 | 19 | 22 | 23 | 24 | 25 | )); 26 | Checkbox.displayName = CheckboxPrimitive.Root.displayName; 27 | 28 | export { Checkbox }; 29 | -------------------------------------------------------------------------------- /src/components/ui/input.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | import { cn } from '@/lib/utils'; 4 | 5 | export interface InputProps 6 | extends React.InputHTMLAttributes {} 7 | 8 | const Input = React.forwardRef( 9 | ({ className, type, ...props }, ref) => { 10 | return ( 11 | 20 | ); 21 | }, 22 | ); 23 | Input.displayName = 'Input'; 24 | 25 | export { Input }; 26 | -------------------------------------------------------------------------------- /src/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | import * as LabelPrimitive from '@radix-ui/react-label'; 2 | import { cva, type VariantProps } from 'class-variance-authority'; 3 | import * as React from 'react'; 4 | 5 | import { cn } from '@/lib/utils'; 6 | 7 | const labelVariants = cva( 8 | 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70', 9 | ); 10 | 11 | const Label = React.forwardRef< 12 | React.ElementRef, 13 | React.ComponentPropsWithoutRef & 14 | VariantProps 15 | >(({ className, ...props }, ref) => ( 16 | 21 | )); 22 | Label.displayName = LabelPrimitive.Root.displayName; 23 | 24 | export { Label }; 25 | -------------------------------------------------------------------------------- /src/components/ui/separator.tsx: -------------------------------------------------------------------------------- 1 | import * as SeparatorPrimitive from '@radix-ui/react-separator'; 2 | import * as React from 'react'; 3 | 4 | import { cn } from '@/lib/utils'; 5 | 6 | const Separator = React.forwardRef< 7 | React.ElementRef, 8 | React.ComponentPropsWithoutRef 9 | >( 10 | ( 11 | { className, orientation = 'horizontal', decorative = true, ...props }, 12 | ref, 13 | ) => ( 14 | 25 | ), 26 | ); 27 | Separator.displayName = SeparatorPrimitive.Root.displayName; 28 | 29 | export { Separator }; 30 | -------------------------------------------------------------------------------- /src/components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from '@/lib/utils'; 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ( 8 |
15 | ); 16 | } 17 | 18 | export { Skeleton }; 19 | -------------------------------------------------------------------------------- /src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | import { cn } from '@/lib/utils'; 4 | 5 | export interface TextareaProps 6 | extends React.TextareaHTMLAttributes {} 7 | 8 | const Textarea = React.forwardRef( 9 | ({ className, ...props }, ref) => { 10 | return ( 11 |