mirror of
https://codeberg.org/pluja/kycnot.me
synced 2025-08-16 10:10:52 -04:00
large update
This commit is contained in:
parent
1b7717b8eb
commit
54d72fad0d
44 changed files with 944 additions and 2334 deletions
|
@ -86,8 +86,8 @@ const (
|
|||
var ServiceAttributes = AttributeMap{
|
||||
Attributes: map[string]Attribute{
|
||||
AttributeRiskPreventionSystem: {
|
||||
Title: "Automated Risk-Prevention KYC Enforcement",
|
||||
Description: "If the trade is flagged suspicious by the service, the user will be required a KYC procedure in order to get a refund.",
|
||||
Title: "Automated Risk-Prevention System",
|
||||
Description: "This service scans transactions automatically in search for suspicious transactions. If the trade is flagged suspicious by the system, the user might be required a KYC procedure in order to complete the trade or get a refund.",
|
||||
Rating: AttributeRatingBad,
|
||||
ID: AttributeRiskPreventionSystem,
|
||||
},
|
||||
|
@ -100,7 +100,7 @@ var ServiceAttributes = AttributeMap{
|
|||
},
|
||||
|
||||
AttributeKYCIfObligedByLaw: {
|
||||
Title: "May require KYC/SOF",
|
||||
Title: "May require KYC/SOF by policy/law",
|
||||
Description: "If obliged to do so by the law or in accordance with the service's internal policy, it may at any time introduce or amend mandatory identification / verification procedures and require the user to complete identification and/or verification and may also require to submit identification documents (KYC) or provide Source of Funds (SOF) information.",
|
||||
Rating: AttributeRatingBad,
|
||||
ID: AttributeKYCIfObligedByLaw,
|
||||
|
@ -156,7 +156,7 @@ var ServiceAttributes = AttributeMap{
|
|||
},
|
||||
|
||||
AttributeRefundRequiresKYC: {
|
||||
Title: "Refunds may require KYC or personal information disclosure",
|
||||
Title: "Refunds may require KYC",
|
||||
Description: "In certain cases, the refund process of these services may require the completion of a Know Your Customer (KYC) procedure or the disclosure of personal information. Some services, such as aggregators, usually don't control the KYC procedures of their partners so they fall in this category.",
|
||||
Rating: AttributeRatingWarning,
|
||||
ID: AttributeRefundRequiresKYC,
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
package database
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/allegro/bigcache/v3"
|
||||
)
|
||||
|
||||
var Cache *bigcache.BigCache
|
||||
|
||||
func InitCache() {
|
||||
cache, _ := bigcache.New(context.Background(), bigcache.Config{
|
||||
Shards: 1024,
|
||||
LifeWindow: 10 * time.Minute,
|
||||
CleanWindow: 2 * time.Minute,
|
||||
MaxEntriesInWindow: 1000 * 10 * 60,
|
||||
MaxEntrySize: 500,
|
||||
Verbose: false,
|
||||
HardMaxCacheSize: 0,
|
||||
})
|
||||
Cache = cache
|
||||
}
|
|
@ -8,26 +8,21 @@ import (
|
|||
_ "github.com/mattn/go-sqlite3"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"pluja.dev/kycnot.me/config"
|
||||
"pluja.dev/kycnot.me/ent"
|
||||
"pluja.dev/kycnot.me/ent/schema"
|
||||
"pluja.dev/kycnot.me/ent/service"
|
||||
)
|
||||
|
||||
var Client *ent.Client
|
||||
|
||||
func AddFakeData() {
|
||||
sampleTosHighlight := schema.TosHighlight{
|
||||
Title: "Transaction monitoring",
|
||||
Text: "MEX relies on data analysis as a risk-assessment and suspicion detection tool. MEX performs a variety of compliance-related tasks, including capturing data, filtering, record-keeping, investigation management, and reporting.",
|
||||
Reference: "https://example.com/tos",
|
||||
}
|
||||
|
||||
_, err := Client.Service.Create().
|
||||
SetName("bisq").
|
||||
SetLogoURL("https://kycnot.me/static/img/bisq.webp").
|
||||
SetDescription("Buy and sell bitcoin for fiat (or cryptocurrencies) privately and securely using Bisq's peer-to-peer network and open-source desktop software.").
|
||||
SetUrls([]string{"https://bisq.network/"}).
|
||||
SetTosUrls([]string{"https://bisq.network/privacy-policy/"}).
|
||||
SetTosUrls([]string{"https://bisq.wiki/Frequently_asked_questions"}).
|
||||
SetOnionUrls([]string{}).
|
||||
SetKycLevel(0).
|
||||
SetTags("market,p2p,buy,sell,anonymous").
|
||||
|
@ -39,20 +34,22 @@ func AddFakeData() {
|
|||
SetLightning(true).
|
||||
SetFiat(true).
|
||||
SetCash(true).
|
||||
SetScore(10).
|
||||
SetType(service.TypeExchange).
|
||||
SetAttributes(strings.Join([]string{AttributeNonCustodialWallet, AttributeOpenSource, AttributeNoPersonalInfoNeeded, AttributeP2P, AttributeAPIAvailable, AttributePartnersMayEnforceKYC, AttributeBlockFundsIfFlagged, AttributeKYCForSomeFeatures}, ",")).
|
||||
SetTosHighlights(&[]schema.TosHighlight{sampleTosHighlight}).
|
||||
SetAttributes(strings.Join([]string{AttributeNonCustodialWallet, AttributeOpenSource, AttributeNoPersonalInfoNeeded, AttributeP2P}, ",")).
|
||||
SetTosHighlights(nil).
|
||||
Save(context.Background())
|
||||
|
||||
if err != nil {
|
||||
log.Fatal().Msgf("failed creating service: %v", err)
|
||||
log.Error().Err(err).Msg("Could not save service to database")
|
||||
}
|
||||
|
||||
_, err = Client.Service.Create().
|
||||
_, _ = Client.Service.Create().
|
||||
SetName("localmonero").
|
||||
SetLogoURL("https://kycnot.me/static/img/localmonero.webp").
|
||||
SetDescription("Peer-to-peer Monero trading platform. A marketplace where users can buy and sell Monero to and from each other. You'll be able to buy and sell online with more than 60 currencies.").
|
||||
SetUrls([]string{"https://localmonero.co/"}).
|
||||
SetTosUrls([]string{"https://localmonero.co/faq"}).
|
||||
SetTosUrls([]string{"https://localmonero.co/nojs/faq"}).
|
||||
SetOnionUrls([]string{"http://nehdddktmhvqklsnkjqcbpmb63htee2iznpcbs5tgzctipxykpj6yrid.onion/"}).
|
||||
SetKycLevel(1).
|
||||
SetTags("market,p2p,buy,sell").
|
||||
|
@ -64,13 +61,84 @@ func AddFakeData() {
|
|||
SetLightning(false).
|
||||
SetFiat(true).
|
||||
SetCash(true).
|
||||
SetScore(10).
|
||||
SetType(service.TypeExchange).
|
||||
SetAttributes(strings.Join([]string{AttributeNonCustodialWallet, AttributeOpenSource, AttributeNoPersonalInfoNeeded, AttributeP2P}, ",")).
|
||||
SetTosHighlights(&[]schema.TosHighlight{sampleTosHighlight}).
|
||||
SetTosHighlights(nil).
|
||||
Save(context.Background())
|
||||
|
||||
_, _ = Client.Service.Create().
|
||||
SetName("mullvad").
|
||||
SetLogoURL("https://kycnot.me/static/img/mullvad.webp").
|
||||
SetDescription("VPN service. Strict no-logs, open-source clients.").
|
||||
SetUrls([]string{"https://mullvad.net/"}).
|
||||
SetTosUrls([]string{"https://mullvad.net/en/help/terms-service/"}).
|
||||
SetOnionUrls([]string{"http://o54hon2e2vj6c7m3aqqu6uyece65by3vgoxxhlqlsvkmacw6a7m7kiad.onion/en/"}).
|
||||
SetKycLevel(0).
|
||||
SetTags("vpn,private,secure,safe").
|
||||
SetPending(false).
|
||||
SetListed(true).
|
||||
SetVerified(true).
|
||||
SetXmr(true).
|
||||
SetBtc(true).
|
||||
SetLightning(false).
|
||||
SetFiat(true).
|
||||
SetCash(true).
|
||||
SetType(service.TypeService).
|
||||
SetCategory("VPN").
|
||||
SetScore(10).
|
||||
SetAttributes(strings.Join([]string{AttributeStrictNoKYCPolicy, AttributeStrictNoLogPolicy, AttributeNoRegistrationNeeded, AttributeOpenSource, AttributeMobileAppAvailable, AttributeNoJavaScriptNeeded}, ",")).
|
||||
SetTosHighlights(nil).
|
||||
Save(context.Background())
|
||||
|
||||
_, _ = Client.Service.Create().
|
||||
SetName("fixedfloat").
|
||||
SetLogoURL("https://kycnot.me/static/img/fixedfloat.webp").
|
||||
SetDescription("Instant, fully automatic cryptocurrency exchange with Lightning Network.").
|
||||
SetUrls([]string{"https://fixedfloat.com/"}).
|
||||
SetTosUrls([]string{"https://fixedfloat.com/terms-of-service"}).
|
||||
SetOnionUrls([]string{}).
|
||||
SetKycLevel(2).
|
||||
SetTags("swap,fast,no account").
|
||||
SetListingComments([]string{"This is a sample listing comment."}).
|
||||
SetPending(false).
|
||||
SetListed(true).
|
||||
SetVerified(false).
|
||||
SetXmr(true).
|
||||
SetBtc(true).
|
||||
SetLightning(true).
|
||||
SetFiat(false).
|
||||
SetCash(false).
|
||||
SetType(service.TypeExchange).
|
||||
SetCategory("").
|
||||
SetScore(6).
|
||||
SetAttributes(strings.Join([]string{AttributeRiskPreventionSystem, AttributeKYCIfObligedByLaw, AttributePrivateSourceCode, AttributeRefundRequiresKYC, AttributeNonCustodialWallet, AttributeNoRegistrationNeeded, AttributeAPIAvailable, AttributeJavaScriptNeeded}, ",")).
|
||||
SetTosHighlights(nil).
|
||||
Save(context.Background())
|
||||
|
||||
_, _ = Client.Service.Create().
|
||||
SetName("coinswap").
|
||||
SetLogoURL("https://kycnot.me/static/img/coinswap.webp").
|
||||
SetDescription("Simple and light swap page where you can swap various cryptos.").
|
||||
SetUrls([]string{"https://coinswap.click/"}).
|
||||
SetTosUrls([]string{"https://coinswap.click/faq/"}).
|
||||
SetOnionUrls([]string{}).
|
||||
SetKycLevel(1).
|
||||
SetTags("swap,fast,no account,nojs,light").
|
||||
SetPending(false).
|
||||
SetListed(true).
|
||||
SetVerified(true).
|
||||
SetXmr(true).
|
||||
SetBtc(true).
|
||||
SetLightning(true).
|
||||
SetFiat(false).
|
||||
SetCash(false).
|
||||
SetType(service.TypeExchange).
|
||||
SetCategory("").
|
||||
SetScore(8).
|
||||
SetAttributes(strings.Join([]string{AttributeKYCIfObligedByLaw, AttributePrivateSourceCode, AttributeRefundRequiresKYC, AttributeNonCustodialWallet, AttributeNoRegistrationNeeded, AttributeAPIAvailable, AttributeNoJavaScriptNeeded}, ",")).
|
||||
SetTosHighlights(nil).
|
||||
Save(context.Background())
|
||||
if err != nil {
|
||||
log.Fatal().Msgf("failed creating service: %v", err)
|
||||
}
|
||||
}
|
||||
func InitDb() {
|
||||
var err error
|
||||
|
@ -103,7 +171,8 @@ func InitDb() {
|
|||
log.Fatal().Msgf("failed creating schema resources: %v", err)
|
||||
}
|
||||
|
||||
if os.Getenv("DB_TYPE") == "sqlite" && os.Getenv("DEV_MODE") == "true" {
|
||||
if os.Getenv("DB_TYPE") == "sqlite" && config.Conf.Dev {
|
||||
log.Debug().Msg("Adding fake data to DB")
|
||||
AddFakeData()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue