hey guys
is it possible to:
1) get KYC status for specific TON wallet via API?
2) get country of the user for said KYC via API?
Jan 6, 2024, 10:35 AM
KYC status with respect to what service?
TON, The Open Network, doesn't have integrated KYC for smart contracts.
TON, The Open Network, doesn't have integrated KYC for smart contracts.
Jan 6, 2024, 12:11 PM
I need to understand if I can fetch the fact if certain user with @wallet has passed KYC with wallet
and Ideally to understand user country based on said KYC (from @wallet)
and Ideally to understand user country based on said KYC (from @wallet)
Jan 6, 2024, 12:22 PM
I think that's unlikely.
Jan 6, 2024, 12:23 PM
how to raise a change request for it? it would be very useful tool
Jan 6, 2024, 12:24 PM
Do you mean ( If its possible to have a contract that can verify other wallet address, to show their status as verified or not verified by a service?)
Jan 6, 2024, 12:24 PM
having a smart contract for this would be nice
but for now I need to understand if I can call Telegram API (centralized) directly to know KYC status for certain wallet
but for now I need to understand if I can call Telegram API (centralized) directly to know KYC status for certain wallet
Jan 6, 2024, 12:25 PM
No you can't
And telegram doesn't do kyc or collect users data for that, so basically you'll need to create your own app to do that.
It may be helpful when there's a service that requires to know if their users are real. Then the users will have to go to your website for kyc and any service that require to know the authenticity of a wallet will hold you as a trusted supplier.
It may be helpful when there's a service that requires to know if their users are real. Then the users will have to go to your website for kyc and any service that require to know the authenticity of a wallet will hold you as a trusted supplier.
Jan 6, 2024, 12:31 PM
it does, though
Jan 6, 2024, 12:32 PM
Isn't that KYC for P2P trading ?
Jan 6, 2024, 12:35 PM
not sure, but this thing could be very useful. so I need to know if I can access this data (not KYC details, just the fact if user passed or not)
if it is not possible to access, I'd love to know how to get developers attention to this, as it could be used in many apps
if it is not possible to access, I'd love to know how to get developers attention to this, as it could be used in many apps
Jan 6, 2024, 12:35 PM
You can't access that data. But you'd be able to see the KYC status of someone that places a buy or sell order in P2P market within the webapp is kycd
Jan 6, 2024, 12:38 PM
if its possible to access the fact that user has passed KYC in webapp, it means there should be some API to show KYC status
thats exactly what I need
thats exactly what I need
Jan 6, 2024, 12:38 PM
I'm not sure I you're following the idea behind kyc (Know Your Customer) not share your customers data. Even if there's an API they'll only share the status of a wallet with a partnered service not make it open for everyone to see.
Jan 6, 2024, 12:43 PM
I am very familiar with KYC and Sumsub KYC they have.
I dont need to know user data (sex, age, name, etc)
I just need to know if a certain wallet has passed KYC or not
if wallet passed KYC it is already a good indicator that user is probably not a bot
and I can use this fact in my app
I dont need to know user data (sex, age, name, etc)
I just need to know if a certain wallet has passed KYC or not
if wallet passed KYC it is already a good indicator that user is probably not a bot
and I can use this fact in my app
Jan 6, 2024, 12:44 PM
Well you can talk to @wallet team for that.
Jan 6, 2024, 12:46 PM
Thanks!
where I can find these guys? :)
where I can find these guys? :)
asked wallet support already but would love to get a real dev there to pitch them this idea
Jan 6, 2024, 12:46 PM
Please note that KYC verification fact will not be available in blockchain. If you choose to use that data, you'll lose decentralization, and I wouldn't do that.
Jan 6, 2024, 12:47 PM
it is possible to implement KYC in blockchain too
in fact, it is quite easy to do
just need to have a smart contract which will store ton addresses which has passed KYC
this smart contract could be populated based on user input, i.e. only store this information if user specifically agreed to pay some TX fees for that
in fact, it is quite easy to do
just need to have a smart contract which will store ton addresses which has passed KYC
this smart contract could be populated based on user input, i.e. only store this information if user specifically agreed to pay some TX fees for that
Jan 6, 2024, 12:48 PM
Unless he's building some centralised services to stay on a decentralized network they required user verification and validity.
Jan 6, 2024, 12:49 PM
indeed, this smart contract need to be deployed and maintained via wallet team
which is centralized entity..
but even in blockcahin you have centralized things like Oracles to fetch data from the real world
it would be just kind of an Oracle for KYC
which is centralized entity..
but even in blockcahin you have centralized things like Oracles to fetch data from the real world
it would be just kind of an Oracle for KYC
Jan 6, 2024, 12:49 PM
This looks like a contract agreement, not what I was thinking ðŸ’
Jan 6, 2024, 12:50 PM
But what stops [centralized entity you choose]'s oracle from allowing their own bots — for instance, to milk airdrops?
Jan 6, 2024, 12:51 PM
Trust and faith is our only hope
Jan 6, 2024, 12:52 PM
its a matter of a trust... same trust as you have for USDT
what if they create USDT out of thin air?
what if they create USDT out of thin air?
Jan 6, 2024, 12:52 PM
That's why I have more trust for TON...
It seems that you want to know the country of user. It's one stop from blocking certain countries. I don't want to help in building such projects.
It seems that you want to know the country of user. It's one stop from blocking certain countries. I don't want to help in building such projects.
Jan 6, 2024, 12:53 PM
It all comes down to ethics and hope they don't abide by the rules.
Jan 6, 2024, 12:54 PM
I want to create advertising app, and it is critical to know user country at least
you usually want to show ads only for certain specific country (as example)
you usually want to show ads only for certain specific country (as example)
Jan 6, 2024, 12:55 PM
That well you don't need KYC for that
Why not just track then with the ip they use when visiting your app?
Jan 6, 2024, 12:57 PM
If user uses TON Connect 2, you will get request for tonconnect-manifest.json from their device, and that (+ IP) should allow you to determine language/country.
That will allow for all wallets (including non-custodial ones) rather than just @wallet users.
Also, you may introduce a server delay in returning manifest if the request is suspicious (same wallet configuration as with many others).
Also, you may introduce a server delay in returning manifest if the request is suspicious (same wallet configuration as with many others).
Jan 6, 2024, 12:58 PM
yeah I dont think wallet will ever give me a country of the KYC, it would be just nice to have
Jan 6, 2024, 12:59 PM
Are you from Facebook ?
Jan 6, 2024, 12:59 PM
no
core thing I need is to know if user passed KYC or not, thats the main thing which I need.
core thing I need is to know if user passed KYC or not, thats the main thing which I need.
Jan 6, 2024, 12:59 PM
You seem so eager to get that data 😂
Jan 6, 2024, 1:00 PM
facebook would not be happy with just KYC fact, they'd need all other details and more
Jan 6, 2024, 1:00 PM
Then your request is reasonably fair I guess 😎
the wallet should handle the confirmation, remember this is not a full implementation.
assuming you are refering to "How to construct a message for a jetton transfer with a comment?" from the cookbook
Jan 6, 2024, 2:59 PM
Hope you help me.
const TonWeb = require("tonweb");
const {mnemonicToKeyPair} = require("tonweb-mnemonic");
async function main() {
const tonweb = new TonWeb(new TonWeb.HttpProvider(
'https://toncenter.com/api/v2/jsonRPC', {
apiKey: 'put your api key'
})
);
const destinationAddress = new TonWeb.Address('put destination wallet address');
const forwardPayload = new TonWeb.boc.Cell();
forwardPayload.bits.writeUint(0, 32); // 0 opcode means we have a comment
forwardPayload.bits.writeString('Hello, TON!');
/*
Tonweb has a built-in class for interacting with jettons, which has
a method for creating a transfer. However, it has disadvantages, so
we manually create the message body. Additionally, this way we have a
better understanding of what is stored and how it functions.
*/
const jettonTransferBody = new TonWeb.boc.Cell();
jettonTransferBody.bits.writeUint(0xf8a7ea5, 32); // opcode for jetton transfer
jettonTransferBody.bits.writeUint(0, 64); // query id
jettonTransferBody.bits.writeCoins(new TonWeb.utils.BN('5')); // jetton amount, amount * 10^9
jettonTransferBody.bits.writeAddress(destinationAddress);
jettonTransferBody.bits.writeAddress(destinationAddress); // response destination
jettonTransferBody.bits.writeBit(false); // no custom payload
jettonTransferBody.bits.writeCoins(TonWeb.utils.toNano('0.02')); // forward amount
jettonTransferBody.bits.writeBit(true); // we store forwardPayload as a reference
jettonTransferBody.refs.push(forwardPayload);
const keyPair = await mnemonicToKeyPair('put your mnemonic'.split(' '));
const jettonWallet = new TonWeb.token.ft.JettonWallet(tonweb.provider, {
address: 'put your jetton wallet address'
});
// available wallet types: simpleR1, simpleR2, simpleR3,
// v2R1, v2R2, v3R1, v3R2, v4R1, v4R2
const wallet = new tonweb.wallet.all['v4R2'](tonweb.provider, {
publicKey: keyPair.publicKey,
wc: 0 // workchain
});
await wallet.methods.transfer({
secretKey: keyPair.secretKey,
toAddress: jettonWallet.address,
amount: tonweb.utils.toNano('0.1'),
seqno: await wallet.methods.seqno().call(),
payload: jettonTransferBody,
sendMode: 3
}).send(); // create transfer and send it
}
main().finally(() => console.log("Exiting..."));
const {mnemonicToKeyPair} = require("tonweb-mnemonic");
async function main() {
const tonweb = new TonWeb(new TonWeb.HttpProvider(
'https://toncenter.com/api/v2/jsonRPC', {
apiKey: 'put your api key'
})
);
const destinationAddress = new TonWeb.Address('put destination wallet address');
const forwardPayload = new TonWeb.boc.Cell();
forwardPayload.bits.writeUint(0, 32); // 0 opcode means we have a comment
forwardPayload.bits.writeString('Hello, TON!');
/*
Tonweb has a built-in class for interacting with jettons, which has
a method for creating a transfer. However, it has disadvantages, so
we manually create the message body. Additionally, this way we have a
better understanding of what is stored and how it functions.
*/
const jettonTransferBody = new TonWeb.boc.Cell();
jettonTransferBody.bits.writeUint(0xf8a7ea5, 32); // opcode for jetton transfer
jettonTransferBody.bits.writeUint(0, 64); // query id
jettonTransferBody.bits.writeCoins(new TonWeb.utils.BN('5')); // jetton amount, amount * 10^9
jettonTransferBody.bits.writeAddress(destinationAddress);
jettonTransferBody.bits.writeAddress(destinationAddress); // response destination
jettonTransferBody.bits.writeBit(false); // no custom payload
jettonTransferBody.bits.writeCoins(TonWeb.utils.toNano('0.02')); // forward amount
jettonTransferBody.bits.writeBit(true); // we store forwardPayload as a reference
jettonTransferBody.refs.push(forwardPayload);
const keyPair = await mnemonicToKeyPair('put your mnemonic'.split(' '));
const jettonWallet = new TonWeb.token.ft.JettonWallet(tonweb.provider, {
address: 'put your jetton wallet address'
});
// available wallet types: simpleR1, simpleR2, simpleR3,
// v2R1, v2R2, v3R1, v3R2, v4R1, v4R2
const wallet = new tonweb.wallet.all['v4R2'](tonweb.provider, {
publicKey: keyPair.publicKey,
wc: 0 // workchain
});
await wallet.methods.transfer({
secretKey: keyPair.secretKey,
toAddress: jettonWallet.address,
amount: tonweb.utils.toNano('0.1'),
seqno: await wallet.methods.seqno().call(),
payload: jettonTransferBody,
sendMode: 3
}).send(); // create transfer and send it
}
main().finally(() => console.log("Exiting..."));
Not work.
Jan 6, 2024, 3:21 PM
Try this approach to check for any error, don't forget to put the required info.
const TonWeb = require("tonweb");
const { mnemonicToKeyPair } = require("tonweb-mnemonic");
async function main() {
try {
console.log("Initializing TonWeb...");
const tonweb = new TonWeb(new TonWeb.HttpProvider(
'https://toncenter.com/api/v2/jsonRPC', {
apiKey: 'put your api key'
})
);
console.log("TonWeb initialized successfully.");
const destinationAddress = new TonWeb.Address('put destination wallet address');
const forwardPayload = new TonWeb.boc.Cell();
forwardPayload.bits.writeUint(0, 32); // 0 opcode means we have a comment
forwardPayload.bits.writeString('Hello, TON!');
const jettonTransferBody = new TonWeb.boc.Cell();
jettonTransferBody.bits.writeUint(0xf8a7ea5, 32); // opcode for jetton transfer
jettonTransferBody.bits.writeUint(0, 64); // query id
jettonTransferBody.bits.writeCoins(new TonWeb.utils.BN('5')); // jetton amount, amount * 10^9
jettonTransferBody.bits.writeAddress(destinationAddress);
jettonTransferBody.bits.writeAddress(destinationAddress); // response destination
jettonTransferBody.bits.writeBit(false); // no custom payload
jettonTransferBody.bits.writeCoins(TonWeb.utils.toNano('0.02')); // forward amount
jettonTransferBody.bits.writeBit(true); // we store forwardPayload as a reference
jettonTransferBody.refs.push(forwardPayload);
const keyPair = await mnemonicToKeyPair('put your mnemonic'.split(' '));
const jettonWallet = new TonWeb.token.ft.JettonWallet(tonweb.provider, {
address: 'put your jetton wallet address'
});
console.log("Creating transfer...");
const wallet = new tonweb.wallet.all['v4R2'](tonweb.provider, {
publicKey: keyPair.publicKey,
wc: 0 // workchain
});
const seqno = await wallet.methods.seqno().call();
console.log("Transfer details:");
console.log(`- Destination Address: ${destinationAddress.toString()}`);
console.log(`- Transfer Amount: ${tonweb.utils.fromNano('0.1')} TON`);
console.log(`- Sequence Number: ${seqno}`);
console.log("Sending transfer...");
await wallet.methods.transfer({
secretKey: keyPair.secretKey,
toAddress: jettonWallet.address,
amount: tonweb.utils.toNano('0.1'),
seqno: seqno,
payload: jettonTransferBody,
sendMode: 3
}).send(); // create transfer and send it
console.log("Transfer sent successfully!");
} catch (error) {
console.error("Error:", error);
} finally {
console.log("Exiting...");
}
}
main();
const TonWeb = require("tonweb");
const { mnemonicToKeyPair } = require("tonweb-mnemonic");
async function main() {
try {
console.log("Initializing TonWeb...");
const tonweb = new TonWeb(new TonWeb.HttpProvider(
'https://toncenter.com/api/v2/jsonRPC', {
apiKey: 'put your api key'
})
);
console.log("TonWeb initialized successfully.");
const destinationAddress = new TonWeb.Address('put destination wallet address');
const forwardPayload = new TonWeb.boc.Cell();
forwardPayload.bits.writeUint(0, 32); // 0 opcode means we have a comment
forwardPayload.bits.writeString('Hello, TON!');
const jettonTransferBody = new TonWeb.boc.Cell();
jettonTransferBody.bits.writeUint(0xf8a7ea5, 32); // opcode for jetton transfer
jettonTransferBody.bits.writeUint(0, 64); // query id
jettonTransferBody.bits.writeCoins(new TonWeb.utils.BN('5')); // jetton amount, amount * 10^9
jettonTransferBody.bits.writeAddress(destinationAddress);
jettonTransferBody.bits.writeAddress(destinationAddress); // response destination
jettonTransferBody.bits.writeBit(false); // no custom payload
jettonTransferBody.bits.writeCoins(TonWeb.utils.toNano('0.02')); // forward amount
jettonTransferBody.bits.writeBit(true); // we store forwardPayload as a reference
jettonTransferBody.refs.push(forwardPayload);
const keyPair = await mnemonicToKeyPair('put your mnemonic'.split(' '));
const jettonWallet = new TonWeb.token.ft.JettonWallet(tonweb.provider, {
address: 'put your jetton wallet address'
});
console.log("Creating transfer...");
const wallet = new tonweb.wallet.all['v4R2'](tonweb.provider, {
publicKey: keyPair.publicKey,
wc: 0 // workchain
});
const seqno = await wallet.methods.seqno().call();
console.log("Transfer details:");
console.log(`- Destination Address: ${destinationAddress.toString()}`);
console.log(`- Transfer Amount: ${tonweb.utils.fromNano('0.1')} TON`);
console.log(`- Sequence Number: ${seqno}`);
console.log("Sending transfer...");
await wallet.methods.transfer({
secretKey: keyPair.secretKey,
toAddress: jettonWallet.address,
amount: tonweb.utils.toNano('0.1'),
seqno: seqno,
payload: jettonTransferBody,
sendMode: 3
}).send(); // create transfer and send it
console.log("Transfer sent successfully!");
} catch (error) {
console.error("Error:", error);
} finally {
console.log("Exiting...");
}
}
main();
Jan 6, 2024, 3:44 PM
It worked.
Thank you.
Jan 6, 2024, 3:48 PM
Happy coding 🎉
Jan 6, 2024, 3:51 PM