wallet_defined_by_addresses.js
function addNewSharedAddress(address, arrDefinition, assocSignersByPath, bForwarded, onDone){
//	network.addWatchedAddress(address);
	db.query(
		"INSERT "+db.getIgnore()+" INTO shared_addresses (shared_address, definition) VALUES (?,?)", 
		[address, JSON.stringify(arrDefinition)], 
		function(){
			var arrQueries = [];
			for (var signing_path in assocSignersByPath){
				var signerInfo = assocSignersByPath[signing_path];
				db.addQuery(arrQueries, 
					"INSERT "+db.getIgnore()+" INTO shared_address_signing_paths \n\
					(shared_address, address, signing_path, member_signing_path, device_address) VALUES (?,?,?,?,?)", 
					[address, signerInfo.address, signing_path, signerInfo.member_signing_path, signerInfo.device_address]);
			}
			async.series(arrQueries, function(){
				console.log('added new shared address '+address);
				eventBus.emit("new_address-"+address);
				if (conf.bLight)
					network.addLightWatchedAddress(address);
				if (!bForwarded)
					forwardNewSharedAddressToCosignersOfMyMemberAddresses(address, arrDefinition, assocSignersByPath);
				if (onDone)
					onDone();
			});
		}
	);
}
function addNewSharedAddress(address, arrDefinition, assocSignersByPath, bForwarded, onDone){
//	network.addWatchedAddress(address);
	db.query(
		"INSERT "+db.getIgnore()+" INTO shared_addresses (shared_address, definition) VALUES (?,?)", 
		[address, JSON.stringify(arrDefinition)], 
		function(){
			var arrQueries = [];
			for (var signing_path in assocSignersByPath){
				var signerInfo = assocSignersByPath[signing_path];
				db.addQuery(arrQueries, 
					"INSERT "+db.getIgnore()+" INTO shared_address_signing_paths \n\
					(shared_address, address, signing_path, member_signing_path, device_address) VALUES (?,?,?,?,?)", 
					[address, signerInfo.address, signing_path, signerInfo.member_signing_path, signerInfo.device_address]);
			}
			async.series(arrQueries, function(){
				console.log('added new shared address '+address);
				eventBus.emit("new_address-"+address);
				if (conf.bLight)
					network.addLightWatchedAddress(address);
				if (!bForwarded)
					forwardNewSharedAddressToCosignersOfMyMemberAddresses(address, arrDefinition, assocSignersByPath);
				if (onDone)
					onDone();
			});
		}
	);
}
function addNewSharedAddress ( address , arrDefinition , assocSignersByPath , bForwarded , onDone ) { //	network.addWatchedAddress(address); db . query ( "INSERT " + db . getIgnore ( ) + " INTO shared_addresses (shared_address, definition) VALUES (?,?)" , [ address , JSON . stringify ( arrDefinition ) ] , function ( ) { var arrQueries = [ ] ; for ( var signing_path in assocSignersByPath ) { var signerInfo = assocSignersByPath [ signing_path ] ; db . addQuery ( arrQueries , "INSERT " + db . getIgnore ( ) + " INTO shared_address_signing_paths \n\
					(shared_address, address, signing_path, member_signing_path, device_address) VALUES (?,?,?,?,?)" , [ address , signerInfo . address , signing_path , signerInfo . member_signing_path , signerInfo . device_address ] ) ; } async . series ( arrQueries , function ( ) { console . log ( 'added new shared address ' + address ) ; eventBus . emit ( "new_address-" + address ) ; if ( conf . bLight ) network . addLightWatchedAddress ( address ) ; if ( ! bForwarded ) forwardNewSharedAddressToCosignersOfMyMemberAddresses ( address , arrDefinition , assocSignersByPath ) ; if ( onDone ) onDone ( ) ; } ) ; } ) ; }
called from network after the initiator collects approvals from all members of the address and then sends the completed address to all members member_signing_path is now deprecated and unused shared_address_signing_paths.signing_path is now path to member-address, not full path to a signing key
called from network after the initiator collects approvals from all members of the address and then sends the completed address to all members member_signing_path is now deprecated and unused shared_address_signing_paths . signing_path is now path to member - address not full path to a signing key