Hello wonderful person! :) Thanks for using GUN, please ask for help on http://chat.gun.eco if anything takes you longer than 5min to figure out!
radisk.js:28 ERROR: Radisk needs `opt.store` interface with `{get: fn, put: fn (, list: fn)}`!
tmp_js_export.js:362 Error calling method once on: Gun_: {$: Gun, root: {…}, id: 5, back: {…}, on: ƒ, …}[[Prototype]]: Object error: TypeError: dare is not a function
...
...
Gun.on('create', function(root){
...
gun/lib/radisk.js
in your list it looks like.flutter_js
, but I thought how gun run in Flutter without localStorage or indexedDB .. or this would be a future feature?
let's say there is a common node where all users store data,
if a user did something like
let message = await gun.user().get('all').set({ msg: 'hello'})
gun.get('messages').get('first_message').put(message)
later you can do this:
let data = await gun.get('messages').get('fist_message')
let alias = gun.user(data).get('alias')
// retrieve all available users
gun.get('users').map().on(ui.show.users)
I've found a strange behavior. I'm not sure if that's a bug or it works as designed but here is a code
let room = SEA.pair()
let user = SEA.pair()
let cert = await SEA.certify(
'*',
{ '*':'posts', '+': '*' },
room
)
await gunRoom.get('posts') // => undefined
await gunUser.user().auth(user)
await gunUser.get('~' + room.pub).get('posts').get(user.pub).get('messages').put({message: 'hello'}, null, {opt: {cert: cert}})
gunRoom.user().get('posts').get(user.pub).get('messages') // => {message: hello}
gunRoom.user().get('posts').get(user.pub).put(null)
gunRoom.user().get('posts').get(user.pub).get('messages') // => undefined
gunRoom.user().get('posts').get(user.pub).set(null)
gunRoom.user().get('posts').get(user.pub).get('messages') // => {message: hello}
the whole thing is in a difference .put(null) vs .set(null)
we can go a bit further with it
await gunUser.get('~' + room.pub).get('posts').get(user.pub).get('messages').put(null, null, {opt: {cert: cert}})
gunRoom.user().get('posts').get(user.pub).get('messages') // => undefined
await gunUser.get('~' + room.pub).get('posts').get(user.pub).get('messages').set(null, null, {opt: {cert: cert}})
gunRoom.user().get('posts').get(user.pub).get('messages') // => {message: hello, ku33iqysRfusABH: null}
when the owner of the message .set(null) it reverts the nullified by .put(null) document with some extra hash key with a null value
let someArr = ['test', 'tests', 'testing']
for(let i = 0;i < someArr.length;i++){
gun.get(someArr[i])
}
gun.once(data => {console.log(data)})
let someArr = ['test', 'tests', 'testing']
for(let i = 0;i < someArr.length;i++){
gun.get(someArr[i])
}
gun.once(data => {console.log(data)})
vs
gun.get('test').get('tests').get('testing').once(data => {console.log(data)})