Gun = require('gun');
g = new Gun();
p = Gun.SEA.pair().then(p => {
user = g.user();
user.auth(p);
user.get('newkey').get('newkey').put({});
});
Output:
Hello wonderful person! :) Thanks for using GUN, feel free to ask for help on https://gitter.im/amark/gun and ask StackOverflow questions tagged with 'gun'!
TypeError: Cannot read property 'byteLength' of undefined
at Function.from (/Users/martti/workspace-old/identifi-lib/node_modules/gun/sea.js:121:34)
at Object.SEA.opt.fall_verify (/Users/martti/workspace-old/identifi-lib/node_modules/gun/sea.js:470:27)
at <anonymous>
NO! Mismatched owner on 'newkey'. { 'jqqd9v94jUWKkqrwWhvk~CKCKEuLWon1c_gshn59hBp-grIGxM9NwzWaAXij_Q3M.lkmHiMDqpQbBTYToI6hNbwhoH6wOKw4qZGhW8DqbFuY.':
{ _:
{ '#': 'jqqd9v94jUWKkqrwWhvk~CKCKEuLWon1c_gshn59hBp-grIGxM9NwzWaAXij_Q3M.lkmHiMDqpQbBTYToI6hNbwhoH6wOKw4qZGhW8DqbFuY.',
'>': [Object] },
newkey:
{ '#': 'jqqd9v90l6Vl9Z2nFRct~CKCKEuLWon1c_gshn59hBp-grIGxM9NwzWaAXij_Q3M.lkmHiMDqpQbBTYToI6hNbwhoH6wOKw4qZGhW8DqbFuY.' } } }
.put({}) causes the error, while .put({a:1}) doesn't.
Code:
Output:
.put({}) causes the error, while .put({a:1}) doesn't.
GUN version 0.9.999997