@amark: I suppose I wasn't very clear in my communication about payment - I agree that GUN shouldn't be used for making payments (like running a coin or something), but I suppose GUN is perfectly capable for managing payments and thus updating an app provider's 'business space'. I'm thinking basic things, like a crawler scraping payments from a payment-provider a posteriori, and then pushing tokens / ... in an encrypted fashion to the user graph, such that they can be used for micro services.
This will sound stupid and I don't like it perse, but it's popular: take the example of unlocking skins in a metaverse-app built on GUN. Payments will be done outside of GUN, but once that information is settled, unlocks can proceed on GUN's graph
Hi all, thanks for great project. I am ex-developer. After quit my job, I started in music group 🙂 but still continue coding. I created youtube radio for our group, website etc. I'm using vue and nuxt stack. Right now I am developing mobile application by using capactitor.js.
We have a problem in our concerts. We want to make presentation during concern but not every place has TV or display screen etc. I want to create a mobile application which viewers can use their phones to see our presentation. But so many viewers will connect to firebase or supabase in the same time has lag. That's why I am looking p2p technologies. Is gun.js can help to connect phones p2p connection between?
Could someone please help me figure out how this line works and why it might not be received by remote peer.
root.on('out', {'@': msg['#'], '#': root.ask(open), ok: {rtc: {offer: offer, id: opt.pid}}});
I am trying to add ability to to add video and audio streams to existing peer connection in lib/webrtc.js and that requires ability to renegotiate SDP more than one time.
After many attempts the way I am currently trying to do this is to run pc creation part only if there is no existing peer connection, and by calling open()
if there is onnegotiationneeded
event fired.
msg['#']
, I called open(ok: {rtc: {id: rtc.id}}})
, but the right solution is open({'#': ''+msg['#'], ok: {rtc: {id: rtc.id}}})
get
a key:val, does gun get the entire node under the hood, or are you really only downloading that value?
I think you misunderstand. I'm not getting an object, I'm getting a key:val of an object.
Heres an example of what I mean:
{
_: {
#: "demo/space",
>: { ... }
},
valueIDontNeed: "fuaigfiydt67f9tq",
valueIWant: "xxxxxxx"
}
if I run await gun.get("demo/space").get("valueIWant")
is gun downloading the whole node, including value I dont need? or is it only getting the value I asked for?
:point_up: Edit: I think you misunderstand. I'm not getting an object, I'm getting a key:val of an object.
Heres an example of what I mean:
{
_: {
#: "demo/space",
>: { ... }
},
importantValue: "xxxxxxx",
irrelevantValue: "fuaigfiydt67f9tq"
}
if I run await gun.get("demo/space").get("importantValue")
is gun downloading the whole node, including the irrelevant value? or is it only getting the value I asked for?
Could someone please help me figure out how this line works and why it might not be received by remote peer.
root.on('out', {'@': msg['#'], '#': root.ask(open), ok: {rtc: {offer: offer, id: opt.pid}}});
I am trying to add ability to to add video and audio streams to existing peer connection in lib/webrtc.js and that requires ability to renegotiate SDP more than one time.
After many attempts the way I am currently trying to do this is to run pc creation part only if there is no existing peer connection, and by calling
open()
if there isonnegotiationneeded
event fired.
@verschmelzen:matrix.org
Thank you for working on this! If you get it sorted out, please submit a PR for lib/webrtc.js
so we can have an example of video + audio! That would be amazing.
Can someone point me to the best working open-source example of gun ACL in 2022?
Do you mean Access Control List? If so, you would use SEA.encrypt()
and SEA.decrypt()
along with SEA.certify()
to create access/read/write policies. https://gun.eco/docs/SEA#certify
probably a simple question.. can some point me to an example of how to use Rad to build create a storage adapter?
All storage adapter examples are here: https://gun.eco/docs/Storage
Good Afternoon, I'm currently trying to set up gun as a p2p backend for my decentralised application. I'm using gun in react and and currently testing my understanding my adding and removing items from a set according to a form input. I retrieve the 'items' set from gun using:
const gunItems = gun.get('items');
Then add a new item to the set by doing:
const newItem = gun.get(keccak256(formData).toString('hex')).put({data: formData})
gunItems.set(newItem);
In this case, I'm creating objects in gun where the key is the hash of the data in the form of hash(data) : {data: formData}.
I'm "deleting" data using:
gunItems.get(keccak256(formData).toString('hex')).put(null);
After adding "a", "b", then deleting "a" and looking at my local storage, I can see that within the items set, hash(a) : null. However, the object hash(a) : {data: "a"} still exists outside of the set. Shouldn't all values associated with hash(a) be null?
root.on('out', {'@': msg['#'], '#': root.ask(open), ok: {rtc: {offer: offer, id: opt.pid}}});
?
Can images/video/files be propagated through the gun network or do i need to use something like ipfs?
IPFS public gateways appear to be.. well, no longer public. I was loading lots of content for free. Anyone else seeing that for their projects?
@champ5898 We've talked about moving console.log in gun over to an error event handler, but it's lower on the priority list than upgrading gun's DHT. You could potentially turn off all console logging:
let cl = console.log
console.log = {}
// Turn back on:
console.log = cl
But please keep the welcome message unless you are paying for professional support
I'm having a very mysterious bug, where I'm trying to pass a IGunUserInstance around from a factory function to a client function, but the object seems to be mutated when it exits my factory function.
If I return user.get.bind(user)
directly, then there is no problem. But if I return user
(const user = gun.user()
), then the object outside the factory function is different and "loses" the .get
method.
Does this talk to anyone?
function userFactory() {
const user = gun.user()
return new Promise(resolve => {
gun.on('auth', () =>{
console.log(user.get); // fine
resolve(user);
});
});
}
userFactory().then(user => {
console.log(user.get); // undefined
})