├── src
├── lib
│ ├── swaps.js
│ ├── galleries.js
│ ├── .pnpm-debug.log
│ ├── sign.js
│ └── variables.js
├── routes
│ ├── transfer.js
│ ├── wallet
│ │ ├── balances.json.js
│ │ ├── create
│ │ │ └── index.svelte
│ │ └── import.svelte
│ ├── settings
│ │ └── index.svelte
│ ├── galleries
│ │ └── [tag].svelte
│ ├── tx
│ │ └── parse.svelte
│ ├── u
│ │ └── [slug].svelte
│ ├── history
│ │ └── index.svelte
│ ├── artworks
│ │ ├── username
│ │ │ └── [username].json.js
│ │ └── viewed.js
│ ├── artwork
│ │ └── [id].svelte
│ └── a
│ │ └── _issuing.svelte
└── queries
│ ├── royalty_recipients.js
│ └── follows.js
├── hasura
├── metadata
│ ├── actions.graphql
│ ├── schema.graphql
│ ├── allow_list.yaml
│ ├── api_limits.yaml
│ ├── network.yaml
│ ├── cron_triggers.yaml
│ ├── inherited_roles.yaml
│ ├── remote_schemas.yaml
│ ├── rest_endpoints.yaml
│ ├── version.yaml
│ ├── query_collections.yaml
│ ├── graphql_schema_introspection.yaml
│ ├── databases
│ │ └── default
│ │ │ ├── functions
│ │ │ ├── functions.yaml
│ │ │ └── public_searchable.yaml
│ │ │ └── tables
│ │ │ ├── public_invitees.yaml
│ │ │ ├── public_activelistings.yaml
│ │ │ ├── auth_refresh_tokens.yaml
│ │ │ ├── public_utxos.yaml
│ │ │ ├── auth_account_roles.yaml
│ │ │ ├── auth_account_providers.yaml
│ │ │ ├── auth_providers.yaml
│ │ │ ├── public_userstats.yaml
│ │ │ └── public_search.yaml
│ └── actions.yaml
├── app
│ ├── .dockerignore
│ ├── emails
│ │ ├── artwork-sold
│ │ │ └── subject.ejs
│ │ ├── artwork-transfered
│ │ │ └── subject.ejs
│ │ ├── outbid
│ │ │ └── subject.ejs
│ │ ├── artwork-minted
│ │ │ └── subject.ejs
│ │ ├── someone-bid
│ │ │ └── subject.ejs
│ │ ├── wallet-funded
│ │ │ └── subject.ejs
│ │ ├── bid-processed
│ │ │ └── subject.ejs
│ │ ├── wallet-withdrawal
│ │ │ └── subject.ejs
│ │ ├── artist-application-approved
│ │ │ └── subject.ejs
│ │ ├── artist-application-denied
│ │ │ └── subject.ejs
│ │ ├── purchase-successful
│ │ │ └── subject.ejs
│ │ └── notify-bid
│ │ │ └── subject.ejs
│ ├── avatar.png
│ ├── nodemon.json
│ ├── ecc.js
│ ├── const.js
│ ├── Dockerfile
│ ├── utils.js
│ └── index.js
├── custom
│ └── emails
│ │ ├── change-email
│ │ └── subject.ejs
│ │ ├── lost-password
│ │ └── subject.ejs
│ │ ├── activate-account
│ │ └── subject.ejs
│ │ └── notify-email-change
│ │ └── subject.ejs
├── migrations_history
│ ├── 1605134584855_run_sql_migration
│ │ └── up.sql
│ ├── 1605657414726_run_sql_migration
│ │ └── up.sql
│ ├── 1605758771326_run_sql_migration
│ │ └── up.sql
│ ├── 1611551475569_run_sql_migration
│ │ └── up.sql
│ ├── 1605747535523_run_sql_migration
│ │ └── up.sql
│ ├── 1604958288811_create_table_public_tags
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605647598534_run_sql_migration
│ │ └── up.sql
│ ├── 1608751533084_drop_table_public_wallets
│ │ └── up.sql
│ ├── 1610698039696_run_sql_migration
│ │ └── up.sql
│ ├── 1611559093871_run_sql_migration
│ │ └── up.sql
│ ├── 1604951450407_create_table_public_artworks
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1604953778081_create_table_public_follows
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605747522989_run_sql_migration
│ │ └── up.sql
│ ├── 1606453108627_create_table_public_wallets
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611558600366_run_sql_migration
│ │ └── up.sql
│ ├── 1604956102647_drop_table_public_collections
│ │ └── up.sql
│ ├── 1604962051695_create_table_public_favorites
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1606626707344_create_table_public_addresses
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1610698003464_run_sql_migration
│ │ └── up.sql
│ ├── 1604953931773_create_table_public_collections
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1604958409206_create_table_public_transactions
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1606766530894_run_sql_migration
│ │ └── up.sql
│ ├── 1608750384404_rename_table_public_utxos
│ │ ├── up.sql
│ │ └── down.sql
│ ├── 1608750369373_rename_table_public_addresses
│ │ ├── up.sql
│ │ └── down.sql
│ ├── 1608750436209_rename_table_public_addresses
│ │ ├── up.sql
│ │ └── down.sql
│ ├── 1611558625695_alter_table_public_tags_add_column_id
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605543629956_alter_table_public_users_add_column_bio
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611204092519_alter_table_public_users_add_column_gaid
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611558776545_alter_table_public_tags_drop_column_id
│ │ ├── up.sql
│ │ └── down.sql
│ ├── 1605543638289_alter_table_public_users_add_column_website
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605545492805_alter_table_public_users_add_column_email
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1606712434394_alter_table_public_users_add_column_balance
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1608751588169_alter_table_public_users_add_column_pubkey
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1608751611864_alter_table_public_users_add_column_privkey
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1609651046858_alter_table_public_users_add_column_address
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1604951486061_alter_table_public_artworks_add_column_title
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605543617192_alter_table_public_users_add_column_location
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605545506961_alter_table_public_users_add_column_full_name
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1606765755873_alter_table_public_artworks_add_column_asset
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611208469629_alter_table_public_artworks_add_column_ticker
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1604956147689_alter_table_public_artworks_add_column_owner_id
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1604956187411_set_fk_public_artworks_owner_id
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1604958456645_alter_table_public_transactions_add_column_type
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605055648959_alter_table_public_artworks_add_column_filename
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605129887168_run_sql_migration
│ │ └── up.sql
│ ├── 1605129892717_run_sql_migration
│ │ └── up.sql
│ ├── 1605133674930_drop_artwork_liked
│ │ └── up.sql
│ ├── 1605296927087_alter_table_public_users_add_column_display_name
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605641306741_alter_table_public_artworks_add_column_bid_price
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605655624131_alter_table_public_artworks_add_column_bidder_id
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605655710354_set_fk_public_artworks_bid_id
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1608751670175_alter_table_public_users_drop_column_balance
│ │ ├── up.sql
│ │ └── down.sql
│ ├── 1609720047592_alter_table_public_transactions_add_column_asset
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1609732968492_alter_table_public_transactions_add_column_hex
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1610072685939_alter_table_public_artworks_add_column_editions
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611204106369_alter_table_public_users_add_column_amp_mnemonic
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611208604859_alter_table_public_artworks_add_column_managed
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611252381629_alter_table_public_users_add_column_confidential
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611344745100_alter_table_public_users_add_column_amp_user_id
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611551529043_run_sql_migration
│ │ └── up.sql
│ ├── 1611701552526_alter_table_public_artworks_add_column_royalty
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1604988421880_alter_table_public_artworks_add_column_description
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605117226302_alter_table_public_artworks_add_column_created_at
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605293283465_alter_table_public_artworks_add_column_list_price
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605563176483_alter_table_public_transactions_add_column_amount
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605644125119_alter_table_public_transactions_add_column_user_id
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605644629437_alter_table_public_transactions_add_column_user_id
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1607036589000_alter_table_public_artworks_add_column_auction_end
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1608750566136_alter_table_public_utxos_alter_column_address
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1608751271156_alter_table_public_users_add_column_address_index
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611766972102_alter_table_public_transactions_add_column_bid_id
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611767103144_alter_table_public_transactions_add_column_bid_id
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611790369414_alter_table_public_artworks_drop_column_managed
│ │ ├── up.sql
│ │ └── down.sql
│ ├── 1605740726038_set_fk_public_transactions_user_id
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605759232730_alter_table_public_artworks_add_column_transferred_at
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605760158639_alter_table_public_transactions_add_column_created_at
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1608677526455_alter_table_public_artworks_add_column_list_price_tx
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1608751741986_alter_table_public_users_alter_column_privkey
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1609653817701_alter_table_public_artworks_add_column_asking_asset
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1609738707082_alter_table_public_transactions_alter_column_hex
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1609999492099_alter_table_public_artworks_add_column_auction_start
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1610088479566_alter_table_public_artworks_add_column_reserve_price
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611032775739_alter_table_public_transactions_add_column_confirmed
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611701575218_alter_table_public_artworks_add_column_max_extensions
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611701599403_alter_table_public_artworks_add_column_bid_increment
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611767091106_alter_table_public_transactions_drop_column_bid_id
│ │ ├── up.sql
│ │ └── down.sql
│ ├── 1611767111069_set_fk_public_transactions_bid_id
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1604956130104_alter_table_public_artworks_alter_column_user_id
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605296940851_alter_table_public_users_alter_column_display_name
│ │ ├── up.sql
│ │ └── down.sql
│ ├── 1605644602169_alter_table_public_transactions_drop_column_user_id
│ │ ├── up.sql
│ │ └── down.sql
│ ├── 1605655685493_alter_table_public_artworks_alter_column_bidder_id
│ │ ├── up.sql
│ │ └── down.sql
│ ├── 1606627296250_alter_table_public_addresses_alter_column_user_id
│ │ ├── up.sql
│ │ └── down.sql
│ ├── 1606713097959_alter_table_public_addresses_add_column_unconfidential
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1608750583188_alter_table_public_utxos_drop_column_unconfidential
│ │ ├── up.sql
│ │ └── down.sql
│ ├── 1610404978598_alter_table_public_artworks_alter_column_list_price
│ │ ├── up.sql
│ │ └── down.sql
│ ├── 1606707331454_alter_table_public_addresses_alter_column_wallet_id
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611701586635_alter_table_public_artworks_add_column_extension_interval
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605117244242_alter_table_public_artworks_alter_column_created_at
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1611769983642_alter_table_public_transactions_add_unique_hash_type
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605648283951_run_sql_migration
│ │ └── up.sql
│ ├── 1605657313484_run_sql_migration
│ │ └── up.sql
│ ├── 1605759887322_transferred_at_trigger
│ │ └── up.sql
│ ├── 1606422016884_trigger_transfer_on_bid
│ │ └── up.sql
│ ├── 1605051685195_modify_primarykey_public_tags
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605296670132_alter_table_public_users_alter_column_display_name
│ │ ├── down.sql
│ │ └── up.sql
│ ├── 1605759848021_transferred_at_trigger
│ │ └── up.sql
│ ├── 1605758790338_run_sql_migration
│ │ └── up.sql
│ ├── 1611558663390_run_sql_migration
│ │ └── up.sql
│ ├── 1605648081162_update_bid_price
│ │ └── up.sql
│ ├── 1605657417493_run_sql_migration
│ │ └── up.sql
│ ├── 1605833189272_count_follows
│ │ └── up.sql
│ ├── 1605833671150_run_sql_migration
│ │ └── up.sql
│ ├── 1611551678391_run_sql_migration
│ │ └── up.sql
│ ├── 1605833210435_count_followers
│ │ └── up.sql
│ ├── 1605833698630_run_sql_migration
│ │ └── up.sql
│ ├── 1606369164152_top_collectors
│ │ └── up.sql
│ ├── 1605760244172_run_sql_migration
│ │ └── up.sql
│ ├── 1611551789089_run_sql_migration
│ │ └── up.sql
│ ├── 1611551793423_run_sql_migration
│ │ └── up.sql
│ ├── 1611559078375_run_sql_migration
│ │ └── up.sql
│ ├── 1605742347460_run_sql_migration
│ │ └── up.sql
│ ├── 1611558872027_run_sql_migration
│ │ └── up.sql
│ ├── 1604953656989_set_fk_public_artworks_user_id
│ │ ├── up.sql
│ │ └── down.sql
│ ├── 1605294394500_add_artwork_favorites
│ │ └── up.sql
│ ├── 1605911248151_run_sql_migration
│ │ └── up.sql
│ ├── 1606341838452_trigger_tx_on_artwork
│ │ └── up.sql
│ ├── 1605759956784_update_trigger_set_transferred_at
│ │ └── up.sql
│ ├── 1606707343827_set_fk_public_addresses_user_id
│ │ ├── up.sql
│ │ └── down.sql
│ ├── 1606627310673_set_fk_public_addresses_wallet_id
│ │ ├── up.sql
│ │ └── down.sql
│ ├── 1605740249563_run_sql_migration
│ │ └── up.sql
│ ├── 1605929297132_artwork_last_tx
│ │ └── up.sql
│ ├── 1606869056377_run_sql_migration
│ │ └── up.sql
│ ├── 1605744698315_run_sql_migration
│ │ └── up.sql
│ ├── 1605747967592_run_sql_migration
│ │ └── up.sql
│ ├── 1606342083371_run_sql_migration
│ │ └── up.sql
│ ├── 1609802254966_run_sql_migration
│ │ └── up.sql
│ ├── 1605647603418_run_sql_migration
│ │ └── up.sql
│ ├── 1605830953513_user_followed_column
│ │ └── up.sql
│ ├── 1605133832522_artwork_favorited
│ │ └── up.sql
│ ├── 1605742338585_run_sql_migration
│ │ └── up.sql
│ ├── 1606421925997_transfer_on_bid
│ │ └── up.sql
│ ├── 1605129762366_run_sql_migration
│ │ └── up.sql
│ ├── 1605129901077_run_sql_migration
│ │ └── up.sql
│ ├── 1609802328940_run_sql_migration
│ │ └── up.sql
│ ├── 1611559651609_run_sql_migration
│ │ └── up.sql
│ ├── 1605644972090_add_bidder_column
│ │ └── up.sql
│ ├── 1606422086978_run_sql_migration
│ │ └── up.sql
│ ├── 1609803053925_run_sql_migration
│ │ └── up.sql
│ └── 1606422064916_run_sql_migration
│ │ └── up.sql
├── .dockerignore
├── migrations
│ └── default
│ │ ├── 1614208159457_run_sql_migration
│ │ └── up.sql
│ │ ├── 1614208940327_run_sql_migration
│ │ └── up.sql
│ │ ├── 1616725125379_run_sql_migration
│ │ └── up.sql
│ │ ├── 1635858322548_run_sql_migration
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1623732696188_run_sql_migration
│ │ └── up.sql
│ │ ├── 1623732809093_run_sql_migration
│ │ └── up.sql
│ │ ├── 1635858293762_run_sql_migration
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1640976339774_drop_table_public_utxos
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1640976462851_create_table_public_utxos
│ │ └── down.sql
│ │ ├── 1615240552178_create_table_public_samples
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1616105616507_create_table_public_invitees
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1623473963894_create_table_public_featured
│ │ └── down.sql
│ │ ├── 1631576961332_run_sql_migration
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1640574726046_create_table_public_comments
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1615342037473_drop_view_public_users_public
│ │ └── up.sql
│ │ ├── 1645723551521_create_table_public_announcements
│ │ └── down.sql
│ │ ├── 1612396978791_run_sql_migration
│ │ └── up.sql
│ │ ├── 1637205760207_create_index_transactions_type
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1637215808608_create_index_artworks_owner_id
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1632049526169_create_table_public_royalty_recipients
│ │ └── down.sql
│ │ ├── 1636698950722_drop_index_artworks_created_at_key
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1636698969958_create_index_artworks_created_at
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1635858424790_create_index_artworks_created_at_key
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1637205744736_create_index_transactions_artwork_id
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1615247098075_alter_table_public_users_add_column_info
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1641600293429_drop_index_transactions_updated_at_key
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1614968935245_alter_table_public_users_add_column_twitter
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1614970641275_alter_table_public_users_add_column_pubkey
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1615249834713_alter_table_public_samples_add_column_type
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1615320620872_alter_table_public_artworks_add_column_slug
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1631143505789_alter_table_public_artworks_add_column_held
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1635858497266_create_index_transactions_created_at_key
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1641452433703_alter_table_public_utxos_drop_column_hex
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1641600211401_create_index_transactions_updated_at_key
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1611876045515_alter_table_public_users_add_column_multisig
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1612989184913_alter_table_public_artworks_add_column_views
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1613188600523_alter_table_public_users_add_column_is_artist
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1613188777016_alter_table_public_users_add_column_is_admin
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1614968954024_alter_table_public_users_add_column_instagram
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1614969911524_alter_table_public_users_drop_column_gaid
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1614969967166_alter_table_public_users_drop_column_pubkey
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1615342366787_run_sql_migration
│ │ └── up.sql
│ │ ├── 1615342387263_run_sql_migration
│ │ └── up.sql
│ │ ├── 1616734683113_alter_table_public_users_add_column_blindkey
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1632678017868_create_table_public_default_royalty_recipients
│ │ └── down.sql
│ │ ├── 1640628267344_modify_primarykey_public_comments
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1640628347385_modify_primarykey_public_comments
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1641361884965_alter_table_public_utxos_add_column_hex
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1641452403702_alter_table_public_utxos_drop_column_txid
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1611876150950_alter_table_public_users_drop_column_multisig
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1612989184912_alter_table_public_artworks_add_column_filetype
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1615063082435_alter_table_public_artworks_add_column_edition
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1615841552264_alter_table_public_artworks_add_column_instagram
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1616733456104_alter_table_public_users_add_column_confidential
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1635860958120_set_fk_public_artworks_bid_id
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1640628110370_alter_table_public_comments_drop_column_liked
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1640628398831_set_fk_public_comments_user_id
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1640976894820_set_fk_public_users_last_seen_tx
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1614969906375_alter_table_public_users_drop_column_amp_user_id
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1615841457688_alter_table_public_artworks_add_column_is_physical
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1623474223692_alter_table_public_featured_alter_column_light
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1631136465107_alter_table_public_artworks_add_column_auction_tx
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1639553041723_alter_table_public_artworks_alter_column_held
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1640628282728_alter_table_public_comments_drop_column_username
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1640628602233_alter_table_public_comments_alter_column_id
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1640642848273_set_fk_public_comments_artwork_id
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1641147136755_alter_table_public_artworks_alter_column_held
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1641633339083_set_fk_public_utxos_transaction_id
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1643460235998_alter_table_public_users_drop_column_is_denied
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1613156392170_alter_table_public_transactions_add_column_contract
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1613416511373_alter_table_public_users_alter_column_username
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1613458056567_alter_table_public_users_add_unique_username
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1614969887967_alter_table_public_users_drop_column_address_index
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1614969897906_alter_table_public_users_drop_column_amp_mnemonic
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1616556759524_alter_table_public_artworks_add_unique_asset
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1616556766791_alter_table_public_artworks_add_unique_slug
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1640628190348_alter_table_public_comments_add_column_id
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1641430239373_alter_table_public_transactions_add_column_hex
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1641430536201_alter_table_public_transactions_add_column_json
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1641450254775_alter_table_public_users_drop_column_last_seen_tx
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1644547387175_alter_table_public_artworks_alter_column_held
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1613437257869_alter_table_public_users_add_column_wallet_initialized
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1635860911911_alter_table_public_artworks_add_column_bid_id
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1640628230613_delete_fk_public_comments_comments_username_fkey
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1640628315031_alter_table_public_comments_alter_column_user_id
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1640976857805_alter_table_public_users_add_column_last_seen_tx
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1641368040013_alter_table_public_artworks_alter_column_held
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1611876168303_alter_table_public_users_alter_column_confidential
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1615397743084_alter_table_public_artworks_add_column_auction_release_tx
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1615958519832_alter_table_public_users_alter_column_is_artist
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1615958525916_alter_table_public_users_alter_column_avatar_url
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1620968910361_run_sql_migration
│ │ └── up.sql
│ │ ├── 1637131288089_run_sql_migration
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1640628305201_alter_table_public_comments_add_column_user_id
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1640642826752_alter_table_public_comments_add_column_artwork_id
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1641430178308_alter_table_public_utxos_add_column_transaction_id
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1641525360530_alter_table_public_transactions_add_column_address
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1641599835823_alter_table_public_transactions_add_column_time
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1641599948810_alter_table_public_transactions_alter_column_time
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1641600281768_alter_table_public_transactions_drop_column_updated_at
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1644538717647_run_sql_migration
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1613971336935_alter_table_public_transactions_alter_column_artwork_id
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1632116114637_alter_table_public_royalty_recipients_alter_column_amount
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1641600313320_alter_table_public_transactions_add_column_sequence
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1615271837936_run_sql_migration
│ │ └── up.sql
│ │ ├── 1615342341876_run_sql_migration
│ │ └── up.sql
│ │ ├── 1623561479167_alter_table_public_artworks_alter_column_bid_increment
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1639671290183_alter_table_public_users_add_column_is_denied
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1616045109580_alter_table_public_artworks_add_unique_artist_id_ticker
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1641485492359_alter_table_public_users_add_column_prompt_sign
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1643451806875_alter_table_public_users_add_column_has_samples
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1645725310796_alter_table_public_announcements_alter_column_visible_start
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1635861321880_run_sql_migration
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1641593737375_alter_table_public_utxos_add_unique_vout_asset_transaction_id
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1643454372304_run_sql_migration
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1632678931221_alter_table_public_royalty_recipients_add_column_type
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1633264955403_alter_table_public_default_royalty_recipients_drop_column_artwork_id
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1626301098496_alter_table_public_transactions_drop_constraint_transactions_hash_type_key
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1632678164363_alter_table_public_default_royalty_recipients_drop_column_asking_asset
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1641454170815_alter_table_public_transactions_add_unique_hash_asset_user_id
│ │ └── down.sql
│ │ ├── 1645725273030_alter_table_public_announcements_add_column_visible_start
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1645725299809_alter_table_public_announcements_add_column_visible_end
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1643452476583_run_sql_migration
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1643453596269_run_sql_migration
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1636010237211_alter_table_public_artworks_drop_column_royalty
│ │ └── down.sql
│ │ ├── 1633264886551_delete_fk_public_default_royalty_recipients_default_royalty_recipients_artwork_id_fkey
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1640628159677_alter_table_public_comments_alter_column_date_posted
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1641600077658_alter_table_public_transactions_alter_column_updated_at
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1631576988088_run_sql_migration
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1623732703588_run_sql_migration
│ │ └── up.sql
│ │ ├── 1641454170015_set_fk_public_artworks_bid_id
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1631574558734_run_sql_migration
│ │ └── up.sql
│ │ ├── 1642661803281_set_fk_public_artworks_owner_id
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1642661810017_set_fk_public_artworks_artist_id
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1623732814640_run_sql_migration
│ │ └── up.sql
│ │ ├── 1641454170013_set_fk_public_transactions_bid_id
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1623732654519_run_sql_migration
│ │ └── up.sql
│ │ ├── 1623732856463_run_sql_migration
│ │ └── up.sql
│ │ ├── 1641613383035_alter_table_public_transactions_add_unique_asset_user_id_hash_address
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1643452670064_run_sql_migration
│ │ └── up.sql
│ │ ├── 1616714781148_run_sql_migration
│ │ └── up.sql
│ │ ├── 1644554269431_set_fk_public_royalty_recipients_artwork_id
│ │ ├── up.sql
│ │ └── down.sql
│ │ ├── 1615271679712_run_sql_migration
│ │ └── up.sql
│ │ ├── 1632305070839_run_sql_migration
│ │ └── up.sql
│ │ ├── 1635431021274_run_sql_migration
│ │ └── up.sql
│ │ ├── 1642799327369_alter_table_public_transactions_add_unique_asset_user_id_hash_address_type
│ │ ├── down.sql
│ │ └── up.sql
│ │ ├── 1631206435513_run_sql_migration
│ │ └── up.sql
│ │ ├── 1615271882883_run_sql_migration
│ │ └── up.sql
│ │ ├── 1637268276853_run_sql_migration
│ │ └── up.sql
│ │ ├── 1643452200360_run_sql_migration
│ │ └── up.sql
│ │ ├── 1630971006891_run_sql_migration
│ │ └── up.sql
│ │ ├── 1616471775903_run_sql_migration
│ │ └── up.sql
│ │ ├── 1620938524569_run_sql_migration
│ │ └── up.sql
│ │ ├── 1616472880413_run_sql_migration
│ │ └── up.sql
│ │ ├── 1635858328507_run_sql_migration
│ │ └── up.sql
│ │ ├── 1631330355501_run_sql_migration
│ │ └── up.sql
│ │ ├── 1615341346931_run_sql_migration
│ │ └── up.sql
│ │ ├── 1623829427120_run_sql_migration
│ │ └── up.sql
│ │ ├── 1631332544481_run_sql_migration
│ │ └── up.sql
│ │ ├── 1620968840665_run_sql_migration
│ │ └── up.sql
│ │ ├── 1621886471638_run_sql_migration
│ │ └── up.sql
│ │ └── 1631333354578_run_sql_migration
│ │ └── up.sql
├── Dockerfile
└── liquidregtest
│ └── config
│ └── bitcoin.conf
├── .dockerignore
├── .fdignore
├── static
├── heart.png
├── logo.png
├── user.png
├── favicon.ico
├── satoshi.jpg
├── splash.png
├── telegram.png
├── twitter.png
├── down-arrow.png
├── raretoshi.png
├── guide
│ ├── image1.png
│ ├── image10.png
│ ├── image11.png
│ ├── image12.png
│ ├── image13.png
│ ├── image14.png
│ ├── image15.png
│ ├── image16.png
│ ├── image17.png
│ ├── image18.png
│ ├── image19.png
│ ├── image2.png
│ ├── image20.png
│ ├── image21.png
│ ├── image22.png
│ ├── image23.png
│ ├── image24.png
│ ├── image25.png
│ ├── image26.png
│ ├── image27.png
│ ├── image28.png
│ ├── image29.png
│ ├── image3.png
│ ├── image30.png
│ ├── image31.png
│ ├── image32.png
│ ├── image33.png
│ ├── image34.png
│ ├── image35.png
│ ├── image36.png
│ ├── image37.png
│ ├── image38.png
│ ├── image4.png
│ ├── image5.png
│ ├── image6.png
│ ├── image7.png
│ ├── image8.png
│ └── image9.png
├── logo-graphic.png
├── robots.txt
├── font
│ ├── OpenSans-Bold.ttf
│ ├── Montserrat-Bold.ttf
│ ├── Montserrat-Regular.ttf
│ └── OpenSans-Regular.ttf
├── secondary-header.jpg
└── search.svg
├── .prettierrc
├── cypress.json
├── shim.js
├── cypress
├── fixtures
│ ├── test_image.png
│ └── example.json
└── integration
│ ├── faq_spec.js
│ ├── market_spec.js
│ ├── activity_spec.js
│ ├── sign_up_spec.js
│ └── forgot_password_spec.js
├── mine.sh
├── ecosystem.config.js
├── Dockerfile.staging
├── git_hooks
└── pre-commit
├── Dockerfile
├── postcss.config.cjs
└── .pnpmfile.cjs
/src/lib/swaps.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/routes/transfer.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/hasura/metadata/actions.graphql:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/hasura/metadata/schema.graphql:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/hasura/metadata/allow_list.yaml:
--------------------------------------------------------------------------------
1 | []
2 |
--------------------------------------------------------------------------------
/hasura/metadata/api_limits.yaml:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/hasura/metadata/network.yaml:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/src/routes/wallet/balances.json.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/hasura/app/.dockerignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/hasura/metadata/cron_triggers.yaml:
--------------------------------------------------------------------------------
1 | []
2 |
--------------------------------------------------------------------------------
/hasura/metadata/inherited_roles.yaml:
--------------------------------------------------------------------------------
1 | []
2 |
--------------------------------------------------------------------------------
/hasura/metadata/remote_schemas.yaml:
--------------------------------------------------------------------------------
1 | []
2 |
--------------------------------------------------------------------------------
/hasura/metadata/rest_endpoints.yaml:
--------------------------------------------------------------------------------
1 | []
2 |
--------------------------------------------------------------------------------
/hasura/metadata/version.yaml:
--------------------------------------------------------------------------------
1 | version: 3
2 |
--------------------------------------------------------------------------------
/hasura/metadata/query_collections.yaml:
--------------------------------------------------------------------------------
1 | []
2 |
--------------------------------------------------------------------------------
/src/routes/settings/index.svelte:
--------------------------------------------------------------------------------
1 | Settings
2 |
--------------------------------------------------------------------------------
/hasura/app/emails/artwork-sold/subject.ejs:
--------------------------------------------------------------------------------
1 | Artwork sold!
--------------------------------------------------------------------------------
/hasura/app/emails/artwork-transfered/subject.ejs:
--------------------------------------------------------------------------------
1 | A gift!
--------------------------------------------------------------------------------
/hasura/app/emails/outbid/subject.ejs:
--------------------------------------------------------------------------------
1 | You have been outbid!
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | .git
2 | build
3 | hasura
4 | node_modules
5 |
--------------------------------------------------------------------------------
/hasura/app/emails/artwork-minted/subject.ejs:
--------------------------------------------------------------------------------
1 | Mint successful!
--------------------------------------------------------------------------------
/hasura/app/emails/someone-bid/subject.ejs:
--------------------------------------------------------------------------------
1 | You received a bid!
--------------------------------------------------------------------------------
/hasura/app/emails/wallet-funded/subject.ejs:
--------------------------------------------------------------------------------
1 | Raretoshi wallet funded!
--------------------------------------------------------------------------------
/hasura/app/emails/bid-processed/subject.ejs:
--------------------------------------------------------------------------------
1 | Your bid has been processed
--------------------------------------------------------------------------------
/hasura/custom/emails/change-email/subject.ejs:
--------------------------------------------------------------------------------
1 | Change your email address
--------------------------------------------------------------------------------
/.fdignore:
--------------------------------------------------------------------------------
1 | hasura/migrations
2 | hasura/metadata
3 | hasura/liquidregtest
4 |
--------------------------------------------------------------------------------
/hasura/app/emails/wallet-withdrawal/subject.ejs:
--------------------------------------------------------------------------------
1 | Raretoshi wallet withdrawal!
--------------------------------------------------------------------------------
/hasura/custom/emails/lost-password/subject.ejs:
--------------------------------------------------------------------------------
1 | [Raretoshi] Password Reset
2 |
--------------------------------------------------------------------------------
/hasura/metadata/graphql_schema_introspection.yaml:
--------------------------------------------------------------------------------
1 | disabled_for_roles: []
2 |
--------------------------------------------------------------------------------
/hasura/app/emails/artist-application-approved/subject.ejs:
--------------------------------------------------------------------------------
1 | Welcome to Raretoshi!
2 |
--------------------------------------------------------------------------------
/hasura/app/emails/artist-application-denied/subject.ejs:
--------------------------------------------------------------------------------
1 | Raretoshi Application Update
--------------------------------------------------------------------------------
/src/lib/galleries.js:
--------------------------------------------------------------------------------
1 | export default {
2 | bitcoin2021: "Bitcoin 2021",
3 | };
4 |
--------------------------------------------------------------------------------
/static/heart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/heart.png
--------------------------------------------------------------------------------
/static/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/logo.png
--------------------------------------------------------------------------------
/static/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/user.png
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": ["./node_modules/prettier-plugin-svelte"]
3 | }
4 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605134584855_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | drop type artwork;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605657414726_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | drop view offers;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605758771326_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | drop view offers;
2 |
--------------------------------------------------------------------------------
/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/favicon.ico
--------------------------------------------------------------------------------
/static/satoshi.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/satoshi.jpg
--------------------------------------------------------------------------------
/static/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/splash.png
--------------------------------------------------------------------------------
/static/telegram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/telegram.png
--------------------------------------------------------------------------------
/static/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/twitter.png
--------------------------------------------------------------------------------
/cypress.json:
--------------------------------------------------------------------------------
1 | {
2 | "pluginsFile": false,
3 | "baseUrl": "http://localhost:3000"
4 | }
5 |
--------------------------------------------------------------------------------
/hasura/.dockerignore:
--------------------------------------------------------------------------------
1 | db
2 | storage
3 | liquidregtest
4 | .env*
5 | data
6 | ipfs
7 | app
8 |
--------------------------------------------------------------------------------
/hasura/app/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/hasura/app/avatar.png
--------------------------------------------------------------------------------
/hasura/custom/emails/activate-account/subject.ejs:
--------------------------------------------------------------------------------
1 | [Raretoshi] Please Confirm Your Email
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614208159457_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | drop view collectors;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614208940327_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | drop view collectors;
2 |
--------------------------------------------------------------------------------
/static/down-arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/down-arrow.png
--------------------------------------------------------------------------------
/static/raretoshi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/raretoshi.png
--------------------------------------------------------------------------------
/hasura/app/emails/purchase-successful/subject.ejs:
--------------------------------------------------------------------------------
1 | Congratulations, your purchase was successful!
--------------------------------------------------------------------------------
/hasura/metadata/databases/default/functions/functions.yaml:
--------------------------------------------------------------------------------
1 | - "!include public_searchable.yaml"
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1616725125379_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | drop view recentactivity;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1635858322548_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | DROP FUNCTION artwork_bid;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611551475569_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE EXTENSION pg_trgm;
2 |
--------------------------------------------------------------------------------
/static/guide/image1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image1.png
--------------------------------------------------------------------------------
/static/guide/image10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image10.png
--------------------------------------------------------------------------------
/static/guide/image11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image11.png
--------------------------------------------------------------------------------
/static/guide/image12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image12.png
--------------------------------------------------------------------------------
/static/guide/image13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image13.png
--------------------------------------------------------------------------------
/static/guide/image14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image14.png
--------------------------------------------------------------------------------
/static/guide/image15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image15.png
--------------------------------------------------------------------------------
/static/guide/image16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image16.png
--------------------------------------------------------------------------------
/static/guide/image17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image17.png
--------------------------------------------------------------------------------
/static/guide/image18.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image18.png
--------------------------------------------------------------------------------
/static/guide/image19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image19.png
--------------------------------------------------------------------------------
/static/guide/image2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image2.png
--------------------------------------------------------------------------------
/static/guide/image20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image20.png
--------------------------------------------------------------------------------
/static/guide/image21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image21.png
--------------------------------------------------------------------------------
/static/guide/image22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image22.png
--------------------------------------------------------------------------------
/static/guide/image23.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image23.png
--------------------------------------------------------------------------------
/static/guide/image24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image24.png
--------------------------------------------------------------------------------
/static/guide/image25.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image25.png
--------------------------------------------------------------------------------
/static/guide/image26.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image26.png
--------------------------------------------------------------------------------
/static/guide/image27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image27.png
--------------------------------------------------------------------------------
/static/guide/image28.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image28.png
--------------------------------------------------------------------------------
/static/guide/image29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image29.png
--------------------------------------------------------------------------------
/static/guide/image3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image3.png
--------------------------------------------------------------------------------
/static/guide/image30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image30.png
--------------------------------------------------------------------------------
/static/guide/image31.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image31.png
--------------------------------------------------------------------------------
/static/guide/image32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image32.png
--------------------------------------------------------------------------------
/static/guide/image33.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image33.png
--------------------------------------------------------------------------------
/static/guide/image34.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image34.png
--------------------------------------------------------------------------------
/static/guide/image35.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image35.png
--------------------------------------------------------------------------------
/static/guide/image36.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image36.png
--------------------------------------------------------------------------------
/static/guide/image37.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image37.png
--------------------------------------------------------------------------------
/static/guide/image38.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image38.png
--------------------------------------------------------------------------------
/static/guide/image4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image4.png
--------------------------------------------------------------------------------
/static/guide/image5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image5.png
--------------------------------------------------------------------------------
/static/guide/image6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image6.png
--------------------------------------------------------------------------------
/static/guide/image7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image7.png
--------------------------------------------------------------------------------
/static/guide/image8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image8.png
--------------------------------------------------------------------------------
/static/guide/image9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/guide/image9.png
--------------------------------------------------------------------------------
/static/logo-graphic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/logo-graphic.png
--------------------------------------------------------------------------------
/static/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/hasura/app/emails/notify-bid/subject.ejs:
--------------------------------------------------------------------------------
1 | <%- outbid ? "You've been out-bid" : "Bid received" %>
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1623732696188_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | DROP VIEW "public"."activebids";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1623732809093_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | DROP VIEW "public"."activebids";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1635858293762_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | DROP FUNCTION public.artwork_bid2;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640976339774_drop_table_public_utxos/up.sql:
--------------------------------------------------------------------------------
1 | DROP table "public"."utxos";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605747535523_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | drop function update_bid_price;
2 |
--------------------------------------------------------------------------------
/hasura/custom/emails/notify-email-change/subject.ejs:
--------------------------------------------------------------------------------
1 | The email attached to your account has been changed
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640976462851_create_table_public_utxos/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."utxos";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604958288811_create_table_public_tags/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."tags";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605647598534_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | DROP FUNCTION public.artwork_bidder;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608751533084_drop_table_public_wallets/up.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."wallets";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1610698039696_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | drop function trigger_transfer_on_bid;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611559093871_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | DROP FUNCTION public.search_artworks;
2 |
--------------------------------------------------------------------------------
/shim.js:
--------------------------------------------------------------------------------
1 | const __filename = fileURLToPath(import.meta.url);
2 | const __dirname = dirname(__filename);
3 |
--------------------------------------------------------------------------------
/static/font/OpenSans-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/font/OpenSans-Bold.ttf
--------------------------------------------------------------------------------
/static/secondary-header.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/secondary-header.jpg
--------------------------------------------------------------------------------
/cypress/fixtures/test_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/cypress/fixtures/test_image.png
--------------------------------------------------------------------------------
/hasura/migrations/default/1615240552178_create_table_public_samples/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."samples";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1616105616507_create_table_public_invitees/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."invitees";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1623473963894_create_table_public_featured/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."featured";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1631576961332_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | DROP FUNCTION public.artwork_artist_owned;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640574726046_create_table_public_comments/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."comments";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604951450407_create_table_public_artworks/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."artworks";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604953778081_create_table_public_follows/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."follows";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605747522989_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | drop trigger set_bid_price on transactions;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606453108627_create_table_public_wallets/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."wallets";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611558600366_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
2 |
--------------------------------------------------------------------------------
/static/font/Montserrat-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/font/Montserrat-Bold.ttf
--------------------------------------------------------------------------------
/hasura/metadata/databases/default/tables/public_invitees.yaml:
--------------------------------------------------------------------------------
1 | table:
2 | name: invitees
3 | schema: public
4 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615342037473_drop_view_public_users_public/up.sql:
--------------------------------------------------------------------------------
1 | DROP VIEW "public"."users_public";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604956102647_drop_table_public_collections/up.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."collections";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604962051695_create_table_public_favorites/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."favorites";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606626707344_create_table_public_addresses/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."addresses";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1610698003464_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | drop trigger transfer_on_bid on transactions;
2 |
--------------------------------------------------------------------------------
/static/font/Montserrat-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/font/Montserrat-Regular.ttf
--------------------------------------------------------------------------------
/static/font/OpenSans-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liquidnft/lnft/HEAD/static/font/OpenSans-Regular.ttf
--------------------------------------------------------------------------------
/hasura/migrations/default/1645723551521_create_table_public_announcements/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."announcements";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604953931773_create_table_public_collections/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."collections";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604958409206_create_table_public_transactions/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."transactions";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606766530894_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | DROP function public.trigger_tx_on_artwork CASCADE;
2 |
--------------------------------------------------------------------------------
/src/routes/galleries/[tag].svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/hasura/metadata/databases/default/functions/public_searchable.yaml:
--------------------------------------------------------------------------------
1 | function:
2 | name: searchable
3 | schema: public
4 |
--------------------------------------------------------------------------------
/hasura/metadata/databases/default/tables/public_activelistings.yaml:
--------------------------------------------------------------------------------
1 | table:
2 | name: activelistings
3 | schema: public
4 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1612396978791_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | create or replace view currentuser as select * from users;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1637205760207_create_index_transactions_type/down.sql:
--------------------------------------------------------------------------------
1 | DROP INDEX IF EXISTS "transactions_type";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1637215808608_create_index_artworks_owner_id/down.sql:
--------------------------------------------------------------------------------
1 | DROP INDEX IF EXISTS "artworks_owner_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608750384404_rename_table_public_utxos/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."utxos" rename to "addresses";
2 |
--------------------------------------------------------------------------------
/src/routes/wallet/create/index.svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1632049526169_create_table_public_royalty_recipients/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."royalty_recipients";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1636698950722_drop_index_artworks_created_at_key/up.sql:
--------------------------------------------------------------------------------
1 | DROP INDEX IF EXISTS "artworks_created_at_key";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1636698969958_create_index_artworks_created_at/down.sql:
--------------------------------------------------------------------------------
1 | DROP INDEX IF EXISTS "artworks_created_at";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608750369373_rename_table_public_addresses/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."addresses" rename to "utxos";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608750384404_rename_table_public_utxos/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."addresses" rename to "utxos";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608750436209_rename_table_public_addresses/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."addresses" rename to "utxos";
2 |
--------------------------------------------------------------------------------
/hasura/metadata/actions.yaml:
--------------------------------------------------------------------------------
1 | actions: []
2 | custom_types:
3 | enums: []
4 | input_objects: []
5 | objects: []
6 | scalars: []
7 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1635858424790_create_index_artworks_created_at_key/down.sql:
--------------------------------------------------------------------------------
1 | DROP INDEX IF EXISTS "artworks_created_at_key";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1637205744736_create_index_transactions_artwork_id/down.sql:
--------------------------------------------------------------------------------
1 | DROP INDEX IF EXISTS "transactions_artwork_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608750369373_rename_table_public_addresses/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."utxos" rename to "addresses";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608750436209_rename_table_public_addresses/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."utxos" rename to "addresses";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611558625695_alter_table_public_tags_add_column_id/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."tags" DROP COLUMN "id";
2 |
--------------------------------------------------------------------------------
/cypress/integration/faq_spec.js:
--------------------------------------------------------------------------------
1 | describe("/faq", () => {
2 | it("successfully loads", () => {
3 | cy.visit("/faq");
4 | });
5 | });
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615247098075_alter_table_public_users_add_column_info/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "info";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641600293429_drop_index_transactions_updated_at_key/up.sql:
--------------------------------------------------------------------------------
1 | DROP INDEX IF EXISTS "transactions_updated_at_key";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605543629956_alter_table_public_users_add_column_bio/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "bio";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611204092519_alter_table_public_users_add_column_gaid/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "gaid";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611558776545_alter_table_public_tags_drop_column_id/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."tags" DROP COLUMN "id" CASCADE;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614968935245_alter_table_public_users_add_column_twitter/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "twitter";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614970641275_alter_table_public_users_add_column_pubkey/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "pubkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615249834713_alter_table_public_samples_add_column_type/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."samples" DROP COLUMN "type";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615320620872_alter_table_public_artworks_add_column_slug/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "slug";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1631143505789_alter_table_public_artworks_add_column_held/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "held";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1635858497266_create_index_transactions_created_at_key/down.sql:
--------------------------------------------------------------------------------
1 | DROP INDEX IF EXISTS "transactions_created_at_key";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641452433703_alter_table_public_utxos_drop_column_hex/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."utxos" drop column "hex" cascade;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641600211401_create_index_transactions_updated_at_key/down.sql:
--------------------------------------------------------------------------------
1 | DROP INDEX IF EXISTS "transactions_updated_at_key";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605543629956_alter_table_public_users_add_column_bio/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "bio" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605543638289_alter_table_public_users_add_column_website/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "website";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605545492805_alter_table_public_users_add_column_email/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "email";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606712434394_alter_table_public_users_add_column_balance/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "balance";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608751588169_alter_table_public_users_add_column_pubkey/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "pubkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608751611864_alter_table_public_users_add_column_privkey/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "privkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1609651046858_alter_table_public_users_add_column_address/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "address";
2 |
--------------------------------------------------------------------------------
/cypress/integration/market_spec.js:
--------------------------------------------------------------------------------
1 | describe("/market", () => {
2 | it("successfully loads", () => {
3 | cy.visit("/market");
4 | });
5 | });
6 |
--------------------------------------------------------------------------------
/hasura/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM hasura/graphql-engine:v2.0.9.cli-migrations-v3
2 |
3 | COPY migrations /hasura-migrations
4 | COPY metadata /hasura-metadata
5 |
--------------------------------------------------------------------------------
/hasura/app/nodemon.json:
--------------------------------------------------------------------------------
1 | {
2 | "watch": ["."],
3 | "inspect": true,
4 | "exec": "cross-env NODE_OPTIONS='--openssl-legacy-provider' node"
5 | }
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1611876045515_alter_table_public_users_add_column_multisig/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "multisig";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1612989184913_alter_table_public_artworks_add_column_views/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "views";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1613188600523_alter_table_public_users_add_column_is_artist/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "is_artist";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1613188777016_alter_table_public_users_add_column_is_admin/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "is_admin";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614968954024_alter_table_public_users_add_column_instagram/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "instagram";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614969911524_alter_table_public_users_drop_column_gaid/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "gaid" CASCADE;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614969967166_alter_table_public_users_drop_column_pubkey/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "pubkey" CASCADE;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614970641275_alter_table_public_users_add_column_pubkey/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "pubkey" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615247098075_alter_table_public_users_add_column_info/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "info" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615249834713_alter_table_public_samples_add_column_type/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."samples" ADD COLUMN "type" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615342366787_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."currentuser" AS
2 | SELECT *
3 | FROM users;
4 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615342387263_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."currentuser" AS
2 | SELECT *
3 | FROM users;
4 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1616734683113_alter_table_public_users_add_column_blindkey/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "blindkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1632678017868_create_table_public_default_royalty_recipients/down.sql:
--------------------------------------------------------------------------------
1 | DROP TABLE "public"."default_royalty_recipients";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628267344_modify_primarykey_public_comments/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" drop constraint "comments_pkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628347385_modify_primarykey_public_comments/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" drop constraint "comments_pkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641361884965_alter_table_public_utxos_add_column_hex/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."utxos" add column "hex" text
2 | null;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641452403702_alter_table_public_utxos_drop_column_txid/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."utxos" drop column "txid" cascade;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604951486061_alter_table_public_artworks_add_column_title/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "title";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605543617192_alter_table_public_users_add_column_location/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "location";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605545492805_alter_table_public_users_add_column_email/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "email" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605545506961_alter_table_public_users_add_column_full_name/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "full_name";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606765755873_alter_table_public_artworks_add_column_asset/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "asset";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608751588169_alter_table_public_users_add_column_pubkey/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "pubkey" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611204092519_alter_table_public_users_add_column_gaid/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "gaid" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611208469629_alter_table_public_artworks_add_column_ticker/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "ticker";
2 |
--------------------------------------------------------------------------------
/cypress/integration/activity_spec.js:
--------------------------------------------------------------------------------
1 | describe("/activity", () => {
2 | it("successfully loads", () => {
3 | cy.visit("/activity");
4 | });
5 | });
6 |
--------------------------------------------------------------------------------
/cypress/integration/sign_up_spec.js:
--------------------------------------------------------------------------------
1 | describe("/register", () => {
2 | it("successfully loads", () => {
3 | cy.visit("/register");
4 | });
5 | });
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1611876045515_alter_table_public_users_add_column_multisig/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "multisig" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1611876150950_alter_table_public_users_drop_column_multisig/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "multisig" CASCADE;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1612989184912_alter_table_public_artworks_add_column_filetype/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "filetype";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614968935245_alter_table_public_users_add_column_twitter/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "twitter" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615063082435_alter_table_public_artworks_add_column_edition/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "edition";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615320620872_alter_table_public_artworks_add_column_slug/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "slug" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615841552264_alter_table_public_artworks_add_column_instagram/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "instagram";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1616733456104_alter_table_public_users_add_column_confidential/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "confidential";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1616734683113_alter_table_public_users_add_column_blindkey/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "blindkey" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1635860958120_set_fk_public_artworks_bid_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" drop constraint "artworks_bid_id_fkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628110370_alter_table_public_comments_drop_column_liked/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" drop column "liked" cascade;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628398831_set_fk_public_comments_user_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" drop constraint "comments_user_id_fkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640976894820_set_fk_public_users_last_seen_tx/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."users" drop constraint "users_last_seen_tx_fkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604956147689_alter_table_public_artworks_add_column_owner_id/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "owner_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604956187411_set_fk_public_artworks_owner_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" drop constraint "artworks_owner_id_fkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604958456645_alter_table_public_transactions_add_column_type/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" DROP COLUMN "type";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605055648959_alter_table_public_artworks_add_column_filename/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "filename";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605129887168_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | DROP FUNCTION public.artwork_liked_by_user(artwork_row artworks, hasura_session json);
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605129892717_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | DROP FUNCTION public.artwork_liked_by_user(artwork_row artwork, hasura_session json);
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605133674930_drop_artwork_liked/up.sql:
--------------------------------------------------------------------------------
1 | DROP FUNCTION public.artwork_liked_by_user(artwork_row artworks, hasura_session json);
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605296927087_alter_table_public_users_add_column_display_name/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "display_name";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605543617192_alter_table_public_users_add_column_location/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "location" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605543638289_alter_table_public_users_add_column_website/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "website" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605641306741_alter_table_public_artworks_add_column_bid_price/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "bid_price";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605655624131_alter_table_public_artworks_add_column_bidder_id/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "bidder_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605655710354_set_fk_public_artworks_bid_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" drop constraint "artworks_bid_id_fkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606765755873_alter_table_public_artworks_add_column_asset/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "asset" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608751611864_alter_table_public_users_add_column_privkey/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "privkey" Text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608751670175_alter_table_public_users_drop_column_balance/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "balance" CASCADE;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1609651046858_alter_table_public_users_add_column_address/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "address" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1609720047592_alter_table_public_transactions_add_column_asset/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" DROP COLUMN "asset";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1609732968492_alter_table_public_transactions_add_column_hex/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" DROP COLUMN "hex";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1610072685939_alter_table_public_artworks_add_column_editions/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "editions";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611204106369_alter_table_public_users_add_column_amp_mnemonic/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "amp_mnemonic";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611208604859_alter_table_public_artworks_add_column_managed/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "managed";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611252381629_alter_table_public_users_add_column_confidential/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "confidential";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611344745100_alter_table_public_users_add_column_amp_user_id/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "amp_user_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611551529043_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX artworks_title_gin_idx ON artworks
2 | USING GIN ((title) gin_trgm_ops);
3 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611701552526_alter_table_public_artworks_add_column_royalty/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "royalty";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1612989184912_alter_table_public_artworks_add_column_filetype/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "filetype" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614968954024_alter_table_public_users_add_column_instagram/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "instagram" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614969906375_alter_table_public_users_drop_column_amp_user_id/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "amp_user_id" CASCADE;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615841457688_alter_table_public_artworks_add_column_is_physical/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "is_physical";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1623474223692_alter_table_public_featured_alter_column_light/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."featured" rename column "light" to "white";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1631136465107_alter_table_public_artworks_add_column_auction_tx/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "auction_tx";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1639553041723_alter_table_public_artworks_alter_column_held/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ALTER COLUMN "held" TYPE text;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628282728_alter_table_public_comments_drop_column_username/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" drop column "username" cascade;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628602233_alter_table_public_comments_alter_column_id/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."comments" ALTER COLUMN "id" drop default;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640642848273_set_fk_public_comments_artwork_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" drop constraint "comments_artwork_id_fkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641147136755_alter_table_public_artworks_alter_column_held/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ALTER COLUMN "held" drop default;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641633339083_set_fk_public_utxos_transaction_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."utxos" drop constraint "utxos_transaction_id_fkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1643460235998_alter_table_public_users_drop_column_is_denied/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."users" drop column "is_denied" cascade;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604951486061_alter_table_public_artworks_add_column_title/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "title" text NOT NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604988421880_alter_table_public_artworks_add_column_description/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "description";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605117226302_alter_table_public_artworks_add_column_created_at/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "created_at";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605293283465_alter_table_public_artworks_add_column_list_price/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "list_price";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605545506961_alter_table_public_users_add_column_full_name/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "full_name" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605563176483_alter_table_public_transactions_add_column_amount/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" DROP COLUMN "amount";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605644125119_alter_table_public_transactions_add_column_user_id/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" DROP COLUMN "user_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605644629437_alter_table_public_transactions_add_column_user_id/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" DROP COLUMN "user_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1607036589000_alter_table_public_artworks_add_column_auction_end/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "auction_end";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608750566136_alter_table_public_utxos_alter_column_address/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."utxos" rename column "utxo" to "address";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608750566136_alter_table_public_utxos_alter_column_address/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."utxos" rename column "address" to "utxo";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608751271156_alter_table_public_users_add_column_address_index/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "address_index";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1609732968492_alter_table_public_transactions_add_column_hex/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" ADD COLUMN "hex" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611208469629_alter_table_public_artworks_add_column_ticker/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "ticker" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611766972102_alter_table_public_transactions_add_column_bid_id/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" DROP COLUMN "bid_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611767103144_alter_table_public_transactions_add_column_bid_id/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" DROP COLUMN "bid_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611790369414_alter_table_public_artworks_drop_column_managed/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "managed" CASCADE;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1613156392170_alter_table_public_transactions_add_column_contract/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" DROP COLUMN "contract";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1613416511373_alter_table_public_users_alter_column_username/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ALTER COLUMN "username" SET NOT NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1613416511373_alter_table_public_users_alter_column_username/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ALTER COLUMN "username" DROP NOT NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1613458056567_alter_table_public_users_add_unique_username/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."users" drop constraint "users_username_key";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614969887967_alter_table_public_users_drop_column_address_index/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "address_index" CASCADE;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614969897906_alter_table_public_users_drop_column_amp_mnemonic/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "amp_mnemonic" CASCADE;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615841552264_alter_table_public_artworks_add_column_instagram/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "instagram" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1616556759524_alter_table_public_artworks_add_unique_asset/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" drop constraint "artworks_asset_key";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1616556766791_alter_table_public_artworks_add_unique_slug/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" drop constraint "artworks_slug_key";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1616733456104_alter_table_public_users_add_column_confidential/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "confidential" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1623474223692_alter_table_public_featured_alter_column_light/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."featured" rename column "white" to "light";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1631136465107_alter_table_public_artworks_add_column_auction_tx/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "auction_tx" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1639553041723_alter_table_public_artworks_alter_column_held/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ALTER COLUMN "held" TYPE boolean;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628190348_alter_table_public_comments_add_column_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" add column "id" uuid
2 | not null unique;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641430239373_alter_table_public_transactions_add_column_hex/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" add column "hex" text
2 | null;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641430536201_alter_table_public_transactions_add_column_json/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" add column "json" text
2 | null;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641450254775_alter_table_public_users_drop_column_last_seen_tx/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."users" drop column "last_seen_tx" cascade;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1644547387175_alter_table_public_artworks_alter_column_held/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ALTER COLUMN "held" drop default;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604956147689_alter_table_public_artworks_add_column_owner_id/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "owner_id" uuid NOT NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604958456645_alter_table_public_transactions_add_column_type/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" ADD COLUMN "type" text NOT NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605055648959_alter_table_public_artworks_add_column_filename/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "filename" text NOT NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605296927087_alter_table_public_users_add_column_display_name/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "display_name" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605641306741_alter_table_public_artworks_add_column_bid_price/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "bid_price" integer NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605655624131_alter_table_public_artworks_add_column_bidder_id/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "bidder_id" uuid NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605740726038_set_fk_public_transactions_user_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" drop constraint "transactions_user_id_fkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605759232730_alter_table_public_artworks_add_column_transferred_at/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "transferred_at";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605760158639_alter_table_public_transactions_add_column_created_at/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" DROP COLUMN "created_at";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608677526455_alter_table_public_artworks_add_column_list_price_tx/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "list_price_tx";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608751741986_alter_table_public_users_alter_column_privkey/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."users" rename column "mnemonic" to "privkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608751741986_alter_table_public_users_alter_column_privkey/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."users" rename column "privkey" to "mnemonic";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1609653817701_alter_table_public_artworks_add_column_asking_asset/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "asking_asset";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1609720047592_alter_table_public_transactions_add_column_asset/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" ADD COLUMN "asset" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1609738707082_alter_table_public_transactions_alter_column_hex/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" rename column "psbt" to "hex";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1609738707082_alter_table_public_transactions_alter_column_hex/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" rename column "hex" to "psbt";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1609999492099_alter_table_public_artworks_add_column_auction_start/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "auction_start";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1610088479566_alter_table_public_artworks_add_column_reserve_price/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "reserve_price";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611032775739_alter_table_public_transactions_add_column_confirmed/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" DROP COLUMN "confirmed";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611204106369_alter_table_public_users_add_column_amp_mnemonic/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "amp_mnemonic" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611252381629_alter_table_public_users_add_column_confidential/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "confidential" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611344745100_alter_table_public_users_add_column_amp_user_id/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "amp_user_id" integer NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611701552526_alter_table_public_artworks_add_column_royalty/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "royalty" integer NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611701575218_alter_table_public_artworks_add_column_max_extensions/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "max_extensions";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611701599403_alter_table_public_artworks_add_column_bid_increment/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "bid_increment";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611767091106_alter_table_public_transactions_drop_column_bid_id/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" DROP COLUMN "bid_id" CASCADE;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611767103144_alter_table_public_transactions_add_column_bid_id/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" ADD COLUMN "bid_id" uuid NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611767111069_set_fk_public_transactions_bid_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" drop constraint "transactions_bid_id_fkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1613156392170_alter_table_public_transactions_add_column_contract/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" ADD COLUMN "contract" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1613437257869_alter_table_public_users_add_column_wallet_initialized/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" DROP COLUMN "wallet_initialized";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1631143505789_alter_table_public_artworks_add_column_held/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "held" boolean NULL DEFAULT true;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1635860911911_alter_table_public_artworks_add_column_bid_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" add column "bid_id" uuid
2 | null unique;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1637205760207_create_index_transactions_type/up.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX "transactions_type" on
2 | "public"."transactions" using btree ("type");
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1637215808608_create_index_artworks_owner_id/up.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX "artworks_owner_id" on
2 | "public"."artworks" using btree ("owner_id");
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628230613_delete_fk_public_comments_comments_username_fkey/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" drop constraint "comments_username_fkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628315031_alter_table_public_comments_alter_column_user_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" drop constraint "comments_user_id_key";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640976857805_alter_table_public_users_add_column_last_seen_tx/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."users" add column "last_seen_tx" uuid
2 | null;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641147136755_alter_table_public_artworks_alter_column_held/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" alter column "held" set default 'true';
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641368040013_alter_table_public_artworks_alter_column_held/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" alter column "held" set default 'true';
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641368040013_alter_table_public_artworks_alter_column_held/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" alter column "held" set default 'singlesig';
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1644547387175_alter_table_public_artworks_alter_column_held/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" alter column "held" set default 'singlesig';
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604956130104_alter_table_public_artworks_alter_column_user_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" rename column "artist_id" to "user_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604956130104_alter_table_public_artworks_alter_column_user_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" rename column "user_id" to "artist_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604988421880_alter_table_public_artworks_add_column_description/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "description" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605293283465_alter_table_public_artworks_add_column_list_price/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "list_price" integer NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605296940851_alter_table_public_users_alter_column_display_name/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ALTER COLUMN "display_name" SET NOT NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605644602169_alter_table_public_transactions_drop_column_user_id/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" DROP COLUMN "user_id" CASCADE;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605644629437_alter_table_public_transactions_add_column_user_id/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" ADD COLUMN "user_id" uuid NOT NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605655685493_alter_table_public_artworks_alter_column_bidder_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" rename column "bidder_id" to "bid_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606627296250_alter_table_public_addresses_alter_column_user_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."addresses" rename column "user_id" to "wallet_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606712434394_alter_table_public_users_add_column_balance/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "balance" integer NOT NULL DEFAULT 0;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606713097959_alter_table_public_addresses_add_column_unconfidential/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."addresses" DROP COLUMN "unconfidential";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608677526455_alter_table_public_artworks_add_column_list_price_tx/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "list_price_tx" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608750583188_alter_table_public_utxos_drop_column_unconfidential/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."utxos" DROP COLUMN "unconfidential" CASCADE;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1609653817701_alter_table_public_artworks_add_column_asking_asset/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "asking_asset" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1610404978598_alter_table_public_artworks_alter_column_list_price/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ALTER COLUMN "list_price" TYPE int8;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611766972102_alter_table_public_transactions_add_column_bid_id/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" ADD COLUMN "bid_id" integer NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1611876168303_alter_table_public_users_alter_column_confidential/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."users" rename column "multisig" to "confidential";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1611876168303_alter_table_public_users_alter_column_confidential/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."users" rename column "confidential" to "multisig";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1613188777016_alter_table_public_users_add_column_is_admin/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "is_admin" boolean NOT NULL DEFAULT false;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615063082435_alter_table_public_artworks_add_column_edition/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "edition" integer NOT NULL DEFAULT 1;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615397743084_alter_table_public_artworks_add_column_auction_release_tx/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "auction_release_tx";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615958519832_alter_table_public_users_alter_column_is_artist/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE ONLY "public"."users" ALTER COLUMN "is_artist" SET DEFAULT false;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615958519832_alter_table_public_users_alter_column_is_artist/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE ONLY "public"."users" ALTER COLUMN "is_artist" SET DEFAULT true;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615958525916_alter_table_public_users_alter_column_avatar_url/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE ONLY "public"."users" ALTER COLUMN "avatar_url" DROP DEFAULT;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1616105616507_create_table_public_invitees/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE "public"."invitees"("email" text NOT NULL, PRIMARY KEY ("email") , UNIQUE ("email"));
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1616556766791_alter_table_public_artworks_add_unique_slug/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" add constraint "artworks_slug_key" unique ("slug");
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1620968910361_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | create trigger check_bid before insert on transactions for each row execute procedure trigger_check_bid();
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1636698969958_create_index_artworks_created_at/up.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX "artworks_created_at" on
2 | "public"."artworks" using btree ("created_at");
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1637131288089_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | create trigger update_bid after insert on transactions for each row execute procedure trigger_update_bid();
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628305201_alter_table_public_comments_add_column_user_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" add column "user_id" uuid
2 | not null unique;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628602233_alter_table_public_comments_alter_column_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" alter column "id" set default gen_random_uuid();
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640642826752_alter_table_public_comments_add_column_artwork_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" add column "artwork_id" uuid
2 | not null;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641430178308_alter_table_public_utxos_add_column_transaction_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."utxos" add column "transaction_id" uuid
2 | not null;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641525360530_alter_table_public_transactions_add_column_address/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" add column "address" text
2 | null;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641599835823_alter_table_public_transactions_add_column_time/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" add column "time" timestamptz
2 | null;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641599948810_alter_table_public_transactions_alter_column_time/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" rename column "updated_at" to "time";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641599948810_alter_table_public_transactions_alter_column_time/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" rename column "time" to "updated_at";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641600281768_alter_table_public_transactions_drop_column_updated_at/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" drop column "updated_at" cascade;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1644538717647_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | create trigger cancel_bid after update on transactions for each row execute procedure trigger_cancel_bid();
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605117226302_alter_table_public_artworks_add_column_created_at/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "created_at" timestamptz NOT NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605296940851_alter_table_public_users_alter_column_display_name/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ALTER COLUMN "display_name" DROP NOT NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605563176483_alter_table_public_transactions_add_column_amount/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" ADD COLUMN "amount" integer NOT NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605644125119_alter_table_public_transactions_add_column_user_id/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" ADD COLUMN "user_id" integer NOT NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605655685493_alter_table_public_artworks_alter_column_bidder_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" rename column "bid_id" to "bidder_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606627296250_alter_table_public_addresses_alter_column_user_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."addresses" rename column "wallet_id" to "user_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606707331454_alter_table_public_addresses_alter_column_wallet_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."addresses" rename column "user_id" to "wallet_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606707331454_alter_table_public_addresses_alter_column_wallet_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."addresses" rename column "wallet_id" to "user_id";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606713097959_alter_table_public_addresses_add_column_unconfidential/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."addresses" ADD COLUMN "unconfidential" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1607036589000_alter_table_public_artworks_add_column_auction_end/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "auction_end" timestamptz NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1610088479566_alter_table_public_artworks_add_column_reserve_price/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "reserve_price" integer NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1610404978598_alter_table_public_artworks_alter_column_list_price/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ALTER COLUMN "list_price" TYPE integer;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611558625695_alter_table_public_tags_add_column_id/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."tags" ADD COLUMN "id" UUID NOT NULL DEFAULT uuid_generate_v4();
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611701575218_alter_table_public_artworks_add_column_max_extensions/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "max_extensions" integer NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611701586635_alter_table_public_artworks_add_column_extension_interval/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" DROP COLUMN "extension_interval";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611701599403_alter_table_public_artworks_add_column_bid_increment/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "bid_increment" integer NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1612989184913_alter_table_public_artworks_add_column_views/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN IF NOT EXISTS "views" integer DEFAULT 0;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1613188600523_alter_table_public_users_add_column_is_artist/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "is_artist" boolean NOT NULL DEFAULT false;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1613458056567_alter_table_public_users_add_unique_username/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."users" add constraint "users_username_key" unique ("username");
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1613971336935_alter_table_public_transactions_alter_column_artwork_id/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" ALTER COLUMN "artwork_id" DROP NOT NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615397743084_alter_table_public_artworks_add_column_auction_release_tx/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "auction_release_tx" text NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1616556759524_alter_table_public_artworks_add_unique_asset/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" add constraint "artworks_asset_key" unique ("asset");
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1632116114637_alter_table_public_royalty_recipients_alter_column_amount/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."royalty_recipients" ALTER COLUMN "amount" TYPE int4;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628347385_modify_primarykey_public_comments/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments"
2 | add constraint "comments_pkey"
3 | primary key ("id");
4 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641600313320_alter_table_public_transactions_add_column_sequence/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" add column "sequence" serial
2 | not null;
3 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605117244242_alter_table_public_artworks_alter_column_created_at/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE ONLY "public"."artworks" ALTER COLUMN "created_at" DROP DEFAULT;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605759232730_alter_table_public_artworks_add_column_transferred_at/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "transferred_at" timestamptz NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1609999492099_alter_table_public_artworks_add_column_auction_start/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "auction_start" timestamptz NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1610072685939_alter_table_public_artworks_add_column_editions/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "editions" integer NOT NULL DEFAULT 1;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611208604859_alter_table_public_artworks_add_column_managed/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "managed" boolean NOT NULL DEFAULT false;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1613971336935_alter_table_public_transactions_alter_column_artwork_id/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" ALTER COLUMN "artwork_id" SET NOT NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615271837936_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | create trigger extend_auction after insert on transactions for each row execute procedure trigger_extend_auction();
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615342341876_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | DROP VIEW currentuser CASCADE;
2 | CREATE OR REPLACE VIEW "public"."currentuser" AS
3 | SELECT *
4 | FROM users;
5 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1623561479167_alter_table_public_artworks_alter_column_bid_increment/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE ONLY "public"."artworks" ALTER COLUMN "bid_increment" DROP DEFAULT;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1632116114637_alter_table_public_royalty_recipients_alter_column_amount/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."royalty_recipients" ALTER COLUMN "amount" TYPE bigint;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1636698950722_drop_index_artworks_created_at_key/down.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX "artworks_created_at_key" on
2 | "public"."artworks" using btree ("created_at");
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1637205744736_create_index_transactions_artwork_id/up.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX "transactions_artwork_id" on
2 | "public"."transactions" using btree ("artwork_id");
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1639671290183_alter_table_public_users_add_column_is_denied/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."users" add column "is_denied" boolean
2 | not null default 'false';
3 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605117244242_alter_table_public_artworks_alter_column_created_at/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE ONLY "public"."artworks" ALTER COLUMN "created_at" SET DEFAULT now();
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608751271156_alter_table_public_users_add_column_address_index/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "address_index" integer NOT NULL DEFAULT 0;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611701586635_alter_table_public_artworks_add_column_extension_interval/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "extension_interval" integer NULL;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611769983642_alter_table_public_transactions_add_unique_hash_type/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" drop constraint "transactions_hash_type_key";
2 |
--------------------------------------------------------------------------------
/hasura/app/ecc.js:
--------------------------------------------------------------------------------
1 | import { ECPairFactory } from "ecpair";
2 | import * as ecclib from "tiny-secp256k1";
3 |
4 | export const ECPair = ECPairFactory(ecclib);
5 | export const ecc = ecclib;
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615841457688_alter_table_public_artworks_add_column_is_physical/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "is_physical" boolean NOT NULL DEFAULT false;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1616045109580_alter_table_public_artworks_add_unique_artist_id_ticker/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" drop constraint "artworks_artist_id_ticker_key";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1623561479167_alter_table_public_artworks_alter_column_bid_increment/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE ONLY "public"."artworks" ALTER COLUMN "bid_increment" SET DEFAULT 10000;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1635858424790_create_index_artworks_created_at_key/up.sql:
--------------------------------------------------------------------------------
1 | CREATE UNIQUE INDEX "artworks_created_at_key" on
2 | "public"."artworks" using btree ("created_at");
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628267344_modify_primarykey_public_comments/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments"
2 | add constraint "comments_pkey"
3 | primary key ("username");
4 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628315031_alter_table_public_comments_alter_column_user_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" add constraint "comments_user_id_key" unique ("user_id");
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641485492359_alter_table_public_users_add_column_prompt_sign/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."users" add column "prompt_sign" boolean
2 | not null default 'true';
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1643451806875_alter_table_public_users_add_column_has_samples/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."users" add column "has_samples" boolean
2 | not null default 'false';
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1645725310796_alter_table_public_announcements_alter_column_visible_start/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."announcements" alter column "visible_start" drop not null;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1645725310796_alter_table_public_announcements_alter_column_visible_start/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."announcements" alter column "visible_start" set not null;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1613437257869_alter_table_public_users_add_column_wallet_initialized/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "wallet_initialized" boolean NOT NULL DEFAULT false;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1635858497266_create_index_transactions_created_at_key/up.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX "transactions_created_at_key" on
2 | "public"."transactions" using btree ("created_at");
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1635861321880_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | update artworks a set bid_id = (select id from activebids where type='bid' and artwork_id = a.id order by amount desc limit 1);
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641593737375_alter_table_public_utxos_add_unique_vout_asset_transaction_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."utxos" drop constraint "utxos_vout_asset_transaction_id_key";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641600211401_create_index_transactions_updated_at_key/up.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX "transactions_updated_at_key" on
2 | "public"."transactions" using btree ("updated_at");
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641600293429_drop_index_transactions_updated_at_key/down.sql:
--------------------------------------------------------------------------------
1 | CREATE INDEX "transactions_updated_at_key" on
2 | "public"."transactions" using btree ("updated_at");
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1643454372304_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | -- Fix current applicants
2 | UPDATE users SET has_samples = (SELECT EXISTS (SELECT id FROM samples WHERE user_id = users.id));
3 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611032775739_alter_table_public_transactions_add_column_confirmed/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" ADD COLUMN "confirmed" boolean NOT NULL DEFAULT false;
2 |
--------------------------------------------------------------------------------
/src/queries/royalty_recipients.js:
--------------------------------------------------------------------------------
1 | export const getDefaultRoyaltyRecipients = `query {
2 | default_royalty_recipients {
3 | amount
4 | address
5 | name
6 | id
7 | }
8 | }`;
9 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1632678931221_alter_table_public_royalty_recipients_add_column_type/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."royalty_recipients" add column "type" text
2 | not null default 'system';
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1633264955403_alter_table_public_default_royalty_recipients_drop_column_artwork_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."default_royalty_recipients" drop column "artwork_id" cascade;
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605648283951_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TRIGGER set_bid_price
2 | BEFORE INSERT
3 | ON transactions
4 | FOR EACH ROW
5 | EXECUTE PROCEDURE update_bid_price();
6 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605657313484_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE VIEW offers AS
2 | SELECT artwork_id, user_id, max(amount)
3 | FROM transactions
4 | GROUP BY artwork_id, user_id;
5 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605760158639_alter_table_public_transactions_add_column_created_at/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" ADD COLUMN "created_at" timestamptz NOT NULL DEFAULT now();
2 |
--------------------------------------------------------------------------------
/src/routes/tx/parse.svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/cypress/fixtures/example.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Using fixtures to represent data",
3 | "email": "hello@cypress.io",
4 | "body": "Fixtures are a great way to mock data for responses to routes"
5 | }
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1626301098496_alter_table_public_transactions_drop_constraint_transactions_hash_type_key/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" drop constraint "transactions_hash_type_key";
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1632678164363_alter_table_public_default_royalty_recipients_drop_column_asking_asset/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."default_royalty_recipients" drop column "asking_asset" cascade;
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641454170815_alter_table_public_transactions_add_unique_hash_asset_user_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" drop constraint "transactions_hash_asset_user_id_key";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605759887322_transferred_at_trigger/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TRIGGER set_transferred_at
2 | BEFORE UPDATE ON artworks
3 | FOR EACH ROW
4 | EXECUTE PROCEDURE trigger_set_transferred_at();
5 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611769983642_alter_table_public_transactions_add_unique_hash_type/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" add constraint "transactions_hash_type_key" unique ("hash", "type");
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641452433703_alter_table_public_utxos_drop_column_hex/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."utxos" alter column "hex" drop not null;
2 | alter table "public"."utxos" add column "hex" text;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1645725273030_alter_table_public_announcements_add_column_visible_start/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."announcements" add column "visible_start" timestamptz
2 | null default now();
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1645725299809_alter_table_public_announcements_add_column_visible_end/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."announcements" add column "visible_end" timestamptz
2 | not null default now();
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614969911524_alter_table_public_users_drop_column_gaid/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "gaid" text;
2 | ALTER TABLE "public"."users" ALTER COLUMN "gaid" DROP NOT NULL;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1616045109580_alter_table_public_artworks_add_unique_artist_id_ticker/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" add constraint "artworks_artist_id_ticker_key" unique ("artist_id", "ticker");
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1635858322548_run_sql_migration/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- DROP FUNCTION artwork_bid;
4 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641452403702_alter_table_public_utxos_drop_column_txid/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."utxos" alter column "txid" drop not null;
2 | alter table "public"."utxos" add column "txid" text;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1643452476583_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TRIGGER set_user_has_samples
2 | BEFORE INSERT ON samples
3 | FOR EACH ROW
4 | EXECUTE FUNCTION trigger_set_user_has_samples();
5 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1643453596269_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TRIGGER unset_user_has_samples
2 | AFTER DELETE ON samples
3 | FOR EACH ROW
4 | EXECUTE FUNCTION trigger_unset_user_has_samples();
5 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606422016884_trigger_transfer_on_bid/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TRIGGER transfer_on_bid
2 | AFTER INSERT
3 | ON transactions
4 | FOR EACH ROW
5 | EXECUTE PROCEDURE trigger_transfer_on_bid();
6 |
--------------------------------------------------------------------------------
/hasura/app/const.js:
--------------------------------------------------------------------------------
1 | export default {
2 | projectName: "Raretoshi",
3 | urls: {
4 | protocol: "https://raretoshi.com",
5 | },
6 | emails: {
7 | support: "support@raretoshi.com",
8 | },
9 | };
10 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614969967166_alter_table_public_users_drop_column_pubkey/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "pubkey" text;
2 | ALTER TABLE "public"."users" ALTER COLUMN "pubkey" DROP NOT NULL;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615958525916_alter_table_public_users_alter_column_avatar_url/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE ONLY "public"."users" ALTER COLUMN "avatar_url" SET DEFAULT 'QmcbyjMMT5fFtoiWRJiwV8xoiRWJpSRwC6qCFMqp7EXD4Z';
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1611876150950_alter_table_public_users_drop_column_multisig/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "multisig" text;
2 | ALTER TABLE "public"."users" ALTER COLUMN "multisig" DROP NOT NULL;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1635858293762_run_sql_migration/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- DROP FUNCTION public.artwork_bid2;
4 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628110370_alter_table_public_comments_drop_column_liked/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" alter column "liked" drop not null;
2 | alter table "public"."comments" add column "liked" bool;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640976339774_drop_table_public_utxos/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- DROP table "public"."utxos";
4 |
--------------------------------------------------------------------------------
/hasura/metadata/databases/default/tables/auth_refresh_tokens.yaml:
--------------------------------------------------------------------------------
1 | table:
2 | name: refresh_tokens
3 | schema: auth
4 | object_relationships:
5 | - name: account
6 | using:
7 | foreign_key_constraint_on: account_id
8 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1626301098496_alter_table_public_transactions_drop_constraint_transactions_hash_type_key/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" add constraint "transactions_hash_type_key" unique ("hash", "type");
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1636010237211_alter_table_public_artworks_drop_column_royalty/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" alter column "royalty" drop not null;
2 | alter table "public"."artworks" add column "royalty" int4;
3 |
--------------------------------------------------------------------------------
/src/routes/u/[slug].svelte:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614969906375_alter_table_public_users_drop_column_amp_user_id/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "amp_user_id" int4;
2 | ALTER TABLE "public"."users" ALTER COLUMN "amp_user_id" DROP NOT NULL;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1631576961332_run_sql_migration/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- DROP FUNCTION public.artwork_artist_owned;
4 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628282728_alter_table_public_comments_drop_column_username/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" alter column "username" drop not null;
2 | alter table "public"."comments" add column "username" text;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641593737375_alter_table_public_utxos_add_unique_vout_asset_transaction_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."utxos" add constraint "utxos_vout_asset_transaction_id_key" unique ("vout", "asset", "transaction_id");
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605051685195_modify_primarykey_public_tags/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."tags" drop constraint "tags_pkey";
2 | alter table "public"."tags"
3 | add constraint "tags_pkey"
4 | primary key ( "tag" );
5 |
--------------------------------------------------------------------------------
/src/routes/history/index.svelte:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Transaction History
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614969897906_alter_table_public_users_drop_column_amp_mnemonic/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "amp_mnemonic" text;
2 | ALTER TABLE "public"."users" ALTER COLUMN "amp_mnemonic" DROP NOT NULL;
3 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611767091106_alter_table_public_transactions_drop_column_bid_id/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" ADD COLUMN "bid_id" int4;
2 | ALTER TABLE "public"."transactions" ALTER COLUMN "bid_id" DROP NOT NULL;
3 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605644602169_alter_table_public_transactions_drop_column_user_id/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."transactions" ADD COLUMN "user_id" int4;
2 | ALTER TABLE "public"."transactions" ALTER COLUMN "user_id" DROP NOT NULL;
3 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608750583188_alter_table_public_utxos_drop_column_unconfidential/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."utxos" ADD COLUMN "unconfidential" text;
2 | ALTER TABLE "public"."utxos" ALTER COLUMN "unconfidential" DROP NOT NULL;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1633264886551_delete_fk_public_default_royalty_recipients_default_royalty_recipients_artwork_id_fkey/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."default_royalty_recipients" drop constraint "default_royalty_recipients_artwork_id_fkey";
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605051685195_modify_primarykey_public_tags/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."tags" drop constraint "tags_pkey";
2 | alter table "public"."tags"
3 | add constraint "tags_pkey"
4 | primary key ( "tag", "artwork_id" );
5 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605296670132_alter_table_public_users_alter_column_display_name/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ALTER COLUMN "display_name" DROP NOT NULL;
2 | alter table "public"."users" rename column "username" to "display_name";
3 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605296670132_alter_table_public_users_alter_column_display_name/up.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ALTER COLUMN "display_name" SET NOT NULL;
2 | alter table "public"."users" rename column "display_name" to "username";
3 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605759848021_transferred_at_trigger/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION trigger_set_transferred_at()
2 | RETURNS TRIGGER AS $$
3 | BEGIN
4 | NEW.transferred_at = NOW();
5 | RETURN NEW;
6 | END;
7 | $$ LANGUAGE plpgsql;
8 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605758790338_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."offers" AS
2 | SELECT transactions.artwork_id,
3 | max(transactions.amount) AS amount
4 | FROM transactions
5 | GROUP BY transactions.artwork_id;
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628159677_alter_table_public_comments_alter_column_date_posted/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" rename column "created_at" to "date_posted";
2 | ALTER TABLE "public"."comments" ALTER COLUMN "date_posted" drop default;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628159677_alter_table_public_comments_alter_column_date_posted/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments" alter column "date_posted" set default now();
2 | alter table "public"."comments" rename column "date_posted" to "created_at";
3 |
--------------------------------------------------------------------------------
/mine.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 |
4 | while true
5 | do
6 | docker exec -it liquid elements-cli -datadir=/home/elements/.elements generatetoaddress 1 $(docker exec -it liquid elements-cli -datadir=/home/elements/.elements getnewaddress)
7 | sleep 8
8 | done
9 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641600077658_alter_table_public_transactions_alter_column_updated_at/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" alter column "updated_at" drop not null;
2 | ALTER TABLE "public"."transactions" ALTER COLUMN "updated_at" drop default;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628398831_set_fk_public_comments_user_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments"
2 | add constraint "comments_user_id_fkey"
3 | foreign key ("user_id")
4 | references "public"."users"
5 | ("id") on update restrict on delete cascade;
6 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611558663390_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."search" AS
2 | SELECT a.id, a.title as s FROM artworks a
3 | UNION
4 | SELECT u.id, u.username as s FROM users u
5 | UNION
6 | SELECT t.id, t.tag as s FROM tags t;
7 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1635860958120_set_fk_public_artworks_bid_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks"
2 | add constraint "artworks_bid_id_fkey"
3 | foreign key ("bid_id")
4 | references "public"."transactions"
5 | ("id") on update restrict on delete restrict;
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641361884965_alter_table_public_utxos_add_column_hex/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."utxos" add column "hex" text
4 | -- null;
5 |
--------------------------------------------------------------------------------
/hasura/liquidregtest/config/bitcoin.conf:
--------------------------------------------------------------------------------
1 | regtest=1
2 | testnet=0
3 | dnsseed=0
4 | upnp=0
5 |
6 | [regtest]
7 | port=19000
8 | rpcport=19001
9 |
10 | server=1
11 | txindex=0
12 |
13 | rpcuser=admin1
14 | rpcpassword=123
15 | rpcallowip=0.0.0.0/0
16 | rpcbind=0.0.0.0
17 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640642848273_set_fk_public_comments_artwork_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments"
2 | add constraint "comments_artwork_id_fkey"
3 | foreign key ("artwork_id")
4 | references "public"."artworks"
5 | ("id") on update restrict on delete cascade;
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640976894820_set_fk_public_users_last_seen_tx/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."users"
2 | add constraint "users_last_seen_tx_fkey"
3 | foreign key ("last_seen_tx")
4 | references "public"."transactions"
5 | ("id") on update restrict on delete set null;
6 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611558776545_alter_table_public_tags_drop_column_id/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."tags" ADD COLUMN "id" uuid;
2 | ALTER TABLE "public"."tags" ALTER COLUMN "id" DROP NOT NULL;
3 | ALTER TABLE "public"."tags" ALTER COLUMN "id" SET DEFAULT uuid_generate_v4();
4 |
--------------------------------------------------------------------------------
/ecosystem.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | apps: [
3 | {
4 | name: "raretoshi",
5 | watch: ["src"],
6 | script: "npm",
7 | args: "start",
8 | env_production: {
9 | NODE_ENV: "production",
10 | },
11 | },
12 | ],
13 | };
14 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628190348_alter_table_public_comments_add_column_id/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."comments" add column "id" uuid
4 | -- not null unique;
5 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641430239373_alter_table_public_transactions_add_column_hex/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."transactions" add column "hex" text
4 | -- null;
5 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641633339083_set_fk_public_utxos_transaction_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."utxos"
2 | add constraint "utxos_transaction_id_fkey"
3 | foreign key ("transaction_id")
4 | references "public"."transactions"
5 | ("id") on update cascade on delete cascade;
6 |
--------------------------------------------------------------------------------
/static/search.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1633264955403_alter_table_public_default_royalty_recipients_drop_column_artwork_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."default_royalty_recipients" alter column "artwork_id" drop not null;
2 | alter table "public"."default_royalty_recipients" add column "artwork_id" uuid;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1635860911911_alter_table_public_artworks_add_column_bid_id/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."artworks" add column "bid_id" uuid
4 | -- null unique;
5 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640976857805_alter_table_public_users_add_column_last_seen_tx/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."users" add column "last_seen_tx" uuid
4 | -- null;
5 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641430536201_alter_table_public_transactions_add_column_json/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."transactions" add column "json" text
4 | -- null;
5 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604958288811_create_table_public_tags/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE "public"."tags"("artwork_id" uuid NOT NULL, "tag" text NOT NULL, PRIMARY KEY ("tag") , FOREIGN KEY ("artwork_id") REFERENCES "public"."artworks"("id") ON UPDATE restrict ON DELETE cascade, UNIQUE ("tag"));
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1608751670175_alter_table_public_users_drop_column_balance/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "balance" int4;
2 | ALTER TABLE "public"."users" ALTER COLUMN "balance" DROP NOT NULL;
3 | ALTER TABLE "public"."users" ALTER COLUMN "balance" SET DEFAULT 0;
4 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1631576988088_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.artwork_artist_owned(artwork_row artworks)
2 | RETURNS boolean
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT artist_id = owner_id FROM artworks WHERE id = artwork_row.id
7 | $function$;
8 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1632678164363_alter_table_public_default_royalty_recipients_drop_column_asking_asset/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."default_royalty_recipients" alter column "asking_asset" drop not null;
2 | alter table "public"."default_royalty_recipients" add column "asking_asset" text;
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1637131288089_run_sql_migration/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- create trigger update_bid after insert on transactions for each row execute procedure trigger_update_bid();
4 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628230613_delete_fk_public_comments_comments_username_fkey/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."comments"
2 | add constraint "comments_username_fkey"
3 | foreign key ("username")
4 | references "public"."users"
5 | ("username") on update restrict on delete restrict;
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640628305201_alter_table_public_comments_add_column_user_id/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."comments" add column "user_id" uuid
4 | -- not null unique;
5 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640642826752_alter_table_public_comments_add_column_artwork_id/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."comments" add column "artwork_id" uuid
4 | -- not null;
5 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641525360530_alter_table_public_transactions_add_column_address/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."transactions" add column "address" text
4 | -- null;
5 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641599835823_alter_table_public_transactions_add_column_time/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."transactions" add column "time" timestamptz
4 | -- null;
5 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1644538717647_run_sql_migration/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- create trigger cancel_bid after update on transactions for each row execute procedure trigger_cancel_bid();
4 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605648081162_update_bid_price/up.sql:
--------------------------------------------------------------------------------
1 | CREATE FUNCTION update_bid_price()
2 | RETURNS TRIGGER
3 | LANGUAGE PLPGSQL
4 | AS $$
5 | BEGIN
6 | UPDATE artworks SET bid_price = NEW.amount WHERE artworks.id = NEW.artwork_id;
7 | RETURN NEW;
8 | END;
9 | $$;
10 |
--------------------------------------------------------------------------------
/hasura/metadata/databases/default/tables/public_utxos.yaml:
--------------------------------------------------------------------------------
1 | table:
2 | name: utxos
3 | schema: public
4 | object_relationships:
5 | - name: tx
6 | using:
7 | foreign_key_constraint_on: transaction_id
8 | - name: user
9 | using:
10 | foreign_key_constraint_on: user_id
11 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1623732703588_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."activebids" AS
2 | SELECT t.*
3 | FROM transactions t
4 | JOIN artworks a
5 | ON t.artwork_id = a.id
6 | WHERE t.type = 'bid' AND a.transferred_at is null or t.created_at > a.transferred_at;
7 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641430178308_alter_table_public_utxos_add_column_transaction_id/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."utxos" add column "transaction_id" uuid
4 | -- not null;
5 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641600313320_alter_table_public_transactions_add_column_sequence/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."transactions" add column "sequence" serial
4 | -- not null;
5 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1643460235998_alter_table_public_users_drop_column_is_denied/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."users" alter column "is_denied" set default false;
2 | alter table "public"."users" alter column "is_denied" drop not null;
3 | alter table "public"."users" add column "is_denied" bool;
4 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605657417493_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."offers" AS
2 | SELECT transactions.artwork_id,
3 | transactions.user_id,
4 | max(transactions.amount) AS bid
5 | FROM transactions
6 | GROUP BY transactions.artwork_id, transactions.user_id;
7 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605833189272_count_follows/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.user_follows(user_row users)
2 | RETURNS bigint
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT count(*)
7 | FROM follows F
8 | WHERE F.user_id = user_row.id
9 | $function$;
10 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606626707344_create_table_public_addresses/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE "public"."addresses"("address" text NOT NULL, "user_id" uuid NOT NULL, PRIMARY KEY ("address") , FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON UPDATE restrict ON DELETE restrict, UNIQUE ("address"));
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1639671290183_alter_table_public_users_add_column_is_denied/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."users" add column "is_denied" boolean
4 | -- not null default 'false';
5 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604956187411_set_fk_public_artworks_owner_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks"
2 | add constraint "artworks_owner_id_fkey"
3 | foreign key ("owner_id")
4 | references "public"."users"
5 | ("id") on update restrict on delete restrict;
6 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605833671150_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.user_followers(user_row users)
2 | RETURNS bigint
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT count(*)
7 | FROM follows F
8 | WHERE F.user_id = user_row.id
9 | $function$;
10 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611551678391_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE FUNCTION search_artworks(search text)
2 | returns setof artworks AS $$
3 | SELECT *
4 | FROM artworks
5 | WHERE search <% ( title )
6 | ORDER BY similarity(search, ( title )) DESC limit 5;
7 |
8 | $$ language sql stable;
9 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611790369414_alter_table_public_artworks_drop_column_managed/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."artworks" ADD COLUMN "managed" bool;
2 | ALTER TABLE "public"."artworks" ALTER COLUMN "managed" DROP NOT NULL;
3 | ALTER TABLE "public"."artworks" ALTER COLUMN "managed" SET DEFAULT false;
4 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641454170015_set_fk_public_artworks_bid_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" drop constraint "artworks_bid_id_fkey",
2 | add constraint "artworks_bid_id_fkey"
3 | foreign key ("bid_id")
4 | references "public"."transactions"
5 | ("id") on update restrict on delete set null;
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641485492359_alter_table_public_users_add_column_prompt_sign/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."users" add column "prompt_sign" boolean
4 | -- not null default 'true';
5 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1643451806875_alter_table_public_users_add_column_has_samples/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."users" add column "has_samples" boolean
4 | -- not null default 'false';
5 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605655710354_set_fk_public_artworks_bid_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks"
2 | add constraint "artworks_bid_id_fkey"
3 | foreign key ("bid_id")
4 | references "public"."transactions"
5 | ("id") on update restrict on delete restrict;
6 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605833210435_count_followers/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.user_followers(user_row users)
2 | RETURNS bigint
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT count(*)
7 | FROM follows F
8 | WHERE F.follower_id = user_row.id
9 | $function$;
10 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605833698630_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.user_follows(user_row users)
2 | RETURNS bigint
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT count(*)
7 | FROM follows F
8 | WHERE F.follower_id = user_row.id
9 | $function$;
10 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606369164152_top_collectors/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."collectors" AS
2 | SELECT
3 | u.*,
4 | (
5 | SELECT count(*)
6 | FROM artworks a
7 | WHERE u.id = a.owner_id
8 | ) AS num_artworks
9 | FROM
10 | users u
11 | ORDER BY num_artworks DESC;
12 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1614969887967_alter_table_public_users_drop_column_address_index/down.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE "public"."users" ADD COLUMN "address_index" int4;
2 | ALTER TABLE "public"."users" ALTER COLUMN "address_index" DROP NOT NULL;
3 | ALTER TABLE "public"."users" ALTER COLUMN "address_index" SET DEFAULT 0;
4 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1631574558734_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.artwork_artist_owned(artwork_row artworks, hasura_session json)
2 | RETURNS boolean
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT artist_id = owner_id FROM artworks WHERE id = artwork_row.id
7 | $function$;
8 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1635861321880_run_sql_migration/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- update artworks a set bid_id = (select id from activebids where type='bid' and artwork_id = a.id order by amount desc limit 1);
4 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641454170015_set_fk_public_artworks_bid_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" drop constraint "artworks_bid_id_fkey",
2 | add constraint "artworks_bid_id_fkey"
3 | foreign key ("bid_id")
4 | references "public"."transactions"
5 | ("id") on update restrict on delete restrict;
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1642661803281_set_fk_public_artworks_owner_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" drop constraint "artworks_owner_id_fkey",
2 | add constraint "artworks_owner_id_fkey"
3 | foreign key ("owner_id")
4 | references "public"."users"
5 | ("id") on update restrict on delete restrict;
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1642661803281_set_fk_public_artworks_owner_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" drop constraint "artworks_owner_id_fkey",
2 | add constraint "artworks_owner_id_fkey"
3 | foreign key ("owner_id")
4 | references "public"."users"
5 | ("id") on update restrict on delete set null;
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1642661810017_set_fk_public_artworks_artist_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" drop constraint "artworks_artist_id_fkey",
2 | add constraint "artworks_user_id_fkey"
3 | foreign key ("artist_id")
4 | references "public"."users"
5 | ("id") on update restrict on delete cascade;
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1642661810017_set_fk_public_artworks_artist_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" drop constraint "artworks_user_id_fkey",
2 | add constraint "artworks_artist_id_fkey"
3 | foreign key ("artist_id")
4 | references "public"."users"
5 | ("id") on update restrict on delete set null;
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1643454372304_run_sql_migration/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- -- Fix current applicants
4 | -- UPDATE users SET has_samples = (SELECT EXISTS (SELECT id FROM samples WHERE user_id = users.id));
5 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605740726038_set_fk_public_transactions_user_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions"
2 | add constraint "transactions_user_id_fkey"
3 | foreign key ("user_id")
4 | references "public"."users"
5 | ("id") on update restrict on delete restrict;
6 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605760244172_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."offers" AS
2 | SELECT T.artwork_id,
3 | max(T.amount) AS amount
4 | FROM transactions T
5 | JOIN artworks A ON T.artwork_id = A.id
6 | WHERE T.created_at > A.transferred_at
7 | GROUP BY T.artwork_id;
8 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611551789089_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION search_artworks(search text)
2 | returns setof artworks AS $$
3 | SELECT *
4 | FROM artworks
5 | WHERE search <% ( title )
6 | ORDER BY similarity(search, ( title )) DESC limit 5;
7 |
8 | $$ language sql stable;
9 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611551793423_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION search_artworks(search text)
2 | returns setof artworks AS $$
3 | SELECT *
4 | FROM artworks
5 | WHERE search <% ( title )
6 | ORDER BY similarity(search, ( title )) DESC limit 5;
7 |
8 | $$ language sql stable;
9 |
--------------------------------------------------------------------------------
/hasura/metadata/databases/default/tables/auth_account_roles.yaml:
--------------------------------------------------------------------------------
1 | table:
2 | name: account_roles
3 | schema: auth
4 | object_relationships:
5 | - name: account
6 | using:
7 | foreign_key_constraint_on: account_id
8 | - name: roleByRole
9 | using:
10 | foreign_key_constraint_on: role
11 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1632678931221_alter_table_public_royalty_recipients_add_column_type/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."royalty_recipients" add column "type" text
4 | -- not null default 'system';
5 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611767111069_set_fk_public_transactions_bid_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions"
2 | add constraint "transactions_bid_id_fkey"
3 | foreign key ("bid_id")
4 | references "public"."transactions"
5 | ("id") on update restrict on delete restrict;
6 |
--------------------------------------------------------------------------------
/Dockerfile.staging:
--------------------------------------------------------------------------------
1 | FROM node:17-alpine
2 |
3 | ENV NODE_ENV staging
4 |
5 | RUN apk add git python3
6 | RUN npm i -g pnpm
7 |
8 | WORKDIR /app
9 |
10 | COPY package.json .
11 | RUN NODE_ENV=development pnpm i
12 |
13 | COPY . .
14 | RUN NODE_ENV=development pnpm i
15 | RUN pnpm build
16 |
17 | CMD ["node", "build"]
18 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1623732814640_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."activebids" AS
2 | SELECT
3 | t.psbt
4 | FROM (transactions t
5 | JOIN artworks a ON ((t.artwork_id = a.id)))
6 | WHERE (((t.type = 'bid'::text) AND (a.transferred_at IS NULL)) OR (t.created_at > a.transferred_at));
7 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641454170013_set_fk_public_transactions_bid_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" drop constraint "transactions_bid_id_fkey",
2 | add constraint "transactions_bid_id_fkey"
3 | foreign key ("bid_id")
4 | references "public"."transactions"
5 | ("id") on update restrict on delete restrict;
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641454170013_set_fk_public_transactions_bid_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" drop constraint "transactions_bid_id_fkey",
2 | add constraint "transactions_bid_id_fkey"
3 | foreign key ("bid_id")
4 | references "public"."transactions"
5 | ("id") on update restrict on delete set null;
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1645725273030_alter_table_public_announcements_add_column_visible_start/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."announcements" add column "visible_start" timestamptz
4 | -- null default now();
5 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1645725299809_alter_table_public_announcements_add_column_visible_end/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- alter table "public"."announcements" add column "visible_end" timestamptz
4 | -- not null default now();
5 |
--------------------------------------------------------------------------------
/hasura/metadata/databases/default/tables/auth_account_providers.yaml:
--------------------------------------------------------------------------------
1 | table:
2 | name: account_providers
3 | schema: auth
4 | object_relationships:
5 | - name: account
6 | using:
7 | foreign_key_constraint_on: account_id
8 | - name: provider
9 | using:
10 | foreign_key_constraint_on: auth_provider
11 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1623732654519_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."activebids" AS
2 | SELECT t.created_at,
3 | a.transferred_at
4 | FROM transactions t
5 | JOIN artworks a
6 | ON t.artwork_id = a.id
7 | WHERE t.type = 'bid' AND a.transferred_at is null or t.created_at > a.transferred_at;
8 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611559078375_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.searchable(t text)
2 | RETURNS SETOF search
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT *
7 | FROM search
8 | WHERE t <% ( s )
9 | ORDER BY similarity(t, ( s )) DESC limit 5;
10 |
11 | $function$;
12 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641600281768_alter_table_public_transactions_drop_column_updated_at/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" alter column "updated_at" set default now();
2 | alter table "public"."transactions" alter column "updated_at" drop not null;
3 | alter table "public"."transactions" add column "updated_at" timestamptz;
4 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1643452476583_run_sql_migration/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- CREATE TRIGGER set_user_has_samples
4 | -- BEFORE INSERT ON samples
5 | -- FOR EACH ROW
6 | -- EXECUTE FUNCTION trigger_set_user_has_samples();
7 |
--------------------------------------------------------------------------------
/hasura/metadata/databases/default/tables/auth_providers.yaml:
--------------------------------------------------------------------------------
1 | table:
2 | name: providers
3 | schema: auth
4 | array_relationships:
5 | - name: account_providers
6 | using:
7 | foreign_key_constraint_on:
8 | column: auth_provider
9 | table:
10 | name: account_providers
11 | schema: auth
12 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1623732856463_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."activebids" AS
2 | SELECT
3 | t.psbt,
4 | t.user_id
5 | FROM (transactions t
6 | JOIN artworks a ON ((t.artwork_id = a.id)))
7 | WHERE (((t.type = 'bid'::text) AND (a.transferred_at IS NULL)) OR (t.created_at > a.transferred_at));
8 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641600077658_alter_table_public_transactions_alter_column_updated_at/up.sql:
--------------------------------------------------------------------------------
1 | update "public"."transactions" set "updated_at" = now() where updated_at is null;
2 | alter table "public"."transactions" alter column "updated_at" set default now();
3 | alter table "public"."transactions" alter column "updated_at" set not null;
4 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641613383035_alter_table_public_transactions_add_unique_asset_user_id_hash_address/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" drop constraint "transactions_asset_user_id_hash_address_key";
2 | alter table "public"."transactions" add constraint "transactions_asset_user_id_hash_key" unique ("asset", "user_id", "hash");
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1643453596269_run_sql_migration/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- CREATE TRIGGER unset_user_has_samples
4 | -- AFTER DELETE ON samples
5 | -- FOR EACH ROW
6 | -- EXECUTE FUNCTION trigger_unset_user_has_samples();
7 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605742347460_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.artwork_favorites(artwork_row artworks, hasura_session json)
2 | RETURNS bigint
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT count(*)
7 | FROM favorites F
8 | WHERE F.artwork_id = artwork_row.id
9 | $function$;
10 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611558872027_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."search" AS
2 | SELECT a.id, a.title as s, 'artwork' as type FROM artworks a
3 | UNION
4 | SELECT u.id, u.username as s, 'user' as type FROM users u
5 | UNION
6 | SELECT DISTINCT uuid_generate_v4() as id, t.tag as s, 'tag' as type FROM tags t;
7 |
--------------------------------------------------------------------------------
/hasura/metadata/databases/default/tables/public_userstats.yaml:
--------------------------------------------------------------------------------
1 | table:
2 | name: userstats
3 | schema: public
4 | select_permissions:
5 | - permission:
6 | columns:
7 | - users
8 | - artworks
9 | - is_artist
10 | - user_created
11 | - artwork_created
12 | filter: {}
13 | role: user
14 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1640574726046_create_table_public_comments/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE "public"."comments" ("comment" text NOT NULL, "date_posted" timestamptz NOT NULL, "liked" boolean NOT NULL, "username" text NOT NULL, PRIMARY KEY ("username") , FOREIGN KEY ("username") REFERENCES "public"."users"("username") ON UPDATE restrict ON DELETE restrict);
2 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1643452670064_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.trigger_set_user_has_samples()
2 | RETURNS trigger
3 | LANGUAGE plpgsql
4 | AS $function$
5 | BEGIN
6 | UPDATE users SET has_samples = true WHERE id = NEW.user_id AND has_samples = false;
7 |
8 | RETURN NEW;
9 | END;
10 | $function$;
11 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604953656989_set_fk_public_artworks_user_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" drop constraint "artworks_user_id_fkey",
2 | add constraint "artworks_user_id_fkey"
3 | foreign key ("user_id")
4 | references "public"."users"
5 | ("id") on update restrict on delete cascade;
6 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605294394500_add_artwork_favorites/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.artwork_favorites(artwork_row artworks, hasura_session json)
2 | RETURNS bigint
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT count(*)
7 | FROM favorites F
8 | WHERE F.artwork_id = artwork_row.id
9 | $function$;
10 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605911248151_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."offers" AS
2 | SELECT t.artwork_id,
3 | max(t.amount) AS amount
4 | FROM (transactions t
5 | JOIN artworks a ON ((t.artwork_id = a.id)))
6 | WHERE (t.created_at > a.transferred_at) OR a.transferred_at is null
7 | GROUP BY t.artwork_id;
8 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1616714781148_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | create view recentactivity as SELECT t1.* FROM artworks t1
2 | JOIN (
3 | SELECT artwork_id, max(created_at) max_created_at
4 | FROM transactions
5 | GROUP BY artwork_id
6 | ) t2
7 | ON t1.id = t2.artwork_id AND t1.created_at = t2.max_created_at
8 | ORDER BY t1.created_at DESC;
9 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641613383035_alter_table_public_transactions_add_unique_asset_user_id_hash_address/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" drop constraint "transactions_hash_asset_user_id_key";
2 | alter table "public"."transactions" add constraint "transactions_asset_user_id_hash_address_key" unique ("asset", "user_id", "hash", "address");
3 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604951450407_create_table_public_artworks/up.sql:
--------------------------------------------------------------------------------
1 | CREATE EXTENSION IF NOT EXISTS pgcrypto;
2 | CREATE TABLE "public"."artworks"("id" uuid NOT NULL DEFAULT gen_random_uuid(), "user_id" uuid NOT NULL, PRIMARY KEY ("id") , FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON UPDATE restrict ON DELETE restrict, UNIQUE ("id"));
3 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606341838452_trigger_tx_on_artwork/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION trigger_tx_on_artwork()
2 | RETURNS trigger AS
3 | $$
4 | BEGIN
5 | INSERT INTO transactions (artwork_id, amount, hash, type)
6 | VALUES (NEW.id, 0, '12345', 'creation');
7 |
8 | RETURN NEW;
9 | END;
10 | $$
11 | LANGUAGE 'plpgsql';
12 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615240552178_create_table_public_samples/up.sql:
--------------------------------------------------------------------------------
1 | CREATE EXTENSION IF NOT EXISTS pgcrypto;
2 | CREATE TABLE "public"."samples"("id" uuid NOT NULL DEFAULT gen_random_uuid(), "url" text NOT NULL, "user_id" uuid NOT NULL, PRIMARY KEY ("id") , FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON UPDATE restrict ON DELETE restrict);
3 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1644554269431_set_fk_public_royalty_recipients_artwork_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."royalty_recipients" drop constraint "royalty_recipients_artwork_id_fkey",
2 | add constraint "royalty_recipients_artwork_id_fkey"
3 | foreign key ("artwork_id")
4 | references "public"."artworks"
5 | ("id") on update cascade on delete cascade;
6 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605759956784_update_trigger_set_transferred_at/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.trigger_set_transferred_at()
2 | RETURNS trigger
3 | LANGUAGE plpgsql
4 | AS $function$
5 | BEGIN
6 | IF NEW.owner_id <> OLD.owner_id THEN
7 | NEW.transferred_at = NOW();
8 | END IF;
9 | RETURN NEW;
10 | END;
11 | $function$;
12 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606453108627_create_table_public_wallets/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE "public"."wallets"("id" UUID NOT NULL, "user_id" uuid NOT NULL, "seed" text, "privkey" text NOT NULL, "pubkey" text NOT NULL, "balance" integer NOT NULL, PRIMARY KEY ("id") , FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON UPDATE restrict ON DELETE restrict);
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606707343827_set_fk_public_addresses_user_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."addresses" drop constraint "addresses_wallet_id_fkey",
2 | add constraint "addresses_user_id_fkey"
3 | foreign key ("user_id")
4 | references "public"."users"
5 | ("id") on update restrict on delete restrict;
6 |
--------------------------------------------------------------------------------
/hasura/app/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:17-alpine3.13
2 |
3 | ARG NODE_ENV=production
4 | ENV NODE_ENV $NODE_ENV
5 | ENV NODE_OPTIONS --openssl-legacy-provider
6 |
7 | RUN apk add git ffmpeg python3 build-base vips-dev
8 | RUN npm i -g pnpm
9 |
10 | WORKDIR /app
11 | COPY package.json .
12 | RUN pnpm install
13 |
14 | COPY . .
15 |
16 | CMD ["pnpm", "start"]
17 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615271679712_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.trigger_extend_auction()
2 | RETURNS trigger
3 | LANGUAGE plpgsql
4 | AS $function$
5 | BEGIN
6 | UPDATE artworks SET auction_end = GREATEST(NOW() + interval '15 minutes', auction_end) WHERE id = NEW.artwork_id;
7 | RETURN NEW;
8 | END;
9 | $function$;
10 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1644554269431_set_fk_public_royalty_recipients_artwork_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."royalty_recipients" drop constraint "royalty_recipients_artwork_id_fkey",
2 | add constraint "royalty_recipients_artwork_id_fkey"
3 | foreign key ("artwork_id")
4 | references "public"."artworks"
5 | ("id") on update restrict on delete restrict;
6 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606627310673_set_fk_public_addresses_wallet_id/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."addresses" drop constraint "addresses_user_id_fkey",
2 | add constraint "addresses_wallet_id_fkey"
3 | foreign key ("wallet_id")
4 | references "public"."wallets"
5 | ("id") on update restrict on delete restrict;
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1632305070839_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."offers" AS
2 | SELECT t.artwork_id,
3 | t.amount,
4 | t.psbt,
5 | t.id
6 | FROM (transactions t
7 | JOIN artworks a ON (((t.artwork_id = a.id) AND (((t.created_at > a.transferred_at) OR (a.transferred_at IS NULL)) AND (t.type = 'bid'::text)))))
8 | ;
9 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1633264886551_delete_fk_public_default_royalty_recipients_default_royalty_recipients_artwork_id_fkey/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."default_royalty_recipients"
2 | add constraint "default_royalty_recipients_artwork_id_fkey"
3 | foreign key ("artwork_id")
4 | references "public"."artworks"
5 | ("id") on update restrict on delete restrict;
6 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1635431021274_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.artwork_has_royalty(artwork_row artworks)
2 | RETURNS boolean
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT EXISTS(
7 | SELECT 1 FROM public.royalty_recipients
8 | WHERE artwork_id = artwork_row.id
9 | );
10 | $function$;
11 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604953656989_set_fk_public_artworks_user_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."artworks" drop constraint "artworks_user_id_fkey",
2 | add constraint "artworks_user_id_fkey"
3 | foreign key ("user_id")
4 | references "public"."users"
5 | ("id")
6 | on update restrict
7 | on delete restrict;
8 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605740249563_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.artwork_bid(artwork_row artworks)
2 | RETURNS SETOF transactions
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT *
7 | FROM transactions T
8 | WHERE T.artwork_id = artwork_row.id
9 | ORDER BY amount DESC
10 | LIMIT 1
11 | $function$;
12 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605929297132_artwork_last_tx/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.artwork_last_tx(artwork_row artworks)
2 | RETURNS timestamp with time zone
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT max(transactions.created_at)
7 | FROM transactions
8 | WHERE transactions.artwork_id = artwork_row.id
9 | $function$;
10 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606869056377_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."offers" AS
2 | SELECT t.artwork_id,
3 | max(t.amount) AS amount
4 | FROM (transactions t
5 | JOIN artworks a ON ((t.artwork_id = a.id)))
6 | WHERE ((t.created_at > a.transferred_at) OR (a.transferred_at IS NULL)) AND t.type = 'bid'
7 | GROUP BY t.artwork_id;
8 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1642799327369_alter_table_public_transactions_add_unique_asset_user_id_hash_address_type/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" drop constraint "transactions_asset_user_id_hash_address_type_key";
2 | alter table "public"."transactions" add constraint "transactions_asset_user_id_hash_address_key" unique ("asset", "user_id", "hash", "address");
3 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605744698315_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION artwork_bid (artwork_row artworks)
2 | RETURNS SETOF transactions
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT *
7 | FROM transactions
8 | WHERE transactions.artwork_id = artwork_row.id
9 | ORDER BY amount DESC
10 | LIMIT 1
11 | $function$;
12 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605747967592_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.artwork_bid2(artwork_row artworks)
2 | RETURNS transactions
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT *
7 | FROM transactions
8 | WHERE transactions.artwork_id = artwork_row.id
9 | ORDER BY amount DESC
10 | LIMIT 1
11 | $function$;
12 |
--------------------------------------------------------------------------------
/git_hooks/pre-commit:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
3 | [ -z "$FILES" ] && exit 0
4 |
5 | # Prettify all selected files
6 | echo "$FILES" | xargs ./node_modules/.bin/prettier --ignore-unknown --write
7 |
8 | # Add back the modified/prettified files to staging
9 | echo "$FILES" | xargs git add
10 |
11 | exit 0
12 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1631206435513_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."activelistings" AS
2 | SELECT t.psbt,
3 | t.user_id,
4 | t.amount,
5 | t.artwork_id,
6 | t.id,
7 | t.hash
8 | FROM (transactions t
9 | JOIN artworks a ON ((t.artwork_id = a.id)))
10 | WHERE t.type = 'listing'::text AND t.psbt = a.list_price_tx;
11 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1642799327369_alter_table_public_transactions_add_unique_asset_user_id_hash_address_type/up.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."transactions" drop constraint "transactions_asset_user_id_hash_address_key";
2 | alter table "public"."transactions" add constraint "transactions_asset_user_id_hash_address_type_key" unique ("asset", "user_id", "hash", "address", "type");
3 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606627310673_set_fk_public_addresses_wallet_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."addresses" drop constraint "addresses_wallet_id_fkey",
2 | add constraint "addresses_user_id_fkey"
3 | foreign key ("wallet_id")
4 | references "public"."users"
5 | ("id")
6 | on update restrict
7 | on delete restrict;
8 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606707343827_set_fk_public_addresses_user_id/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."addresses" drop constraint "addresses_user_id_fkey",
2 | add constraint "addresses_wallet_id_fkey"
3 | foreign key ("user_id")
4 | references "public"."wallets"
5 | ("id")
6 | on update restrict
7 | on delete restrict;
8 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615271882883_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.trigger_extend_auction()
2 | RETURNS trigger
3 | LANGUAGE plpgsql
4 | AS $function$
5 | BEGIN
6 | UPDATE artworks SET auction_end = GREATEST(NOW() + interval '15 minutes', auction_end) WHERE id = NEW.artwork_id AND NEW.type = 'bid';
7 | RETURN NEW;
8 | END;
9 | $function$;
10 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1637268276853_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."offers" AS
2 | SELECT t.artwork_id,
3 | t.amount,
4 | t.psbt,
5 | t.id,
6 | a.owner_id
7 | FROM (transactions t
8 | JOIN artworks a ON (((t.artwork_id = a.id) AND (((t.created_at > a.transferred_at) OR (a.transferred_at IS NULL)) AND (t.type = 'bid'::text)))));
9 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1643452200360_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.trigger_set_user_has_samples()
2 | RETURNS trigger
3 | LANGUAGE plpgsql
4 | AS $function$
5 | BEGIN
6 | IF NEW.user_id != NULL THEN
7 | UPDATE users SET has_samples = true WHERE id = NEW.user_id;
8 | END IF;
9 |
10 | RETURN NEW;
11 | END;
12 | $function$;
13 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:17-alpine
2 |
3 | ARG NODE_ENV=production
4 | ENV NODE_ENV $NODE_ENV
5 |
6 | RUN apk add git python3 build-base
7 | RUN npm i -g pnpm
8 |
9 | RUN apk add git
10 | RUN npm i -g pnpm
11 |
12 | COPY package.json .
13 | RUN NODE_ENV=development pnpm i
14 |
15 | COPY . .
16 | RUN NODE_ENV=development pnpm i
17 | RUN pnpm build
18 |
19 | CMD ["node", "build"]
20 |
--------------------------------------------------------------------------------
/postcss.config.cjs:
--------------------------------------------------------------------------------
1 | const mode = process.env.NODE_ENV;
2 | const dev = mode === "development";
3 |
4 | module.exports = {
5 | plugins: [
6 | require("tailwindcss"),
7 | require("autoprefixer"),
8 | require("tailwindcss/nesting")(require("postcss-nesting")),
9 | !dev &&
10 | require("cssnano")({
11 | preset: "default",
12 | }),
13 | ],
14 | };
15 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604953778081_create_table_public_follows/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE "public"."follows"("follower_id" uuid NOT NULL, "user_id" uuid NOT NULL, PRIMARY KEY ("follower_id","user_id") , FOREIGN KEY ("follower_id") REFERENCES "public"."users"("id") ON UPDATE restrict ON DELETE cascade, FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON UPDATE restrict ON DELETE cascade);
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604958409206_create_table_public_transactions/up.sql:
--------------------------------------------------------------------------------
1 | CREATE EXTENSION IF NOT EXISTS pgcrypto;
2 | CREATE TABLE "public"."transactions"("id" uuid NOT NULL DEFAULT gen_random_uuid(), "hash" text NOT NULL, "artwork_id" uuid NOT NULL, PRIMARY KEY ("id") , FOREIGN KEY ("artwork_id") REFERENCES "public"."artworks"("id") ON UPDATE restrict ON DELETE cascade, UNIQUE ("id"));
3 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606342083371_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.trigger_tx_on_artwork()
2 | RETURNS trigger
3 | LANGUAGE plpgsql
4 | AS $function$
5 | BEGIN
6 | INSERT INTO transactions (artwork_id, amount, hash, type, user_id)
7 | VALUES (NEW.id, 0, '12345', 'creation', NEW.owner_id);
8 |
9 | RETURN NEW;
10 | END;
11 | $function$;
12 |
--------------------------------------------------------------------------------
/src/lib/.pnpm-debug.log:
--------------------------------------------------------------------------------
1 | {
2 | "0 info pnpm": {
3 | "message": "Using hooks from: /home/adam/la/.pnpmfile.cjs",
4 | "prefix": "/home/adam/la"
5 | },
6 | "1 info pnpm": {
7 | "message": "readPackage hook is declared. Manifests of dependencies might get overridden",
8 | "prefix": "/home/adam/la"
9 | },
10 | "2 debug pnpm:scope": {
11 | "selected": 1
12 | }
13 | }
--------------------------------------------------------------------------------
/src/routes/artworks/username/[username].json.js:
--------------------------------------------------------------------------------
1 | import { getArtworksByUsername } from "$queries/artworks";
2 |
3 | export async function get({ locals, params }) {
4 | let { username } = params;
5 | let { artworks } = await locals.q(getArtworksByUsername(username));
6 |
7 | return {
8 | body: {
9 | artworks,
10 | count: artworks.length
11 | },
12 | };
13 | }
14 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604962051695_create_table_public_favorites/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE "public"."favorites"("user_id" uuid NOT NULL, "artwork_id" uuid NOT NULL, PRIMARY KEY ("user_id","artwork_id") , FOREIGN KEY ("artwork_id") REFERENCES "public"."artworks"("id") ON UPDATE restrict ON DELETE cascade, FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON UPDATE restrict ON DELETE cascade);
2 |
--------------------------------------------------------------------------------
/src/lib/sign.js:
--------------------------------------------------------------------------------
1 | import { tick } from "svelte";
2 | import { sighash, psbt } from "$lib/store";
3 | import { get } from "svelte/store";
4 | import { sign } from "$lib/wallet";
5 | import { requirePassword } from "$lib/auth";
6 |
7 | export default async () => {
8 | await requirePassword();
9 | psbt.set(await sign(get(sighash) || 1));
10 | await tick();
11 | return get(psbt);
12 | };
13 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1604953931773_create_table_public_collections/up.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE "public"."collections"("user_id" uuid NOT NULL, "artwork_id" uuid NOT NULL, PRIMARY KEY ("user_id","artwork_id") , FOREIGN KEY ("artwork_id") REFERENCES "public"."artworks"("id") ON UPDATE restrict ON DELETE cascade, FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON UPDATE restrict ON DELETE cascade);
2 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1609802254966_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."offers" AS
2 | SELECT t.artwork_id,
3 | max(t.amount) AS amount,
4 | t.psbt
5 | FROM (transactions t
6 | JOIN artworks a ON ((t.artwork_id = a.id)))
7 | WHERE (((t.created_at > a.transferred_at) OR (a.transferred_at IS NULL)) AND (t.type = 'bid'::text))
8 | GROUP BY t.artwork_id, t.psbt;
9 |
--------------------------------------------------------------------------------
/hasura/app/utils.js:
--------------------------------------------------------------------------------
1 | export const kebab = (str) =>
2 | str &&
3 | str
4 | .match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)
5 | .map((x) => x.toLowerCase())
6 | .join("-");
7 |
8 | export const sleep = (n) => new Promise((r) => setTimeout(r, n));
9 |
10 | export const wait = async (f) => {
11 | while (!(await f())) await sleep(1000);
12 | return f();
13 | };
14 |
--------------------------------------------------------------------------------
/hasura/metadata/databases/default/tables/public_search.yaml:
--------------------------------------------------------------------------------
1 | table:
2 | name: search
3 | schema: public
4 | select_permissions:
5 | - permission:
6 | columns:
7 | - s
8 | - type
9 | - id
10 | filter: {}
11 | role: anonymous
12 | - permission:
13 | columns:
14 | - id
15 | - s
16 | - type
17 | filter: {}
18 | role: user
19 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1630971006891_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."activebids" AS
2 | SELECT t.psbt,
3 | t.user_id,
4 | t.amount,
5 | t.artwork_id,
6 | t.id,
7 | t.hash
8 | FROM (transactions t
9 | JOIN artworks a ON ((t.artwork_id = a.id)))
10 | WHERE (t.type = 'bid'::text AND (a.transferred_at IS NULL OR t.created_at > a.transferred_at));
11 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605647603418_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.artwork_bidder(artwork_row artworks)
2 | RETURNS text
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT U.username
7 | FROM transactions T
8 | JOIN users U on
9 | T.user_id = U.id
10 | WHERE T.artwork_id = artwork_row.id
11 | ORDER BY amount DESC
12 | LIMIT 1
13 | $function$;
14 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605830953513_user_followed_column/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.user_followed(user_row users, hasura_session json)
2 | RETURNS boolean
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT EXISTS (
7 | SELECT 1
8 | FROM follows F
9 | WHERE F.follower_id = (hasura_session ->> 'x-hasura-user-id')::uuid AND F.user_id = user_row.id
10 | );
11 | $function$;
12 |
--------------------------------------------------------------------------------
/cypress/integration/forgot_password_spec.js:
--------------------------------------------------------------------------------
1 | describe("/forgot-password", () => {
2 | it("successfully loads", () => {
3 | cy.visit("/forgot-password");
4 | });
5 | it("sends email", () => {
6 | cy.visit("/forgot-password");
7 | cy.get("input[placeholder=Email]").type("test@email.com", { force: true });
8 | cy.get(".primary-btn").click();
9 | cy.get("p").contains("Thank you");
10 | });
11 | });
12 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605133832522_artwork_favorited/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.artwork_favorited(artwork_row artworks, hasura_session json)
2 | RETURNS boolean
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT EXISTS (
7 | SELECT 1
8 | FROM favorites F
9 | WHERE F.user_id = (hasura_session ->> 'x-hasura-user-id')::uuid AND F.artwork_id = artwork_row.id
10 | );
11 | $function$;
12 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605742338585_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.artwork_favorited(artwork_row artworks, hasura_session json)
2 | RETURNS boolean
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT EXISTS (
7 | SELECT 1
8 | FROM favorites F
9 | WHERE F.user_id = (hasura_session ->> 'x-hasura-user-id')::uuid AND F.artwork_id = artwork_row.id
10 | );
11 | $function$;
12 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606421925997_transfer_on_bid/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.trigger_transfer_on_bid()
2 | RETURNS trigger
3 | LANGUAGE plpgsql
4 | AS $function$
5 | BEGIN
6 | UPDATE artworks a
7 | SET owner_id = NEW.user_id
8 | WHERE a.id = NEW.artwork_id
9 | AND a.list_price is not null
10 | AND a.list_price <= NEW.amount;
11 | END;
12 | $function$;
13 |
--------------------------------------------------------------------------------
/.pnpmfile.cjs:
--------------------------------------------------------------------------------
1 | function readPackage(pkg) {
2 | if (pkg.dependencies && pkg.dependencies['hash-base']) {
3 | pkg.dependencies['hash-base'] = 'github:asoltys/hash-base'
4 | }
5 | if (pkg.dependencies && pkg.dependencies['cipher-base']) {
6 | pkg.dependencies['cipher-base'] = 'github:asoltys/cipher-base'
7 | }
8 | return pkg
9 | }
10 |
11 | module.exports = {
12 | hooks: {
13 | readPackage
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1616471775903_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.trigger_extend_auction()
2 | RETURNS trigger
3 | LANGUAGE plpgsql
4 | AS $function$
5 | BEGIN
6 | UPDATE artworks SET auction_end = GREATEST(NOW() + interval '1 minutes', auction_end) WHERE id = NEW.artwork_id AND NEW.type = 'bid' AND auction_end is not null AND auction_end > now();
7 | RETURN NEW;
8 | END;
9 | $function$;
10 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1620938524569_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.trigger_extend_auction()
2 | RETURNS trigger
3 | LANGUAGE plpgsql
4 | AS $function$
5 | BEGIN
6 | UPDATE artworks SET auction_end = GREATEST(NOW() + interval '1 minutes', auction_end) WHERE id = NEW.artwork_id AND NEW.type = 'bid' AND auction_end is not null AND auction_end > now();
7 | RETURN NEW;
8 | END;
9 | $function$;
10 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1641450254775_alter_table_public_users_drop_column_last_seen_tx/down.sql:
--------------------------------------------------------------------------------
1 | alter table "public"."users"
2 | add constraint "users_last_seen_tx_fkey"
3 | foreign key (last_seen_tx)
4 | references "public"."transactions"
5 | (id) on update restrict on delete set null;
6 | alter table "public"."users" alter column "last_seen_tx" drop not null;
7 | alter table "public"."users" add column "last_seen_tx" uuid;
8 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605129762366_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.artwork_liked_by_user(artwork_row artworks, hasura_session json)
2 | RETURNS boolean
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT EXISTS (
7 | SELECT 1
8 | FROM favorites F
9 | WHERE F.user_id = (hasura_session ->> 'x-hasura-user-id')::uuid AND F.artwork_id = artwork_row.id
10 | );
11 | $function$;
12 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605129901077_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.artwork_liked_by_user(artwork_row artworks, hasura_session json)
2 | RETURNS boolean
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT EXISTS (
7 | SELECT 1
8 | FROM favorites F
9 | WHERE F.user_id = (hasura_session ->> 'x-hasura-user-id')::uuid AND F.artwork_id = artwork_row.id
10 | );
11 | $function$;
12 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1609802328940_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."offers" AS
2 | SELECT t.artwork_id,
3 | max(t.amount) AS amount,
4 | t.psbt,
5 | t.id
6 | FROM (transactions t
7 | JOIN artworks a ON ((t.artwork_id = a.id)))
8 | WHERE (((t.created_at > a.transferred_at) OR (a.transferred_at IS NULL)) AND (t.type = 'bid'::text))
9 | GROUP BY t.artwork_id, t.psbt, t.id;
10 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1611559651609_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."search" AS
2 | SELECT a.id,
3 | a.title AS s,
4 | 'artwork'::text AS type
5 | FROM artworks a
6 | UNION
7 | SELECT u.id,
8 | u.username AS s,
9 | 'user'::text AS type
10 | FROM users u
11 | UNION
12 | SELECT DISTINCT null::uuid AS id,
13 | t.tag AS s,
14 | 'tag'::text AS type
15 | FROM tags t;
16 |
--------------------------------------------------------------------------------
/hasura/app/index.js:
--------------------------------------------------------------------------------
1 | import toBuffer from "blob-to-buffer";
2 | import { formatISO } from "date-fns";
3 | import fs from "fs";
4 | import path from "path";
5 | import "make-promises-safe";
6 |
7 | import "./auth.js";
8 | import "./artworks.js";
9 | import "./auctions.js";
10 | import "./coinos.js";
11 | import "./proxy.js";
12 | import "./monitor.js";
13 | import "./signing.js";
14 | import "./upload.js";
15 | import "./mail.js";
16 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1616472880413_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.trigger_extend_auction()
2 | RETURNS trigger
3 | LANGUAGE plpgsql
4 | AS $function$
5 | BEGIN
6 | UPDATE artworks SET auction_end = GREATEST(NOW() + interval '15 minutes', auction_end) WHERE id = NEW.artwork_id AND NEW.type = 'bid' AND auction_end is not null AND auction_end > now();
7 | RETURN NEW;
8 | END;
9 | $function$;
10 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1635858328507_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.artwork_bid(artwork_row artworks)
2 | RETURNS activebids
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT activebids.*
7 | FROM activebids
8 | JOIN artworks ON activebids.artwork_id = artworks.id
9 | WHERE activebids.artwork_id = artwork_row.id
10 | ORDER BY amount DESC
11 | LIMIT 1
12 | $function$;
13 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1605644972090_add_bidder_column/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.artwork_bidder(artwork_row artworks, hasura_session json)
2 | RETURNS text
3 | LANGUAGE sql
4 | STABLE
5 | AS $function$
6 | SELECT U.username
7 | FROM transactions T
8 | JOIN users U on
9 | T.user_id = U.id
10 | WHERE T.artwork_id = artwork_row.id
11 | ORDER BY amount DESC
12 | LIMIT 1
13 | $function$;
14 |
--------------------------------------------------------------------------------
/src/lib/variables.js:
--------------------------------------------------------------------------------
1 | export const variables = {
2 | publicWs: import.meta.env.VITE_PUBLIC_WS,
3 | publicHttp: import.meta.env.VITE_PUBLIC_HTTP,
4 | publicExplorer: import.meta.env.VITE_PUBLIC_EXPLORER,
5 | publicCad: import.meta.env.VITE_PUBLIC_CAD,
6 | publicUsd: import.meta.env.VITE_PUBLIC_USD,
7 | publicBtc: import.meta.env.VITE_PUBLIC_BTC,
8 | publicNetwork: import.meta.env.VITE_PUBLIC_NETWORK || "liquid",
9 | };
10 |
--------------------------------------------------------------------------------
/src/routes/artwork/[id].svelte:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/src/routes/wallet/import.svelte:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1631330355501_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."activebids" AS
2 | SELECT t.psbt,
3 | t.user_id,
4 | t.amount,
5 | t.artwork_id,
6 | t.id,
7 | t.hash
8 | FROM (transactions t
9 | JOIN artworks a ON ((t.artwork_id = a.id)))
10 | WHERE ((t.type = 'bid'::text OR t.type = 'return'::text) AND ((a.transferred_at IS NULL) OR (t.created_at > a.transferred_at)));
11 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1631576988088_run_sql_migration/down.sql:
--------------------------------------------------------------------------------
1 | -- Could not auto-generate a down migration.
2 | -- Please write an appropriate down migration for the SQL below:
3 | -- CREATE OR REPLACE FUNCTION public.artwork_artist_owned(artwork_row artworks)
4 | -- RETURNS boolean
5 | -- LANGUAGE sql
6 | -- STABLE
7 | -- AS $function$
8 | -- SELECT artist_id = owner_id FROM artworks WHERE id = artwork_row.id
9 | -- $function$;
10 |
--------------------------------------------------------------------------------
/src/routes/artworks/viewed.js:
--------------------------------------------------------------------------------
1 | import { serverApi } from "$lib/api";
2 | export async function post({ request }) {
3 | try {
4 | let body = await request.json();
5 | return {
6 | body: await serverApi.url("/viewed").post(body).json(),
7 | };
8 | } catch (e) {
9 | console.log(e);
10 | return {
11 | body: { message: "Problem incrementing view count" },
12 | status: 500,
13 | };
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1615341346931_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."users_public" AS
2 | SELECT users.id,
3 | users.avatar_url,
4 | users.username,
5 | users.location,
6 | users.bio,
7 | users.website,
8 | users.email,
9 | users.full_name,
10 | users.pubkey,
11 | users.instagram,
12 | users.twitter,
13 | users.address,
14 | users.multisig
15 | FROM users;
16 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1623829427120_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."activebids" AS
2 | SELECT t.psbt,
3 | t.user_id
4 | FROM (transactions t
5 | JOIN artworks a ON ((t.artwork_id = a.id)))
6 | WHERE (((t.type = 'bid'::text) AND (a.transferred_at IS NULL)) OR (t.created_at > a.transferred_at)) AND NOT EXISTS (select t.id from transactions t2 where t2.amount > t.amount AND t2.artwork_id = t.artwork_id);
7 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1631332544481_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."activebids" AS
2 | SELECT t.psbt,
3 | t.user_id,
4 | t.amount,
5 | t.artwork_id,
6 | t.id,
7 | t.hash
8 | FROM (transactions t
9 | JOIN artworks a ON ((t.artwork_id = a.id)))
10 | WHERE (((t.type = 'bid'::text) OR (t.type = 'auction'::text)) AND ((a.transferred_at IS NULL) OR (t.created_at > a.transferred_at)));
11 |
--------------------------------------------------------------------------------
/src/queries/follows.js:
--------------------------------------------------------------------------------
1 | export const createFollow = (subject) => `mutation insert_follows_one {
2 | insert_follows_one(object: { user_id: "${subject.id}" }) {
3 | user_id
4 | follower_id
5 | }
6 | }`;
7 |
8 | export const deleteFollow = (follower, subject) => `mutation delete_follow {
9 | delete_follows_by_pk(follower_id: "${follower.id}", user_id: "${subject.id}") {
10 | user_id
11 | follower_id
12 | }
13 | }`;
14 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606422086978_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.trigger_transfer_on_bid()
2 | RETURNS trigger
3 | LANGUAGE plpgsql
4 | AS $function$
5 | BEGIN
6 | UPDATE artworks a
7 | SET owner_id = NEW.user_id,
8 | list_price = null
9 | WHERE a.id = NEW.artwork_id
10 | AND a.list_price > 0
11 | AND a.list_price <= NEW.amount;
12 | END;
13 | $function$;
14 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1609803053925_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."offers" AS
2 | SELECT t.artwork_id,
3 | t.amount,
4 | t.psbt,
5 | t.id
6 | FROM transactions t
7 | JOIN artworks a
8 | ON (t.artwork_id = a.id) AND (((t.created_at > a.transferred_at) OR (a.transferred_at IS NULL)) AND (t.type = 'bid'::text))
9 | WHERE t.amount = (select max(amount) from transactions t2 where t2.id = t.id);
10 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1620968840665_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.trigger_extend_auction()
2 | RETURNS trigger
3 | LANGUAGE plpgsql
4 | AS $function$
5 | DECLARE bid INTEGER;
6 | BEGIN
7 | UPDATE artworks SET auction_end = GREATEST(NOW() + interval '1 minute', auction_end) WHERE id = NEW.artwork_id AND NEW.type = 'bid' AND auction_end is not null AND auction_end > now();
8 | RETURN NEW;
9 | END;
10 | $function$;
11 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1621886471638_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.trigger_extend_auction()
2 | RETURNS trigger
3 | LANGUAGE plpgsql
4 | AS $function$
5 | DECLARE bid INTEGER;
6 | BEGIN
7 | UPDATE artworks SET auction_end = GREATEST(NOW() + interval '15 minutes', auction_end) WHERE id = NEW.artwork_id AND NEW.type = 'bid' AND auction_end is not null AND auction_end > now();
8 | RETURN NEW;
9 | END;
10 | $function$;
11 |
--------------------------------------------------------------------------------
/hasura/migrations_history/1606422064916_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE FUNCTION public.trigger_transfer_on_bid()
2 | RETURNS trigger
3 | LANGUAGE plpgsql
4 | AS $function$
5 | BEGIN
6 | UPDATE artworks a
7 | SET owner_id = NEW.user_id,
8 | list_price = null
9 | WHERE a.id = NEW.artwork_id
10 | AND a.list_price is not null
11 | AND a.list_price <= NEW.amount;
12 | END;
13 | $function$;
14 |
--------------------------------------------------------------------------------
/src/routes/a/_issuing.svelte:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
17 |
--------------------------------------------------------------------------------
/hasura/migrations/default/1631333354578_run_sql_migration/up.sql:
--------------------------------------------------------------------------------
1 | CREATE OR REPLACE VIEW "public"."activebids" AS
2 | SELECT t.psbt,
3 | t.user_id,
4 | t.amount,
5 | t.artwork_id,
6 | t.id,
7 | t.hash,
8 | t.type
9 | FROM (transactions t
10 | JOIN artworks a ON ((t.artwork_id = a.id)))
11 | WHERE (((t.type = 'bid'::text) OR (t.type = 'auction'::text)) AND ((a.transferred_at IS NULL) OR (t.created_at > a.transferred_at)));
12 |
--------------------------------------------------------------------------------